!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Elementary=t():e.Elementary=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){var n={development:!0,containing_element:"#elementary_container",use_hash:!0,hash_prefix:"#",auto_link_nav:!0,use_auth:!1,use_editor:!1,root_path:"undefined"!=typeof window?window.location.protocol+"//"+window.location.host:null,bucket:null,domain:"undefined"!=typeof window?window.location.host:null,url:"undefined"!=typeof window?window.location.href:null,resolved_domain:"undefined"!=typeof window?window.location.href:null,google:{client_id:"11111111111-xxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"},aws:{identity_pool_id:"us-east-1:xx111111111-1111-1111-1111-111111111111"},iframely_key:"xxx11111111111"};"undefined"!=typeof window&&(window.config=n),e.exports=n},function(e,t,n){var r={_this:this,ltrim:function(e,t){t=t?(t+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^:])/g,"$1"):" \\s ";var n=new RegExp("^["+t+"]+","g");return(e+"").replace(n,"")},rtrim:function(e,t){t=t?(t+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^:])/g,"\\$1"):" \\s ";var n=new RegExp("["+t+"]+$","g");return(e+"").replace(n,"")},randid:function(){return"ID"+Math.round(1e5*Math.random())},getArgs:function(e){return e.toString().match(/function\s.*?\(([^)]*)\)/)[1].split(",").map(function(e){return e.replace(/\/\*.*\*\//,"").trim()}).filter(function(e){return e})},filter_int:function(e){return"string"!=typeof e?e:isNaN(parseInt(e))?e:parseInt(e)},str_contains:function(e,t){return-1!==e.indexOf(t)},str_slug:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},in_array:function(e,t){return-1!==t.indexOf(e)},array_where:function(e,t){var n=null;return e.forEach(function(e){t(e)&&(n=e)}),n},str_rand:function(e){e=e||5;for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r= 2.0.0-beta.1",7:">= 4.0.0"};var l="[object Object]";r.prototype={constructor:r,logger:c.default,log:c.default.log,registerHelper:function(e,t){if(o.toString.call(e)===l){if(t)throw new a.default("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(o.toString.call(e)===l)o.extend(this.partials,e);else{if(void 0===t)throw new a.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(o.toString.call(e)===l){if(t)throw new a.default("Arg not supported with multiple decorators");o.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var f=c.default.log;t.log=f,t.createFrame=o.createFrame,t.logger=c.default},function(e,t){"use strict";function n(e){return i[e]}function r(e){for(var t=1;tn;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}return a.test(e)?e.replace(o,n):e},t.isEmpty=function(e){return!e&&0!==e||!(!c(e)||0!==e.length)},t.createFrame=function(e){var t=r({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var i={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},o=/[&<>"'`=]/g,a=/[&<>"'`=]/,s=Object.prototype.toString;t.toString=s;var u=function(e){return"function"==typeof e};u(/x/)&&(t.isFunction=u=function(e){return"function"==typeof e&&"[object Function]"===s.call(e)}),t.isFunction=u;var c=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===s.call(e)};t.isArray=c},function(e,t){"use strict";function n(e,t){var i=t&&t.loc,o=void 0,a=void 0;i&&(o=i.start.line,a=i.start.column,e+=" - "+o+":"+a);for(var s=Error.prototype.constructor.call(this,e),u=0;u0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):i(this);if(n.data&&n.ids){var a=r.createFrame(n.data);a.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(t,n)})},e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;t.__esModule=!0;var i=n(5),o=r(n(6));t.default=function(e){e.registerHelper("each",function(e,t){function n(t,n,o){c&&(c.key=t,c.index=n,c.first=0===n,c.last=!!o,l&&(c.contextPath=l+t)),u+=r(e[t],{data:c,blockParams:i.blockParams([e[t],t],[l+t,null])})}if(!t)throw new o.default("Must pass iterator to #each");var r=t.fn,a=t.inverse,s=0,u="",c=void 0,l=void 0;if(t.data&&t.ids&&(l=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(c=i.createFrame(t.data)),e&&"object"==typeof e)if(i.isArray(e))for(var f=e.length;f>s;s++)s in e&&n(s,s,s===e.length-1);else{var h=void 0;for(var p in e)e.hasOwnProperty(p)&&(void 0!==h&&n(h,s-1),h=p,s++);void 0!==h&&n(h,s-1,!0)}return 0===s&&(u=a(this)),u})},e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default;t.__esModule=!0;var i=r(n(6));t.default=function(e){e.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=n(5);t.default=function(e){e.registerHelper("if",function(e,t){return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r=0?t:parseInt(e,10)}return e},log:function(e){if(e=i.lookupLevel(e),"undefined"!=typeof console&&i.lookupLevel(i.level)<=e){var t=i.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];console[t].apply(console,r)}}};t.default=i,e.exports=t.default},function(e,t){"use strict";function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s){function u(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=s;return s&&t!==s[0]&&(o=[t].concat(s)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),o)}return u=o(n,u,e,s,r,a),u.program=t,u.depth=s?s.length:0,u.blockParams=i||0,u}function i(){return""}function o(e,t,n,r,i,o){if(e.decorator){var a={};t=e.decorator(t,a,n,r&&r[0],i,o,r),u.extend(t,a)}return t}var a=n(3).default,s=n(1).default;t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,n=l.COMPILER_REVISION;if(t!==n){if(n>t){var r=l.REVISION_CHANGES[n],i=l.REVISION_CHANGES[t];throw new c.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}throw new c.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}},t.template=function(e,t){function n(t){function r(t){return""+e.main(i,t,i.helpers,i.partials,s,c,u)}var a=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a.data;n._setup(a),!a.partial&&e.useData&&(s=function(e,t){return t&&"root"in t||(t=t?l.createFrame(t):{},t.root=e),t}(t,s));var u=void 0,c=e.useBlockParams?[]:void 0;return e.useDepths&&(u=a.depths?t!==a.depths[0]?[t].concat(a.depths):a.depths:[t]),(r=o(e.main,r,i,a.depths||[],s,c))(t,a)}if(!t)throw new c.default("No environment passed to template");if(!e||!e.main)throw new c.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var i={strict:function(e,t){if(!(t in e))throw new c.default('"'+t+'" not defined in '+e);return e[t]},lookup:function(e,t){for(var n=e.length,r=0;n>r;r++)if(e[r]&&null!=e[r][t])return e[r][t]},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:u.escapeExpression,invokePartial:function(n,r,i){i.hash&&(r=u.extend({},r,i.hash),i.ids&&(i.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,i);var o=t.VM.invokePartial.call(this,n,r,i);if(null==o&&t.compile&&(i.partials[i.name]=t.compile(n,e.compilerOptions,t),o=i.partials[i.name](r,i)),null!=o){if(i.indent){for(var a=o.split("\n"),s=0,l=a.length;l>s&&(a[s]||s+1!==l);s++)a[s]=i.indent+a[s];o=a.join("\n")}return o}throw new c.default("The partial "+i.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,i,o){var a=this.programs[e],s=this.fn(e);return t||o||i||n?a=r(this,e,s,t,n,i,o):a||(a=this.programs[e]=r(this,e,s)),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=u.extend({},t,e)),n},noop:t.VM.noop,compilerInfo:e.compiler};return n.isTop=!0,n._setup=function(n){n.partial?(i.helpers=n.helpers,i.partials=n.partials,i.decorators=n.decorators):(i.helpers=i.merge(n.helpers,t.helpers),e.usePartial&&(i.partials=i.merge(n.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=i.merge(n.decorators,t.decorators)))},n._child=function(t,n,o,a){if(e.useBlockParams&&!o)throw new c.default("must pass block params");if(e.useDepths&&!a)throw new c.default("must pass parent depths");return r(i,t,e[t],n,0,o,a)},n},t.wrapProgram=r,t.resolvePartial=function(e,t,n){return e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],e},t.invokePartial=function(e,t,n){n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var r=void 0;if(n.fn&&n.fn!==i&&(n.data=l.createFrame(n.data),(r=n.data["partial-block"]=n.fn).partials&&(n.partials=u.extend({},n.partials,r.partials))),void 0===e&&r&&(e=r),void 0===e)throw new c.default("The partial "+n.name+" could not be found");return e instanceof Function?e(t,n):void 0},t.noop=i;var u=a(n(5)),c=s(n(6)),l=n(4)},function(e,t){(function(n){"use strict";t.__esModule=!0,t.default=function(e){var t=void 0!==n?n:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}},e.exports=t.default}).call(t,function(){return this}())},function(e,t){"use strict";t.__esModule=!0;var n={helpers:{helperExpression:function(e){return"SubExpression"===e.type||("MustacheStatement"===e.type||"BlockStatement"===e.type)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return 1===e.parts.length&&!n.helpers.scopedId(e)&&!e.depth}}};t.default=n,e.exports=t.default},function(e,t,n){"use strict";var r=n(1).default,i=n(3).default;t.__esModule=!0,t.parse=function(e,t){return"Program"===e.type?e:(o.default.yy=c,c.locInfo=function(e){return new c.SourceLocation(t&&t.srcName,e)},new a.default(t).accept(o.default.parse(e)))};var o=r(n(23)),a=r(n(24)),s=i(n(26)),u=n(5);t.parser=o.default;var c={};u.extend(c,s)},function(e,t){"use strict";var n=function(){function e(){this.yy={}}var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,r,i,o,a){var s=o.length-1;switch(i){case 1:return o[s-1];case 2:this.$=r.prepareProgram(o[s]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=o[s];break;case 9:this.$={type:"CommentStatement",value:r.stripComment(o[s]),strip:r.stripFlags(o[s],o[s]),loc:r.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[s],value:o[s],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(o[s-2],o[s-1],o[s],this._$);break;case 12:this.$={path:o[s-3],params:o[s-2],hash:o[s-1]};break;case 13:this.$=r.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!1,this._$);break;case 14:this.$=r.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!0,this._$);break;case 15:this.$={open:o[s-5],path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:r.stripFlags(o[s-5],o[s])};break;case 16:case 17:this.$={path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:r.stripFlags(o[s-5],o[s])};break;case 18:this.$={strip:r.stripFlags(o[s-1],o[s-1]),program:o[s]};break;case 19:var u=r.prepareBlock(o[s-2],o[s-1],o[s],o[s],!1,this._$),c=r.prepareProgram([u],o[s-1].loc);c.chained=!0,this.$={strip:o[s-2].strip,program:c,chain:!0};break;case 20:this.$=o[s];break;case 21:this.$={path:o[s-1],strip:r.stripFlags(o[s-2],o[s])};break;case 22:case 23:this.$=r.prepareMustache(o[s-3],o[s-2],o[s-1],o[s-4],r.stripFlags(o[s-4],o[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[s-3],params:o[s-2],hash:o[s-1],indent:"",strip:r.stripFlags(o[s-4],o[s]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(o[s-2],o[s-1],o[s],this._$);break;case 26:this.$={path:o[s-3],params:o[s-2],hash:o[s-1],strip:r.stripFlags(o[s-4],o[s])};break;case 27:case 28:this.$=o[s];break;case 29:this.$={type:"SubExpression",path:o[s-3],params:o[s-2],hash:o[s-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[s],loc:r.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:r.id(o[s-2]),value:o[s],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(o[s-1]);break;case 33:case 34:this.$=o[s];break;case 35:this.$={type:"StringLiteral",value:o[s],original:o[s],loc:r.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[s]),original:Number(o[s]),loc:r.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===o[s],original:"true"===o[s],loc:r.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:r.locInfo(this._$)};break;case 40:case 41:this.$=o[s];break;case 42:this.$=r.preparePath(!0,o[s],this._$);break;case 43:this.$=r.preparePath(!1,o[s],this._$);break;case 44:o[s-2].push({part:r.id(o[s]),original:o[s],separator:o[s-1]}),this.$=o[s-2];break;case 45:this.$=[{part:r.id(o[s]),original:o[s]}];break;case 46:this.$=[];break;case 47:o[s-1].push(o[s]);break;case 48:this.$=[o[s]];break;case 49:o[s-1].push(o[s]);break;case 50:this.$=[];break;case 51:o[s-1].push(o[s]);break;case 58:this.$=[];break;case 59:o[s-1].push(o[s]);break;case 64:this.$=[];break;case 65:o[s-1].push(o[s]);break;case 70:this.$=[];break;case 71:o[s-1].push(o[s]);break;case 78:this.$=[];break;case 79:o[s-1].push(o[s]);break;case 82:this.$=[];break;case 83:o[s-1].push(o[s]);break;case 86:this.$=[];break;case 87:o[s-1].push(o[s]);break;case 90:this.$=[];break;case 91:o[s-1].push(o[s]);break;case 94:this.$=[];break;case 95:o[s-1].push(o[s]);break;case 98:this.$=[o[s]];break;case 99:o[s-1].push(o[s]);break;case 100:this.$=[o[s]];break;case 101:o[s-1].push(o[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(){var e;return"number"!=typeof(e=n.lexer.lex()||1)&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],o=[],a=this.table,s="",u=0,c=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var f=this.lexer.yylloc;o.push(f);var h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,d,v,g,y,m,b,_,w,x={};;){if(v=r[r.length-1],this.defaultActions[v]?g=this.defaultActions[v]:((null===p||void 0===p)&&(p=t()),g=a[v]&&a[v][p]),void 0===g||!g.length||!g[0]){var k="";if(!l){w=[];for(m in a[v])this.terminals_[m]&&m>2&&w.push("'"+this.terminals_[m]+"'");k=this.lexer.showPosition?"Parse error on line "+(u+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:f,expected:w})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+p);switch(g[0]){case 1:r.push(p),i.push(this.lexer.yytext),o.push(this.lexer.yylloc),r.push(g[1]),p=null,d?(p=d,d=null):(c=this.lexer.yyleng,s=this.lexer.yytext,u=this.lexer.yylineno,f=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[g[1]][1],x.$=i[i.length-b],x._$={first_line:o[o.length-(b||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(b||1)].first_column,last_column:o[o.length-1].last_column},h&&(x._$.range=[o[o.length-(b||1)].range[0],o[o.length-1].range[1]]),void 0!==(y=this.performAction.call(x,s,c,u,this.yy,g[1],i,o)))return y;b&&(r=r.slice(0,-1*b*2),i=i.slice(0,-1*b),o=o.slice(0,-1*b)),r.push(this.productions_[g[1]][0]),i.push(x.$),o.push(x._$),_=a[r[r.length-2]][r[r.length-1]],r.push(_);break;case 3:return!0}}return!0}},n=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;return e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),a=0;at[0].length)||(t=n,r=a,this.options.flex));a++);return t?((i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substr(e,t.yyleng-n)}switch(n){case 0:if("\\\\"===t.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===t.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(t.yytext=t.yytext.substr(5,t.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e}();return t.lexer=n,e.prototype=t,t.Parser=e,new e}();t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function r(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=e}function i(e,t,n){void 0===t&&(t=e.length);var r=e[t-1],i=e[t-2];return r?"ContentStatement"===r.type?(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:n}function o(e,t,n){void 0===t&&(t=-1);var r=e[t+1],i=e[t+2];return r?"ContentStatement"===r.type?(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:n}function a(e,t,n){var r=e[null==t?0:t+1];if(r&&"ContentStatement"===r.type&&(n||!r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function s(e,t,n){var r=e[null==t?e.length-1:t-1];if(r&&"ContentStatement"===r.type&&(n||!r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==i,r.leftStripped}}var u=n(1).default;t.__esModule=!0;var c=u(n(25));(r.prototype=new c.default).Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,u=0,c=r.length;c>u;u++){var l=r[u],f=this.accept(l);if(f){var h=i(r,u,n),p=o(r,u,n),d=f.openStandalone&&h,v=f.closeStandalone&&p,g=f.inlineStandalone&&h&&p;f.close&&a(r,u,!0),f.open&&s(r,u,!0),t&&g&&(a(r,u),s(r,u)&&"PartialStatement"===l.type&&(l.indent=/([ \t]+$)/.exec(r[u-1].original)[1])),t&&d&&(a((l.program||l.inverse).body),s(r,u)),t&&v&&(a(r,u),s((l.inverse||l.program).body))}}return e},r.prototype.BlockStatement=r.prototype.DecoratorBlock=r.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,u=n;if(n&&n.chained)for(r=n.body[0].program;u.chained;)u=u.body[u.body.length-1].program;var c={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:o(t.body),closeStandalone:i((r||t).body)};if(e.openStrip.close&&a(t.body,null,!0),n){var l=e.inverseStrip;l.open&&s(t.body,null,!0),l.close&&a(r.body,null,!0),e.closeStrip.open&&s(u.body,null,!0),!this.options.ignoreStandalone&&i(t.body)&&o(r.body)&&(s(t.body),a(r.body))}else e.closeStrip.open&&s(t.body,null,!0);return c},r.prototype.Decorator=r.prototype.MustacheStatement=function(e){return e.strip},r.prototype.PartialStatement=r.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(){this.parents=[]}function i(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function o(e){i.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function a(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}var s=n(1).default;t.__esModule=!0;var u=s(n(6));r.prototype={constructor:r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!r.prototype[n.type])throw new u.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new u.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;n>t;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new u.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);return this.current=this.parents.shift(),!this.mutating||t?t:!1!==t?e:void 0}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:i,Decorator:i,BlockStatement:o,DecoratorBlock:o,PartialStatement:a,PartialBlockStatement:function(e){a.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}},t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var n={loc:e.path.loc};throw new o.default(e.path.original+" doesn't match "+t,n)}}var i=n(1).default;t.__esModule=!0,t.SourceLocation=function(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}},t.id=function(e){return/^\[.*\]$/.test(e)?e.substr(1,e.length-2):e},t.stripFlags=function(e,t){return{open:"~"===e.charAt(2),close:"~"===t.charAt(t.length-3)}},t.stripComment=function(e){return e.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")},t.preparePath=function(e,t,n){n=this.locInfo(n);for(var r=e?"@":"",i=[],a=0,s=0,u=t.length;u>s;s++){var c=t[s].part,l=t[s].original!==c;if(r+=(t[s].separator||"")+c,l||".."!==c&&"."!==c&&"this"!==c)i.push(c);else{if(i.length>0)throw new o.default("Invalid path: "+r,{loc:n});".."===c&&a++}}return{type:"PathExpression",data:e,depth:a,parts:i,original:r,loc:n}},t.prepareMustache=function(e,t,n,r,i,o){var a=r.charAt(3)||r.charAt(2),s="{"!==a&&"&"!==a;return{type:/\*/.test(r)?"Decorator":"MustacheStatement",path:e,params:t,hash:n,escaped:s,strip:i,loc:this.locInfo(o)}},t.prepareRawBlock=function(e,t,n,i){r(e,n);var o={type:"Program",body:t,strip:{},loc:i=this.locInfo(i)};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}},t.prepareBlock=function(e,t,n,i,a,s){i&&i.path&&r(e,i);var u=/\*/.test(e.open);t.blockParams=e.blockParams;var c=void 0,l=void 0;if(n){if(u)throw new o.default("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=i.strip),l=n.strip,c=n.program}return a&&(a=c,c=t,t=a),{type:u?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:c,openStrip:e.strip,inverseStrip:l,closeStrip:i&&i.strip,loc:this.locInfo(s)}},t.prepareProgram=function(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:e,strip:{},loc:t}},t.preparePartialBlock=function(e,t,n,i){return r(e,n),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(i)}};var o=i(n(6))},function(e,t,n){"use strict";function r(){}function i(e,t){if(e===t)return!0;if(u.isArray(e)&&u.isArray(t)&&e.length===t.length){for(var n=0;no;o++){var n=this.opcodes[o],r=e.opcodes[o];if(n.opcode!==r.opcode||!i(n.args,r.args))return!1}t=this.children.length;for(var o=0;t>o;o++)if(!this.children[o].equals(e.children[o]))return!1;return!0},guid:0,compile:function(e,t){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[];var n=t.knownHelpers;if(t.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},n)for(var r in n)r in n&&(t.knownHelpers[r]=n[r]);return this.accept(e)},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new s.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;n>r;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){o(e);var t=e.program,n=e.inverse;t=t&&this.compileProgram(t),n=n&&this.compileProgram(n);var r=this.classifySexpr(e);"helper"===r?this.helperSexpr(e,t,n):"simple"===r?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new s.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=e.name.original,i="SubExpression"===e.name.type;i&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",i,r,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){o(e);var t=this.classifySexpr(e);"simple"===t?this.simpleSexpr(e):"helper"===t?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],o=null!=t||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",i,o)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),i=e.path,o=i.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",r.length,o);else{if(this.options.knownHelpersOnly)throw new s.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",r.length,i.original,c.default.helpers.simpleId(i))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=c.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode("pushHash");r>n;n++)this.pushParam(t[n].value);for(;n--;)this.opcode("assignToHash",t[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:l.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=c.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&c.default.helpers.helperExpression(e),i=!n&&(r||t);if(i&&!r){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?r=!0:a.knownHelpersOnly&&(i=!1)}return r?"helper":i?"ambiguous":"simple"},pushParams:function(e){for(var t=0,n=e.length;n>t;t++)this.pushParam(e[t])},pushParam:function(e){var t=null!=e.value?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),"SubExpression"===e.type&&this.accept(e);else{if(this.trackIds){var n=void 0;if(!e.parts||c.default.helpers.scopedId(e)||e.depth||(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,r)}else(t=e.original||t).replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;n>t;t++){var r=this.options.blockParams[t],i=r&&u.indexOf(r,e);if(r&&i>=0)return[t,i]}}}},function(e,t,n){"use strict";function r(e){this.value=e}function i(){}var o=n(1).default;t.__esModule=!0;var a=n(4),s=o(n(6)),u=n(5),c=o(n(29));i.prototype={nameLookup:function(e,t){return i.isValidJavaScriptVariableName(t)?[e,".",t]:[e,"[",JSON.stringify(t),"]"]},depthedLookup:function(e){return[this.aliasable("container.lookup"),'(depths, "',e,'")']},compilerInfo:function(){var e=a.COMPILER_REVISION;return[e,a.REVISION_CHANGES[e]]},appendToBuffer:function(e,t,n){return u.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var i=e.opcodes,o=void 0,a=void 0,u=void 0,c=void 0;for(u=0,c=i.length;c>u;u++)o=i[u],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new s.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),r?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var l=this.createFunctionContext(r);if(this.isChild)return l;var f={compiler:this.compilerInfo(),main:l};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var h=this.context,p=h.programs,d=h.decorators;for(u=0,c=p.length;c>u;u++)p[u]&&(f[u]=p[u],d[u]&&(f[u+"_d"]=d[u],f.useDecorators=!0));return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),r?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),t.srcName?(f=f.toStringWithSourceMap({file:t.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(e){var t="",n=this.stackVars.concat(this.registers.list);n.length>0&&(t+=", "+n.join(", "));var r=0;for(var i in this.aliases){var o=this.aliases[i];this.aliases.hasOwnProperty(i)&&o.children&&o.referenceCount>1&&(t+=", alias"+ ++r+"="+i,o.children[0]="alias"+r)}var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(t);return e?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",s,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,o=void 0,a=void 0;return this.source.each(function(e){e.appendToBuffer?(o?e.prepend(" + "):o=e,a=e):(o&&(i?o.prepend("buffer += "):r=!0,a.add(";"),o=a=void 0),i=!0,t||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(r?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(r?"":";\n")),this.source.merge()},blockValue:function(e){var t=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[" != null ? ",e,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(e[i++])),this.resolvePath("context",e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,r,i){var o=this;if(this.options.strict||this.options.assumeObjects)this.push(function(e,t,n,r){var i=t.popStack(),o=0,a=n.length;for(e&&a--;a>o;o++)i=t.nameLookup(i,n[o],r);return e?[t.aliasable("container.strict"),"(",i,", ",t.quotedString(n[o]),")"]:i}(this.options.strict&&i,this,t,e));else for(var a=t.length;a>n;n++)this.replaceStack(function(i){var a=o.nameLookup(i,t[n],e);return r?[" && ",a]:[" != null ? ",a," : ",i]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),"SubExpression"!==t&&("string"==typeof e?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){null!=e?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var n=this.nameLookup("decorators",t,"decorator"),r=this.setupHelperArgs(t,e);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",r])," || fn;"])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),o=n?[i.name," || "]:"",a=["("].concat(o,r);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",i.callParams))},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",e,"helper")," || ",n,")"];this.options.strict||(i[0]="(helper = ",i.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",i,r.paramsInit?["),(",r.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",r.callParams)," : helper))"])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",e?r.unshift(t):r.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall("container.invokePartial","",r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[e]=n),r&&(o.types[e]=r),i&&(o.ids[e]=i),o.values[e]=t},pushId:function(e,t,n){"BlockParam"===e?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===e?this.pushString(t):"SubExpression"===e?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,o=0,a=n.length;a>o;o++){r=n[o],i=new this.compiler;var s=this.matchExistingProgram(r);null==s?(this.context.programs.push(""),s=this.context.programs.length,r.index=s,r.name="program"+s,this.context.programs[s]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[s]=i.decorators,this.context.environments[s]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams):(r.index=s,r.name="program"+s,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams)}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;n>t;t++){var r=this.context.environments[t];if(r&&r.equals(e))return t}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof r||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new r(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new s.default("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof r)n=[a.value],t=["(",n],o=!0;else{i=!0;var u=this.incrStack();t=["((",this.push(u)," = ",a,")"],n=this.topStack()}var c=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(t.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;n>t;t++){var i=e[t];if(i instanceof r)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof r)return n.value;if(!t){if(!this.stackSlot)throw new s.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof r?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[];return{params:r,paramsInit:this.setupHelperArgs(t,e,r,n),name:this.nameLookup("helpers",t,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}")].concat(r)}},setupParams:function(e,t,n){var r={},i=[],o=[],a=[],s=!n,u=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var c=this.popStack(),l=this.popStack();(l||c)&&(r.fn=l||"container.noop",r.inverse=c||"container.noop");for(var f=t;f--;)u=this.popStack(),n[f]=u,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(o[f]=this.popStack(),i[f]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(a)),this.stringParams&&(r.types=this.source.generateArray(o),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data="data"),this.useBlockParams&&(r.blockParams="blockParams"),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i=this.objectLiteral(i),r?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}},function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=i.RESERVED_WORDS={},n=0,r=e.length;r>n;n++)t[e[n]]=!0}(),i.isValidJavaScriptVariableName=function(e){return!i.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)},t.default=i,e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){if(o.isArray(e)){for(var r=[],i=0,a=e.length;a>i;i++)r.push(t.wrap(e[i],n));return r}return"boolean"==typeof e||"number"==typeof e?e+"":e}function i(e){this.srcFile=e,this.source=[]}t.__esModule=!0;var o=n(5),a=void 0;a||(a=function(e,t,n,r){this.src="",r&&this.add(r)},a.prototype={add:function(e){o.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){o.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),i.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,"\n"])}),e},each:function(e){for(var t=0,n=this.source.length;n>t;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new a(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return e instanceof a?e:(e=r(e,this,t),new a(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?"."+t+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var i=r(e[n],this);"undefined"!==i&&t.push([this.quotedString(n),":",i])}var o=this.generateList(t);return o.prepend("{"),o.add("}"),o},generateList:function(e){for(var t=this.empty(),n=0,i=e.length;i>n;n++)n&&t.add(","),t.add(r(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}},t.default=i,e.exports=t.default}])})},function(e,t,n){const r=n(4);e.exports=r},function(e,t,n){const r=n(5),i=n(0),o=n(6),a=(n(1),n(7));console.log("ElementaryModel",a);const s=n(2),u=n(8),c=n(9);n(10);class l{constructor(e,t,n,r){this.navigo=new o(e,t,n,r),this.app=r,this.data={query:{},params:{}},this.query=this.data.query,this.params=this.data.params,this.navigo.hooks({before:(e,t)=>{let n=this.app.beforePageChangeHandler||window.beforePageChangeHandler;"function"==typeof n&&n(),e()},after:e=>{let t=this.navigo.lastRouteResolved();"/"===t[1]&&(t=t.slice(1)),console.log(t),this.app.config.auto_link_nav&&(u("nav, .nav").find(".active").removeClass("active"),u("nav, .nav").find('[href="'+t.url+'"], [href="'+t.url+'/"]').addClass("active"));let n=this.app.afterPageChangeHandler||window.afterPageChangeHandler;"function"==typeof n&&n()}})}route(){var e=Array.from(arguments);if(0===e.length||"function"==typeof e[0]){console.log(this.app.route_handlers);var t="home"in this.app.route_handlers?this.app.route_handlers.home:e[0];this.navigo.on(e=>{if(this.data.query=parseQuery(e),"function"==typeof t)t(this);else if("home"in this.app.templates)return void(this.app.view={name:"home"})})}else 1===e.length?"string"==typeof e[0]&&this.navigo.on(e[0],(t,n)=>{this.data.query=parseQuery(n),this.data.params=t||{};let r=e[0].replace(/\/?:.*\/?/g,".").split(".").filter(function(e){return e.length}).join("."),i=r in this.app.route_handlers&&this.app.route_handlers[r];if(console.log(this.app.route_handlers),i)return i(this);r in this.app.templates&&(this.app.view={name:r})}):2===e.length&&this.navigo.on(e[0],(t,n)=>{this.data.query=parseQuery(n),this.data.params=t||{},e[1](this)})}resolve(){this.navigo.resolve()}notFound(e){this.navigo.notFound(e)}navigate(e,t){this.navigo.navigate(e,t)}link(e){return this.navigo.link(e)}}var f=function(e){for(var t in e)i[t]=e[t];var n=this;if(n.config=i,n.identity=new r,n.Model=a.Model,n.router=new l(i.root_path,i.use_hash,i.hash_prefix,n),n.logged_in=n.identity.logged_in||null!==n.identity.user,i.use_editor&&(n.editor=new Editor),n.view={name:"loading",data:{}},n.handlebars=s,n.jquery=u,n.addTemplate=function(e,t){n._templates=n._templates||[];var r=new Promise((n,r)=>{u.get(t).then(t=>{n({name:e,data:t})})});n._templates.push(r)},n.booted=!1,n.current_project=null,n.published=!1,n.show=function(e){if("undefined"==typeof window)return!1;if(e.container=e.container||i.containing_element,u(e.container).length)t=u(e.container);else{let e=document.createElement("div");e.id=i.containing_element.replace("#","");var t;(t=u(e)).prependTo("body"),console.warn("Heads up! The containing element for Elementary wasn't there, so I made one and prepended ",e," to document.body.")}var r=n.templates[e.name](e.data);t.html(r)},n.signOut=function(){n.identity.signOut(),n.view={name:"login"}},n.g3n1us_watch("view",function(e,t,r){n.booted&&n.show(r)}),n.templates={},n.route_handlers={},n.g3n1us_watch("templates",function(e,t,n){console.log(e,t,n)}),n.run=function(e){n.identity.startApp(n,e||function(){}),n._templates=n._templates||[],Promise.all(n._templates).then(t=>(t.forEach(e=>{n.templates[e.name]=n.handlebars.compile(e.data)}),n.router.resolve(),"function"==typeof e&&e(n),Promise.resolve(n)))},n.save=function(e){localStorage.redirectTo=e||window.location.hash,u("form").submit()},n.not_found=function(e){alert("Not Found")},n.user_path="u/"+n.identity.user_unique_id,"undefined"!=typeof document&&u(document).on("click",".signout",function(){n.identity.signOut(),n.signOut()}),"undefined"!=typeof window)for(var t in c)window[t]=c[t]};"undefined"!=typeof window&&(window.Elementary=f),e.exports=f},function(e,t,n){const r=n(0);e.exports=function(){var e=this;e.user=null,e.logins={},e.app=null,e.callback=null,e.params={IdentityPoolId:r.aws.identity_pool_id,Logins:{}},e.logged_in_buttons=function(){$("#controls .google-button-outer .avatar").length||$("#controls .google-button-outer").append(''),$("#controls .signout").length||$("#controls .google-button-outer").after(''),$("html").removeClass("logged-out")},e.logged_out_buttons=function(){$("html").addClass("logged-out"),$("#controls .signout").length&&$("#controls .signout").remove(),$("#controls .google-button-outer .avatar").length&&$("#controls .google-button-outer .avatar").remove()},e.login_listener_set=!1,e.setLoginListener=function(){e.login_listener_set||(e.googleAuth.isSignedIn.listen(function(t){0==t?(e.logged_out_buttons(),e.app.view={name:"login",data:{}}):(e.logged_in_buttons(),e.app.view={name:"projects",data:e.app})}),e.login_listener_set=!0)},e.signOut=function(){var t=gapi.auth2.getAuthInstance();e.googleAuth.signOut(),t.signOut().then(function(){AWS.config.credentials.clearCachedId(),e.app.view={name:"login",data:{}}})},e.googleUser={},e.signedIn=!1,e.startApp=function(t,n){if(e.app=t,!r.use_auth&&n)return e.app.booted=!0,void n();e.callback=n,isset("gapi")||e.callback(),gapi.load("auth2",function(){e.googleAuth=gapi.auth2.init({client_id:r.google.client_id,cookiepolicy:"single_host_origin"}),e.googleAuth.then(function(){e.init_fns(),gapi.signin2.render("my-signin2",{scope:"profile email",width:120,height:38,longtitle:!1,theme:"dark",onsuccess:e.onSuccess,onfailure:e.onFailure})})})},e.init_fns=function(){e.setLoginListener(),0==e.googleAuth.isSignedIn.get()&&(e.logged_out_buttons(),e.app.show({name:"login",data:{}}))},e.onSuccess=function(t){var n=t.getBasicProfile(),i={};i.email=n.getEmail(),i.full_name=n.getName(),i.first_name=n.getGivenName(),i.last_name=n.getFamilyName(),i.image_url=n.getImageUrl(),e.user=t,e.signedIn=!0,e.logged_in_buttons(),t.getAuthResponse().id_token,e.logins["accounts.google.com"]=t.getAuthResponse().id_token,e.params.Logins=e.logins,AWS.config.region="us-east-1",AWS.config.credentials=new AWS.CognitoIdentityCredentials(e.params),AWS.config.credentials.get(function(t){t?console.log("Error: "+t):(e.user_unique_id=AWS.config.credentials.identityId,i.identity_id=e.user_unique_id,e.app.s3=new AWS.S3({params:{Bucket:r.bucket}}),e.app.sync=new Sync,e.app.user_path="u/"+e.user_unique_id,e.app.sync.put("dataset","profile",i,function(t,n,r){if(t)return localStorage.error="Your login identity has not been verified. Please contact support. Include the identity id:
"+e.user_unique_id+"
with your request to be added.",e.app.booted=!0,app.identity.signOut(),!1;e.app.booted=!0,e.callback()}))})},e.onFailure=function(t){e.logged_out_buttons(),e.app.booted=!0,e.app.show({name:"login",data:{}})}}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(){return!("undefined"==typeof window||!window.history||!window.history.pushState)}function r(e,t,r){this.root=null,this._routes=[],this._useHash=t,this._hash=void 0===r?"#":r,this._paused=!1,this._destroyed=!1,this._lastRouteResolved=null,this._notFoundHandler=null,this._defaultHandler=null,this._usePushState=!t&&n(),this._onLocationChange=this._onLocationChange.bind(this),this._genericHooks=null,this._historyAPIUpdateMethod="pushState",e?this.root=t?e.replace(/\/$/,"/"+this._hash):e.replace(/\/$/,""):t&&(this.root=this._cLoc().split(this._hash)[0].replace(/\/$/,"/"+this._hash)),this._listen(),this.updatePageLinks()}function i(e){return e instanceof RegExp?e:e.replace(/\/+$/,"").replace(/^\/+/,"^/")}function o(e){return e.replace(/\/$/,"").split("/").length}function a(e,t){return o(t)-o(e)}function s(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map(function(t){var n=function(e){var t,n=[];return t=e instanceof RegExp?e:new RegExp(e.replace(r.PARAMETER_REGEXP,function(e,t,i){return n.push(i),r.REPLACE_VARIABLE_REGEXP}).replace(r.WILDCARD_REGEXP,r.REPLACE_WILDCARD)+r.FOLLOWED_BY_SLASH_REGEXP,r.MATCH_REGEXP_FLAGS),{regexp:t,paramNames:n}}(i(t.route)),o=n.regexp,a=n.paramNames,s=e.replace(/^\/+/,"/").match(o),u=function(e,t){return 0===t.length?null:e?e.slice(1,e.length).reduce(function(e,n,r){return null===e&&(e={}),e[t[r]]=decodeURIComponent(n),e},null):null}(s,a);return!!s&&{match:s,route:t,params:u}}).filter(function(e){return e})}function u(e,t){return s(e,t)[0]||!1}function c(e,t){var n=t.map(function(t){return""===t.route||"*"===t.route?e:e.split(new RegExp(t.route+"($|/)"))[0]}),r=i(e);return n.length>1?n.reduce(function(e,t){return e.length>t.length&&(e=t),e},n[0]):1===n.length?n[0]:r}function l(e,t,r){var i,o=function(e){return e.split(/\?(.*)?$/)[0]};return void 0===r&&(r="#"),n()&&!t?o(e).split(r)[0]:o((i=e.split(r)).length>1?i[1]:i[0])}function f(e,t,n){t&&"object"===(void 0===t?"undefined":h(t))?t.before?t.before(function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(e(),t.after&&t.after(n))},n):t.after&&(e(),t.after&&t.after(n)):e()}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r.prototype={helpers:{match:u,root:c,clean:i,getOnlyURL:l},navigate:function(e,t){var n;return e=e||"",this._usePushState?(n=(n=(t?"":this._getRoot()+"/")+e.replace(/^\/+/,"/")).replace(/([^:])(\/{2,})/g,"$1/"),history[this._historyAPIUpdateMethod]({},"",n),this.resolve()):"undefined"!=typeof window&&(e=e.replace(new RegExp("^"+this._hash),""),window.location.href=window.location.href.replace(/#$/,"").replace(new RegExp(this._hash+".*$"),"")+this._hash+e),this},on:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r=2)if("/"===n[0]){var i=n[1];"object"===h(n[1])&&(i=n[1].uses),this._defaultHandler={handler:i,hooks:n[2]}}else this._add(n[0],n[1],n[2]);else if("object"===h(n[0])){Object.keys(n[0]).sort(a).forEach(function(t){e.on(t,n[0][t])})}return this},off:function(e){return null!==this._defaultHandler&&e===this._defaultHandler.handler?this._defaultHandler=null:null!==this._notFoundHandler&&e===this._notFoundHandler.handler&&(this._notFoundHandler=null),this._routes=this._routes.reduce(function(t,n){return n.handler!==e&&t.push(n),t},[]),this},notFound:function(e,t){return this._notFoundHandler={handler:e,hooks:t},this},resolve:function(e){var t,r,i=this,o=(e||this._cLoc()).replace(this._getRoot(),"");this._useHash&&(o=o.replace(new RegExp("^/"+this._hash),"/"));var a=function(e){return e.split(/\?(.*)?$/).slice(1).join("")}(e||this._cLoc()),s=l(o,this._useHash,this._hash);return!this._paused&&(this._lastRouteResolved&&s===this._lastRouteResolved.url&&a===this._lastRouteResolved.query?(this._lastRouteResolved.hooks&&this._lastRouteResolved.hooks.already&&this._lastRouteResolved.hooks.already(this._lastRouteResolved.params),!1):(r=u(s,this._routes))?(this._callLeave(),this._lastRouteResolved={url:s,query:a,hooks:r.route.hooks,params:r.params,name:r.route.name},t=r.route.handler,f(function(){f(function(){r.route.route instanceof RegExp?t.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{},n=this._routes.reduce(function(n,r){var i;if(r.name===e){n=r.route;for(i in t)n=n.toString().replace(":"+i,t[i])}return n},"");return this._useHash?this._hash+n:n},link:function(e){return this._getRoot()+e},pause:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._paused=e,this._historyAPIUpdateMethod=e?"replaceState":"pushState"},resume:function(){this.pause(!1)},historyAPIUpdateMethod:function(e){return void 0===e?this._historyAPIUpdateMethod:(this._historyAPIUpdateMethod=e,e)},disableIfAPINotAvailable:function(){n()||this.destroy()},lastRouteResolved:function(){return this._lastRouteResolved},getLinkPath:function(e){return e.pathname||e.getAttribute("href")},hooks:function(e){this._genericHooks=e},_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"string"==typeof e&&(e=encodeURI(e)),"object"===(void 0===t?"undefined":h(t))?this._routes.push({route:e,handler:t.uses,name:t.as,hooks:n||t.hooks}):this._routes.push({route:e,handler:t,hooks:n}),this._add},_getRoot:function(){return null!==this.root?this.root:(this.root=c(this._cLoc().split("?")[0],this._routes),this.root)},_listen:function(){var e=this;if(this._usePushState)window.addEventListener("popstate",this._onLocationChange);else if(!("undefined"!=typeof window&&"onhashchange"in window)){var t=this._cLoc(),n=void 0,r=void 0;(r=function(){n=e._cLoc(),t!==n&&(t=n,e.resolve()),e._listeningInterval=setTimeout(r,200)})()}else window.addEventListener("hashchange",this._onLocationChange)},_cLoc:function(){return"undefined"!=typeof window?void 0!==window.__NAVIGO_WINDOW_LOCATION_MOCK__?window.__NAVIGO_WINDOW_LOCATION_MOCK__:i(window.location.href):""},_findLinks:function(){return[].slice.call(document.querySelectorAll("[data-navigo]"))},_onLocationChange:function(){this.resolve()},_callLeave:function(){this._lastRouteResolved&&this._lastRouteResolved.hooks&&this._lastRouteResolved.hooks.leave&&this._lastRouteResolved.hooks.leave()}},r.PARAMETER_REGEXP=/([:*])(\w+)/g,r.WILDCARD_REGEXP=/\*/g,r.REPLACE_VARIABLE_REGEXP="([^/]+)",r.REPLACE_WILDCARD="(?:.*)",r.FOLLOWED_BY_SLASH_REGEXP="(?:/$|$)",r.MATCH_REGEXP_FLAGS="",t.default=r,e.exports=t.default}])})},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=147)}([function(e,t,n){var r=n(2),i=n(21),o=n(12),a=n(13),s=n(18),u=function(e,t,n){var c,l,f,h,p=e&u.F,d=e&u.G,v=e&u.S,g=e&u.P,y=e&u.B,m=d?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=d?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});d&&(n=t);for(c in n)f=((l=!p&&m&&void 0!==m[c])?m:n)[c],h=y&&l?s(f,r):g&&"function"==typeof f?s(Function.call,f):f,m&&a(m,c,f,e&u.U),b[c]!=f&&o(b,c,h),g&&_[c]!=f&&(_[c]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(51)("wks"),i=n(33),o=n(2).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){e.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(1),i=n(99),o=n(22),a=Object.defineProperty;t.f=n(6)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(24),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(23);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(7),i=n(32);e.exports=n(6)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(2),i=n(12),o=n(11),a=n(33)("src"),s=Function.toString,u=(""+s).split("toString");n(21).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(0),i=n(3),o=n(23),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(47),i=n(23);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(48),i=n(32),o=n(15),a=n(22),s=n(11),u=n(99),c=Object.getOwnPropertyDescriptor;t.f=n(6)?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(11),i=n(9),o=n(70)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(10);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t){var n=e.exports={version:"2.5.1"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(0),i=n(21),o=n(3);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(18),i=n(47),o=n(9),a=n(8),s=n(87);e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,l=4==e,f=6==e,h=5==e||f,p=t||s;return function(t,s,d){for(var v,g,y=o(t),m=i(y),b=r(s,d,3),_=a(m.length),w=0,x=n?p(t,_):u?p(t,0):void 0;_>w;w++)if((h||w in m)&&(v=m[w],g=b(v,w,y),e))if(n)x[w]=g;else if(g)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(l)return!1;return f?-1:c||l?l:x}}},function(e,t,n){"use strict";if(n(6)){var r=n(34),i=n(2),o=n(3),a=n(0),s=n(61),u=n(93),c=n(18),l=n(40),f=n(32),h=n(12),p=n(42),d=n(24),v=n(8),g=n(125),y=n(36),m=n(22),b=n(11),_=n(49),w=n(4),x=n(9),k=n(84),S=n(37),E=n(17),O=n(38).f,A=n(86),j=n(33),T=n(5),C=n(26),P=n(52),N=n(59),L=n(89),q=n(45),D=n(56),I=n(39),R=n(88),$=n(115),M=n(7),F=n(16),B=M.f,H=F.f,U=i.RangeError,W=i.TypeError,z=i.Uint8Array,V="ArrayBuffer",G="Shared"+V,X="BYTES_PER_ELEMENT",K="prototype",J=Array[K],Y=u.ArrayBuffer,Q=u.DataView,Z=C(0),ee=C(2),te=C(3),ne=C(4),re=C(5),ie=C(6),oe=P(!0),ae=P(!1),se=L.values,ue=L.keys,ce=L.entries,le=J.lastIndexOf,fe=J.reduce,he=J.reduceRight,pe=J.join,de=J.sort,ve=J.slice,ge=J.toString,ye=J.toLocaleString,me=T("iterator"),be=T("toStringTag"),_e=j("typed_constructor"),we=j("def_constructor"),xe=s.CONSTR,ke=s.TYPED,Se=s.VIEW,Ee="Wrong length!",Oe=C(1,function(e,t){return Pe(N(e,e[we]),t)}),Ae=o(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),je=!!z&&!!z[K].set&&o(function(){new z(1).set({})}),Te=function(e,t){var n=d(e);if(n<0||n%t)throw U("Wrong offset!");return n},Ce=function(e){if(w(e)&&ke in e)return e;throw W(e+" is not a typed array!")},Pe=function(e,t){if(!(w(e)&&_e in e))throw W("It is not a typed array constructor!");return new e(t)},Ne=function(e,t){return Le(N(e,e[we]),t)},Le=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},qe=function(e,t,n){B(e,t,{get:function(){return this._d[n]}})},De=function(e){var t,n,r,i,o,a,s=x(e),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,h=A(s);if(void 0!=h&&!k(h)){for(a=h.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),t=0,n=v(s.length),i=Pe(this,n);n>t;t++)i[t]=f?l(s[t],t):s[t];return i},Ie=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},Re=!!z&&o(function(){ye.call(new z(1))}),$e=function(){return ye.apply(Re?ve.call(Ce(this)):Ce(this),arguments)},Me={copyWithin:function(e,t){return $.call(Ce(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Ce(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return R.apply(Ce(this),arguments)},filter:function(e){return Ne(this,ee(Ce(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Ce(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Ce(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Z(Ce(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Ce(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Ce(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return pe.apply(Ce(this),arguments)},lastIndexOf:function(e){return le.apply(Ce(this),arguments)},map:function(e){return Oe(Ce(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return fe.apply(Ce(this),arguments)},reduceRight:function(e){return he.apply(Ce(this),arguments)},reverse:function(){for(var e,t=this,n=Ce(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return de.call(Ce(this),e)},subarray:function(e,t){var n=Ce(this),r=n.length,i=y(e,r);return new(N(n,n[we]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===t?r:y(t,r))-i))}},Fe=function(e,t){return Ne(this,ve.call(Ce(this),e,t))},Be=function(e){Ce(this);var t=Te(arguments[1],1),n=this.length,r=x(e),i=v(r.length),o=0;if(i+t>n)throw U(Ee);for(;o255?255:255&r),i.v[p](n*t+i.o,r,Ae)}(this,n,e)},enumerable:!0})};b?(d=n(function(e,n,r,i){l(e,d,c,"_d");var o,a,s,u,f=0,p=0;if(w(n)){if(!(n instanceof Y||(u=_(n))==V||u==G))return ke in n?Le(d,n):De.call(d,n);o=n,p=Te(r,t);var y=n.byteLength;if(void 0===i){if(y%t)throw U(Ee);if((a=y-p)<0)throw U(Ee)}else if((a=v(i)*t)+p>y)throw U(Ee);s=a/t}else s=g(n),o=new Y(a=s*t);for(h(e,"_d",{b:o,o:p,l:a,e:s,v:new Q(o)});fdocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(101),i=n(71).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){"use strict";var r=n(2),i=n(7),o=n(6),a=n(5)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(18),i=n(113),o=n(84),a=n(1),s=n(8),u=n(86),c={},l={};(t=e.exports=function(e,t,n,f,h){var p,d,v,g,y=h?function(){return e}:u(e),m=r(n,f,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=s(e.length);p>b;b++)if((g=t?m(a(d=e[b])[0],d[1]):m(e[b]))===c||g===l)return g}else for(v=y.call(e);!(d=v.next()).done;)if((g=i(v,m,d.value,t))===c||g===l)return g}).BREAK=c,t.RETURN=l},function(e,t,n){var r=n(13);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){var r=n(7).f,i=n(11),o=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(0),i=n(23),o=n(3),a=n(74),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(e,t,n){var i={},s=o(function(){return!!a[e]()||"​…"!="​…"[e]()}),u=i[e]=s?t(f):a[e];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},f=l.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e};e.exports=l},function(e,t){e.exports={}},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(19);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(19),i=n(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(2),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var r=n(15),i=n(8),o=n(36);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(19);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(4),i=n(19),o=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!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},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(1);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(12),i=n(13),o=n(3),a=n(23),s=n(5);e.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],f=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){var r=n(1),i=n(10),o=n(5)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},function(e,t,n){"use strict";var r=n(2),i=n(0),o=n(13),a=n(42),s=n(29),u=n(41),c=n(40),l=n(4),f=n(3),h=n(56),p=n(43),d=n(75);e.exports=function(e,t,n,v,g,y){var m=r[e],b=m,_=g?"set":"add",w=b&&b.prototype,x={},k=function(e){var t=w[e];o(w,e,"delete"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(y||w.forEach&&!f(function(){(new b).entries().next()}))){var S=new b,E=S[_](y?{}:-0,1)!=S,O=f(function(){S.has(1)}),A=h(function(e){new b(e)}),j=!y&&f(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});A||((b=t(function(t,n){c(t,b,e);var r=d(new m,t,b);return void 0!=n&&u(n,g,r[_],r),r})).prototype=w,w.constructor=b),(O||j)&&(k("delete"),k("has"),g&&k("get")),(j||E)&&k(_),y&&w.clear&&delete w.clear}else b=v.getConstructor(t,e,g,_),a(b.prototype,n),s.NEED=!0;return p(b,e),x[e]=b,i(i.G+i.W+i.F*(b!=m),x),y||v.setStrong(b,e,g),b}},function(e,t,n){for(var r,i=n(2),o=n(12),a=n(33),s=a("typed_array"),u=a("view"),c=!(!i.ArrayBuffer||!i.DataView),l=c,f=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=i[h[f++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):l=!1;e.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(e,t,n){"use strict";e.exports=n(34)||!n(3)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(2)[e]})},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(18),a=n(41);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),void 0==e?new this:(n=[],t?(r=0,s=o(u,arguments[2],2),a(e,!1,function(e){n.push(s(e,r++))})):a(e,!1,n.push,n),new this(n))}})}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(){d&&h&&(d=!1,h.length?p=h.concat(p):v=-1,p.length&&a())}function a(){if(!d){var e=i(o);d=!0;for(var t=p.length;t;){for(h=p,p=[];++v1)for(var n=1;nr.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===s&&k()(i),s=!1}).on("error",function(){s=!1})}}if(!this._listeners[t]){var o=this,s=!1;this._listeners[t]=i,this.on(e,i)}},c.prototype.removeListener=function(e,t){t in this._listeners&&(b.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},c.prototype.notifyLocalWindows=function(e){s()?chrome.storage.local.set({dbName:e}):u()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},c.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var A,j=A="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(24),i=n(23);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(34),i=n(0),o=n(13),a=n(12),s=n(11),u=n(45),c=n(81),l=n(43),f=n(17),h=n(5)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,v,g,y,m){c(n,t,v);var b,_,w,x=function(e){if(!p&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S="values"==g,E=!1,O=e.prototype,A=O[h]||O["@@iterator"]||g&&O[g],j=A||x(g),T=g?S?x("entries"):j:void 0,C="Array"==t?O.entries||A:A;if(C&&(w=f(C.call(new e)))!==Object.prototype&&w.next&&(l(w,k,!0),r||s(w,h)||a(w,h,d)),S&&A&&"values"!==A.name&&(E=!0,j=function(){return A.call(this)}),r&&!m||!p&&!E&&O[h]||a(O,h,j),u[t]=j,u[k]=d,g)if(b={values:S?j:x("values"),keys:y?j:x("keys"),entries:T},m)for(_ in b)_ in O||o(O,_,b[_]);else i(i.P+i.F*(p||E),t,b);return b}},function(e,t,n){"use strict";var r=n(37),i=n(32),o=n(43),a={};n(12)(a,n(5)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(55),i=n(23);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(45),i=n(5)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(7),i=n(32);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(49),i=n(5)("iterator"),o=n(45);e.exports=n(21).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(240);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(9),i=n(36),o=n(8);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(30),i=n(116),o=n(45),a=n(15);e.exports=n(80)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r,i,o,a=n(18),s=n(106),u=n(72),c=n(68),l=n(2),f=l.process,h=l.setImmediate,p=l.clearImmediate,d=l.MessageChannel,v=l.Dispatch,g=0,y={},m="onreadystatechange",b=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},_=function(e){b.call(e.data)};h&&p||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++g]=function(){s("function"==typeof e?e:Function(e),t)},r(g),g},p=function(e){delete y[e]},"process"==n(19)(f)?r=function(e){f.nextTick(a(b,e,1))}:v&&v.now?r=function(e){v.now(a(b,e,1))}:d?(o=(i=new d).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",_,!1)):r=m in c("script")?function(e){u.appendChild(c("script"))[m]=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:h,clear:p}},function(e,t,n){var r=n(2),i=n(90).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(19)(a);e.exports=function(){var e,t,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(o){var l=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}else if(s&&s.resolve){var h=s.resolve();n=function(){h.then(c)}}else n=function(){i.call(r,c)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){"use strict";var r=n(10);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){"use strict";function r(e,t,n){var r,i,o,a=Array(n),s=8*n-t-1,u=(1<>1,l=23===t?F(2,-24)-F(2,-77):0,f=0,h=e<0||0===e&&1/e<0?1:0;for((e=M(e))!=e||e===R?(i=e!=e?1:0,r=u):(r=B(H(e)/U),e*(o=F(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*F(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*F(2,t),r+=c):(i=e*F(2,c-1)*F(2,t),r=0));t>=8;a[f++]=255&i,i/=256,t-=8);for(r=r<0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*h,a}function i(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-R:R;r+=F(2,t),l-=a}return(c?-1:1)*r*F(2,l-t)}function o(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function a(e){return[255&e]}function s(e){return[255&e,e>>8&255]}function u(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function c(e){return r(e,52,8)}function l(e){return r(e,23,4)}function f(e,t,n){O(e[P],t,{get:function(){return this[n]}})}function h(e,t,n,r){var i=S(+n);if(i+t>e[V])throw I(N);var o=e[z]._b,a=i+e[G],s=o.slice(a,a+t);return r?s:s.reverse()}function p(e,t,n,r,i,o){var a=S(+n);if(a+t>e[V])throw I(N);for(var s=e[z]._b,u=a+e[G],c=r(+i),l=0;lY;)(X=J[Y++])in L||m(L,X,$[X]);g||(K.constructor=L)}var Q=new q(new L(2)),Z=q[P].setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||b(q[P],{setInt8:function(e,t){Z.call(this,e,t<<24>>24)},setUint8:function(e,t){Z.call(this,e,t<<24>>24)}},!0)}else L=function(e){w(this,L,T);var t=S(e);this._b=A.call(Array(t),0),this[V]=t},q=function(e,t,n){w(this,q,C),w(e,L,C);var r=e[V],i=x(t);if(i<0||i>r)throw I("Wrong offset!");if(n=void 0===n?r-i:k(n),i+n>r)throw I("Wrong length!");this[z]=e,this[G]=i,this[V]=n},v&&(f(L,W,"_l"),f(q,"buffer","_b"),f(q,W,"_l"),f(q,"byteOffset","_o")),b(q[P],{getInt8:function(e){return h(this,1,e)[0]<<24>>24},getUint8:function(e){return h(this,1,e)[0]},getInt16:function(e){var t=h(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=h(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return o(h(this,4,e,arguments[1]))},getUint32:function(e){return o(h(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return i(h(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return i(h(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){p(this,1,e,a,t)},setUint8:function(e,t){p(this,1,e,a,t)},setInt16:function(e,t){p(this,2,e,s,t,arguments[2])},setUint16:function(e,t){p(this,2,e,s,t,arguments[2])},setInt32:function(e,t){p(this,4,e,u,t,arguments[2])},setUint32:function(e,t){p(this,4,e,u,t,arguments[2])},setFloat32:function(e,t){p(this,4,e,l,t,arguments[2])},setFloat64:function(e,t){p(this,8,e,c,t,arguments[2])}});j(L,T),j(q,C),m(q[P],y.VIEW,!0),t[T]=L,t[C]=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(e){if(e instanceof ArrayBuffer)return function(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}function i(e){var t,n,o;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,o=e.length;n=l.length)){var n=Math.min(f+$n,l.length),o=l.slice(f,n);!function(n,o){n.forEach(function(n,s){var u=o+s,l=a.get(n),f=h(l[0],["atts_since","attachments"]);f.open_revs=l.map(function(e){return e.rev}),f.open_revs=f.open_revs.filter(p);var v=p;0===f.open_revs.length&&(delete f.open_revs,v=d),["revs","attachments","binary","ajax","latest"].forEach(function(e){e in t&&(f[e]=t[e])}),e.get(n,f,function(e,t){var o;o=e?[{error:e}]:v(t),function(e,t,n){c[e]={id:t,docs:n},r()}(u,n,o),i()})})}(o,f),f+=o.length}}var o=t.docs,a=new In;o.forEach(function(e){a.has(e.id)?a.get(e.id).push(e):a.set(e.id,[e])});var s=a.size,u=0,c=new Array(s),l=[];a.forEach(function(e,t){l.push(t)});var f=0;i()}function g(){return"undefined"!=typeof chrome&&void 0!==chrome.storage&&void 0!==chrome.storage.local}function y(){return Rn}function m(){wn.EventEmitter.call(this),this._listeners={},function(e){g()?chrome.storage.onChanged.addListener(function(t){null!=t.db_name&&e.emit(t.dbName.newValue)}):y()&&("undefined"!=typeof addEventListener?addEventListener("storage",function(t){e.emit(t.key)}):window.attachEvent("storage",function(t){e.emit(t.key)}))}(this)}function b(e){if("undefined"!==console&&e in console){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function _(e){var t=0;return e||(t=2e3),function(e,t){return e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,t>6e5&&(e=3e5,t=6e5),~~((t-e)*Math.random()+e)}(e,t)}function w(e,t){b("info","The above "+e+" is totally normal. "+t)}function x(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}function k(e,t){function n(t){for(var n in e)"function"!=typeof e[n]&&(this[n]=e[n]);void 0!==t&&(this.reason=t)}return n.prototype=x.prototype,new n(t)}function S(e){if("object"!=typeof e){var t=e;(e=Gn).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}function E(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var i=n&&function(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return k(Yn,r)}}(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)r.doc._attachments.hasOwnProperty(o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}function O(e){for(var t=[],n=0,r=e.length;n>>1],t)<0?i=r+1:o=r;return i}(e,t,n);e.splice(r,0,t)}function W(e,t){for(var n,r,i=t,o=e.length;i0;){var i=n.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s0;){var v=d.pop();if(0!==v.diff)for(var g=v.ids[2],y=0,m=g.length;yt){n||(n={});var l=c.length-t;s={pos:u.pos+l,ids:W(c,l)};for(var f=0;f0&&a.emit("error",t):a.emit("complete",n),a.removeAllListeners(),e.removeListener("destroyed",r)});n&&(a.on("complete",function(e){n(null,e)}),a.on("error",n)),e.once("destroyed",r),t.onChange=function(e){a.isCancelled||function(e,t){try{e.emit("change",t)}catch(e){b("error",'Error in .on("change", function):',e)}}(a,e)};var u=new Nn(function(e,n){t.complete=function(t,r){t?n(t):e(r)}});a.once("cancel",function(){e.removeListener("destroyed",r),t.complete(null,{status:"cancelled"})}),this.then=u.then.bind(u),this.catch=u.catch.bind(u),this.then(function(e){s(null,e)},s),e.taskqueue.isReady?a.validateChanges(t):e.taskqueue.addTask(function(e){e?t.complete(e):a.isCancelled?a.emit("cancel"):a.validateChanges(t)})}function ee(e,t,n){var r=[{rev:e._rev}];"all_docs"===n.style&&(r=$(t.rev_tree).map(function(e){return{rev:e.rev}}));var i={id:t.id,changes:r,doc:e};return J(t,e._rev)&&(i.deleted=!0),n.conflicts&&(i.doc._conflicts=M(t),i.doc._conflicts.length||delete i.doc._conflicts),i}function te(e,t){return et?1:0}function ne(e,t){return function(n,r){n||r[0]&&r[0].error?((n=n||r[0]).docId=t,e(n)):e(null,r.length?r[0]:r)}}function re(e,t){var n=te(e._id,t._id);if(0!==n)return n;return te(e._revisions?e._revisions.start:0,t._revisions?t._revisions.start:0)}function ie(e){var t=e._compactionQueue[0],n=t.opts,r=t.callback;e.get("_local/compaction").catch(function(){return!1}).then(function(t){t&&t.last_seq&&(n.last_seq=t.last_seq),e._compact(n,function(t,n){t?r(t):r(null,n),En()(function(){e._compactionQueue.shift(),e._compactionQueue.length&&ie(e)})})})}function oe(){wn.EventEmitter.call(this)}function ae(){this.isReady=!1,this.failed=!1,this.queue=[]}function se(e,t){if(!(this instanceof se))return new se(e,t);var n=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),this.__opts=t=i(t),n.auto_compaction=t.auto_compaction,n.prefix=se.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var r=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var r=se.adapters,i=se.preferredAdapters,o=se.prefix,a=t.adapter;if(!a)for(var s=0;s0&&"\\"===e[r-1]?n=n.substring(0,n.length-1)+".":(t.push(n),n=""):n+=o}return t.push(n),t}function le(e){return cr.indexOf(e)>-1}function fe(e){return Object.keys(e)[0]}function he(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(n){var r=e[n];if("object"!=typeof r&&(r={$eq:r}),le(n))r instanceof Array?t[n]=r.map(function(e){return he([e])}):t[n]=he([r]);else{var i=t[n]=t[n]||{};Object.keys(r).forEach(function(e){var t=r[e];return"$gt"===e||"$gte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):void 0!==n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t}(e,t,i):"$lt"===e||"$lte"===e?function(e,t,n){if(void 0!==n.$eq)return;void 0!==n.$lte?"$lte"===e?tt?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),r=0;rt.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),r=Object.keys(t),i=Math.min(n.length,r.length),o=0;or.length?1:-1}(e,t)}function de(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var r=0;rt?1:0}(e.doc._id,n.doc._id)}}(t.sort);e=e.sort(r),"string"!=typeof t.sort[0]&&"desc"===function(e){return e[fe(e)]}(t.sort[0])&&(e=e.reverse())}if("limit"in t||"skip"in t){var i=t.skip||0,o=("limit"in t?t.limit:e.length)+i;e=e.slice(i,o)}return e}function we(e,t,n){return n.every(function(n){var r=t[n],i=ce(n),o=ue(e,i);return le(n)?function(e,t,n){if("$or"===e)return t.some(function(e){return we(n,e,Object.keys(e))});if("$not"===e)return!we(n,t,Object.keys(t));return!t.find(function(e){return we(n,e,Object.keys(e))})}(n,r,e):xe(r,e,i,o)})}function xe(e,t,n,r){return!e||Object.keys(e).every(function(i){var o=e[i];return function(e,t,n,r,i){if(!pr[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return pr[e](t,n,r,i)}(i,t,o,n,r)})}function ke(e){return void 0!==e&&null!==e}function Se(e){return void 0!==e}function Ee(e,t){return t.some(function(t){return e instanceof Array?e.indexOf(t)>-1:e===t})}function Oe(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");var n=_e([{doc:e}],{selector:t=function(e){var t=i(e),n=!1;"$and"in t&&(t=he(t.$and),n=!0),["$or","$nor"].forEach(function(e){e in t&&t[e].forEach(function(e){for(var t=Object.keys(e),n=0;n0||r0||r1&&!n?(f={continue:s},e.getAll(t,r).onsuccess=o,e.getAllKeys(t,r).onsuccess=a):n?e.openCursor(t,"prev").onsuccess=u:e.openCursor(t).onsuccess=u}function st(e,t,n){function r(t,n,r){var i=t.id+"::"+r;x.get(i).onsuccess=function(r){if(n.doc=Ze(r.target.result),e.conflicts){var i=M(t);i.length&&(n.doc._conflicts=i)}tt(n.doc,e,y)}}function i(t,n){var i={id:n.id,key:n.id,value:{rev:t}},o=n.deleted;"ok"===e.deleted?(S.push(i),o?(i.value.deleted=!0,i.doc=null):e.include_docs&&r(n,i,t)):!o&&f--<=0&&(S.push(i),e.include_docs&&r(n,i,t))}function o(e){for(var t=0,n=e.length;ta&&(a=n),t.continue()}}()}}}var u=t.name,c=null;e._meta=null;e._remote=!1,e.type=function(){return"idb"},e._id=a(function(t){t(null,e._meta.instanceId)}),e._bulkDocs=function(n,r,i){ot(t,n,r,e,c,i)},e._get=function(e,t,n){function r(){n(a,{doc:i,metadata:o,ctx:s})}var i,o,a,s=t.ctx;if(!s){var u=it(c,[xr,kr,Sr],"readonly");if(u.error)return n(u.error);s=u.txn}s.objectStore(xr).get(e).onsuccess=function(e){if(!(o=Qe(e.target.result)))return a=k(Hn,"missing"),r();var n;if(t.rev)n=t.latest?Q(t.rev,o):t.rev;else{n=o.winningRev;if(J(o))return a=k(Hn,"deleted"),r()}var u=s.objectStore(kr),c=o.id+"::"+n;u.index("_doc_id_rev").get(c).onsuccess=function(e){if((i=e.target.result)&&(i=Ze(i)),!i)return a=k(Hn,"missing"),r();r()}}},e._getAttachment=function(e,t,n,r,i){var o;if(r.ctx)o=r.ctx;else{var a=it(c,[xr,kr,Sr],"readonly");if(a.error)return i(a.error);o=a.txn}var s=n.digest,u=n.content_type;o.objectStore(Sr).get(s).onsuccess=function(e){et(e.target.result.body,u,r.binary,function(e){i(null,e)})}},e._info=function(t){var n,r,i=it(c,[Or,kr],"readonly");if(i.error)return t(i.error);var o=i.txn;o.objectStore(Or).get(Or).onsuccess=function(e){r=e.target.result.docCount},o.objectStore(kr).openCursor(null,"prev").onsuccess=function(e){var t=e.target.result;n=t?t.key:0},o.oncomplete=function(){t(null,{doc_count:r,update_seq:n,idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){st(e,c,t)},e._changes=function(t){return ct(t,e,u,c)},e._close=function(e){c.close(),Nr.delete(u),e()},e._getRevisionTree=function(e,t){var n=it(c,[xr],"readonly");if(n.error)return t(n.error);n.txn.objectStore(xr).get(e).onsuccess=function(e){var n=Qe(e.target.result);n?t(null,n.rev_tree):t(k(Hn))}},e._doCompaction=function(e,t,n){var r=it(c,[xr,kr,Sr,Er],"readwrite");if(r.error)return n(r.error);var i=r.txn;i.objectStore(xr).get(e).onsuccess=function(n){var r=Qe(n.target.result);I(r.rev_tree,function(e,n,r,i,o){var a=n+"-"+r;-1!==t.indexOf(a)&&(o.status="missing")}),rt(t,e,i);var o=r.winningRev,a=r.deleted;i.objectStore(xr).put(Ye(r,o,a))},i.onabort=Je(n),i.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=it(c,[Ar],"readonly");if(n.error)return t(n.error);var r=n.txn.objectStore(Ar).get(e);r.onerror=Je(t),r.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,t(null,n)):t(k(Hn))}},e._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),delete e._revisions;var r=e._rev,i=e._id;e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var o,a=t.ctx;if(!a){var s=it(c,[Ar],"readwrite");if(s.error)return n(s.error);(a=s.txn).onerror=Je(n),a.oncomplete=function(){o&&n(null,o)}}var u,l=a.objectStore(Ar);r?(u=l.get(i)).onsuccess=function(i){var a=i.target.result;if(a&&a._rev===r){l.put(e).onsuccess=function(){o={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,o)}}else n(k(Un))}:((u=l.add(e)).onerror=function(e){n(k(Un)),e.preventDefault(),e.stopPropagation()},u.onsuccess=function(){o={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,o)})},e._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={});var r=t.ctx;if(!r){var i=it(c,[Ar],"readwrite");if(i.error)return n(i.error);(r=i.txn).oncomplete=function(){o&&n(null,o)}}var o,a=e._id,s=r.objectStore(Ar),u=s.get(a);u.onerror=Je(n),u.onsuccess=function(r){var i=r.target.result;i&&i._rev===e._rev?(s.delete(a),o={ok:!0,id:a,rev:"0-0"},t.ctx&&n(null,o)):n(k(Hn))}},e._destroy=function(e,t){Tr.removeAllListeners(u);var n=Lr.get(u);n&&n.result&&(n.result.close(),Nr.delete(u));var r=indexedDB.deleteDatabase(u);r.onsuccess=function(){Lr.delete(u),y()&&u in localStorage&&delete localStorage[u],t(null,{ok:!0})},r.onerror=Je(t)};var l=Nr.get(u);if(l)return c=l.idb,e._meta=l.global,En()(function(){n(null,e)});var f;f=t.storage?function(e,t){try{return indexedDB.open(e,{version:wr,storage:t})}catch(t){return indexedDB.open(e,wr)}}(u,t.storage):indexedDB.open(u,wr);Lr.set(u,f),f.onupgradeneeded=function(e){function t(){var e=u[c-1];c++,e&&e(a,t)}var n=e.target.result;if(e.oldVersion<1)return function(e){var t=e.createObjectStore(xr,{keyPath:"id"});e.createObjectStore(kr,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(Sr,{keyPath:"digest"}),e.createObjectStore(Or,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(jr),t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),e.createObjectStore(Ar,{keyPath:"_id"});var n=e.createObjectStore(Er,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}(n);var a=e.currentTarget.transaction;e.oldVersion<3&&function(e){e.createObjectStore(Ar,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}(n),e.oldVersion<4&&function(e){var t=e.createObjectStore(Er,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}(n);var u=[r,i,o,s],c=e.oldVersion;t()},f.onsuccess=function(t){function r(){void 0!==s&&h&&(e._meta={name:u,instanceId:l,blobSupport:s},Nr.set(u,{idb:c,global:e._meta}),n(null,e))}function i(){if(void 0!==a&&void 0!==o){var e=u+"_id";e in o?l=o[e]:o[e]=l=sr(),o.docCount=a,f.objectStore(Or).put(o)}}(c=t.target.result).onversionchange=function(){c.close(),Nr.delete(u)},c.onabort=function(e){b("error","Database has a global failure",e.target.error),c.close(),Nr.delete(u)};var o,a,s,l,f=c.transaction([Or,jr,xr],"readwrite"),h=!1;f.objectStore(Or).get(Or).onsuccess=function(e){o=e.target.result||{id:Or},i()},function(e,t){e.objectStore(xr).index("deletedOrLocal").count(IDBKeyRange.only("0")).onsuccess=function(e){t(e.target.result)}}(f,function(e){a=e,i()}),dr||(dr=function(e){return new Nn(function(t){var n=qe([""]);e.objectStore(jr).put(n,"key").onsuccess=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)},e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}}).catch(function(){return!1})}(f)),dr.then(function(e){s=e,r()}),f.oncomplete=function(){h=!0,r()}},f.onerror=function(){var e="Failed to open indexedDB, are you in private browsing mode?";b("error",e),n(k(Zn,e))}}(n,e,t)},t,n.constructor)}function ft(e){return e<65?e-48:e-55}function ht(e,t){return"UTF-8"===t?function(e){return decodeURIComponent(escape(e))}(function(e,t,n){for(var r="";t0;){b.pop()(null,g)}}function h(e,t){if(0===t){var n="CREATE TABLE IF NOT EXISTS "+Mr+" (dbid, db_version INTEGER)",i="CREATE TABLE IF NOT EXISTS "+Rr+" (digest UNIQUE, escaped TINYINT(1), body BLOB)",a="CREATE TABLE IF NOT EXISTS "+Fr+" (digest, seq INTEGER)",h="CREATE TABLE IF NOT EXISTS "+Dr+" (id unique, json, winningseq, max_seq INTEGER UNIQUE)",p="CREATE TABLE IF NOT EXISTS "+Ir+" (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, json, deleted TINYINT(1), doc_id, rev)",d="CREATE TABLE IF NOT EXISTS "+$r+" (id UNIQUE, rev, json)";e.executeSql(i),e.executeSql(d),e.executeSql(a,[],function(){e.executeSql(Gr),e.executeSql(Xr)}),e.executeSql(h,[],function(){e.executeSql(Vr),e.executeSql(p,[],function(){e.executeSql(Wr),e.executeSql(zr),e.executeSql(n,[],function(){var t="INSERT INTO "+Mr+" (db_version, dbid) VALUES (?,?)";g=sr();var n=[qr,g];e.executeSql(t,n,function(){f()})})})})}else{var v=[r,o,s,u,c,l,function(){t=")+" ?"),f.push(i)),!1!==o){var d=s?">":"<";l&&(d+="="),h.push(Dr+".id "+d+" ?"),f.push(o)}!1!==a&&(h.push(Dr+".id = ?"),f.push(a))}"ok"!==e.deleted&&h.push(Ir+".deleted = 0"),w.readTransaction(function(t){if(p(t,function(e){n=e}),0!==u){var i=yt(Jr,[Dr,Ir],Kr,h,Dr+".id "+(s?"DESC":"ASC"));i+=" LIMIT "+u+" OFFSET "+c,t.executeSql(i,f,function(t,n){for(var i=0,o=n.rows.length;i ?"],l=[e.since];e.doc_ids&&(c.push(Dr+".id IN "+gt(e.doc_ids.length)),l=l.concat(e.doc_ids));var f=yt(t,i,u,c,"maxSeq "+(n?"DESC":"ASC")),h=E(e);e.view||e.filter||(f+=" LIMIT "+r);var p=e.since||0;w.readTransaction(function(t){t.executeSql(f,l,function(t,n){function i(t){return function(){e.onChange(t)}}for(var u=0,c=n.rows.length;u0&&(r=setTimeout(function(){n.reject(new Error("Load timeout for resource: "+e.url))},e.timeout)),n.promise.then(function(t){return i={statusCode:t.status},e.timeout>0&&clearTimeout(r),i.statusCode>=200&&i.statusCode<300?e.binary?t.blob():t.text():t.json()}).then(function(e){i.statusCode>=200&&i.statusCode<300?t(null,i,e):(e.status=i.statusCode,t(e))}).catch(function(e){e||(e=new Error("canceled")),t(e)}),{abort:n.reject}}function At(e,t){return Yr||e.xhr?function(e,t){var n,r,i=!1,o=function(){i=!0,n.abort(),s()},a={abort:function(){n.abort(),s()}},s=function(){clearTimeout(r),a.abort=function(){},n&&(n.onprogress=void 0,n.upload&&(n.upload.onprogress=void 0),n.onreadystatechange=void 0,n=void 0)};n=e.xhr?new e.xhr:new XMLHttpRequest;try{n.open(e.method,e.url)}catch(e){return t(new Error(e.name||"Url is invalid"))}n.withCredentials=!("withCredentials"in e)||e.withCredentials,"GET"===e.method?delete e.headers["Content-Type"]:e.json&&(e.headers.Accept="application/json",e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json",e.body&&e.processData&&"string"!=typeof e.body&&(e.body=JSON.stringify(e.body))),e.binary&&(n.responseType="arraybuffer"),"body"in e||(e.body=null);for(var u in e.headers)e.headers.hasOwnProperty(u)&&n.setRequestHeader(u,e.headers[u]);return e.timeout>0&&(r=setTimeout(o,e.timeout),n.onprogress=function(){clearTimeout(r),4!==n.readyState&&(r=setTimeout(o,e.timeout))},void 0!==n.upload&&(n.upload.onprogress=n.onprogress)),n.onreadystatechange=function(){if(4===n.readyState){var r={statusCode:n.status};if(n.status>=200&&n.status<300){var o;o=e.binary?qe([n.response||""],{type:n.getResponseHeader("Content-Type")}):n.responseText,t(null,r,o)}else{var a={};if(i)(a=new Error("ETIMEDOUT")).code="ETIMEDOUT";else if("string"==typeof n.response)try{a=JSON.parse(n.response)}catch(e){}a.status=n.status,t(a)}s()}},e.body&&e.body instanceof Blob?Be(e.body,function(e){n.send(e)}):n.send(e.body),a}(e,t):Ot(e,t)}function jt(e,t){e=i(e);return(e=Fn({method:"GET",headers:{},json:!0,processData:!0,timeout:1e4,cache:!1},e)).json&&(e.binary||(e.headers.Accept="application/json"),e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json"),e.binary&&(e.encoding=null,e.json=!1),e.processData||(e.json=!1),At(e,function(n,r,i){if(n)return t(S(n));var o,a=r.headers&&r.headers["content-type"],s=i||"";if(!e.binary&&(e.json||!e.processData)&&"object"!=typeof s&&(/json/.test(a)||/^[\s]*\{/.test(s)&&/\}[\s]*$/.test(s)))try{s=JSON.parse(s.toString())}catch(e){}r.statusCode>=200&&r.statusCode<300?function(t,n,r){if(!e.binary&&e.json&&"string"==typeof t)try{t=JSON.parse(t)}catch(e){return r(e)}Array.isArray(t)&&(t=t.map(function(e){return e.error||e.missing?S(e):e})),e.binary&&Qr(t,n),r(null,t,n)}(s,r,t):((o=S(s)).status=r.statusCode,t(o))})}function Tt(e,t){var n=navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",r=-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"),i=-1!==n.indexOf("msie"),o=-1!==n.indexOf("edge"),a=r||(i||o)&&"GET"===e.method,s=!("cache"in e)||e.cache;if(!/^blob:/.test(e.url)&&(a||!s)){var u=-1!==e.url.indexOf("?");e.url+=(u?"&":"?")+"_nonce="+Date.now()}return jt(e,t)}function Ct(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach(function(e){var n=t[e];n.data=Ie(n.data,n.content_type)})}function Pt(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function Nt(e){return e._attachments&&Object.keys(e._attachments)?Nn.all(Object.keys(e._attachments).map(function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new Nn(function(e){Fe(n.data,e)}).then(function(e){n.data=e})})):Nn.resolve()}function Lt(e,t){if(function(e){if(!e.prefix)return!1;var t=P(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);e=t.prefix+encodeURIComponent(n)}var r=P(e);(r.user||r.password)&&(r.auth={username:r.user,password:r.password});var i=r.path.replace(/(^\/|\/$)/g,"").split("/");return r.db=i.pop(),-1===r.db.indexOf("%")&&(r.db=encodeURIComponent(r.db)),r.path=i.join("/"),r}function qt(e,t){return Dt(e,e.db+"/"+t)}function Dt(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function It(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")}function Rt(e,t){function n(e,t,n){var r=e.ajax||{},o=Fn(i(p),r,t),a=i(p.headers||{});return o.headers=Fn(a,r.headers,t.headers||{}),c.constructor.listeners("debug").length&&c.constructor.emit("debug",["http",o.method,o.url]),c._ajax(o,n)}function r(e,t){return new Nn(function(r,i){n(e,t,function(e,t){if(e)return i(e);r(t)})})}function o(e,t){return s(e,_n()(function(e){a().then(function(){return t.apply(this,e)}).catch(function(t){e.pop()(t)})}))}function a(){if(e.skipSetup||e.skip_setup)return Nn.resolve();if(m)return m;return(m=r({},{method:"GET",url:f}).catch(function(e){return e&&e.status&&404===e.status?(w(404,"PouchDB is just detecting if the remote exists."),r({},{method:"PUT",url:f})):Nn.reject(e)}).catch(function(e){return!(!e||!e.status||412!==e.status)||Nn.reject(e)})).catch(function(){m=null}),m}function u(e){return e.split("/").map(encodeURIComponent).join("/")}var c=this,l=Lt(e.name,e),f=qt(l,""),p=(e=i(e)).ajax||{};if(e.auth||l.auth){var d=e.auth||l.auth,g=d.username+":"+d.password,y=mr(unescape(encodeURIComponent(g)));p.headers=p.headers||{},p.headers.Authorization="Basic "+y}c._ajax=Tt;var m;En()(function(){t(null,c)}),c._remote=!0,c.type=function(){return"http"},c.id=o("id",function(e){n({},{method:"GET",url:Dt(l,"")},function(t,n){var r=n&&n.uuid?n.uuid+l.db:qt(l,"");e(null,r)})}),c.request=o("request",function(e,t){e.url=qt(l,e.url),n({},e,t)}),c.compact=o("compact",function(e,t){"function"==typeof e&&(t=e,e={}),n(e=i(e),{url:qt(l,"_compact"),method:"POST"},function(){function n(){c.info(function(r,i){i&&!i.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)})}n()})}),c.bulkGet=s("bulkGet",function(e,t){function r(t){var r={};e.revs&&(r.revs=!0),e.attachments&&(r.attachments=!0),e.latest&&(r.latest=!0),n(e,{url:qt(l,"_bulk_get"+It(r)),method:"POST",body:{docs:e.docs}},t)}function i(){function n(e){return function(n,r){s[e]=r.results,++a===i&&t(null,{results:O(s)})}}for(var r=ei,i=Math.ceil(e.docs.length/r),a=0,s=new Array(i),u=0;ut?t:c;var f={method:d,url:qt(l,"_changes"+It(o)),timeout:r,body:h};g=i,e.aborted||a().then(function(){v=n(e,f,s)}).catch(s)}},m={results:[]},b=function(n,r){if(!e.aborted){var i=0;if(r&&r.results){i=r.results.length,m.last_seq=r.last_seq;({}).query=e.query_params,r.results=r.results.filter(function(t){c--;var n=E(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&Ct(t),s&&m.results.push(t),e.onChange(t)),n})}else if(n)return e.aborted=!0,void e.complete(n);r&&r.last_seq&&(g=r.last_seq);var o=u&&c<=0||r&&i0}(e.doc)||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(e.doc._conflicts&&delete e.doc._conflicts,a.push(e.doc),delete n[e.id])})})}n=i(n);var a=[],s=!0;return Nn.resolve().then(function(){var e=Object.keys(n).filter(function(e){var t=n[e].missing;return 1===t.length&&Zt(t[0])});if(e.length>0)return o(e)}).then(function(){var i=function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].missing.forEach(function(e){t.push({id:n,rev:e})})}),{docs:t,revs:!0,latest:!0}}(n);if(i.docs.length)return e.bulkGet(i).then(function(n){if(r.cancelled)throw new Error("cancelled");return Nn.all(n.results.map(function(n){return Nn.all(n.docs.map(function(n){var r=n.ok;return n.error&&(s=!1),r&&r._attachments?function(e,t,n){var r=j(t)&&!j(e),i=Object.keys(n._attachments);return r?e.get(n._id).then(function(r){return Nn.all(i.map(function(i){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(r,n,i)?t.getAttachment(n._id,i):e.getAttachment(r._id,i)}))}).catch(function(e){if(404!==e.status)throw e;return en(t,n)}):en(t,n)}(t,e,r).then(function(e){var t=Object.keys(r._attachments);return e.forEach(function(e,n){var i=r._attachments[t[n]];delete i.stub,delete i.length,i.data=e}),r}):r}))})).then(function(e){a=a.concat(O(e).filter(Boolean))})})}).then(function(){return{ok:s,docs:a}})}function nn(e,t,n,r,i){return e.get(t).catch(function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||w(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:r,_id:t,history:[],replicator:di,version:pi};throw n}).then(function(o){if(!i.cancelled&&o.last_seq!==n)return o.history=(o.history||[]).filter(function(e){return e.session_id!==r}),o.history.unshift({last_seq:n,session_id:r}),o.history=o.history.slice(0,vi),o.version=pi,o.replicator=di,o.session_id=r,o.last_seq=n,e.put(o).catch(function(o){if(409===o.status)return nn(e,t,n,r,i);throw o})})}function rn(e,t,n,r,i){this.src=e,this.target=t,this.id=n,this.returnValue=r,this.opts=i}function on(e,t){var n=e[0],r=e.slice(1),i=t[0],o=t.slice(1);if(!n||0===t.length)return{last_seq:gi,history:[]};if(an(n.session_id,t))return{last_seq:n.last_seq,history:e};return an(i.session_id,r)?{last_seq:i.last_seq,history:o}:on(r,o)}function an(e,t){var n=t[0],r=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||an(e,r))}function sn(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}function un(e,t,n){var r=n.doc_ids?n.doc_ids.sort(pe):"",i=n.filter?n.filter.toString():"",o="",a="",s="";return n.selector&&(s=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(pe).reduce(function(t,n){return t[n]=e[n],t},{})}(n.query_params))),n.filter&&"_view"===n.filter&&(a=n.view.toString()),Nn.all([e.id(),t.id()]).then(function(e){var t=e[0]+e[1]+i+a+o+r+s;return new Nn(function(e){He(t,e)})}).then(function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))})}function cn(e,t,n,r,o){function a(){return S?Nn.resolve():un(e,t,n).then(function(i){x=i;var o={};o=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},S=new rn(e,t,x,r,o)})}function s(){if($=[],0!==w.docs.length){var e=w.docs,a={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},a).then(function(t){if(r.cancelled)throw p(),new Error("cancelled");var n=Object.create(null);t.forEach(function(e){e.error&&(n[e.id]=e)});var a=Object.keys(n).length;o.doc_write_failures+=a,o.docs_written+=e.length-a,e.forEach(function(e){var t=n[e._id];if(t){if(o.errors.push(t),"unauthorized"!==t.name&&"forbidden"!==t.name)throw t;r.emit("denied",i(t))}else $.push(e)})},function(t){throw o.doc_write_failures+=e.length,t})}}function u(){if(w.error)throw new Error("There was a problem getting docs.");o.last_seq=P=w.seq;var e=i(o);return $.length&&(e.docs=$,r.emit("change",e)),j=!0,S.writeCheckpoint(w.seq,M).then(function(){if(j=!1,r.cancelled)throw p(),new Error("cancelled");w=void 0,y()}).catch(function(e){throw b(e),e})}function c(){return tn(e,t,w.diffs,r).then(function(e){w.error=!e.ok,e.docs.forEach(function(e){delete w.diffs[e._id],o.docs_read++,w.docs.push(e)})})}function l(){r.cancelled||w||(0!==O.length?(w=O.shift(),function(){var e={};return w.changes.forEach(function(t){"_user/"!==t.id&&(e[t.id]=t.changes.map(function(e){return e.rev}))}),t.revsDiff(e).then(function(e){if(r.cancelled)throw p(),new Error("cancelled");w.diffs=e})}().then(c).then(s).then(u).then(l).catch(function(e){h("batch processing terminated with error",e)})):f(!0))}function f(e){0!==A.changes.length?(e||T||A.changes.length>=L)&&(O.push(A),A={seq:0,changes:[],docs:[]},"pending"!==r.state&&"stopped"!==r.state||(r.state="active",r.emit("active")),l()):0!==O.length||w||((N&&F.live||T)&&(r.state="pending",r.emit("paused")),T&&p())}function h(e,t){C||(t.message||(t.message=e),o.ok=!1,o.status="aborting",O=[],A={seq:0,changes:[],docs:[]},p(t))}function p(i){C||r.cancelled&&(o.status="cancelled",j)||(o.status=o.status||"complete",o.end_time=new Date,o.last_seq=P,C=!0,i?((i=k(i)).result=o,"unauthorized"===i.name||"forbidden"===i.name?(r.emit("error",i),r.removeAllListeners()):function(e,t,n,r){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!=typeof e.back_off_function&&(e.back_off_function=_),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var i=function(){e.current_back_off=mi},o=function(){t.removeListener("active",i)};t.once("paused",o),t.once("active",i)}e.current_back_off=e.current_back_off||mi,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(r,e.current_back_off)}(n,r,i,function(){cn(e,t,n,r)})):(r.emit("complete",o),r.removeAllListeners()))}function d(e){if(r.cancelled)return p();E(n)(e)&&(A.seq=e.seq,A.changes.push(e),f(0===O.length&&F.live))}function v(e){if(D=!1,r.cancelled)return p();if(e.results.length>0)F.since=e.last_seq,y(),f(!0);else{var t=function(){N?(F.live=!0,y()):T=!0,f(!0)};w||0!==e.results.length?t():(j=!0,S.writeCheckpoint(e.last_seq,M).then(function(){j=!1,o.last_seq=P=e.last_seq,t()}).catch(b))}}function g(e){if(D=!1,r.cancelled)return p();h("changes rejected",e)}function y(){function t(){o.cancel()}function i(){r.removeListener("cancel",t)}if(!D&&!T&&O.lengthr.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===a&&En()(i),a=!1}).on("error",function(){a=!1})}}if(!this._listeners[t]){var o=this,a=!1;this._listeners[t]=i,this.on(e,i)}},m.prototype.removeListener=function(e,t){t in this._listeners&&(wn.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},m.prototype.notifyLocalWindows=function(e){g()?chrome.storage.local.set({dbName:e}):y()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},m.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var Mn,Fn=Mn="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;nt&&s.push(e)}),I(o,function(e,t,n,r,i){var o=t+"-"+n;"available"===i.status&&-1!==s.indexOf(o)&&u.push(o)}),r._doCompaction(e,u,n)})}),oe.prototype.compact=s("compact",function(e,t){"function"==typeof e&&(t=e,e={});var n=this;e=e||{},n._compactionQueue=n._compactionQueue||[],n._compactionQueue.push({opts:e,callback:t}),1===n._compactionQueue.length&&ie(n)}),oe.prototype._compact=function(e,t){var n=this,r={return_docs:!1,last_seq:e.last_seq||0},i=[];n.changes(r).on("change",function(e){i.push(n.compactDocument(e.id,0))}).on("complete",function(e){var r=e.last_seq;Nn.all(i).then(function(){return L(n,"_local/compaction",function(e){return(!e.last_seq||e.last_seq0?t.keys.slice(t.skip):t.keys;if(t.descending&&r.reverse(),!r.length)return e._allDocs({limit:0},n);var i={offset:t.skip};return Nn.all(r.map(function(n){var r=Fn({key:n,deleted:"ok"},t);return["limit","skip","keys"].forEach(function(e){delete r[e]}),new Nn(function(t,o){e._allDocs(r,function(e,r){if(e)return o(e);i.total_rows=r.total_rows,t(r.rows[0]||{key:n,error:"not_found"})})})})).then(function(e){return i.rows=e,i})}(this,e,t)}return this._allDocs(e,t)}),oe.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),new Z(this,e,t)},oe.prototype.close=s("close",function(e){return this._closed=!0,this.emit("closed"),this._close(e)}),oe.prototype.info=s("info",function(e){var t=this;this._info(function(n,r){if(n)return e(n);r.db_name=r.db_name||t.name,r.auto_compaction=!(!t.auto_compaction||j(t)),r.adapter=t.adapter,e(null,r)})}),oe.prototype.id=s("id",function(e){return this._id(e)}),oe.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},oe.prototype.bulkDocs=s("bulkDocs",function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(k(Bn));for(var r=0;r1?t.set(e.name,n):t.delete(e.name))}}),e.on("destroyed",function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach(function(e){e.emit("destroyed",!0)})}})}(se),se.adapter=function(e,t,n){t.valid()&&(se.adapters[e]=t,n&&se.preferredAdapters.push(e))},se.plugin=function(e){if("function"==typeof e)e(se);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach(function(t){se.prototype[t]=e[t]})}return this.__defaults&&(se.__defaults=Fn({},this.__defaults)),se},se.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"==typeof e&&(e=(n=e).name,delete n.name),n=Fn({},t.__defaults,n),se.call(this,e,n)}return kn()(t,se),t.preferredAdapters=se.preferredAdapters.slice(),Object.keys(se).forEach(function(e){e in t||(t[e]=se[e])}),t.__defaults=Fn({},this.__defaults,e),t};var cr=["$or","$nor","$not"],lr=-324,fr=3,hr="",pr={$elemMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"==typeof r[0]?r.some(function(e){return we(e,t,Object.keys(t))}):r.some(function(r){return xe(t,e,n,r)})))},$allMatch:function(e,t,n,r){return!!Array.isArray(r)&&(0!==r.length&&("object"==typeof r[0]?r.every(function(e){return we(e,t,Object.keys(t))}):r.every(function(r){return xe(t,e,n,r)})))},$eq:function(e,t,n,r){return Se(r)&&0===pe(r,t)},$gte:function(e,t,n,r){return Se(r)&&pe(r,t)>=0},$gt:function(e,t,n,r){return Se(r)&&pe(r,t)>0},$lte:function(e,t,n,r){return Se(r)&&pe(r,t)<=0},$lt:function(e,t,n,r){return Se(r)&&pe(r,t)<0},$exists:function(e,t,n,r){return t?Se(r):!Se(r)},$mod:function(e,t,n,r){return ke(r)&&function(e,t){var n=t[0],r=t[1];if(0===n)throw new Error("Bad divisor, cannot divide by zero");if(parseInt(n,10)!==n)throw new Error("Divisor is not an integer");if(parseInt(r,10)!==r)throw new Error("Modulus is not an integer");return parseInt(e,10)===e&&e%n===r}(r,t)},$ne:function(e,t,n,r){return t.every(function(e){return 0!==pe(r,e)})},$in:function(e,t,n,r){return ke(r)&&Ee(r,t)},$nin:function(e,t,n,r){return ke(r)&&!Ee(r,t)},$size:function(e,t,n,r){return ke(r)&&function(e,t){return e.length===t}(r,t)},$all:function(e,t,n,r){return Array.isArray(r)&&function(e,t){return t.every(function(t){return e.indexOf(t)>-1})}(r,t)},$regex:function(e,t,n,r){return ke(r)&&function(e,t){return new RegExp(t).test(e)}(r,t)},$type:function(e,t,n,r){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}throw new Error(t+" not supported as a type.Please use one of object, string, array, number, boolean or null.")}(r,t)}};se.plugin(function(e){e.debug=An.a;var t={};e.on("debug",function(e){var n=e[0],r=e.slice(1);t[n]||(t[n]=An()("pouchdb:"+n)),t[n].apply(null,r)})}),se.plugin(function(e){e._changesFilterPlugin={validate:Ae,normalize:je,shouldFilter:Te,filter:Ce}}),se.version="6.3.4";var dr,vr=Pe(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),gr=Pe(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]),yr=function(e){return atob(e)},mr=function(e){return btoa(e)},br=e.setImmediate||e.setTimeout,_r=32768,wr=5,xr="document-store",kr="by-sequence",Sr="attach-store",Er="attach-seq-store",Or="meta-store",Ar="local-store",jr="detect-blob-support",Tr=new m,Cr=!1,Pr=[],Nr=new In,Lr=new In;lt.valid=function(){return!("undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform))&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange};var qr=7,Dr=pt("document-store"),Ir=pt("by-sequence"),Rr=pt("attach-store"),$r=pt("local-store"),Mr=pt("metadata-store"),Fr=pt("attach-seq-store"),Br=new In,Hr=new m,Ur=1,Wr="CREATE INDEX IF NOT EXISTS 'by-seq-deleted-idx' ON "+Ir+" (seq, deleted)",zr="CREATE UNIQUE INDEX IF NOT EXISTS 'by-seq-doc-id-rev' ON "+Ir+" (doc_id, rev)",Vr="CREATE INDEX IF NOT EXISTS 'doc-winningseq-idx' ON "+Dr+" (winningseq)",Gr="CREATE INDEX IF NOT EXISTS 'attach-seq-seq-idx' ON "+Fr+" (seq)",Xr="CREATE UNIQUE INDEX IF NOT EXISTS 'attach-seq-digest-idx' ON "+Fr+" (digest, seq)",Kr=Ir+".seq = "+Dr+".winningseq",Jr=Ir+".seq AS seq, "+Ir+".deleted AS deleted, "+Ir+".json AS data, "+Ir+".rev AS rev, "+Dr+".json AS metadata";Et.valid=function(){return"function"==typeof openDatabase&&kt()},Et.use_prefix=!0;var Yr=function(){try{return new XMLHttpRequest,!0}catch(e){return!1}}(),Qr=function(){},Zr=25,ei=50,ti=5e3,ni=1e4,ri={};Rt.valid=function(){return!0};kn()($t,Error),kn()(Mt,Error),kn()(Ft,Error);var ii=b.bind(null,"log"),oi=Array.isArray,ai=JSON.parse;Xt.prototype.add=function(e){return this.promise=this.promise.catch(function(){}).then(function(){return e()}),this.promise},Xt.prototype.finish=function(){return this.promise};var si={},ui=new Xt,ci=50,li={_sum:function(e,t){return Vt(t)},_count:function(e,t){return t.length},_stats:function(e,t){return{sum:Vt(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:function(e){for(var t=0,n=0,r=e.length;n0)throw new $t("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new $t("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new $t("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach(function(t){var n=function(e){if(e){if("number"!=typeof e)return new $t('Invalid value for integer: "'+e+'"');if(e<0)return new $t('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n})}function h(e){return function(t){if(404===t.status)return e;throw t}}function p(e,t,n){var r="_local/doc_"+e,i={_id:r,keys:[]},o=n.get(e),a=o[0];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(o[1])?Nn.resolve(i):t.db.get(r).catch(h(i))).then(function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):Nn.resolve({rows:[]})}(e).then(function(t){return function(e,t){for(var n=[],r=new Dn,i=0,o=t.rows.length;i0&&0===pe(o.key,t)&&a.push(r),n.set(ge(a),o),t=o.key}return n}(s);n.set(f.doc._id,[h,f.changes])}l=f.seq}return n}(o);if(f.add(n(h,l)),!(o.lengthn))return e.doc.value}var r=function(e){for(var t=[],n=[],r=0;;){var i=e[r++];if("\0"!==i)switch(i){case"1":t.push(null);break;case"2":t.push("1"===e[r]),r++;break;case"3":var o=ye(e,r);t.push(o.num),r+=o.length;break;case"4":for(var a="";;){var s=e[r];if("\0"===s)break;a+=s,r++}a=a.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(a);break;case"5":var u={element:[],index:t.length};t.push(u.element),n.push(u);break;case"6":var c={element:{},index:t.length};t.push(c.element),n.push(c);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+i)}else{if(1===t.length)return t.pop();me(t,n)}}}(e.doc._id);return{key:r[0],id:r[1],value:"value"in e.doc?e.doc.value:null}})})}function i(r){var i;if(i=u?function(e,t,r){0===r.group_level&&delete r.group_level;var i=r.group||r.group_level,a=n(e.reduceFun),s=[],u=isNaN(r.group_level)?Number.POSITIVE_INFINITY:r.group_level;t.forEach(function(e){var t=s[s.length-1],n=i?e.key:null;if(i&&Array.isArray(n)&&(n=n.slice(0,u)),t&&0===pe(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);s.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})}),t=[];for(var c=0,l=s.length;c0?e.slice(n):e}(t,r.limit,r.skip)}}(e,r,t):{total_rows:a,offset:c,rows:r},t.include_docs){var l=Ut(r.map(s));return e.sourceDB.allDocs({keys:l,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary}).then(function(e){var t=new In;return e.rows.forEach(function(e){t.set(e.id,e.doc)}),r.forEach(function(e){var n=s(e),r=t.get(n);r&&(e.doc=r)}),i})}return i}var a,u=e.reduceFun&&!1!==t.reduce,c=t.skip||0;if(void 0===t.keys||t.keys.length||(t.limit=0,delete t.keys),void 0!==t.keys){var l=t.keys.map(function(e){return r({startkey:ge([e]),endkey:ge([e,{}])})});return Nn.all(l).then(O).then(i)}var f,h,p={descending:t.descending};if("start_key"in t&&(f=t.start_key),"startkey"in t&&(f=t.startkey),"end_key"in t&&(h=t.end_key),"endkey"in t&&(h=t.endkey),void 0!==f&&(p.startkey=ge(t.descending?[f,{}]:[f])),void 0!==h){var d=!1!==t.inclusive_end;t.descending&&(d=!d),p.endkey=ge(d?[h,{}]:[h])}if(void 0!==t.key){var v=ge([t.key]),g=ge([t.key,{}]);p.descending?(p.endkey=v,p.startkey=g):(p.startkey=v,p.endkey=g)}return u||("number"==typeof t.limit&&(p.limit=t.limit),p.skip=c),r(p).then(i)}(e,t)})()}function y(t,n,i){if("function"==typeof t._query)return function(e,t,n){return new Nn(function(r,i){e._query(t,n,function(e,t){if(e)return i(e);r(t)})})}(t,n,i);if(j(t))return function(e,t,n){var r,i=[],o="GET";if(c("reduce",n,i),c("include_docs",n,i),c("attachments",n,i),c("limit",n,i),c("descending",n,i),c("group",n,i),c("group_level",n,i),c("skip",n,i),c("stale",n,i),c("conflicts",n,i),c("startkey",n,i,!0),c("start_key",n,i,!0),c("endkey",n,i,!0),c("end_key",n,i,!0),c("inclusive_end",n,i),c("key",n,i,!0),i=i.join("&"),i=""===i?"":"?"+i,void 0!==n.keys){var a="keys="+encodeURIComponent(JSON.stringify(n.keys));a.length+i.length+1<=2e3?i+=("?"===i[0]?"&":"?")+a:(o="POST","string"==typeof t?r={keys:n.keys}:t.keys=n.keys)}if("string"==typeof t){var s=Yt(t);return e.request({method:o,url:"_design/"+s[0]+"/_view/"+s[1]+i,body:r}).then(function(e){return e.rows.forEach(function(e){if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)}),e}).then(u(n))}return r=r||{},Object.keys(t).forEach(function(e){Array.isArray(t[e])?r[e]=t[e]:r[e]=t[e].toString()}),e.request({method:"POST",url:"_temp_view"+i,body:r}).then(u(n))}(t,n,i);if("string"!=typeof n)return f(i,n),ui.add(function(){return Jt(t,"temp_view/temp_view",n.map,n.reduce,!0,e).then(function(e){return function(t,n){return v(e).then(function(){return g(e,i)}).then(function(e){return n().then(function(){return e})},function(e){return n().then(function(){throw e})})}(0,function(){return e.db.destroy()})})}),ui.finish();var o=n,a=Yt(o),s=a[0],l=a[1];return t.get("_design/"+s).then(function(n){var a=n.views&&n.views[l];if(!a)throw new Mt("ddoc "+n._id+" has no view named "+l);return r(n,l),f(i,a),Jt(t,o,a.map,a.reduce,!1,e).then(function(e){return"ok"===i.stale||"update_after"===i.stale?("update_after"===i.stale&&En()(function(){v(e)}),g(e,i)):v(e).then(function(){return g(e,i)})})})}return{query:function(e,t,n){var r=this;"function"==typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=l(e.group_level),e.limit=l(e.limit),e.skip=l(e.skip),e}(t):{},"function"==typeof e&&(e={map:e});var i=Nn.resolve().then(function(){return y(r,e,t)});return Bt(i,n),i},viewCleanup:function(e){return _n()(function(t){var n=t.pop(),r=e.apply(this,t);return"function"==typeof n&&Bt(r,n),r})}(function(){var t=this;return"function"==typeof t._viewCleanup?function(e){return new Nn(function(t,n){e._viewCleanup(function(e,r){if(e)return n(e);t(r)})})}(t):j(t)?t.request({method:"POST",url:"_view_cleanup"}):function(t){return t.get("_local/"+e).then(function(e){var n=new In;Object.keys(e.views).forEach(function(e){var t=Yt(e),r="_design/"+t[0],i=t[1],o=n.get(r);o||(o=new Dn,n.set(r,o)),o.add(i)});var r={keys:Wt(n),include_docs:!0};return t.allDocs(r).then(function(r){var i={};r.rows.forEach(function(t){var r=t.key.substring(8);n.get(t.key).forEach(function(n){var o=r+"/"+n;e.views[o]||(o=n);var a=Object.keys(e.views[o]),s=t.doc&&t.doc.views&&t.doc.views[n];a.forEach(function(e){i[e]=i[e]||s})})});var o=Object.keys(i).filter(function(e){return!i[e]}).map(function(e){return Ht(d(e),function(){return new t.constructor(e,t.__opts).destroy()})()});return Nn.all(o).then(function(){return{ok:!0}})})},h({ok:!0}))}(t)})}}("mrviews",function(e,t){if("function"==typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return Gt(e.toString(),t)},function(e){var t=e.toString(),n=function(e){if(/^_sum/.test(e))return li._sum;if(/^_count/.test(e))return li._count;if(/^_stats/.test(e))return li._stats;if(/^_/.test(e))throw new Error(e+" is not a supported reduce function.")}(t);return n||Gt(t)},function(e,t){var n=e.views&&e.views[t];if("string"!=typeof n.map)throw new Mt("ddoc "+e._id+" has no string view named "+t+", instead found object of type: "+typeof n.map)}),hi={query:function(e,t,n){return fi.query.call(this,e,t,n)},viewCleanup:function(e){return fi.viewCleanup.call(this,e)}},pi=1,di="pouchdb",vi=5,gi=0;rn.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then(function(){return n.updateSource(e,t)})},rn.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?nn(this.target,this.id,e,t,this.returnValue):Nn.resolve(!0)},rn.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return this.readOnlySource?Nn.resolve(!0):nn(this.src,this.id,e,t,this.returnValue).catch(function(e){if(sn(e))return n.readOnlySource=!0,!0;throw e})}return Nn.resolve(!0)};var yi={undefined:function(e,t){return 0===pe(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){return e.session_id===t.session_id?{last_seq:e.last_seq,history:e.history}:on(e.history,t.history)}(t,e).last_seq}};rn.prototype.getCheckpoint=function(){var e=this;return e.target.get(e.id).then(function(t){return e.readOnlySource?Nn.resolve(t.last_seq):e.src.get(e.id).then(function(e){if(t.version!==e.version)return gi;var n;return(n=t.version?t.version.toString():"undefined")in yi?yi[n](t,e):gi},function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:gi}).then(function(){return gi},function(n){return sn(n)?(e.readOnlySource=!0,t.last_seq):gi});throw n})}).catch(function(e){if(404!==e.status)throw e;return gi})};var mi=0;kn()(ln,wn.EventEmitter),ln.prototype.cancel=function(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")},ln.prototype.ready=function(e,t){function n(){r.cancel()}var r=this;r._readyCalled||(r._readyCalled=!0,e.once("destroyed",n),t.once("destroyed",n),r.once("complete",function(){e.removeListener("destroyed",n),t.removeListener("destroyed",n)}))},kn()(dn,wn.EventEmitter),dn.prototype.cancel=function(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())},se.plugin(function(e){e.adapter("idb",lt,!0)}).plugin(function(e){e.adapter("websql",Et,!0)}).plugin(function(e){e.adapter("http",Rt,!1),e.adapter("https",Rt,!1)}).plugin(hi).plugin(function(e){e.replicate=hn,e.sync=pn,Object.defineProperty(e.prototype,"replicate",{get:function(){var e=this;return{from:function(t,n,r){return e.constructor.replicate(t,e,n,r)},to:function(t,n,r){return e.constructor.replicate(e,t,n,r)}}}}),e.prototype.sync=function(e,t,n){return this.constructor.sync(this,e,t,n)}}),t.default=se}.call(t,n(31))},function(e,t,n){"use strict";(function(t){function n(){c=!0;for(var e,t,n=l.length;n;){for(t=l,l=[],e=-1;++et?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),i=Object.keys(t),o=Math.min(n.length,i.length),a=0;ai.length?1:-1}(e,t)}function i(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var r=0;ru;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t,n){var r=n(7),i=n(1),o=n(35);e.exports=n(6)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(15),i=n(38).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(35),i=n(53),o=n(48),a=n(9),s=n(47),u=Object.assign;e.exports=!u||n(3)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),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,g=0;v>g;)f.call(p,h=d[g++])&&(n[h]=p[h]);return n}:u},function(e,t,n){"use strict";var r=n(10),i=n(4),o=n(106),a=[].slice,s={};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(2).parseFloat,i=n(44).trim;e.exports=1/r(n(74)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(19);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(4),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(77),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),c=r(e);return is||n!=n?c*(1/0):c*n)}},function(e,t,n){var r=n(1);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(10),i=n(9),o=n(47),a=n(8);e.exports=function(e,t,n,s,u){r(t);var c=i(e),l=o(c),f=a(c.length),h=u?f-1:0,p=u?-1:1;if(n<2)for(;;){if(h in l){s=l[h],h+=p;break}if(h+=p,u?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?h>=0:f>h;h+=p)h in l&&(s=t(s,l[h],h,c));return s}},function(e,t,n){"use strict";var r=n(9),i=n(36),o=n(8);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),f=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(7).f(RegExp.prototype,"flags",{configurable:!0,get:n(57)})},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(1),i=n(4),o=n(92);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(121),i=n(46);e.exports=n(60)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(7).f,i=n(37),o=n(42),a=n(18),s=n(40),u=n(41),c=n(80),l=n(116),f=n(39),h=n(6),p=n(29).fastKey,d=n(46),v=h?"_s":"size",g=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var l=e(function(e,r){s(e,l,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=r&&u(r,n,e[c],e)});return o(l.prototype,{clear:function(){for(var e=d(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=d(this,t),r=g(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(e){d(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!g(d(this,t),e)}}),h&&r(l.prototype,"size",{get:function(){return d(this,t)[v]}}),l},def:function(e,t,n){var r,i,o=g(e,t);return o?o.v=n:(e._l=o={i:i=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[v]++,"F"!==i&&(e._i[i]=o)),e},getEntry:g,setStrong:function(e,t,n){c(e,t,function(e,n){this._t=d(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?l(0,n.k):"values"==t?l(0,n.v):l(0,[n.k,n.v]):(e._t=void 0,l(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(121),i=n(46);e.exports=n(60)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(26)(0),o=n(13),a=n(29),s=n(104),u=n(124),c=n(4),l=n(3),f=n(46),h=a.getWeak,p=Object.isExtensible,d=u.ufstore,v={},g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(c(e)){var t=h(e);return!0===t?d(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(f(this,"WeakMap"),e,t)}},m=e.exports=n(60)("WeakMap",g,y,u,!0,!0);l(function(){return 7!=(new m).set((Object.freeze||Object)(v),7).get(v)})&&(s((r=u.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];o(t,e,function(t,i){if(c(t)&&!p(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(42),i=n(29).getWeak,o=n(1),a=n(4),s=n(40),u=n(41),c=n(26),l=n(11),f=n(46),h=c(5),p=c(6),d=0,v=function(e){return e._l||(e._l=new g)},g=function(){this.a=[]},y=function(e,t){return h(e.a,function(e){return e[0]===t})};g.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var c=e(function(e,r){s(e,c,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=r&&u(r,n,e[o],e)});return r(c.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(f(this,t)).delete(e):n&&l(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(f(this,t)).has(e):n&&l(n,this._i)}}),c},def:function(e,t,n){var r=i(o(t),!0);return!0===r?v(e).set(t,n):r[e._i]=n,e},ufstore:v}},function(e,t,n){var r=n(24),i=n(8);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(38),i=n(53),o=n(1),a=n(2).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";function r(e,t,n,c,l,f,h,p){for(var d,v,g=l,y=0,m=!!h&&s(h,p,3);y0)g=r(e,t,d,a(d.length),g,f-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=d}g++}y++}return g}var i=n(54),o=n(4),a=n(8),s=n(18),u=n(5)("isConcatSpreadable");e.exports=r},function(e,t,n){var r=n(8),i=n(76),o=n(23);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var f=l-u,h=i.call(c,Math.ceil(f/c.length));return h.length>f&&(h=h.slice(0,f)),a?h+s:s+h}},function(e,t,n){var r=n(35),i=n(15),o=n(48).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(49),i=n(131);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(41);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t){e.exports=Math.scale||function(e,t,n,r,i){return 0===arguments.length||e!=e||t!=t||n!=n||r!=r||i!=i?NaN:e===1/0||e===-1/0?e:(e-t)*(i-r)/(n-t)+r}},function(e,t,n){var r,i;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function a(e,t){var n=(t=t||Z).createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function s(e){var t=!!e&&"length"in e&&e.length,n=fe.type(e);return"function"!==n&&!fe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,n){return fe.isFunction(t)?fe.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?fe.grep(e,function(e){return e===t!==n}):"string"!=typeof t?fe.grep(e,function(e){return ie.call(t,e)>-1!==n}):we.test(t)?fe.filter(t,e,n):(t=fe.filter(t,e),fe.grep(e,function(e){return ie.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function f(e){return e}function h(e){throw e}function p(e,t,n,r){var i;try{e&&fe.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&fe.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function d(){Z.removeEventListener("DOMContentLoaded",d),n.removeEventListener("load",d),fe.ready()}function v(){this.expando=fe.expando+v.uid++}function g(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(qe,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Le.test(e)?JSON.parse(e):e)}(n)}catch(e){}Ne.set(e,t,n)}else n=void 0;return n}function y(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return fe.css(e,t,"")},u=s(),c=n&&n[3]||(fe.cssNumber[t]?"":"px"),l=(fe.cssNumber[t]||"px"!==c&&+u)&&Ie.exec(fe.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do{l/=o=o||".5",fe.style(e,t,l+c)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function m(e){var t,n=e.ownerDocument,r=e.nodeName,i=Fe[r];return i||(t=n.body.appendChild(n.createElement(r)),i=fe.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Fe[r]=i,i)}function b(e,t){for(var n,r,i=[],o=0,a=e.length;o-1)i&&i.push(o);else if(c=fe.contains(o.ownerDocument,o),a=_(f.appendChild(o),"script"),c&&w(a),n)for(l=0;o=a[l++];)Ue.test(o.type||"")&&n.push(o);return f}function k(){return!0}function S(){return!1}function E(){try{return Z.activeElement}catch(e){}}function O(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)O(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=S;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return fe().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=fe.guid++)),e.each(function(){fe.event.add(this,t,i,r,n)})}function A(e,t){return u(e,"table")&&u(11!==t.nodeType?t:t.firstChild,"tr")?fe(">tbody",e)[0]||e:e}function j(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function T(e){var t=Ze.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function C(e,t){var n,r,i,o,a,s,u,c;if(1===t.nodeType){if(Pe.hasData(e)&&(o=Pe.access(e),a=Pe.set(t,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof d&&!le.checkClone&&Qe.test(d))return e.each(function(i){var o=e.eq(i);v&&(t[0]=d.call(this,i,o.html())),N(o,t,n,r)});if(h&&(i=x(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=fe.map(_(i,"script"),j)).length;f=0&&nw.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[$]=!0,e}function i(e){var t=P.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e){return e&&void 0!==e.getElementsByTagName&&e}function h(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s-1&&(r[l]=!(s[l]=h))}}else b=g(b===s?b.splice(v,b.length):b),a?a(null,s,b,c):J.apply(s,b)})}function m(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),c=d(function(e){return Q(t,e)>-1},a,!0),l=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,i}];s1&&v(l),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(re),le=new RegExp("^"+te+"$"),fe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,pe=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),me=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},be=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_e=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){C()},xe=d(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{J.apply(G=Y.call(M.childNodes),M.childNodes),G[M.childNodes.length].nodeType}catch(e){J={apply:G.length?function(e,t){K.apply(e,Y.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}_=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},C=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==P&&9===r.nodeType&&r.documentElement?(P=r,N=P.documentElement,L=!k(P),M!==P&&(n=P.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),_.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=i(function(e){return e.appendChild(P.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=de.test(P.getElementsByClassName),_.getById=i(function(e){return N.appendChild(e).id=$,!P.getElementsByName||!P.getElementsByName($).length}),_.getById?(w.filter.ID=function(e){var t=e.replace(ye,me);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ye,me);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&L){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=_.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=_.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&L)return t.getElementsByClassName(e)},D=[],q=[],(_.qsa=de.test(P.querySelectorAll))&&(i(function(e){N.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+$+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||q.push(".#.+[+~]")}),i(function(e){e.innerHTML="";var t=P.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),N.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(_.matchesSelector=de.test(I=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&i(function(e){_.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),D.push("!=",re)}),q=q.length&&new RegExp(q.join("|")),D=D.length&&new RegExp(D.join("|")),t=de.test(N.compareDocumentPosition),R=t||de.test(N.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return T=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===P||e.ownerDocument===M&&R(M,e)?-1:t===P||t.ownerDocument===M&&R(M,t)?1:j?Q(j,e)-Q(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return T=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===P?-1:t===P?1:i?-1:o?1:j?Q(j,e)-Q(j,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===M?-1:u[r]===M?1:0},P):P},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==P&&C(e),n=n.replace(ue,"='$1']"),_.matchesSelector&&L&&!W[n+" "]&&(!D||!D.test(n))&&(!q||!q.test(n)))try{var r=I.call(e,n);if(r||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,P,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==P&&C(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==P&&C(e);var n=w.attrHandle[t.toLowerCase()],r=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==r?r:_.attributes||!L?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(be,_e)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(T=!_.detectDuplicates,j=!_.sortStable&&e.slice(0),e.sort(z),T){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return j=null,e},x=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=x(t);return n},(w=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,me),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,me),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,me).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,h,p,d,v=o!==a?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,b=!1;if(g){if(o){for(;v;){for(h=t;h=h[v];)if(s?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&m){for(b=(p=(c=(l=(f=(h=g)[$]||(h[$]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===F&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[v]||(b=p=0)||d.pop();)if(1===h.nodeType&&++b&&h===t){l[e]=[F,p,b];break}}else if(m&&(b=p=(c=(l=(f=(h=t)[$]||(h[$]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===F&&c[1]),!1===b)for(;(h=++p&&h&&h[v]||(b=p=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++b||(m&&((l=(f=h[$]||(h[$]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[F,b]),h!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[$]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=Q(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(oe,"$1"));return i[$]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ye,me),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:r(function(e){return le.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,me).toLowerCase(),function(t){var n;do{if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===N},focus:function(e){return e===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return pe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r0,o=e.length>0,a=function(r,a,s,u,c){var l,f,h,p=0,d="0",v=r&&[],y=[],m=A,b=r||o&&w.find.TAG("*",c),_=F+=null==m?1:Math.random()||.1,x=b.length;for(c&&(A=a===P||a||c);d!==x&&null!=(l=b[d]);d++){if(o&&l){for(f=0,a||l.ownerDocument===P||(C(l),s=!L);h=e[f++];)if(h(l,a||P,s)){u.push(l);break}c&&(F=_)}i&&((l=!h&&l)&&p--,r&&v.push(l))}if(p+=d,i&&d!==p){for(f=0;h=n[f++];)h(v,y,a,s);if(r){if(p>0)for(;d--;)v[d]||y[d]||(y[d]=X.call(u));y=g(y)}J.apply(u,y),c&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return c&&(F=_,A=m),v};return i?r(a):a}(a,o))).selector=e}return s},O=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,l=!r&&S(e=c.selector||e);if(n=n||[],1===l.length){if((o=l[0]=l[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ye,me),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=fe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(ye,me),ge.test(o[0].type)&&f(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&p(o)))return J.apply(n,r),n;break}}return(c||E(e,l))(r,t,!L,n,!t||ge.test(e)&&f(t.parentNode)||t),n},_.sortStable=$.split("").sort(z).join("")===$,_.detectDuplicates=!!T,C(),_.sortDetached=i(function(e){return 1&e.compareDocumentPosition(P.createElement("fieldset"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);fe.find=ge,fe.expr=ge.selectors,fe.expr[":"]=fe.expr.pseudos,fe.uniqueSort=fe.unique=ge.uniqueSort,fe.text=ge.getText,fe.isXMLDoc=ge.isXML,fe.contains=ge.contains,fe.escapeSelector=ge.escape;var ye=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&fe(e).is(n))break;r.push(e)}return r},me=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=fe.expr.match.needsContext,_e=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,we=/^.[^:#\[\.,]*$/;fe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?fe.find.matchesSelector(r,e)?[r]:[]:fe.find.matches(e,fe.grep(t,function(e){return 1===e.nodeType}))},fe.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(fe(e).filter(function(){for(t=0;t1?fe.uniqueSort(n):n},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&be.test(e)?fe(e):e||[],!1).length}});var xe,ke=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(fe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||xe,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ke.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof fe?t[0]:t,fe.merge(this,fe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),_e.test(r[1])&&fe.isPlainObject(t))for(r in t)fe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=Z.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):fe.isFunction(e)?void 0!==n.ready?n.ready(e):e(fe):fe.makeArray(e,this)}).prototype=fe.fn,xe=fe(Z);var Se=/^(?:parents|prev(?:Until|All))/,Ee={children:!0,contents:!0,next:!0,prev:!0};fe.fn.extend({has:function(e){var t=fe(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&fe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?fe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ie.call(fe(e),this[0]):ie.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(fe.uniqueSort(fe.merge(this.get(),fe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),fe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ye(e,"parentNode")},parentsUntil:function(e,t,n){return ye(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return ye(e,"nextSibling")},prevAll:function(e){return ye(e,"previousSibling")},nextUntil:function(e,t,n){return ye(e,"nextSibling",n)},prevUntil:function(e,t,n){return ye(e,"previousSibling",n)},siblings:function(e){return me((e.parentNode||{}).firstChild,e)},children:function(e){return me(e.firstChild)},contents:function(e){return u(e,"iframe")?e.contentDocument:(u(e,"template")&&(e=e.content||e),fe.merge([],e.childNodes))}},function(e,t){fe.fn[e]=function(n,r){var i=fe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=fe.filter(r,i)),this.length>1&&(Ee[e]||fe.uniqueSort(i),Se.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;fe.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return fe.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}(e):fe.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?fe.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},fe.extend({Deferred:function(e){var t=[["notify","progress",fe.Callbacks("memory"),fe.Callbacks("memory"),2],["resolve","done",fe.Callbacks("once memory"),fe.Callbacks("once memory"),0,"resolved"],["reject","fail",fe.Callbacks("once memory"),fe.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return fe.Deferred(function(n){fe.each(t,function(t,r){var i=fe.isFunction(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&fe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){function o(e,t,r,i){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(e=a&&(r!==h&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?l():(fe.Deferred.getStackHook&&(l.stackTrace=fe.Deferred.getStackHook()),n.setTimeout(l))}}var a=0;return fe.Deferred(function(n){t[0][3].add(o(0,n,fe.isFunction(i)?i:f,n.notifyWith)),t[1][3].add(o(0,n,fe.isFunction(e)?e:f)),t[2][3].add(o(0,n,fe.isFunction(r)?r:h))}).promise()},promise:function(e){return null!=e?fe.extend(e,i):i}},o={};return fe.each(t,function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},t[3-e][2].disable,t[0][2].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=te.call(arguments),o=fe.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?te.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(p(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||fe.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)p(i[n],a(n),o.reject);return o.promise()}});var Ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;fe.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Ae.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},fe.readyException=function(e){n.setTimeout(function(){throw e})};var je=fe.Deferred();fe.fn.ready=function(e){return je.then(e).catch(function(e){fe.readyException(e)}),this},fe.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--fe.readyWait:fe.isReady)||(fe.isReady=!0,!0!==e&&--fe.readyWait>0||je.resolveWith(Z,[fe]))}}),fe.ready.then=je.then,"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(fe.ready):(Z.addEventListener("DOMContentLoaded",d),n.addEventListener("load",d));var Te=function(e,t,n,r,i,o,a){var s=0,u=e.length,c=null==n;if("object"===fe.type(n)){i=!0;for(s in n)Te(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,fe.isFunction(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(fe(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Ne.remove(this,e)})}}),fe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Pe.get(e,t),n&&(!r||Array.isArray(n)?r=Pe.access(e,t,fe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=fe.queue(e,t),r=n.length,i=n.shift(),o=fe._queueHooks(e,t),a=function(){fe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Pe.get(e,n)||Pe.access(e,n,{empty:fe.Callbacks("once memory").add(function(){Pe.remove(e,[t+"queue",n])})})}}),fe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ue=/^$|\/(?:java|ecma)script/i,We={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};We.optgroup=We.option,We.tbody=We.tfoot=We.colgroup=We.caption=We.thead,We.th=We.td;var ze=/<|&#?\w+;/;!function(){var e=Z.createDocumentFragment().appendChild(Z.createElement("div")),t=Z.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),le.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",le.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Ve=Z.documentElement,Ge=/^key/,Xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ke=/^([^.]*)(?:\.(.+)|)/;fe.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g=Pe.get(e);if(g)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&fe.find.matchesSelector(Ve,i),n.guid||(n.guid=fe.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(t){return void 0!==fe&&fe.event.triggered!==t.type?fe.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(Oe)||[""]).length;c--;)p=v=(s=Ke.exec(t[c])||[])[1],d=(s[2]||"").split(".").sort(),p&&(f=fe.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=fe.event.special[p]||{},l=fe.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&fe.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=u[p])||((h=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,d,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),fe.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g=Pe.hasData(e)&&Pe.get(e);if(g&&(u=g.events)){for(c=(t=(t||"").match(Oe)||[""]).length;c--;)if(s=Ke.exec(t[c])||[],p=v=s[1],d=(s[2]||"").split(".").sort(),p){for(f=fe.event.special[p]||{},h=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)l=h[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(e,l));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,d,g.handle)||fe.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)fe.event.remove(e,p+t[c],n,r,!0);fe.isEmptyObject(u)&&Pe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=fe.event.fix(e),u=new Array(arguments.length),c=(Pe.get(this,"events")||{})[s.type]||[],l=fe.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:fe.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ye=/\s*$/g;fe.extend({htmlPrefilter:function(e){return e.replace(Je,"<$1>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=fe.contains(e.ownerDocument,e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||fe.isXMLDoc(e)))for(a=_(s),r=0,i=(o=_(e)).length;r0&&w(a,!u&&_(e,"script")),s},cleanData:function(e){for(var t,n,r,i=fe.event.special,o=0;void 0!==(n=e[o]);o++)if(Ce(n)){if(t=n[Pe.expando]){if(t.events)for(r in t.events)i[r]?fe.event.remove(n,r):fe.removeEvent(n,r,t.handle);n[Pe.expando]=void 0}n[Ne.expando]&&(n[Ne.expando]=void 0)}}}),fe.fn.extend({detach:function(e){return L(this,e,!0)},remove:function(e){return L(this,e)},text:function(e){return Te(this,function(e){return void 0===e?fe.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return N(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return N(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(fe.cleanData(_(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return fe.clone(this,e,t)})},html:function(e){return Te(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ye.test(e)&&!We[(He.exec(e)||["",""])[1].toLowerCase()]){e=fe.htmlPrefilter(e);try{for(;n1)}}),fe.Tween=F,(F.prototype={constructor:F,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||fe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(fe.cssNumber[n]?"":"px")},cur:function(){var e=F.propHooks[this.prop];return e&&e.get?e.get(this):F.propHooks._default.get(this)},run:function(e){var t,n=F.propHooks[this.prop];return this.options.duration?this.pos=t=fe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}}).init.prototype=F.prototype,(F.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=fe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){fe.fx.step[e.prop]?fe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[fe.cssProps[e.prop]]&&!fe.cssHooks[e.prop]?e.elem[e.prop]=e.now:fe.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=F.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},fe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},fe.fx=F.prototype.init,fe.fx.step={};var lt,ft,ht=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;fe.Animation=fe.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return y(n.elem,e,Ie.exec(t),n),n}]},tweener:function(e,t){fe.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){fe.removeAttr(this,e)})}}),fe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?fe.prop(e,t,n):(1===o&&fe.isXMLDoc(e)||(i=fe.attrHooks[t.toLowerCase()]||(fe.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void fe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=fe.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&u(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?fe.removeAttr(e,n):e.setAttribute(n,n),n}},fe.each(fe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=vt[t]||fe.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;fe.fn.extend({prop:function(e,t){return Te(this,fe.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[fe.propFix[e]||e]})}}),fe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&fe.isXMLDoc(e)||(t=fe.propFix[t]||t,i=fe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=fe.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),le.optSelected||(fe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),fe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fe.propFix[this.toLowerCase()]=this}),fe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(fe.isFunction(e))return this.each(function(t){fe(this).addClass(e.call(this,t,G(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=G(n),r=1===n.nodeType&&" "+V(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=V(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(fe.isFunction(e))return this.each(function(t){fe(this).removeClass(e.call(this,t,G(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=G(n),r=1===n.nodeType&&" "+V(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=V(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):fe.isFunction(e)?this.each(function(n){fe(this).toggleClass(e.call(this,n,G(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=fe(this),o=e.match(Oe)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=G(this))&&Pe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Pe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+V(G(n))+" ").indexOf(t)>-1)return!0;return!1}});var mt=/\r/g;fe.fn.extend({val:function(e){var t,n,r,i=this[0];if(arguments.length)return r=fe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,fe(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=fe.map(i,function(e){return null==e?"":e+""})),(t=fe.valHooks[this.type]||fe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=fe.valHooks[i.type]||fe.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(mt,""):null==n?"":n}}),fe.extend({valHooks:{option:{get:function(e){var t=fe.find.attr(e,"value");return null!=t?t:V(fe.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],c=a?o+1:i.length;for(r=o<0?c:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),fe.each(["radio","checkbox"],function(){fe.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=fe.inArray(fe(e).val(),t)>-1}},le.checkOn||(fe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var bt=/^(?:focusinfocus|focusoutblur)$/;fe.extend(fe.event,{trigger:function(e,t,r,i){var o,a,s,u,c,l,f,h=[r||Z],p=se.call(e,"type")?e.type:e,d=se.call(e,"namespace")?e.namespace.split("."):[];if(a=s=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!bt.test(p+fe.event.triggered)&&(p.indexOf(".")>-1&&(p=(d=p.split(".")).shift(),d.sort()),c=p.indexOf(":")<0&&"on"+p,e=e[fe.expando]?e:new fe.Event(p,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:fe.makeArray(t,[e]),f=fe.event.special[p]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!fe.isWindow(r)){for(u=f.delegateType||p,bt.test(u+p)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||Z)&&h.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)e.type=o>1?u:f.bindType||p,(l=(Pe.get(a,"events")||{})[e.type]&&Pe.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&Ce(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!Ce(r)||c&&fe.isFunction(r[p])&&!fe.isWindow(r)&&((s=r[c])&&(r[c]=null),fe.event.triggered=p,r[p](),fe.event.triggered=void 0,s&&(r[c]=s)),e.result}},simulate:function(e,t,n){var r=fe.extend(new fe.Event,n,{type:e,isSimulated:!0});fe.event.trigger(r,null,t)}}),fe.fn.extend({trigger:function(e,t){return this.each(function(){fe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return fe.event.trigger(e,t,n,!0)}}),fe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){fe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),fe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),le.focusin="onfocusin"in n,le.focusin||fe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){fe.event.simulate(t,e.target,fe.event.fix(e))};fe.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Pe.access(r,t);i||r.addEventListener(e,n,!0),Pe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Pe.access(r,t)-1;i?Pe.access(r,t,i):(r.removeEventListener(e,n,!0),Pe.remove(r,t))}}});var _t=n.location,wt=fe.now(),xt=/\?/;fe.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||fe.error("Invalid XML: "+e),t};var kt=/\[\]$/,St=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;fe.param=function(e,t){var n,r=[],i=function(e,t){var n=fe.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!fe.isPlainObject(e))fe.each(e,function(){i(this.name,this.value)});else for(n in e)X(n,e[n],t,i);return r.join("&")},fe.fn.extend({serialize:function(){return fe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=fe.prop(this,"elements");return e?fe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!fe(this).is(":disabled")&&Ot.test(this.nodeName)&&!Et.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=fe(this).val();return null==n?null:Array.isArray(n)?fe.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}});var At=/%20/g,jt=/#.*$/,Tt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Nt=/^\/\//,Lt={},qt={},Dt="*/".concat("*"),It=Z.createElement("a");It.href=_t.href,fe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":fe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Y(Y(e,fe.ajaxSettings),t):Y(fe.ajaxSettings,e)},ajaxPrefilter:K(Lt),ajaxTransport:K(qt),ajax:function(e,t){function r(e,t,r,s){var c,h,p,_,w,x=t;l||(l=!0,u&&n.clearTimeout(u),i=void 0,a=s||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(_=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,k,r)),_=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,_,k,c),c?(d.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(fe.lastModified[o]=w),(w=k.getResponseHeader("etag"))&&(fe.etag[o]=w)),204===e||"HEAD"===d.type?x="nocontent":304===e?x="notmodified":(x=_.state,h=_.data,c=!(p=_.error))):(p=x,!e&&x||(x="error",e<0&&(e=0))),k.status=e,k.statusText=(t||x)+"",c?y.resolveWith(v,[h,x,k]):y.rejectWith(v,[k,x,p]),k.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[k,d,c?h:p]),m.fireWith(v,[k,x]),f&&(g.trigger("ajaxComplete",[k,d]),--fe.active||fe.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,a,s,u,c,l,f,h,p,d=fe.ajaxSetup({},t),v=d.context||d,g=d.context&&(v.nodeType||v.jquery)?fe(v):fe.event,y=fe.Deferred(),m=fe.Callbacks("once memory"),b=d.statusCode||{},_={},w={},x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=Ct.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return i&&i.abort(t),r(0,t),this}};if(y.promise(k),d.url=((e||d.url||_t.href)+"").replace(Nt,_t.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(Oe)||[""],null==d.crossDomain){c=Z.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=It.protocol+"//"+It.host!=c.protocol+"//"+c.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=fe.param(d.data,d.traditional)),J(Lt,d,t,k),l)return k;(f=fe.event&&d.global)&&0==fe.active++&&fe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Pt.test(d.type),o=d.url.replace(jt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(At,"+")):(p=d.url.slice(o.length),d.data&&(o+=(xt.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(Tt,"$1"),p=(xt.test(o)?"&":"?")+"_="+wt+++p),d.url=o+p),d.ifModified&&(fe.lastModified[o]&&k.setRequestHeader("If-Modified-Since",fe.lastModified[o]),fe.etag[o]&&k.setRequestHeader("If-None-Match",fe.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&k.setRequestHeader("Content-Type",d.contentType),k.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Dt+"; q=0.01":""):d.accepts["*"]);for(h in d.headers)k.setRequestHeader(h,d.headers[h]);if(d.beforeSend&&(!1===d.beforeSend.call(v,k,d)||l))return k.abort();if(x="abort",m.add(d.complete),k.done(d.success),k.fail(d.error),i=J(qt,d,t,k)){if(k.readyState=1,f&&g.trigger("ajaxSend",[k,d]),l)return k;d.async&&d.timeout>0&&(u=n.setTimeout(function(){k.abort("timeout")},d.timeout));try{l=!1,i.send(_,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return k},getJSON:function(e,t,n){return fe.get(e,t,n,"json")},getScript:function(e,t){return fe.get(e,void 0,t,"script")}}),fe.each(["get","post"],function(e,t){fe[t]=function(e,n,r,i){return fe.isFunction(n)&&(i=i||r,r=n,n=void 0),fe.ajax(fe.extend({url:e,type:t,dataType:i,data:n,success:r},fe.isPlainObject(e)&&e))}}),fe._evalUrl=function(e){return fe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},fe.fn.extend({wrapAll:function(e){var t;return this[0]&&(fe.isFunction(e)&&(e=e.call(this[0])),t=fe(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return fe.isFunction(e)?this.each(function(t){fe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=fe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=fe.isFunction(e);return this.each(function(n){fe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){fe(this).replaceWith(this.childNodes)}),this}}),fe.expr.pseudos.hidden=function(e){return!fe.expr.pseudos.visible(e)},fe.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},fe.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},$t=fe.ajaxSettings.xhr();le.cors=!!$t&&"withCredentials"in $t,le.ajax=$t=!!$t,fe.ajaxTransport(function(e){var t,r;if(le.cors||$t&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Rt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),fe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),fe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return fe.globalEval(e),e}}}),fe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),fe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=fe("