Commit c73d13c1 authored by Xiaowu Zhang's avatar Xiaowu Zhang

Release version 3.2.1

parent c3e09acc
/*! jio v3.2.0 2015-07-10 */ /*! jio v3.2.1 2015-07-10 */
function Query(){this.onParseStart=emptyFunction,this.onParseSimpleQuery=emptyFunction,this.onParseComplexQuery=emptyFunction,this.onParseEnd=emptyFunction}function parseStringToObject(a){function b(a){g+=a+"\n"}function c(a){var b=0,c=-1,d=0,e=0,f=a.offset+1;do{if(f--,b=0,c=-2,e=f,a.src.length<=e)return 19;do{switch(b){case 0:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=8||a.src.charCodeAt(f)>=10&&a.src.charCodeAt(f)<=31||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||59==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=63&&a.src.charCodeAt(f)<=64||a.src.charCodeAt(f)>=66&&a.src.charCodeAt(f)<=77||a.src.charCodeAt(f)>=80&&a.src.charCodeAt(f)<=254?1:9==a.src.charCodeAt(f)?2:40==a.src.charCodeAt(f)?3:41==a.src.charCodeAt(f)?4:60==a.src.charCodeAt(f)||62==a.src.charCodeAt(f)?5:33==a.src.charCodeAt(f)?11:79==a.src.charCodeAt(f)?12:32==a.src.charCodeAt(f)?13:61==a.src.charCodeAt(f)?14:34==a.src.charCodeAt(f)?15:65==a.src.charCodeAt(f)?19:78==a.src.charCodeAt(f)?20:-1;break;case 1:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=10,d=f;break;case 2:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=1,d=f;break;case 3:b=-1,c=3,d=f;break;case 4:b=-1,c=4,d=f;break;case 5:b=61==a.src.charCodeAt(f)?14:-1,c=11,d=f;break;case 6:b=-1,c=8,d=f;break;case 7:b=-1,c=9,d=f;break;case 8:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=6,d=f;break;case 9:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=5,d=f;break;case 10:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=7,d=f;break;case 11:b=61==a.src.charCodeAt(f)?14:-1;break;case 12:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=81||a.src.charCodeAt(f)>=83&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:82==a.src.charCodeAt(f)?8:-1,c=10,d=f;break;case 13:b=-1,c=1,d=f;break;case 14:b=-1,c=11,d=f;break;case 15:b=34==a.src.charCodeAt(f)?7:a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=33||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=91||a.src.charCodeAt(f)>=93&&a.src.charCodeAt(f)<=254||a.src.charCodeAt(f)>255?15:92==a.src.charCodeAt(f)?17:-1;break;case 16:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=67||a.src.charCodeAt(f)>=69&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:68==a.src.charCodeAt(f)?9:-1,c=10,d=f;break;case 17:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=254?15:-1;break;case 18:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=83||a.src.charCodeAt(f)>=85&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:84==a.src.charCodeAt(f)?10:-1,c=10,d=f;break;case 19:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=77||a.src.charCodeAt(f)>=79&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:78==a.src.charCodeAt(f)?16:-1,c=10,d=f;break;case 20:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=78||a.src.charCodeAt(f)>=80&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:79==a.src.charCodeAt(f)?18:-1,c=10,d=f}f++}while(b>-1)}while(1==c);return c>-1?(a.att=a.src.substr(e,d-e),a.offset=d):(a.att=new String,c=-1),c}function d(a,d,h){var m,n,o,p,q=new Array,r=new Array,s=0,t=new Function("","var offset; var src; var att;"),u=new t,v=new Array(new Array(0,1),new Array(13,1),new Array(12,1),new Array(12,2),new Array(12,3),new Array(14,1),new Array(14,3),new Array(15,2),new Array(15,1),new Array(16,3),new Array(16,2),new Array(16,1),new Array(17,2),new Array(17,1),new Array(18,1),new Array(18,1)),w=new Array(new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,0),new Array(19,-1),new Array(6,14,7,5,3,7,8,8,11,10,10,12,9,13,19,-2,4,-2),new Array(5,16,19,-5,7,-5,3,-5,8,-5,11,-5,10,-5,9,-5,6,-5,4,-5),new Array(3,7,8,8,11,10,10,12,9,13),new Array(19,-8,7,-8,3,-8,8,-8,11,-8,10,-8,9,-8,6,-8,5,-8,4,-8),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(3,7,8,8,11,10,10,12,9,13),new Array(19,-11,7,-11,3,-11,8,-11,11,-11,10,-11,9,-11,6,-11,5,-11,4,-11),new Array(10,12,9,13),new Array(19,-13,7,-13,3,-13,8,-13,11,-13,10,-13,9,-13,6,-13,5,-13,4,-13),new Array(19,-14,7,-14,3,-14,8,-14,11,-14,10,-14,9,-14,6,-14,5,-14,4,-14),new Array(19,-15,7,-15,3,-15,8,-15,11,-15,10,-15,9,-15,6,-15,5,-15,4,-15),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,-3,4,-3),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,-7,7,-7,3,-7,8,-7,11,-7,10,-7,9,-7,6,-7,5,-7,4,-7),new Array(4,23),new Array(19,-10,7,-10,3,-10,8,-10,11,-10,10,-10,9,-10,6,-10,5,-10,4,-10),new Array(19,-12,7,-12,3,-12,8,-12,11,-12,10,-12,9,-12,6,-12,5,-12,4,-12),new Array(19,-4,4,-4),new Array(19,-6,7,-6,3,-6,8,-6,11,-6,10,-6,9,-6,6,-6,4,-6),new Array(19,-9,7,-9,3,-9,8,-9,11,-9,10,-9,9,-9,6,-9,5,-9,4,-9)),x=new Array(new Array(13,1,12,2,14,3,15,4,16,6,17,9,18,11),new Array,new Array,new Array(12,15,14,3,15,4,16,6,17,9,18,11),new Array,new Array(16,17,17,9,18,11),new Array,new Array(12,18,14,3,15,4,16,6,17,9,18,11),new Array(16,19,17,9,18,11),new Array,new Array(18,20),new Array,new Array,new Array,new Array(12,21,14,3,15,4,16,6,17,9,18,11),new Array,new Array(14,22,15,4,16,6,17,9,18,11),new Array,new Array,new Array,new Array,new Array,new Array,new Array),y=new Array("begin'","WHITESPACE","WHITESPACE","LEFT_PARENTHESE","RIGHT_PARENTHESE","AND","OR","NOT","COLUMN","STRING","WORD","OPERATOR","search_text","begin","and_expression","boolean_expression","expression","value","string","$");for(u.offset=0,u.src=a,u.att=new String,d||(d=new Array),h||(h=new Array),q.push(0),r.push(0),o=c(u);;){m=25;for(var z=0;z<w[q[q.length-1]].length;z+=2)if(w[q[q.length-1]][z]==o){m=w[q[q.length-1]][z+1];break}if(f&&q.length>0&&b("\nState "+q[q.length-1]+"\n Lookahead: "+y[o]+' ("'+u.att+'")\n Action: '+m+'\n Source: "'+u.src.substr(u.offset,30)+(u.offset+30<u.src.length?"...":"")+'"\n Stack: '+q.join()+"\n Value stack: "+r.join()+"\n"),25==m){f&&b("Error detected: There is no reduce or shift on the symbol "+y[o]),s++,d.push(u.offset-u.att.length),h.push(new Array);for(var z=0;z<w[q[q.length-1]].length;z+=2)h[h.length-1].push(y[w[q[q.length-1]][z]]);for(var A=new Array,B=new Array,z=0;z<q.length;z++)A[z]=q[z],B[z]=r[z];for(;25==m&&19!=o;){for(f&&b(" Error recovery\nCurrent lookahead: "+y[o]+" ("+u.att+")\nAction: "+m+"\n\n"),-1==o&&u.offset++;25==m&&q.length>0&&(q.pop(),r.pop(),0!=q.length);){m=25;for(var z=0;z<w[q[q.length-1]].length;z+=2)if(w[q[q.length-1]][z]==o){m=w[q[q.length-1]][z+1];break}}if(25!=m)break;for(var z=0;z<A.length;z++)q.push(A[z]),r.push(B[z]);o=c(u)}if(25==m){f&&b(" Error recovery failed, terminating parse process...");break}f&&b(" Error recovery succeeded, continuing")}if(m>0)f&&b("Shifting symbol: "+y[o]+" ("+u.att+")"),q.push(m),r.push(u.att),o=c(u),f&&b(" New lookahead symbol: "+y[o]+" ("+u.att+")");else{switch(m*=-1,f&&b("Reducing by producution: "+m),p=void 0,f&&b(" Performing semantic action..."),m){case 0:p=r[r.length-1];break;case 1:e=r[r.length-1];break;case 2:p=r[r.length-1];break;case 3:p=k("OR",[r[r.length-2],r[r.length-1]]);break;case 4:p=k("OR",[r[r.length-3],r[r.length-1]]);break;case 5:p=r[r.length-1];break;case 6:p=k("AND",[r[r.length-3],r[r.length-1]]);break;case 7:p=j(r[r.length-1]);break;case 8:p=r[r.length-1];break;case 9:p=r[r.length-2];break;case 10:l(r[r.length-1],r[r.length-2].split(":").slice(0,-1).join(":")),p=r[r.length-1];break;case 11:p=r[r.length-1];break;case 12:r[r.length-1].operator=r[r.length-2],p=r[r.length-1];break;case 13:p=r[r.length-1];break;case 14:p=i("",r[r.length-1]);break;case 15:p=i("",r[r.length-1].split('"').slice(1,-1).join('"'))}f&&b(" Popping "+v[m][1]+" off the stack...");for(var z=0;z<v[m][1];z++)q.pop(),r.pop();n=-1;for(var z=0;z<x[q[q.length-1]].length;z+=2)if(x[q[q.length-1]][z]==v[m][0]){n=x[q[q.length-1]][z+1];break}if(0==m)break;f&&b(" Pushing non-terminal "+y[v[m][0]]),q.push(n),r.push(p)}f&&(alert(g),g=new String)}return f&&(b("\nParse complete."),alert(g)),s}var e,f=!1,g=new String,h=function(){var a,b,c=[],d=arguments;for(a=0;a<d.length;a+=1)for(b=0;b<d[a].length;b+=1)c.push(d[a][b]);return c},i=function(a,b,c){var d={type:"simple",key:a,value:b};return void 0!==c&&(d.operator=c),d},j=function(a){return"NOT"===a.operator?a.query_list[0]:{type:"complex",operator:"NOT",query_list:[a]}},k=function(a,b){var c,d=[];for(c=0;c<b.length;c+=1)b[c].operator===a?d=h(d,b[c].query_list):d.push(b[c]);return{type:"complex",operator:a,query_list:d}},l=function(a,b){var c;if("complex"===a.type){for(c=0;c<a.query_list.length;++c)l(a.query_list[c],b);return!0}return"simple"!==a.type||a.key?!1:(a.key=b,!0)},m=[],n=[],o=0;if((o=d(a,m,n))>0){var p;for(p=0;o>p;p+=1)throw new Error('Parse error near "'+a.substr(m[p])+'", expecting "'+n[p].join()+'"')}return e}function ComplexQuery(a,b){Query.call(this),this.operator=a.operator,this.query_list=a.query_list||[],this.query_list=this.query_list.map(function(a,c){return QueryFactory.create(a,b)})}function QueryFactory(){}function objectToSearchText(a){var b=[];if("complex"===a.type)return b.push("("),(a.query_list||[]).forEach(function(c){b.push(objectToSearchText(c)),b.push(a.operator)}),b.length-=1,b.push(")"),b.join(" ");if("simple"===a.type)return(a.key?a.key+": ":"")+(a.operator||"")+' "'+a.value+'"';throw new TypeError("This object is not a query")}function SimpleQuery(a,b){Query.call(this),checkKeySchema(b),this._key_schema=b||{},this.operator=a.operator,this.key=a.key,this.value=a.value}function stringEscapeRegexpCharacters(a){if("string"==typeof a)return a.replace(/([\\\.\$\[\]\(\)\{\}\^\?\*\+\-])/g,"\\$1");throw new TypeError("Query.stringEscapeRegexpCharacters(): Argument no 1 is not of type 'string'")}function metadataValueToStringArray(a){var b,c=[];if(void 0===a)return void 0;for(Array.isArray(a)||(a=[a]),b=0;b<a.length;b+=1)"object"==typeof a[b]?c[b]=a[b].content:c[b]=a[b];return c}function sortFunction(a,b){var c;if("descending"===b)c=1;else{if("ascending"!==b)throw new TypeError("Query.sortFunction(): Argument 2 must be 'ascending' or 'descending'");c=-1}return function(b,d){var e,f;for(b=metadataValueToStringArray(b[a])||[],d=metadataValueToStringArray(d[a])||[],f=b.length>d.length?b.length:d.length,e=0;f>e;e+=1){if(void 0===b[e])return c;if(void 0===d[e])return-c;if(b[e]>d[e])return-c;if(b[e]<d[e])return c}return 0}}function inherits(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{configurable:!0,enumerable:!1,writable:!0,value:a}})}function emptyFunction(){}function select(a,b,c){var d,e,f;if(!Array.isArray(a))throw new TypeError("jioquery.select(): Argument 1 is not of type Array");if(!Array.isArray(b))throw new TypeError("jioquery.select(): Argument 2 is not of type Array");for(c===!0&&(b=deepClone(b)),d=0;d<b.length;d+=1){for(f={},e=0;e<a.length;e+=1)b[d].hasOwnProperty([a[e]])&&(f[a[e]]=b[d][a[e]]);for(e in f)if(f.hasOwnProperty(e)){b[d]=f;break}}return b}function sortOn(a,b,c){var d;if(!Array.isArray(a))throw new TypeError("jioquery.sortOn(): Argument 1 is not of type 'array'");for(c&&(b=deepClone(b)),d=a.length-1;d>=0;d-=1)b.sort(sortFunction(a[d][0],a[d][1]));return b}function limit(a,b,c){if(!Array.isArray(a))throw new TypeError("jioquery.limit(): Argument 1 is not of type 'array'");if(!Array.isArray(b))throw new TypeError("jioquery.limit(): Argument 2 is not of type 'array'");return c&&(b=deepClone(b)),b.splice(0,a[0]),a[1]&&b.splice(a[1]),b}function searchTextToRegExp(a,b){if("string"!=typeof a)throw new TypeError("jioquery.searchTextToRegExp(): Argument 1 is not of type 'string'");return b===!1?new RegExp("^"+stringEscapeRegexpCharacters(a)+"$"):new RegExp("^"+stringEscapeRegexpCharacters(a).replace(/%/g,".*").replace(/_/g,".")+"$")}!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.IPv6=b(a)}(this,function(a){var b=a&&a.IPv6;return{best:function(a){a=a.toLowerCase().split(":");var b=a.length,c=8;""===a[0]&&""===a[1]&&""===a[2]?(a.shift(),a.shift()):""===a[0]&&""===a[1]?a.shift():""===a[b-1]&&""===a[b-2]&&a.pop(),b=a.length,-1!==a[b-1].indexOf(".")&&(c=7);var d;for(d=0;b>d&&""!==a[d];d++);if(c>d)for(a.splice(d,1,"0000");a.length<c;)a.splice(d,0,"0000");for(d=0;c>d;d++){for(var b=a[d].split(""),e=0;3>e&&("0"===b[0]&&1<b.length);e++)b.splice(0,1);a[d]=b.join("")}var b=-1,f=e=0,g=-1,h=!1;for(d=0;c>d;d++)h?"0"===a[d]?f+=1:(h=!1,f>e&&(b=g,e=f)):"0"==a[d]&&(h=!0,g=d,f=1);for(f>e&&(b=g,e=f),e>1&&a.splice(b,e,""),b=a.length,c="",""===a[0]&&(beststr=":"),d=0;b>d&&(c+=a[d],d!==b-1);d++)c+=":";return""===a[b-1]&&(c+=":"),c},noConflict:function(){return a.IPv6===this&&(a.IPv6=b),this}}}),function(a){function b(a){throw RangeError(B[a])}function c(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function d(a,b){return c(a.split(A),b).join(".")}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=E(a>>>10&1023|55296),a=56320|1023&a),b+=E(a)}).join("")}function g(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function h(a,b,c){var d=0;for(a=c?D(a/u):a>>1,a+=D(a/b);a>C*s>>1;d+=q)a=D(a/C);return D(d+(C+1)*a/(a+t))}function i(a){var c,d,e,g,i,j,k=[],l=a.length,m=0,n=w,o=v;for(d=a.lastIndexOf(x),0>d&&(d=0),e=0;d>e;++e)128<=a.charCodeAt(e)&&b("not-basic"),k.push(a.charCodeAt(e));for(d=d>0?d+1:0;l>d;){for(e=m,c=1,g=q;d>=l&&b("invalid-input"),i=a.charCodeAt(d++),i=10>i-48?i-22:26>i-65?i-65:26>i-97?i-97:q,(i>=q||i>D((p-m)/c))&&b("overflow"),m+=i*c,j=o>=g?r:g>=o+s?s:g-o,!(j>i);g+=q)i=q-j,c>D(p/i)&&b("overflow"),c*=i;c=k.length+1,o=h(m-e,c,0==e),D(m/c)>p-n&&b("overflow"),n+=D(m/c),m%=c,k.splice(m++,0,n)}return f(k)}function j(a){var c,d,f,i,j,k,l,m,n,o,t,u,y=[];for(a=e(a),o=a.length,c=w,d=0,j=v,k=0;o>k;++k)n=a[k],128>n&&y.push(E(n));for((f=i=y.length)&&y.push(x);o>f;){for(l=p,k=0;o>k;++k)n=a[k],n>=c&&l>n&&(l=n);for(t=f+1,l-c>D((p-d)/t)&&b("overflow"),d+=(l-c)*t,c=l,k=0;o>k;++k)if(n=a[k],c>n&&++d>p&&b("overflow"),n==c){for(m=d,l=q;n=j>=l?r:l>=j+s?s:l-j,!(n>m);l+=q)u=m-n,m=q-n,y.push(E(g(n+u%m,0))),m=D(u/m);y.push(E(g(m,0))),j=h(d,t,f==i),d=0,++f}++d,++c}return y.join("")}var k="object"==typeof exports&&exports,l="object"==typeof module&&module&&module.exports==k&&module,m="object"==typeof global&&global;(m.global===m||m.window===m)&&(a=m);var n,o,p=2147483647,q=36,r=1,s=26,t=38,u=700,v=72,w=128,x="-",y=/^xn--/,z=/[^ -~]/,A=/\x2E|\u3002|\uFF0E|\uFF61/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=q-r,D=Math.floor,E=String.fromCharCode;if(n={version:"1.2.3",ucs2:{decode:e,encode:f},decode:i,encode:j,toASCII:function(a){return d(a,function(a){return z.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return d(a,function(a){return y.test(a)?i(a.slice(4).toLowerCase()):a})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return n});else if(k&&!k.nodeType)if(l)l.exports=n;else for(o in n)n.hasOwnProperty(o)&&(k[o]=n[o]);else a.punycode=n}(this),function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.SecondLevelDomains=b(a)}(this,function(a){var b=a&&a.SecondLevelDomains,c=Object.prototype.hasOwnProperty,d={list:{ac:"com|gov|mil|net|org",ae:"ac|co|gov|mil|name|net|org|pro|sch",af:"com|edu|gov|net|org",al:"com|edu|gov|mil|net|org",ao:"co|ed|gv|it|og|pb",ar:"com|edu|gob|gov|int|mil|net|org|tur",at:"ac|co|gv|or",au:"asn|com|csiro|edu|gov|id|net|org",ba:"co|com|edu|gov|mil|net|org|rs|unbi|unmo|unsa|untz|unze",bb:"biz|co|com|edu|gov|info|net|org|store|tv",bh:"biz|cc|com|edu|gov|info|net|org",bn:"com|edu|gov|net|org",bo:"com|edu|gob|gov|int|mil|net|org|tv",br:"adm|adv|agr|am|arq|art|ato|b|bio|blog|bmd|cim|cng|cnt|com|coop|ecn|edu|eng|esp|etc|eti|far|flog|fm|fnd|fot|fst|g12|ggf|gov|imb|ind|inf|jor|jus|lel|mat|med|mil|mus|net|nom|not|ntr|odo|org|ppg|pro|psc|psi|qsl|rec|slg|srv|tmp|trd|tur|tv|vet|vlog|wiki|zlg",bs:"com|edu|gov|net|org",bz:"du|et|om|ov|rg",ca:"ab|bc|mb|nb|nf|nl|ns|nt|nu|on|pe|qc|sk|yk",ck:"biz|co|edu|gen|gov|info|net|org",cn:"ac|ah|bj|com|cq|edu|fj|gd|gov|gs|gx|gz|ha|hb|he|hi|hl|hn|jl|js|jx|ln|mil|net|nm|nx|org|qh|sc|sd|sh|sn|sx|tj|tw|xj|xz|yn|zj",co:"com|edu|gov|mil|net|nom|org",cr:"ac|c|co|ed|fi|go|or|sa",cy:"ac|biz|com|ekloges|gov|ltd|name|net|org|parliament|press|pro|tm","do":"art|com|edu|gob|gov|mil|net|org|sld|web",dz:"art|asso|com|edu|gov|net|org|pol",ec:"com|edu|fin|gov|info|med|mil|net|org|pro",eg:"com|edu|eun|gov|mil|name|net|org|sci",er:"com|edu|gov|ind|mil|net|org|rochest|w",es:"com|edu|gob|nom|org",et:"biz|com|edu|gov|info|name|net|org",fj:"ac|biz|com|info|mil|name|net|org|pro",fk:"ac|co|gov|net|nom|org",fr:"asso|com|f|gouv|nom|prd|presse|tm",gg:"co|net|org",gh:"com|edu|gov|mil|org",gn:"ac|com|gov|net|org",gr:"com|edu|gov|mil|net|org",gt:"com|edu|gob|ind|mil|net|org",gu:"com|edu|gov|net|org",hk:"com|edu|gov|idv|net|org",id:"ac|co|go|mil|net|or|sch|web",il:"ac|co|gov|idf|k12|muni|net|org","in":"ac|co|edu|ernet|firm|gen|gov|i|ind|mil|net|nic|org|res",iq:"com|edu|gov|i|mil|net|org",ir:"ac|co|dnssec|gov|i|id|net|org|sch",it:"edu|gov",je:"co|net|org",jo:"com|edu|gov|mil|name|net|org|sch",jp:"ac|ad|co|ed|go|gr|lg|ne|or",ke:"ac|co|go|info|me|mobi|ne|or|sc",kh:"com|edu|gov|mil|net|org|per",ki:"biz|com|de|edu|gov|info|mob|net|org|tel",km:"asso|com|coop|edu|gouv|k|medecin|mil|nom|notaires|pharmaciens|presse|tm|veterinaire",kn:"edu|gov|net|org",kr:"ac|busan|chungbuk|chungnam|co|daegu|daejeon|es|gangwon|go|gwangju|gyeongbuk|gyeonggi|gyeongnam|hs|incheon|jeju|jeonbuk|jeonnam|k|kg|mil|ms|ne|or|pe|re|sc|seoul|ulsan",kw:"com|edu|gov|net|org",ky:"com|edu|gov|net|org",kz:"com|edu|gov|mil|net|org",lb:"com|edu|gov|net|org",lk:"assn|com|edu|gov|grp|hotel|int|ltd|net|ngo|org|sch|soc|web",lr:"com|edu|gov|net|org",lv:"asn|com|conf|edu|gov|id|mil|net|org",ly:"com|edu|gov|id|med|net|org|plc|sch",ma:"ac|co|gov|m|net|org|press",mc:"asso|tm",me:"ac|co|edu|gov|its|net|org|priv",mg:"com|edu|gov|mil|nom|org|prd|tm",mk:"com|edu|gov|inf|name|net|org|pro",ml:"com|edu|gov|net|org|presse",mn:"edu|gov|org",mo:"com|edu|gov|net|org",mt:"com|edu|gov|net|org",mv:"aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro",mw:"ac|co|com|coop|edu|gov|int|museum|net|org",mx:"com|edu|gob|net|org",my:"com|edu|gov|mil|name|net|org|sch",nf:"arts|com|firm|info|net|other|per|rec|store|web",ng:"biz|com|edu|gov|mil|mobi|name|net|org|sch",ni:"ac|co|com|edu|gob|mil|net|nom|org",np:"com|edu|gov|mil|net|org",nr:"biz|com|edu|gov|info|net|org",om:"ac|biz|co|com|edu|gov|med|mil|museum|net|org|pro|sch",pe:"com|edu|gob|mil|net|nom|org|sld",ph:"com|edu|gov|i|mil|net|ngo|org",pk:"biz|com|edu|fam|gob|gok|gon|gop|gos|gov|net|org|web",pl:"art|bialystok|biz|com|edu|gda|gdansk|gorzow|gov|info|katowice|krakow|lodz|lublin|mil|net|ngo|olsztyn|org|poznan|pwr|radom|slupsk|szczecin|torun|warszawa|waw|wroc|wroclaw|zgora",pr:"ac|biz|com|edu|est|gov|info|isla|name|net|org|pro|prof",ps:"com|edu|gov|net|org|plo|sec",pw:"belau|co|ed|go|ne|or",ro:"arts|com|firm|info|nom|nt|org|rec|store|tm|www",rs:"ac|co|edu|gov|in|org",sb:"com|edu|gov|net|org",sc:"com|edu|gov|net|org",sh:"co|com|edu|gov|net|nom|org",sl:"com|edu|gov|net|org",st:"co|com|consulado|edu|embaixada|gov|mil|net|org|principe|saotome|store",sv:"com|edu|gob|org|red",sz:"ac|co|org",tr:"av|bbs|bel|biz|com|dr|edu|gen|gov|info|k12|name|net|org|pol|tel|tsk|tv|web",tt:"aero|biz|cat|co|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel",tw:"club|com|ebiz|edu|game|gov|idv|mil|net|org",mu:"ac|co|com|gov|net|or|org",mz:"ac|co|edu|gov|org",na:"co|com",nz:"ac|co|cri|geek|gen|govt|health|iwi|maori|mil|net|org|parliament|school",pa:"abo|ac|com|edu|gob|ing|med|net|nom|org|sld",pt:"com|edu|gov|int|net|nome|org|publ",py:"com|edu|gov|mil|net|org",qa:"com|edu|gov|mil|net|org",re:"asso|com|nom",ru:"ac|adygeya|altai|amur|arkhangelsk|astrakhan|bashkiria|belgorod|bir|bryansk|buryatia|cbg|chel|chelyabinsk|chita|chukotka|chuvashia|com|dagestan|e-burg|edu|gov|grozny|int|irkutsk|ivanovo|izhevsk|jar|joshkar-ola|kalmykia|kaluga|kamchatka|karelia|kazan|kchr|kemerovo|khabarovsk|khakassia|khv|kirov|koenig|komi|kostroma|kranoyarsk|kuban|kurgan|kursk|lipetsk|magadan|mari|mari-el|marine|mil|mordovia|mosreg|msk|murmansk|nalchik|net|nnov|nov|novosibirsk|nsk|omsk|orenburg|org|oryol|penza|perm|pp|pskov|ptz|rnd|ryazan|sakhalin|samara|saratov|simbirsk|smolensk|spb|stavropol|stv|surgut|tambov|tatarstan|tom|tomsk|tsaritsyn|tsk|tula|tuva|tver|tyumen|udm|udmurtia|ulan-ude|vladikavkaz|vladimir|vladivostok|volgograd|vologda|voronezh|vrn|vyatka|yakutia|yamal|yekaterinburg|yuzhno-sakhalinsk",rw:"ac|co|com|edu|gouv|gov|int|mil|net",sa:"com|edu|gov|med|net|org|pub|sch",sd:"com|edu|gov|info|med|net|org|tv",se:"a|ac|b|bd|c|d|e|f|g|h|i|k|l|m|n|o|org|p|parti|pp|press|r|s|t|tm|u|w|x|y|z",sg:"com|edu|gov|idn|net|org|per",sn:"art|com|edu|gouv|org|perso|univ",sy:"com|edu|gov|mil|net|news|org",th:"ac|co|go|in|mi|net|or",tj:"ac|biz|co|com|edu|go|gov|info|int|mil|name|net|nic|org|test|web",tn:"agrinet|com|defense|edunet|ens|fin|gov|ind|info|intl|mincom|nat|net|org|perso|rnrt|rns|rnu|tourism",tz:"ac|co|go|ne|or",ua:"biz|cherkassy|chernigov|chernovtsy|ck|cn|co|com|crimea|cv|dn|dnepropetrovsk|donetsk|dp|edu|gov|if|in|ivano-frankivsk|kh|kharkov|kherson|khmelnitskiy|kiev|kirovograd|km|kr|ks|kv|lg|lugansk|lutsk|lviv|me|mk|net|nikolaev|od|odessa|org|pl|poltava|pp|rovno|rv|sebastopol|sumy|te|ternopil|uzhgorod|vinnica|vn|zaporizhzhe|zhitomir|zp|zt",ug:"ac|co|go|ne|or|org|sc",uk:"ac|bl|british-library|co|cym|gov|govt|icnet|jet|lea|ltd|me|mil|mod|national-library-scotland|nel|net|nhs|nic|nls|org|orgn|parliament|plc|police|sch|scot|soc",us:"dni|fed|isa|kids|nsn",uy:"com|edu|gub|mil|net|org",ve:"co|com|edu|gob|info|mil|net|org|web",vi:"co|com|k12|net|org",vn:"ac|biz|com|edu|gov|health|info|int|name|net|org|pro",ye:"co|com|gov|ltd|me|net|org|plc",yu:"ac|co|edu|gov|org",za:"ac|agric|alt|bourse|city|co|cybernet|db|edu|gov|grondar|iaccess|imt|inca|landesign|law|mil|net|ngo|nis|nom|olivetti|org|pix|school|tm|web",zm:"ac|co|com|edu|gov|net|org|sch"},has_expression:null,is_expression:null,has:function(a){return!!a.match(d.has_expression)},is:function(a){return!!a.match(d.is_expression)},get:function(a){return(a=a.match(d.has_expression))&&a[1]||null},noConflict:function(){return a.SecondLevelDomains===this&&(a.SecondLevelDomains=b),this},init:function(){var a,b="";for(a in d.list)c.call(d.list,a)&&(b+="|("+("("+d.list[a]+")."+a)+")");d.has_expression=RegExp("\\.("+b.substr(1)+")$","i"),d.is_expression=RegExp("^("+b.substr(1)+")$","i")}};return d.init(),d}),function(a,b){"object"==typeof exports?module.exports=b(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],b):a.URI=b(a.punycode,a.IPv6,a.SecondLevelDomains,a)}(this,function(a,b,c,d){function e(a,b){return this instanceof e?(void 0===a&&(a="undefined"!=typeof location?location.href+"":""),this.href(a),void 0!==b?this.absoluteTo(b):this):new e(a,b)}function f(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function g(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function h(a){return"Array"===g(a)}function i(a,b){var c,d;if(h(b)){for(c=0,d=b.length;d>c;c++)if(!i(a,b[c]))return!1;return!0}var e=g(b);for(c=0,d=a.length;d>c;c++)if("RegExp"===e){if("string"==typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function j(a,b){if(!h(a)||!h(b)||a.length!==b.length)return!1;a.sort(),b.sort();for(var c=0,d=a.length;d>c;c++)if(a[c]!==b[c])return!1;return!0}function k(a){return escape(a)}function l(a){return encodeURIComponent(a).replace(/[!'()*]/g,k).replace(/\*/g,"%2A")}var m=d&&d.URI;e.version="1.12.0";var n=e.prototype,o=Object.prototype.hasOwnProperty;e._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:e.duplicateQueryParameters,escapeQuerySpace:e.escapeQuerySpace}},e.duplicateQueryParameters=!1,e.escapeQuerySpace=!0,e.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,e.idn_expression=/[^a-z0-9\.-]/i,e.punycode_expression=/(xn--)/i,e.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,e.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,e.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,e.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/},e.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},e.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,e.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src"},e.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}},e.encode=l,e.decode=decodeURIComponent,e.iso8859=function(){e.encode=escape,e.decode=unescape},e.unicode=function(){e.encode=l,e.decode=decodeURIComponent},e.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}},e.encodeQuery=function(a,b){var c=e.encode(a+"");return b?c.replace(/%20/g,"+"):c},e.decodeQuery=function(a,b){a+="";try{return e.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}},e.recodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.encodePathSegment(e.decode(a[b]));return a.join("/")},e.decodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.decodePathSegment(a[b]);return a.join("/")};var p,q={encode:"encode",decode:"decode"},r=function(a,b){return function(c){return e[b](c+"").replace(e.characters[a][b].expression,function(c){return e.characters[a][b].map[c]})}};for(p in q)e[p+"PathSegment"]=r("pathname",q[p]);e.encodeReserved=r("reserved","encode"),e.parse=function(a,b){var c;return b||(b={}),c=a.indexOf("#"),c>-1&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c)),c=a.indexOf("?"),c>-1&&(b.query=a.substring(c+1)||null,a=a.substring(0,c)),"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=e.parseAuthority(a,b)):(c=a.indexOf(":"),c>-1&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(e.protocol_expression)?b.protocol=void 0:"file"===b.protocol?a=a.substring(c+3):"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=e.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0))),b.path=a,b},e.parseHost=function(a,b){var c,d=a.indexOf("/");return-1===d&&(d=a.length),"["===a.charAt(0)?(c=a.indexOf("]"),b.hostname=a.substring(1,c)||null,b.port=a.substring(c+2,d)||null):a.indexOf(":")!==a.lastIndexOf(":")?(b.hostname=a.substring(0,d)||null,b.port=null):(c=a.substring(0,d).split(":"),b.hostname=c[0]||null,b.port=c[1]||null),b.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a),a.substring(d)||"/"},e.parseAuthority=function(a,b){return a=e.parseUserinfo(a,b),e.parseHost(a,b)},e.parseUserinfo=function(a,b){var c=a.indexOf("/"),d=c>-1?a.lastIndexOf("@",c):a.indexOf("@");return d>-1&&(-1===c||c>d)?(c=a.substring(0,d).split(":"),b.username=c[0]?e.decode(c[0]):null,c.shift(),b.password=c[0]?e.decode(c.join(":")):null,a=a.substring(d+1)):(b.username=null,b.password=null),a},e.parseQuery=function(a,b){if(!a)return{};if(a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!a)return{};for(var c,d,f={},g=a.split("&"),h=g.length,i=0;h>i;i++)c=g[i].split("="),d=e.decodeQuery(c.shift(),b),c=c.length?e.decodeQuery(c.join("="),b):null,f[d]?("string"==typeof f[d]&&(f[d]=[f[d]]),f[d].push(c)):f[d]=c;return f},e.build=function(a){var b="";return a.protocol&&(b+=a.protocol+":"),a.urn||!b&&!a.hostname||(b+="//"),b+=e.buildAuthority(a)||"","string"==typeof a.path&&("/"!==a.path.charAt(0)&&"string"==typeof a.hostname&&(b+="/"),b+=a.path),"string"==typeof a.query&&a.query&&(b+="?"+a.query),"string"==typeof a.fragment&&a.fragment&&(b+="#"+a.fragment),b},e.buildHost=function(a){var b="";return a.hostname?(e.ip6_expression.test(a.hostname)?b=a.port?b+("["+a.hostname+"]:"+a.port):b+a.hostname:(b+=a.hostname,a.port&&(b+=":"+a.port)),b):""},e.buildAuthority=function(a){return e.buildUserinfo(a)+e.buildHost(a)},e.buildUserinfo=function(a){var b="";return a.username&&(b+=e.encode(a.username),a.password&&(b+=":"+e.encode(a.password)),b+="@"),b},e.buildQuery=function(a,b,c){var d,f,g,i,j="";for(f in a)if(o.call(a,f)&&f)if(h(a[f]))for(d={},g=0,i=a[f].length;i>g;g++)void 0!==a[f][g]&&void 0===d[a[f][g]+""]&&(j+="&"+e.buildQueryParameter(f,a[f][g],c), function Query(){this.onParseStart=emptyFunction,this.onParseSimpleQuery=emptyFunction,this.onParseComplexQuery=emptyFunction,this.onParseEnd=emptyFunction}function parseStringToObject(a){function b(a){g+=a+"\n"}function c(a){var b=0,c=-1,d=0,e=0,f=a.offset+1;do{if(f--,b=0,c=-2,e=f,a.src.length<=e)return 19;do{switch(b){case 0:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=8||a.src.charCodeAt(f)>=10&&a.src.charCodeAt(f)<=31||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||59==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=63&&a.src.charCodeAt(f)<=64||a.src.charCodeAt(f)>=66&&a.src.charCodeAt(f)<=77||a.src.charCodeAt(f)>=80&&a.src.charCodeAt(f)<=254?1:9==a.src.charCodeAt(f)?2:40==a.src.charCodeAt(f)?3:41==a.src.charCodeAt(f)?4:60==a.src.charCodeAt(f)||62==a.src.charCodeAt(f)?5:33==a.src.charCodeAt(f)?11:79==a.src.charCodeAt(f)?12:32==a.src.charCodeAt(f)?13:61==a.src.charCodeAt(f)?14:34==a.src.charCodeAt(f)?15:65==a.src.charCodeAt(f)?19:78==a.src.charCodeAt(f)?20:-1;break;case 1:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=10,d=f;break;case 2:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=1,d=f;break;case 3:b=-1,c=3,d=f;break;case 4:b=-1,c=4,d=f;break;case 5:b=61==a.src.charCodeAt(f)?14:-1,c=11,d=f;break;case 6:b=-1,c=8,d=f;break;case 7:b=-1,c=9,d=f;break;case 8:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=6,d=f;break;case 9:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=5,d=f;break;case 10:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:-1,c=7,d=f;break;case 11:b=61==a.src.charCodeAt(f)?14:-1;break;case 12:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=81||a.src.charCodeAt(f)>=83&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:82==a.src.charCodeAt(f)?8:-1,c=10,d=f;break;case 13:b=-1,c=1,d=f;break;case 14:b=-1,c=11,d=f;break;case 15:b=34==a.src.charCodeAt(f)?7:a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=33||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=91||a.src.charCodeAt(f)>=93&&a.src.charCodeAt(f)<=254||a.src.charCodeAt(f)>255?15:92==a.src.charCodeAt(f)?17:-1;break;case 16:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=67||a.src.charCodeAt(f)>=69&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:68==a.src.charCodeAt(f)?9:-1,c=10,d=f;break;case 17:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=254?15:-1;break;case 18:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=83||a.src.charCodeAt(f)>=85&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:84==a.src.charCodeAt(f)?10:-1,c=10,d=f;break;case 19:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=77||a.src.charCodeAt(f)>=79&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:78==a.src.charCodeAt(f)?16:-1,c=10,d=f;break;case 20:b=a.src.charCodeAt(f)>=0&&a.src.charCodeAt(f)<=31||33==a.src.charCodeAt(f)||a.src.charCodeAt(f)>=35&&a.src.charCodeAt(f)<=39||a.src.charCodeAt(f)>=42&&a.src.charCodeAt(f)<=57||a.src.charCodeAt(f)>=59&&a.src.charCodeAt(f)<=78||a.src.charCodeAt(f)>=80&&a.src.charCodeAt(f)<=254?1:58==a.src.charCodeAt(f)?6:79==a.src.charCodeAt(f)?18:-1,c=10,d=f}f++}while(b>-1)}while(1==c);return c>-1?(a.att=a.src.substr(e,d-e),a.offset=d):(a.att=new String,c=-1),c}function d(a,d,h){var m,n,o,p,q=new Array,r=new Array,s=0,t=new Function("","var offset; var src; var att;"),u=new t,v=new Array(new Array(0,1),new Array(13,1),new Array(12,1),new Array(12,2),new Array(12,3),new Array(14,1),new Array(14,3),new Array(15,2),new Array(15,1),new Array(16,3),new Array(16,2),new Array(16,1),new Array(17,2),new Array(17,1),new Array(18,1),new Array(18,1)),w=new Array(new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,0),new Array(19,-1),new Array(6,14,7,5,3,7,8,8,11,10,10,12,9,13,19,-2,4,-2),new Array(5,16,19,-5,7,-5,3,-5,8,-5,11,-5,10,-5,9,-5,6,-5,4,-5),new Array(3,7,8,8,11,10,10,12,9,13),new Array(19,-8,7,-8,3,-8,8,-8,11,-8,10,-8,9,-8,6,-8,5,-8,4,-8),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(3,7,8,8,11,10,10,12,9,13),new Array(19,-11,7,-11,3,-11,8,-11,11,-11,10,-11,9,-11,6,-11,5,-11,4,-11),new Array(10,12,9,13),new Array(19,-13,7,-13,3,-13,8,-13,11,-13,10,-13,9,-13,6,-13,5,-13,4,-13),new Array(19,-14,7,-14,3,-14,8,-14,11,-14,10,-14,9,-14,6,-14,5,-14,4,-14),new Array(19,-15,7,-15,3,-15,8,-15,11,-15,10,-15,9,-15,6,-15,5,-15,4,-15),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,-3,4,-3),new Array(7,5,3,7,8,8,11,10,10,12,9,13),new Array(19,-7,7,-7,3,-7,8,-7,11,-7,10,-7,9,-7,6,-7,5,-7,4,-7),new Array(4,23),new Array(19,-10,7,-10,3,-10,8,-10,11,-10,10,-10,9,-10,6,-10,5,-10,4,-10),new Array(19,-12,7,-12,3,-12,8,-12,11,-12,10,-12,9,-12,6,-12,5,-12,4,-12),new Array(19,-4,4,-4),new Array(19,-6,7,-6,3,-6,8,-6,11,-6,10,-6,9,-6,6,-6,4,-6),new Array(19,-9,7,-9,3,-9,8,-9,11,-9,10,-9,9,-9,6,-9,5,-9,4,-9)),x=new Array(new Array(13,1,12,2,14,3,15,4,16,6,17,9,18,11),new Array,new Array,new Array(12,15,14,3,15,4,16,6,17,9,18,11),new Array,new Array(16,17,17,9,18,11),new Array,new Array(12,18,14,3,15,4,16,6,17,9,18,11),new Array(16,19,17,9,18,11),new Array,new Array(18,20),new Array,new Array,new Array,new Array(12,21,14,3,15,4,16,6,17,9,18,11),new Array,new Array(14,22,15,4,16,6,17,9,18,11),new Array,new Array,new Array,new Array,new Array,new Array,new Array),y=new Array("begin'","WHITESPACE","WHITESPACE","LEFT_PARENTHESE","RIGHT_PARENTHESE","AND","OR","NOT","COLUMN","STRING","WORD","OPERATOR","search_text","begin","and_expression","boolean_expression","expression","value","string","$");for(u.offset=0,u.src=a,u.att=new String,d||(d=new Array),h||(h=new Array),q.push(0),r.push(0),o=c(u);;){m=25;for(var z=0;z<w[q[q.length-1]].length;z+=2)if(w[q[q.length-1]][z]==o){m=w[q[q.length-1]][z+1];break}if(f&&q.length>0&&b("\nState "+q[q.length-1]+"\n Lookahead: "+y[o]+' ("'+u.att+'")\n Action: '+m+'\n Source: "'+u.src.substr(u.offset,30)+(u.offset+30<u.src.length?"...":"")+'"\n Stack: '+q.join()+"\n Value stack: "+r.join()+"\n"),25==m){f&&b("Error detected: There is no reduce or shift on the symbol "+y[o]),s++,d.push(u.offset-u.att.length),h.push(new Array);for(var z=0;z<w[q[q.length-1]].length;z+=2)h[h.length-1].push(y[w[q[q.length-1]][z]]);for(var A=new Array,B=new Array,z=0;z<q.length;z++)A[z]=q[z],B[z]=r[z];for(;25==m&&19!=o;){for(f&&b(" Error recovery\nCurrent lookahead: "+y[o]+" ("+u.att+")\nAction: "+m+"\n\n"),-1==o&&u.offset++;25==m&&q.length>0&&(q.pop(),r.pop(),0!=q.length);){m=25;for(var z=0;z<w[q[q.length-1]].length;z+=2)if(w[q[q.length-1]][z]==o){m=w[q[q.length-1]][z+1];break}}if(25!=m)break;for(var z=0;z<A.length;z++)q.push(A[z]),r.push(B[z]);o=c(u)}if(25==m){f&&b(" Error recovery failed, terminating parse process...");break}f&&b(" Error recovery succeeded, continuing")}if(m>0)f&&b("Shifting symbol: "+y[o]+" ("+u.att+")"),q.push(m),r.push(u.att),o=c(u),f&&b(" New lookahead symbol: "+y[o]+" ("+u.att+")");else{switch(m*=-1,f&&b("Reducing by producution: "+m),p=void 0,f&&b(" Performing semantic action..."),m){case 0:p=r[r.length-1];break;case 1:e=r[r.length-1];break;case 2:p=r[r.length-1];break;case 3:p=k("OR",[r[r.length-2],r[r.length-1]]);break;case 4:p=k("OR",[r[r.length-3],r[r.length-1]]);break;case 5:p=r[r.length-1];break;case 6:p=k("AND",[r[r.length-3],r[r.length-1]]);break;case 7:p=j(r[r.length-1]);break;case 8:p=r[r.length-1];break;case 9:p=r[r.length-2];break;case 10:l(r[r.length-1],r[r.length-2].split(":").slice(0,-1).join(":")),p=r[r.length-1];break;case 11:p=r[r.length-1];break;case 12:r[r.length-1].operator=r[r.length-2],p=r[r.length-1];break;case 13:p=r[r.length-1];break;case 14:p=i("",r[r.length-1]);break;case 15:p=i("",r[r.length-1].split('"').slice(1,-1).join('"'))}f&&b(" Popping "+v[m][1]+" off the stack...");for(var z=0;z<v[m][1];z++)q.pop(),r.pop();n=-1;for(var z=0;z<x[q[q.length-1]].length;z+=2)if(x[q[q.length-1]][z]==v[m][0]){n=x[q[q.length-1]][z+1];break}if(0==m)break;f&&b(" Pushing non-terminal "+y[v[m][0]]),q.push(n),r.push(p)}f&&(alert(g),g=new String)}return f&&(b("\nParse complete."),alert(g)),s}var e,f=!1,g=new String,h=function(){var a,b,c=[],d=arguments;for(a=0;a<d.length;a+=1)for(b=0;b<d[a].length;b+=1)c.push(d[a][b]);return c},i=function(a,b,c){var d={type:"simple",key:a,value:b};return void 0!==c&&(d.operator=c),d},j=function(a){return"NOT"===a.operator?a.query_list[0]:{type:"complex",operator:"NOT",query_list:[a]}},k=function(a,b){var c,d=[];for(c=0;c<b.length;c+=1)b[c].operator===a?d=h(d,b[c].query_list):d.push(b[c]);return{type:"complex",operator:a,query_list:d}},l=function(a,b){var c;if("complex"===a.type){for(c=0;c<a.query_list.length;++c)l(a.query_list[c],b);return!0}return"simple"!==a.type||a.key?!1:(a.key=b,!0)},m=[],n=[],o=0;if((o=d(a,m,n))>0){var p;for(p=0;o>p;p+=1)throw new Error('Parse error near "'+a.substr(m[p])+'", expecting "'+n[p].join()+'"')}return e}function ComplexQuery(a,b){Query.call(this),this.operator=a.operator,this.query_list=a.query_list||[],this.query_list=this.query_list.map(function(a,c){return QueryFactory.create(a,b)})}function QueryFactory(){}function objectToSearchText(a){var b=[];if("complex"===a.type)return b.push("("),(a.query_list||[]).forEach(function(c){b.push(objectToSearchText(c)),b.push(a.operator)}),b.length-=1,b.push(")"),b.join(" ");if("simple"===a.type)return(a.key?a.key+": ":"")+(a.operator||"")+' "'+a.value+'"';throw new TypeError("This object is not a query")}function SimpleQuery(a,b){Query.call(this),checkKeySchema(b),this._key_schema=b||{},this.operator=a.operator,this.key=a.key,this.value=a.value}function stringEscapeRegexpCharacters(a){if("string"==typeof a)return a.replace(/([\\\.\$\[\]\(\)\{\}\^\?\*\+\-])/g,"\\$1");throw new TypeError("Query.stringEscapeRegexpCharacters(): Argument no 1 is not of type 'string'")}function metadataValueToStringArray(a){var b,c=[];if(void 0===a)return void 0;for(Array.isArray(a)||(a=[a]),b=0;b<a.length;b+=1)"object"==typeof a[b]?c[b]=a[b].content:c[b]=a[b];return c}function sortFunction(a,b){var c;if("descending"===b)c=1;else{if("ascending"!==b)throw new TypeError("Query.sortFunction(): Argument 2 must be 'ascending' or 'descending'");c=-1}return function(b,d){var e,f;for(b=metadataValueToStringArray(b[a])||[],d=metadataValueToStringArray(d[a])||[],f=b.length>d.length?b.length:d.length,e=0;f>e;e+=1){if(void 0===b[e])return c;if(void 0===d[e])return-c;if(b[e]>d[e])return-c;if(b[e]<d[e])return c}return 0}}function inherits(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{configurable:!0,enumerable:!1,writable:!0,value:a}})}function emptyFunction(){}function select(a,b,c){var d,e,f;if(!Array.isArray(a))throw new TypeError("jioquery.select(): Argument 1 is not of type Array");if(!Array.isArray(b))throw new TypeError("jioquery.select(): Argument 2 is not of type Array");for(c===!0&&(b=deepClone(b)),d=0;d<b.length;d+=1){for(f={},e=0;e<a.length;e+=1)b[d].hasOwnProperty([a[e]])&&(f[a[e]]=b[d][a[e]]);for(e in f)if(f.hasOwnProperty(e)){b[d]=f;break}}return b}function sortOn(a,b,c){var d;if(!Array.isArray(a))throw new TypeError("jioquery.sortOn(): Argument 1 is not of type 'array'");for(c&&(b=deepClone(b)),d=a.length-1;d>=0;d-=1)b.sort(sortFunction(a[d][0],a[d][1]));return b}function limit(a,b,c){if(!Array.isArray(a))throw new TypeError("jioquery.limit(): Argument 1 is not of type 'array'");if(!Array.isArray(b))throw new TypeError("jioquery.limit(): Argument 2 is not of type 'array'");return c&&(b=deepClone(b)),b.splice(0,a[0]),a[1]&&b.splice(a[1]),b}function searchTextToRegExp(a,b){if("string"!=typeof a)throw new TypeError("jioquery.searchTextToRegExp(): Argument 1 is not of type 'string'");return b===!1?new RegExp("^"+stringEscapeRegexpCharacters(a)+"$"):new RegExp("^"+stringEscapeRegexpCharacters(a).replace(/%/g,".*").replace(/_/g,".")+"$")}!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.IPv6=b(a)}(this,function(a){var b=a&&a.IPv6;return{best:function(a){a=a.toLowerCase().split(":");var b=a.length,c=8;""===a[0]&&""===a[1]&&""===a[2]?(a.shift(),a.shift()):""===a[0]&&""===a[1]?a.shift():""===a[b-1]&&""===a[b-2]&&a.pop(),b=a.length,-1!==a[b-1].indexOf(".")&&(c=7);var d;for(d=0;b>d&&""!==a[d];d++);if(c>d)for(a.splice(d,1,"0000");a.length<c;)a.splice(d,0,"0000");for(d=0;c>d;d++){for(var b=a[d].split(""),e=0;3>e&&("0"===b[0]&&1<b.length);e++)b.splice(0,1);a[d]=b.join("")}var b=-1,f=e=0,g=-1,h=!1;for(d=0;c>d;d++)h?"0"===a[d]?f+=1:(h=!1,f>e&&(b=g,e=f)):"0"==a[d]&&(h=!0,g=d,f=1);for(f>e&&(b=g,e=f),e>1&&a.splice(b,e,""),b=a.length,c="",""===a[0]&&(beststr=":"),d=0;b>d&&(c+=a[d],d!==b-1);d++)c+=":";return""===a[b-1]&&(c+=":"),c},noConflict:function(){return a.IPv6===this&&(a.IPv6=b),this}}}),function(a){function b(a){throw RangeError(B[a])}function c(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function d(a,b){return c(a.split(A),b).join(".")}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=E(a>>>10&1023|55296),a=56320|1023&a),b+=E(a)}).join("")}function g(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function h(a,b,c){var d=0;for(a=c?D(a/u):a>>1,a+=D(a/b);a>C*s>>1;d+=q)a=D(a/C);return D(d+(C+1)*a/(a+t))}function i(a){var c,d,e,g,i,j,k=[],l=a.length,m=0,n=w,o=v;for(d=a.lastIndexOf(x),0>d&&(d=0),e=0;d>e;++e)128<=a.charCodeAt(e)&&b("not-basic"),k.push(a.charCodeAt(e));for(d=d>0?d+1:0;l>d;){for(e=m,c=1,g=q;d>=l&&b("invalid-input"),i=a.charCodeAt(d++),i=10>i-48?i-22:26>i-65?i-65:26>i-97?i-97:q,(i>=q||i>D((p-m)/c))&&b("overflow"),m+=i*c,j=o>=g?r:g>=o+s?s:g-o,!(j>i);g+=q)i=q-j,c>D(p/i)&&b("overflow"),c*=i;c=k.length+1,o=h(m-e,c,0==e),D(m/c)>p-n&&b("overflow"),n+=D(m/c),m%=c,k.splice(m++,0,n)}return f(k)}function j(a){var c,d,f,i,j,k,l,m,n,o,t,u,y=[];for(a=e(a),o=a.length,c=w,d=0,j=v,k=0;o>k;++k)n=a[k],128>n&&y.push(E(n));for((f=i=y.length)&&y.push(x);o>f;){for(l=p,k=0;o>k;++k)n=a[k],n>=c&&l>n&&(l=n);for(t=f+1,l-c>D((p-d)/t)&&b("overflow"),d+=(l-c)*t,c=l,k=0;o>k;++k)if(n=a[k],c>n&&++d>p&&b("overflow"),n==c){for(m=d,l=q;n=j>=l?r:l>=j+s?s:l-j,!(n>m);l+=q)u=m-n,m=q-n,y.push(E(g(n+u%m,0))),m=D(u/m);y.push(E(g(m,0))),j=h(d,t,f==i),d=0,++f}++d,++c}return y.join("")}var k="object"==typeof exports&&exports,l="object"==typeof module&&module&&module.exports==k&&module,m="object"==typeof global&&global;(m.global===m||m.window===m)&&(a=m);var n,o,p=2147483647,q=36,r=1,s=26,t=38,u=700,v=72,w=128,x="-",y=/^xn--/,z=/[^ -~]/,A=/\x2E|\u3002|\uFF0E|\uFF61/g,B={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=q-r,D=Math.floor,E=String.fromCharCode;if(n={version:"1.2.3",ucs2:{decode:e,encode:f},decode:i,encode:j,toASCII:function(a){return d(a,function(a){return z.test(a)?"xn--"+j(a):a})},toUnicode:function(a){return d(a,function(a){return y.test(a)?i(a.slice(4).toLowerCase()):a})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return n});else if(k&&!k.nodeType)if(l)l.exports=n;else for(o in n)n.hasOwnProperty(o)&&(k[o]=n[o]);else a.punycode=n}(this),function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.SecondLevelDomains=b(a)}(this,function(a){var b=a&&a.SecondLevelDomains,c=Object.prototype.hasOwnProperty,d={list:{ac:"com|gov|mil|net|org",ae:"ac|co|gov|mil|name|net|org|pro|sch",af:"com|edu|gov|net|org",al:"com|edu|gov|mil|net|org",ao:"co|ed|gv|it|og|pb",ar:"com|edu|gob|gov|int|mil|net|org|tur",at:"ac|co|gv|or",au:"asn|com|csiro|edu|gov|id|net|org",ba:"co|com|edu|gov|mil|net|org|rs|unbi|unmo|unsa|untz|unze",bb:"biz|co|com|edu|gov|info|net|org|store|tv",bh:"biz|cc|com|edu|gov|info|net|org",bn:"com|edu|gov|net|org",bo:"com|edu|gob|gov|int|mil|net|org|tv",br:"adm|adv|agr|am|arq|art|ato|b|bio|blog|bmd|cim|cng|cnt|com|coop|ecn|edu|eng|esp|etc|eti|far|flog|fm|fnd|fot|fst|g12|ggf|gov|imb|ind|inf|jor|jus|lel|mat|med|mil|mus|net|nom|not|ntr|odo|org|ppg|pro|psc|psi|qsl|rec|slg|srv|tmp|trd|tur|tv|vet|vlog|wiki|zlg",bs:"com|edu|gov|net|org",bz:"du|et|om|ov|rg",ca:"ab|bc|mb|nb|nf|nl|ns|nt|nu|on|pe|qc|sk|yk",ck:"biz|co|edu|gen|gov|info|net|org",cn:"ac|ah|bj|com|cq|edu|fj|gd|gov|gs|gx|gz|ha|hb|he|hi|hl|hn|jl|js|jx|ln|mil|net|nm|nx|org|qh|sc|sd|sh|sn|sx|tj|tw|xj|xz|yn|zj",co:"com|edu|gov|mil|net|nom|org",cr:"ac|c|co|ed|fi|go|or|sa",cy:"ac|biz|com|ekloges|gov|ltd|name|net|org|parliament|press|pro|tm","do":"art|com|edu|gob|gov|mil|net|org|sld|web",dz:"art|asso|com|edu|gov|net|org|pol",ec:"com|edu|fin|gov|info|med|mil|net|org|pro",eg:"com|edu|eun|gov|mil|name|net|org|sci",er:"com|edu|gov|ind|mil|net|org|rochest|w",es:"com|edu|gob|nom|org",et:"biz|com|edu|gov|info|name|net|org",fj:"ac|biz|com|info|mil|name|net|org|pro",fk:"ac|co|gov|net|nom|org",fr:"asso|com|f|gouv|nom|prd|presse|tm",gg:"co|net|org",gh:"com|edu|gov|mil|org",gn:"ac|com|gov|net|org",gr:"com|edu|gov|mil|net|org",gt:"com|edu|gob|ind|mil|net|org",gu:"com|edu|gov|net|org",hk:"com|edu|gov|idv|net|org",id:"ac|co|go|mil|net|or|sch|web",il:"ac|co|gov|idf|k12|muni|net|org","in":"ac|co|edu|ernet|firm|gen|gov|i|ind|mil|net|nic|org|res",iq:"com|edu|gov|i|mil|net|org",ir:"ac|co|dnssec|gov|i|id|net|org|sch",it:"edu|gov",je:"co|net|org",jo:"com|edu|gov|mil|name|net|org|sch",jp:"ac|ad|co|ed|go|gr|lg|ne|or",ke:"ac|co|go|info|me|mobi|ne|or|sc",kh:"com|edu|gov|mil|net|org|per",ki:"biz|com|de|edu|gov|info|mob|net|org|tel",km:"asso|com|coop|edu|gouv|k|medecin|mil|nom|notaires|pharmaciens|presse|tm|veterinaire",kn:"edu|gov|net|org",kr:"ac|busan|chungbuk|chungnam|co|daegu|daejeon|es|gangwon|go|gwangju|gyeongbuk|gyeonggi|gyeongnam|hs|incheon|jeju|jeonbuk|jeonnam|k|kg|mil|ms|ne|or|pe|re|sc|seoul|ulsan",kw:"com|edu|gov|net|org",ky:"com|edu|gov|net|org",kz:"com|edu|gov|mil|net|org",lb:"com|edu|gov|net|org",lk:"assn|com|edu|gov|grp|hotel|int|ltd|net|ngo|org|sch|soc|web",lr:"com|edu|gov|net|org",lv:"asn|com|conf|edu|gov|id|mil|net|org",ly:"com|edu|gov|id|med|net|org|plc|sch",ma:"ac|co|gov|m|net|org|press",mc:"asso|tm",me:"ac|co|edu|gov|its|net|org|priv",mg:"com|edu|gov|mil|nom|org|prd|tm",mk:"com|edu|gov|inf|name|net|org|pro",ml:"com|edu|gov|net|org|presse",mn:"edu|gov|org",mo:"com|edu|gov|net|org",mt:"com|edu|gov|net|org",mv:"aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro",mw:"ac|co|com|coop|edu|gov|int|museum|net|org",mx:"com|edu|gob|net|org",my:"com|edu|gov|mil|name|net|org|sch",nf:"arts|com|firm|info|net|other|per|rec|store|web",ng:"biz|com|edu|gov|mil|mobi|name|net|org|sch",ni:"ac|co|com|edu|gob|mil|net|nom|org",np:"com|edu|gov|mil|net|org",nr:"biz|com|edu|gov|info|net|org",om:"ac|biz|co|com|edu|gov|med|mil|museum|net|org|pro|sch",pe:"com|edu|gob|mil|net|nom|org|sld",ph:"com|edu|gov|i|mil|net|ngo|org",pk:"biz|com|edu|fam|gob|gok|gon|gop|gos|gov|net|org|web",pl:"art|bialystok|biz|com|edu|gda|gdansk|gorzow|gov|info|katowice|krakow|lodz|lublin|mil|net|ngo|olsztyn|org|poznan|pwr|radom|slupsk|szczecin|torun|warszawa|waw|wroc|wroclaw|zgora",pr:"ac|biz|com|edu|est|gov|info|isla|name|net|org|pro|prof",ps:"com|edu|gov|net|org|plo|sec",pw:"belau|co|ed|go|ne|or",ro:"arts|com|firm|info|nom|nt|org|rec|store|tm|www",rs:"ac|co|edu|gov|in|org",sb:"com|edu|gov|net|org",sc:"com|edu|gov|net|org",sh:"co|com|edu|gov|net|nom|org",sl:"com|edu|gov|net|org",st:"co|com|consulado|edu|embaixada|gov|mil|net|org|principe|saotome|store",sv:"com|edu|gob|org|red",sz:"ac|co|org",tr:"av|bbs|bel|biz|com|dr|edu|gen|gov|info|k12|name|net|org|pol|tel|tsk|tv|web",tt:"aero|biz|cat|co|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel",tw:"club|com|ebiz|edu|game|gov|idv|mil|net|org",mu:"ac|co|com|gov|net|or|org",mz:"ac|co|edu|gov|org",na:"co|com",nz:"ac|co|cri|geek|gen|govt|health|iwi|maori|mil|net|org|parliament|school",pa:"abo|ac|com|edu|gob|ing|med|net|nom|org|sld",pt:"com|edu|gov|int|net|nome|org|publ",py:"com|edu|gov|mil|net|org",qa:"com|edu|gov|mil|net|org",re:"asso|com|nom",ru:"ac|adygeya|altai|amur|arkhangelsk|astrakhan|bashkiria|belgorod|bir|bryansk|buryatia|cbg|chel|chelyabinsk|chita|chukotka|chuvashia|com|dagestan|e-burg|edu|gov|grozny|int|irkutsk|ivanovo|izhevsk|jar|joshkar-ola|kalmykia|kaluga|kamchatka|karelia|kazan|kchr|kemerovo|khabarovsk|khakassia|khv|kirov|koenig|komi|kostroma|kranoyarsk|kuban|kurgan|kursk|lipetsk|magadan|mari|mari-el|marine|mil|mordovia|mosreg|msk|murmansk|nalchik|net|nnov|nov|novosibirsk|nsk|omsk|orenburg|org|oryol|penza|perm|pp|pskov|ptz|rnd|ryazan|sakhalin|samara|saratov|simbirsk|smolensk|spb|stavropol|stv|surgut|tambov|tatarstan|tom|tomsk|tsaritsyn|tsk|tula|tuva|tver|tyumen|udm|udmurtia|ulan-ude|vladikavkaz|vladimir|vladivostok|volgograd|vologda|voronezh|vrn|vyatka|yakutia|yamal|yekaterinburg|yuzhno-sakhalinsk",rw:"ac|co|com|edu|gouv|gov|int|mil|net",sa:"com|edu|gov|med|net|org|pub|sch",sd:"com|edu|gov|info|med|net|org|tv",se:"a|ac|b|bd|c|d|e|f|g|h|i|k|l|m|n|o|org|p|parti|pp|press|r|s|t|tm|u|w|x|y|z",sg:"com|edu|gov|idn|net|org|per",sn:"art|com|edu|gouv|org|perso|univ",sy:"com|edu|gov|mil|net|news|org",th:"ac|co|go|in|mi|net|or",tj:"ac|biz|co|com|edu|go|gov|info|int|mil|name|net|nic|org|test|web",tn:"agrinet|com|defense|edunet|ens|fin|gov|ind|info|intl|mincom|nat|net|org|perso|rnrt|rns|rnu|tourism",tz:"ac|co|go|ne|or",ua:"biz|cherkassy|chernigov|chernovtsy|ck|cn|co|com|crimea|cv|dn|dnepropetrovsk|donetsk|dp|edu|gov|if|in|ivano-frankivsk|kh|kharkov|kherson|khmelnitskiy|kiev|kirovograd|km|kr|ks|kv|lg|lugansk|lutsk|lviv|me|mk|net|nikolaev|od|odessa|org|pl|poltava|pp|rovno|rv|sebastopol|sumy|te|ternopil|uzhgorod|vinnica|vn|zaporizhzhe|zhitomir|zp|zt",ug:"ac|co|go|ne|or|org|sc",uk:"ac|bl|british-library|co|cym|gov|govt|icnet|jet|lea|ltd|me|mil|mod|national-library-scotland|nel|net|nhs|nic|nls|org|orgn|parliament|plc|police|sch|scot|soc",us:"dni|fed|isa|kids|nsn",uy:"com|edu|gub|mil|net|org",ve:"co|com|edu|gob|info|mil|net|org|web",vi:"co|com|k12|net|org",vn:"ac|biz|com|edu|gov|health|info|int|name|net|org|pro",ye:"co|com|gov|ltd|me|net|org|plc",yu:"ac|co|edu|gov|org",za:"ac|agric|alt|bourse|city|co|cybernet|db|edu|gov|grondar|iaccess|imt|inca|landesign|law|mil|net|ngo|nis|nom|olivetti|org|pix|school|tm|web",zm:"ac|co|com|edu|gov|net|org|sch"},has_expression:null,is_expression:null,has:function(a){return!!a.match(d.has_expression)},is:function(a){return!!a.match(d.is_expression)},get:function(a){return(a=a.match(d.has_expression))&&a[1]||null},noConflict:function(){return a.SecondLevelDomains===this&&(a.SecondLevelDomains=b),this},init:function(){var a,b="";for(a in d.list)c.call(d.list,a)&&(b+="|("+("("+d.list[a]+")."+a)+")");d.has_expression=RegExp("\\.("+b.substr(1)+")$","i"),d.is_expression=RegExp("^("+b.substr(1)+")$","i")}};return d.init(),d}),function(a,b){"object"==typeof exports?module.exports=b(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"==typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],b):a.URI=b(a.punycode,a.IPv6,a.SecondLevelDomains,a)}(this,function(a,b,c,d){function e(a,b){return this instanceof e?(void 0===a&&(a="undefined"!=typeof location?location.href+"":""),this.href(a),void 0!==b?this.absoluteTo(b):this):new e(a,b)}function f(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function g(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function h(a){return"Array"===g(a)}function i(a,b){var c,d;if(h(b)){for(c=0,d=b.length;d>c;c++)if(!i(a,b[c]))return!1;return!0}var e=g(b);for(c=0,d=a.length;d>c;c++)if("RegExp"===e){if("string"==typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function j(a,b){if(!h(a)||!h(b)||a.length!==b.length)return!1;a.sort(),b.sort();for(var c=0,d=a.length;d>c;c++)if(a[c]!==b[c])return!1;return!0}function k(a){return escape(a)}function l(a){return encodeURIComponent(a).replace(/[!'()*]/g,k).replace(/\*/g,"%2A")}var m=d&&d.URI;e.version="1.12.0";var n=e.prototype,o=Object.prototype.hasOwnProperty;e._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:e.duplicateQueryParameters,escapeQuerySpace:e.escapeQuerySpace}},e.duplicateQueryParameters=!1,e.escapeQuerySpace=!0,e.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,e.idn_expression=/[^a-z0-9\.-]/i,e.punycode_expression=/(xn--)/i,e.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,e.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,e.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi,e.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/},e.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},e.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,e.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src"},e.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:e.domAttributes[b]}},e.encode=l,e.decode=decodeURIComponent,e.iso8859=function(){e.encode=escape,e.decode=unescape},e.unicode=function(){e.encode=l,e.decode=decodeURIComponent},e.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}},e.encodeQuery=function(a,b){var c=e.encode(a+"");return b?c.replace(/%20/g,"+"):c},e.decodeQuery=function(a,b){a+="";try{return e.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}},e.recodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.encodePathSegment(e.decode(a[b]));return a.join("/")},e.decodePath=function(a){a=(a+"").split("/");for(var b=0,c=a.length;c>b;b++)a[b]=e.decodePathSegment(a[b]);return a.join("/")};var p,q={encode:"encode",decode:"decode"},r=function(a,b){return function(c){return e[b](c+"").replace(e.characters[a][b].expression,function(c){return e.characters[a][b].map[c]})}};for(p in q)e[p+"PathSegment"]=r("pathname",q[p]);e.encodeReserved=r("reserved","encode"),e.parse=function(a,b){var c;return b||(b={}),c=a.indexOf("#"),c>-1&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c)),c=a.indexOf("?"),c>-1&&(b.query=a.substring(c+1)||null,a=a.substring(0,c)),"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=e.parseAuthority(a,b)):(c=a.indexOf(":"),c>-1&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(e.protocol_expression)?b.protocol=void 0:"file"===b.protocol?a=a.substring(c+3):"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=e.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0))),b.path=a,b},e.parseHost=function(a,b){var c,d=a.indexOf("/");return-1===d&&(d=a.length),"["===a.charAt(0)?(c=a.indexOf("]"),b.hostname=a.substring(1,c)||null,b.port=a.substring(c+2,d)||null):a.indexOf(":")!==a.lastIndexOf(":")?(b.hostname=a.substring(0,d)||null,b.port=null):(c=a.substring(0,d).split(":"),b.hostname=c[0]||null,b.port=c[1]||null),b.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a),a.substring(d)||"/"},e.parseAuthority=function(a,b){return a=e.parseUserinfo(a,b),e.parseHost(a,b)},e.parseUserinfo=function(a,b){var c=a.indexOf("/"),d=c>-1?a.lastIndexOf("@",c):a.indexOf("@");return d>-1&&(-1===c||c>d)?(c=a.substring(0,d).split(":"),b.username=c[0]?e.decode(c[0]):null,c.shift(),b.password=c[0]?e.decode(c.join(":")):null,a=a.substring(d+1)):(b.username=null,b.password=null),a},e.parseQuery=function(a,b){if(!a)return{};if(a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!a)return{};for(var c,d,f={},g=a.split("&"),h=g.length,i=0;h>i;i++)c=g[i].split("="),d=e.decodeQuery(c.shift(),b),c=c.length?e.decodeQuery(c.join("="),b):null,f[d]?("string"==typeof f[d]&&(f[d]=[f[d]]),f[d].push(c)):f[d]=c;return f},e.build=function(a){var b="";return a.protocol&&(b+=a.protocol+":"),a.urn||!b&&!a.hostname||(b+="//"),b+=e.buildAuthority(a)||"","string"==typeof a.path&&("/"!==a.path.charAt(0)&&"string"==typeof a.hostname&&(b+="/"),b+=a.path),"string"==typeof a.query&&a.query&&(b+="?"+a.query),"string"==typeof a.fragment&&a.fragment&&(b+="#"+a.fragment),b},e.buildHost=function(a){var b="";return a.hostname?(e.ip6_expression.test(a.hostname)?b=a.port?b+("["+a.hostname+"]:"+a.port):b+a.hostname:(b+=a.hostname,a.port&&(b+=":"+a.port)),b):""},e.buildAuthority=function(a){return e.buildUserinfo(a)+e.buildHost(a)},e.buildUserinfo=function(a){var b="";return a.username&&(b+=e.encode(a.username),a.password&&(b+=":"+e.encode(a.password)),b+="@"),b},e.buildQuery=function(a,b,c){var d,f,g,i,j="";for(f in a)if(o.call(a,f)&&f)if(h(a[f]))for(d={},g=0,i=a[f].length;i>g;g++)void 0!==a[f][g]&&void 0===d[a[f][g]+""]&&(j+="&"+e.buildQueryParameter(f,a[f][g],c),
!0!==b&&(d[a[f][g]+""]=!0));else void 0!==a[f]&&(j+="&"+e.buildQueryParameter(f,a[f],c));return j.substring(1)},e.buildQueryParameter=function(a,b,c){return e.encodeQuery(a,c)+(null!==b?"="+e.encodeQuery(b,c):"")},e.addQuery=function(a,b,c){if("object"==typeof b)for(var d in b)o.call(b,d)&&e.addQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");void 0===a[b]?a[b]=c:("string"==typeof a[b]&&(a[b]=[a[b]]),h(c)||(c=[c]),a[b]=a[b].concat(c))}},e.removeQuery=function(a,b,c){var d;if(h(b))for(c=0,d=b.length;d>c;c++)a[b[c]]=void 0;else if("object"==typeof b)for(d in b)o.call(b,d)&&e.removeQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");if(void 0!==c){if(a[b]===c)a[b]=void 0;else if(h(a[b])){d=a[b];var f,g,i={};if(h(c))for(f=0,g=c.length;g>f;f++)i[c[f]]=!0;else i[c]=!0;for(f=0,g=d.length;g>f;f++)void 0!==i[d[f]]&&(d.splice(f,1),g--,f--);a[b]=d}}else a[b]=void 0}},e.hasQuery=function(a,b,c,d){if("object"==typeof b){for(var f in b)if(o.call(b,f)&&!e.hasQuery(a,f,b[f]))return!1;return!0}if("string"!=typeof b)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(g(c)){case"Undefined":return b in a;case"Boolean":return a=Boolean(h(a[b])?a[b].length:a[b]),c===a;case"Function":return!!c(a[b],b,a);case"Array":return h(a[b])?(d?i:j)(a[b],c):!1;case"RegExp":return h(a[b])?d?i(a[b],c):!1:Boolean(a[b]&&a[b].match(c));case"Number":c=String(c);case"String":return h(a[b])?d?i(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},e.commonPath=function(a,b){var c,d=Math.min(a.length,b.length);for(c=0;d>c;c++)if(a.charAt(c)!==b.charAt(c)){c--;break}return 1>c?a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"":(("/"!==a.charAt(c)||"/"!==b.charAt(c))&&(c=a.substring(0,c).lastIndexOf("/")),a.substring(0,c+1))},e.withinString=function(a,b,c){c||(c={});var d=c.start||e.findUri.start,f=c.end||e.findUri.end,g=c.trim||e.findUri.trim,h=/[a-z0-9-]=["']?$/i;for(d.lastIndex=0;;){var i=d.exec(a);if(!i)break;if(i=i.index,c.ignoreHtml){var j=a.slice(Math.max(i-3,0),i);if(j&&h.test(j))continue}var j=i+a.slice(i).search(f),k=a.slice(i,j).replace(g,"");c.ignore&&c.ignore.test(k)||(j=i+k.length,k=b(k,i,j,a),a=a.slice(0,i)+k+a.slice(j),d.lastIndex=i+k.length)}return d.lastIndex=0,a},e.ensureValidHostname=function(b){if(b.match(e.invalid_hostname_characters)){if(!a)throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(a.toASCII(b).match(e.invalid_hostname_characters))throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-]")}},e.noConflict=function(a){return a?(a={URI:this.noConflict()},URITemplate&&"function"==typeof URITemplate.noConflict&&(a.URITemplate=URITemplate.noConflict()),b&&"function"==typeof b.noConflict&&(a.IPv6=b.noConflict()),SecondLevelDomains&&"function"==typeof SecondLevelDomains.noConflict&&(a.SecondLevelDomains=SecondLevelDomains.noConflict()),a):(d.URI===this&&(d.URI=m),this)},n.build=function(a){return!0===a?this._deferred_build=!0:(void 0===a||this._deferred_build)&&(this._string=e.build(this._parts),this._deferred_build=!1),this},n.clone=function(){return new e(this)},n.valueOf=n.toString=function(){return this.build(!1)._string},q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"},r=function(a){return function(b,c){return void 0===b?this._parts[a]||"":(this._parts[a]=b||null,this.build(!c),this)}};for(p in q)n[p]=r(q[p]);q={query:"?",fragment:"#"},r=function(a,b){return function(c,d){return void 0===c?this._parts[a]||"":(null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1))),this._parts[a]=c,this.build(!d),this)}};for(p in q)n[p]=r(p,q[p]);q={search:["?","query"],hash:["#","fragment"]},r=function(a,b){return function(c,d){var e=this[a](c,d);return"string"==typeof e&&e.length?b+e:e}};for(p in q)n[p]=r(q[p][1],q[p][0]);n.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return this._parts.path=a?e.recodePath(a):"/",this.build(!b),this},n.path=n.pathname,n.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="",this._parts=e._parts();var d=a instanceof e,f="object"==typeof a&&(a.hostname||a.path||a.pathname);if(a.nodeName&&(f=e.getDomAttribute(a),a=a[f]||"",f=!1),!d&&f&&void 0!==a.pathname&&(a=a.toString()),"string"==typeof a)this._parts=e.parse(a,this._parts);else{if(!d&&!f)throw new TypeError("invalid input");for(c in d=d?a._parts:a)o.call(this._parts,c)&&(this._parts[c]=d[c])}return this.build(!b),this},n.is=function(a){var b=!1,d=!1,f=!1,g=!1,h=!1,i=!1,j=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,d=e.ip4_expression.test(this._parts.hostname),f=e.ip6_expression.test(this._parts.hostname),b=d||f,h=(g=!b)&&c&&c.has(this._parts.hostname),i=g&&e.idn_expression.test(this._parts.hostname),j=g&&e.punycode_expression.test(this._parts.hostname)),a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return f;case"idn":return i;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var s=n.protocol,t=n.port,u=n.hostname;n.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(e.protocol_expression)))throw new TypeError("Protocol '"+a+"' contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return s.call(this,a,b)},n.scheme=n.protocol,n.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError("Port '"+a+"' contains characters other than [0-9]");return t.call(this,a,b)},n.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};e.parseHost(a,c),a=c.hostname}return u.call(this,a,b)},n.host=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildHost(this._parts):"":(e.parseHost(a,this._parts),this.build(!b),this)},n.authority=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildAuthority(this._parts):"":(e.parseAuthority(a,this._parts),this.build(!b),this)},n.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var c=e.buildUserinfo(this._parts);return c.substring(0,c.length-1)}return"@"!==a[a.length-1]&&(a+="@"),e.parseUserinfo(a,this._parts),this.build(!b),this},n.resource=function(a,b){var c;return void 0===a?this.path()+this.search()+this.hash():(c=e.parse(a),this._parts.path=c.path,this._parts.query=c.query,this._parts.fragment=c.fragment,this.build(!b),this)},n.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}return c=this._parts.hostname.length-this.domain().length,c=this._parts.hostname.substring(0,c),c=RegExp("^"+f(c)),a&&"."!==a.charAt(a.length-1)&&(a+="."),a&&e.ensureValidHostname(a),this._parts.hostname=this._parts.hostname.replace(c,a),this.build(!b),this},n.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);return c&&2>c.length?this._parts.hostname:(c=this._parts.hostname.length-this.tld(b).length-1,c=this._parts.hostname.lastIndexOf(".",c-1)+1,this._parts.hostname.substring(c)||"")}if(!a)throw new TypeError("cannot set domain empty");return e.ensureValidHostname(a),!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=RegExp(f(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a)),this.build(!b),this},n.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),d=this._parts.hostname.substring(d+1);return!0!==b&&c&&c.list[d.toLowerCase()]?c.get(this._parts.hostname)||d:d}if(!a)throw new TypeError("cannot set TLD empty");if(a.match(/[^a-zA-Z0-9-]/)){if(!c||!c.is(a))throw new TypeError("TLD '"+a+"' contains characters other than [A-Z0-9]");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}return this.build(!b),this},n.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return c=this._parts.path.length-this.filename().length,c=this._parts.path.substring(0,c),c=RegExp("^"+f(c)),this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a)),a&&"/"!==a.charAt(a.length-1)&&(a+="/"),a=e.recodePath(a),this._parts.path=this._parts.path.replace(c,a),this.build(!b),this},n.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?e.decodePathSegment(c):c}c=!1,"/"===a.charAt(0)&&(a=a.substring(1)),a.match(/\.?\//)&&(c=!0);var d=RegExp(f(this.filename())+"$");return a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a),c?this.normalizePath(b):this.build(!b),this},n.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),d=c.lastIndexOf(".");return-1===d?"":(c=c.substring(d+1),c=/^[a-z0-9%]+$/i.test(c)?c:"",a?e.decodePathSegment(c):c)}if("."===a.charAt(0)&&(a=a.substring(1)),c=this.suffix())d=a?RegExp(f(c)+"$"):RegExp(f("."+c)+"$");else{if(!a)return this;this._parts.path+="."+e.recodePath(a)}return d&&(a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a)),this.build(!b),this},n.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(d);if(void 0!==a&&"number"!=typeof a&&(c=b,b=a,a=void 0),void 0!==a&&"number"!=typeof a)throw Error("Bad segment '"+a+"', must be 0-based integer");if(f&&e.shift(),0>a&&(a=Math.max(e.length+a,0)),void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(h(b)){e=[],a=0;for(var g=b.length;g>a;a++)(b[a].length||e.length&&e[e.length-1].length)&&(e.length&&!e[e.length-1].length&&e.pop(),e.push(b[a]))}else(b||"string"==typeof b)&&(""===e[e.length-1]?e[e.length-1]=b:e.push(b));else b||"string"==typeof b&&b.length?e[a]=b:e.splice(a,1);return f&&e.unshift(""),this.path(e.join(d),c)},n.segmentCoded=function(a,b,c){var d,f;if("number"!=typeof a&&(c=b,b=a,a=void 0),void 0===b){if(a=this.segment(a,b,c),h(a))for(d=0,f=a.length;f>d;d++)a[d]=e.decode(a[d]);else a=void 0!==a?e.decode(a):void 0;return a}if(h(b))for(d=0,f=b.length;f>d;d++)b[d]=e.decode(b[d]);else b="string"==typeof b?e.encode(b):b;return this.segment(a,b,c)};var v=n.query;return n.query=function(a,b){if(!0===a)return e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof a){var c=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace),d=a.call(this,c);return this._parts.query=e.buildQuery(d||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this}return void 0!==a&&"string"!=typeof a?(this._parts.query=e.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):v.call(this,a,b)},n.setQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("object"==typeof a)for(var f in a)o.call(a,f)&&(d[f]=a[f]);else{if("string"!=typeof a)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");d[a]=void 0!==b?b:null}return this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.addQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.addQuery(d,a,void 0===b?null:b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.removeQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.removeQuery(d,a,b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.hasQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.hasQuery(d,a,b,c)},n.setSearch=n.setQuery,n.addSearch=n.addQuery,n.removeSearch=n.removeQuery,n.hasSearch=n.hasQuery,n.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},n.normalizeProtocol=function(a){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a)),this},n.normalizeHostname=function(c){return this._parts.hostname&&(this.is("IDN")&&a?this._parts.hostname=a.toASCII(this._parts.hostname):this.is("IPv6")&&b&&(this._parts.hostname=b.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},n.normalizePort=function(a){return"string"==typeof this._parts.protocol&&this._parts.port===e.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a)),this},n.normalizePath=function(a){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var b,c,d,f=this._parts.path,g="";for("/"!==f.charAt(0)&&(b=!0,f="/"+f),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),b&&(g=f.substring(1).match(/^(\.\.\/)+/)||"")&&(g=g[0]);c=f.indexOf("/.."),-1!==c;)0!==c?(d=f.substring(0,c).lastIndexOf("/"),-1===d&&(d=c),f=f.substring(0,d)+f.substring(c+3)):f=f.substring(3);return b&&this.is("relative")&&(f=g+f.substring(1)),f=e.recodePath(f),this._parts.path=f,this.build(!a),this},n.normalizePathname=n.normalizePath,n.normalizeQuery=function(a){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(e.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a)),this},n.normalizeFragment=function(a){return this._parts.fragment||(this._parts.fragment=null,this.build(!a)),this},n.normalizeSearch=n.normalizeQuery,n.normalizeHash=n.normalizeFragment,n.iso8859=function(){var a=e.encode,b=e.decode;return e.encode=escape,e.decode=decodeURIComponent,this.normalize(),e.encode=a,e.decode=b,this},n.unicode=function(){var a=e.encode,b=e.decode;return e.encode=l,e.decode=unescape,this.normalize(),e.encode=a,e.decode=b,this},n.readable=function(){var b=this.clone();b.username("").password("").normalize();var c="";if(b._parts.protocol&&(c+=b._parts.protocol+"://"),b._parts.hostname&&(b.is("punycode")&&a?(c+=a.toUnicode(b._parts.hostname),b._parts.port&&(c+=":"+b._parts.port)):c+=b.host()),b._parts.hostname&&b._parts.path&&"/"!==b._parts.path.charAt(0)&&(c+="/"),c+=b.path(!0),b._parts.query){for(var d="",f=0,g=b._parts.query.split("&"),h=g.length;h>f;f++){var i=(g[f]||"").split("="),d=d+("&"+e.decodeQuery(i[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==i[1]&&(d+="="+e.decodeQuery(i[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=e.decodeQuery(b.hash(),!0)},n.absoluteTo=function(a){var b,c,d=this.clone(),f=["protocol","username","password","hostname","port"];if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a instanceof e||(a=new e(a)),d._parts.protocol||(d._parts.protocol=a._parts.protocol),this._parts.hostname)return d;for(b=0;c=f[b];b++)d._parts[c]=a._parts[c];return d._parts.path?".."===d._parts.path.substring(-2)&&(d._parts.path+="/"):(d._parts.path=a._parts.path,d._parts.query||(d._parts.query=a._parts.query)),"/"!==d.path().charAt(0)&&(a=a.directory(),d._parts.path=(a?a+"/":"")+d._parts.path,d.normalizePath()),d.build(),d},n.relativeTo=function(a){var b,c,d,f,g=this.clone().normalize();if(g._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a=new e(a).normalize(),b=g._parts,c=a._parts,d=g.path(),f=a.path(),"/"!==d.charAt(0))throw Error("URI is already relative");if("/"!==f.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");return b.protocol===c.protocol&&(b.protocol=null),b.username!==c.username||b.password!==c.password||null!==b.protocol||null!==b.username||null!==b.password||b.hostname!==c.hostname||b.port!==c.port?g.build():(b.hostname=null,b.port=null,d===f?(b.path="",g.build()):(a=e.commonPath(g.path(),a.path()))?(c=c.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../"),b.path=c+b.path.substring(a.length),g.build()):g.build())},n.equals=function(a){var b=this.clone();a=new e(a);var c,d={},f={},g={};if(b.normalize(),a.normalize(),b.toString()===a.toString())return!0;if(d=b.query(),f=a.query(),b.query(""),a.query(""),b.toString()!==a.toString()||d.length!==f.length)return!1;d=e.parseQuery(d,this._parts.escapeQuerySpace),f=e.parseQuery(f,this._parts.escapeQuerySpace);for(c in d)if(o.call(d,c)){if(h(d[c])){if(!j(d[c],f[c]))return!1}else if(d[c]!==f[c])return!1;g[c]=!0}for(c in f)if(o.call(f,c)&&!g[c])return!1;return!0},n.duplicateQueryParameters=function(a){return this._parts.duplicateQueryParameters=!!a,this},n.escapeQuerySpace=function(a){return this._parts.escapeQuerySpace=!!a,this},e}),function(a,b){"object"==typeof exports?module.exports=b(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],b):b(a.URI)}(this,function(a){var b=a.prototype,c=b.fragment;a.fragmentPrefix="?";var d=a._parts;return a._parts=function(){var b=d();return b.fragmentPrefix=a.fragmentPrefix,b},b.fragmentPrefix=function(a){return this._parts.fragmentPrefix=a,this},b.fragment=function(b,d){var e=this._parts.fragmentPrefix,f=this._parts.fragment||"";return!0===b?f.substring(0,e.length)!==e?{}:a.parseQuery(f.substring(e.length)):void 0!==b&&"string"!=typeof b?(this._parts.fragment=e+a.buildQuery(b),this.build(!d),this):c.call(this,b,d)},b.addFragment=function(b,c,d){var e=this._parts.fragmentPrefix,f=a.parseQuery((this._parts.fragment||"").substring(e.length));return a.addQuery(f,b,c),this._parts.fragment=e+a.buildQuery(f),"string"!=typeof b&&(d=c),this.build(!d),this},b.removeFragment=function(b,c,d){var e=this._parts.fragmentPrefix,f=a.parseQuery((this._parts.fragment||"").substring(e.length));return a.removeQuery(f,b,c),this._parts.fragment=e+a.buildQuery(f),"string"!=typeof b&&(d=c),this.build(!d),this},b.addHash=b.addFragment,b.removeHash=b.removeFragment,{}}),function(a){"use strict";function b(a){var c;if(null===a||void 0===a)return!1;if(d.isArray(a))return a.length>0;if("string"==typeof a||"number"==typeof a||"boolean"==typeof a)return!0;for(c in a)if(a.hasOwnProperty(c)&&b(a[c]))return!0;return!1}var c=function(){function a(a){this.options=a}return a.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},a}(),d=function(){function a(a){return"[object Array]"===Object.prototype.toString.apply(a)}function b(a){return"[object String]"===Object.prototype.toString.apply(a)}function c(a){return"[object Number]"===Object.prototype.toString.apply(a)}function d(a){return"[object Boolean]"===Object.prototype.toString.apply(a)}function e(a,b){var c,d="",e=!0;for(c=0;c<a.length;c+=1)e?e=!1:d+=b,d+=a[c];return d}function f(a,b){for(var c=[],d=0;d<a.length;d+=1)c.push(b(a[d]));return c}function g(a,b){for(var c=[],d=0;d<a.length;d+=1)b(a[d])&&c.push(a[d]);return c}function h(a){if("object"!=typeof a||null===a)return a;Object.freeze(a);var b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],"object"==typeof b&&i(b));return a}function i(a){return"function"==typeof Object.freeze?h(a):a}return{isArray:a,isString:b,isNumber:c,isBoolean:d,join:e,map:f,filter:g,deepFreeze:i}}(),e=function(){function a(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a}function b(a){return a>="0"&&"9">=a}function c(a){return b(a)||a>="a"&&"f">=a||a>="A"&&"F">=a}return{isAlpha:a,isDigit:b,isHexDigit:c}}(),f=function(){function a(a){var b,c,d="",e=g.encode(a);for(c=0;c<e.length;c+=1)b=e.charCodeAt(c),d+="%"+(16>b?"0":"")+b.toString(16).toUpperCase();return d}function b(a,b){return"%"===a.charAt(b)&&e.isHexDigit(a.charAt(b+1))&&e.isHexDigit(a.charAt(b+2))}function c(a,b){return parseInt(a.substr(b,2),16)}function d(a){if(!b(a,0))return!1;var d=c(a,1),e=g.numBytes(d);if(0===e)return!1;for(var f=1;e>f;f+=1)if(!b(a,3*f)||!g.isValidFollowingCharCode(c(a,3*f+1)))return!1;return!0}function f(a,d){var e=a.charAt(d);if(!b(a,d))return e;var f=c(a,d+1),h=g.numBytes(f);if(0===h)return e;for(var i=1;h>i;i+=1)if(!b(a,d+3*i)||!g.isValidFollowingCharCode(c(a,d+3*i+1)))return e;return a.substr(d,3*h)}var g={encode:function(a){return unescape(encodeURIComponent(a))},numBytes:function(a){return 127>=a?1:a>=194&&223>=a?2:a>=224&&239>=a?3:a>=240&&244>=a?4:0},isValidFollowingCharCode:function(a){return a>=128&&191>=a}};return{encodeCharacter:a,isPctEncoded:d,pctCharAt:f}}(),g=function(){function a(a){return e.isAlpha(a)||e.isDigit(a)||"_"===a||f.isPctEncoded(a)}function b(a){return e.isAlpha(a)||e.isDigit(a)||"-"===a||"."===a||"_"===a||"~"===a}function c(a){return":"===a||"/"===a||"?"===a||"#"===a||"["===a||"]"===a||"@"===a||"!"===a||"$"===a||"&"===a||"("===a||")"===a||"*"===a||"+"===a||","===a||";"===a||"="===a||"'"===a}return{isVarchar:a,isUnreserved:b,isReserved:c}}(),h=function(){function a(a,b){var c,d="",e="";for(("number"==typeof a||"boolean"==typeof a)&&(a=a.toString()),c=0;c<a.length;c+=e.length)e=a.charAt(c),d+=g.isUnreserved(e)||b&&g.isReserved(e)?e:f.encodeCharacter(e);return d}function b(b){return a(b,!0)}function c(a,b){var c=f.pctCharAt(a,b);return c.length>1?c:g.isReserved(c)||g.isUnreserved(c)?c:f.encodeCharacter(c)}function d(a){var b,c="",d="";for(b=0;b<a.length;b+=d.length)d=f.pctCharAt(a,b),c+=d.length>1?d:g.isReserved(d)||g.isUnreserved(d)?d:f.encodeCharacter(d);return c}return{encode:a,encodePassReserved:b,encodeLiteral:d,encodeLiteralCharacter:c}}(),i=function(){function a(a){b[a]={symbol:a,separator:"?"===a?"&":""===a||"+"===a||"#"===a?",":a,named:";"===a||"&"===a||"?"===a,ifEmpty:"&"===a||"?"===a?"=":"",first:"+"===a?"":a,encode:"+"===a||"#"===a?h.encodePassReserved:h.encode,toString:function(){return this.symbol}}}var b={};return a(""),a("+"),a("#"),a("."),a("/"),a(";"),a("?"),a("&"),{valueOf:function(a){return b[a]?b[a]:"=,!@|".indexOf(a)>=0?null:b[""]}}}(),j=function(){function a(a){this.literal=h.encodeLiteral(a)}return a.prototype.expand=function(){return this.literal},a.prototype.toString=a.prototype.expand,a}(),k=function(){function a(a){function b(){var b=a.substring(n,j);if(0===b.length)throw new c({expressionText:a,message:"a varname must be specified",position:j});m={varname:b,exploded:!1,maxLength:null},n=null}function d(){if(o===j)throw new c({expressionText:a,message:"after a ':' you have to specify the length",position:j});m.maxLength=parseInt(a.substring(o,j),10),o=null}var h,j,k=[],m=null,n=null,o=null,p="";for(h=function(b){var d=i.valueOf(b);if(null===d)throw new c({expressionText:a,message:"illegal use of reserved operator",position:j,operator:b});return d}(a.charAt(0)),j=h.symbol.length,n=j;j<a.length;j+=p.length){if(p=f.pctCharAt(a,j),null!==n){if("."===p){if(n===j)throw new c({expressionText:a,message:"a varname MUST NOT start with a dot",position:j});continue}if(g.isVarchar(p))continue;b()}if(null!==o){if(j===o&&"0"===p)throw new c({expressionText:a,message:"A :prefix must not start with digit 0",position:j});if(e.isDigit(p)){if(j-o>=4)throw new c({expressionText:a,message:"A :prefix must have max 4 digits",position:j});continue}d()}if(":"!==p)if("*"!==p){if(","!==p)throw new c({expressionText:a,message:"illegal character",character:p,position:j});k.push(m),m=null,n=j+1}else{if(null===m)throw new c({expressionText:a,message:"exploded without varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"exploded twice",position:j});if(m.maxLength)throw new c({expressionText:a,message:"an explode (*) MUST NOT follow to a prefix",position:j});m.exploded=!0}else{if(null!==m.maxLength)throw new c({expressionText:a,message:"only one :maxLength is allowed per varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"an exploeded varspec MUST NOT be varspeced",position:j});o=j+1}}return null!==n&&b(),null!==o&&d(),k.push(m),new l(a,h,k)}function b(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function d(d){var e,f,g,h=[],i=null,k="",l=!0,n=0;for(e=0;e<d.length;e+=1)if(f=d.charAt(e),null===n){if(null===i)throw new Error("reached unreachable code");if("{"===f)throw new c({templateText:d,message:"brace already opened",position:e});if("}"===f){if(i+1===e)throw new c({templateText:d,message:"empty braces",position:i});try{g=a(d.substring(i+1,e))}catch(o){if(o.prototype===c.prototype)throw new c({templateText:d,message:o.options.message,position:i+o.options.position,details:o.options});throw o}h.push(g),0===g.operator.symbol.length?k+="([^/]+)":l=!1,i=null,n=e+1}}else{if("}"===f)throw new c({templateText:d,message:"unopened brace closed",position:e});"{"===f&&(e>n&&(g=new j(d.substring(n,e)),h.push(g),k+=b(g.literal)),n=null,i=e)}if(null!==i)throw new c({templateText:d,message:"unclosed brace",position:i});return n<d.length&&(g=new j(d.substring(n)),h.push(g),k+=b(g.literal)),l===!1&&(k=void 0),new m(d,h,k)}return d}(),l=function(){function a(a){return JSON&&JSON.stringify?JSON.stringify(a):a}function c(a){if(!b(a))return!0;if(d.isString(a))return""===a;if(d.isNumber(a)||d.isBoolean(a))return!1;if(d.isArray(a))return 0===a.length;for(var c in a)if(a.hasOwnProperty(c))return!1;return!0}function e(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&c.push({name:b,value:a[b]});return c}function f(a,b,c){this.templateText=a,this.operator=b,this.varspecs=c}function g(a,b,c){var d="";if(c=c.toString(),b.named){if(d+=h.encodeLiteral(a.varname),""===c)return d+=b.ifEmpty;d+="="}return null!==a.maxLength&&(c=c.substr(0,a.maxLength)),d+=b.encode(c)}function i(a){return b(a.value)}function j(a,f,g){var j=[],k="";if(f.named){if(k+=h.encodeLiteral(a.varname),c(g))return k+=f.ifEmpty;k+="="}return d.isArray(g)?(j=g,j=d.filter(j,b),j=d.map(j,f.encode),k+=d.join(j,",")):(j=e(g),j=d.filter(j,i),j=d.map(j,function(a){return f.encode(a.name)+","+f.encode(a.value)}),k+=d.join(j,",")),k}function k(a,f,g){var j=d.isArray(g),k=[];return j?(k=g,k=d.filter(k,b),k=d.map(k,function(b){var d=h.encodeLiteral(a.varname);return d+=c(b)?f.ifEmpty:"="+f.encode(b)})):(k=e(g),k=d.filter(k,i),k=d.map(k,function(a){var b=h.encodeLiteral(a.name);return b+=c(a.value)?f.ifEmpty:"="+f.encode(a.value)})),d.join(k,f.separator)}function l(a,c){var f=[],g="";return d.isArray(c)?(f=c,f=d.filter(f,b),f=d.map(f,a.encode),g+=d.join(f,a.separator)):(f=e(c),f=d.filter(f,function(a){return b(a.value)}),f=d.map(f,function(b){return a.encode(b.name)+"="+a.encode(b.value)}),g+=d.join(f,a.separator)),g}return f.prototype.toString=function(){return this.templateText},f.prototype.expand=function(e){var f,h,i,m,n=[],o=!1,p=this.operator;for(f=0;f<this.varspecs.length;f+=1)if(h=this.varspecs[f],i=e[h.varname],null!==i&&void 0!==i)if(h.exploded&&(o=!0),m=d.isArray(i),"string"==typeof i||"number"==typeof i||"boolean"==typeof i)n.push(g(h,p,i));else{if(h.maxLength&&b(i))throw new Error("Prefix modifiers are not applicable to variables that have composite values. You tried to expand "+this+" with "+a(i));h.exploded?b(i)&&(p.named?n.push(k(h,p,i)):n.push(l(p,i))):(p.named||!c(i))&&n.push(j(h,p,i))}return 0===n.length?"":p.first+d.join(n,p.separator)},f}(),m=function(){function a(a,b,c){this.templateText=a,this.expressions=b,void 0!==c&&(this.regexp=new RegExp("^"+c+"$")),d.deepFreeze(this)}return a.prototype.toString=function(){return this.templateText},a.prototype.expand=function(a){var b,c="";for(b=0;b<this.expressions.length;b+=1)c+=this.expressions[b].expand(a);return c},a.prototype.extract=function(a){var b,c,d,e,f=1,g=!0,h={};if(void 0!==this.regexp&&this.regexp.test(a)){for(e=this.regexp.exec(a),b=0;b<this.expressions.length;b+=1)c=this.expressions[b],void 0===c.literal&&(void 0!==c.operator&&0===c.operator.symbol.length&&1===c.varspecs.length?(d=c.varspecs[0],d.exploded===!1&&null===d.maxLength&&-1===e[f].indexOf(",")?(h[d.varname]=decodeURIComponent(e[f]),f+=1):g=!1):g=!1);if(g)return h}return!1},a.parse=k,a.UriTemplateError=c,a}();a(m)}(function(a){"use strict";"undefined"!=typeof module?module.exports=a:"function"==typeof define?define([],function(){return a}):"undefined"!=typeof window?window.UriTemplate=a:global.UriTemplate=a}),function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){u(a),g(this,a)}function f(a){var b=o(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b,c){for(var d=Math.abs(a)+"",e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function j(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&ca.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function m(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function n(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Qa[a]||Ra[b]||b}return a}function o(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=n(c),b&&(d[b]=a[c]));return d}function p(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}ca[b]=function(e,f){var g,h,i=ca.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=ca().utc().set(d,a);return i.call(ca.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function r(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function s(a){return t(a)?366:365}function t(a){return a%4===0&&a%100!==0||a%400===0}function u(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[ia]<0||a._a[ia]>11?ia:a._a[ja]<1||a._a[ja]>r(a._a[ha],a._a[ia])?ja:a._a[ka]<0||a._a[ka]>23?ka:a._a[la]<0||a._a[la]>59?la:a._a[ma]<0||a._a[ma]>59?ma:a._a[na]<0||a._a[na]>999?na:-1,a._pf._overflowDayOfYear&&(ha>b||b>ja)&&(b=ja),a._pf.overflow=b)}function v(a){a._pf={empty:!1,unusedTokens:[], !0!==b&&(d[a[f][g]+""]=!0));else void 0!==a[f]&&(j+="&"+e.buildQueryParameter(f,a[f],c));return j.substring(1)},e.buildQueryParameter=function(a,b,c){return e.encodeQuery(a,c)+(null!==b?"="+e.encodeQuery(b,c):"")},e.addQuery=function(a,b,c){if("object"==typeof b)for(var d in b)o.call(b,d)&&e.addQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");void 0===a[b]?a[b]=c:("string"==typeof a[b]&&(a[b]=[a[b]]),h(c)||(c=[c]),a[b]=a[b].concat(c))}},e.removeQuery=function(a,b,c){var d;if(h(b))for(c=0,d=b.length;d>c;c++)a[b[c]]=void 0;else if("object"==typeof b)for(d in b)o.call(b,d)&&e.removeQuery(a,d,b[d]);else{if("string"!=typeof b)throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");if(void 0!==c){if(a[b]===c)a[b]=void 0;else if(h(a[b])){d=a[b];var f,g,i={};if(h(c))for(f=0,g=c.length;g>f;f++)i[c[f]]=!0;else i[c]=!0;for(f=0,g=d.length;g>f;f++)void 0!==i[d[f]]&&(d.splice(f,1),g--,f--);a[b]=d}}else a[b]=void 0}},e.hasQuery=function(a,b,c,d){if("object"==typeof b){for(var f in b)if(o.call(b,f)&&!e.hasQuery(a,f,b[f]))return!1;return!0}if("string"!=typeof b)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(g(c)){case"Undefined":return b in a;case"Boolean":return a=Boolean(h(a[b])?a[b].length:a[b]),c===a;case"Function":return!!c(a[b],b,a);case"Array":return h(a[b])?(d?i:j)(a[b],c):!1;case"RegExp":return h(a[b])?d?i(a[b],c):!1:Boolean(a[b]&&a[b].match(c));case"Number":c=String(c);case"String":return h(a[b])?d?i(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},e.commonPath=function(a,b){var c,d=Math.min(a.length,b.length);for(c=0;d>c;c++)if(a.charAt(c)!==b.charAt(c)){c--;break}return 1>c?a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"":(("/"!==a.charAt(c)||"/"!==b.charAt(c))&&(c=a.substring(0,c).lastIndexOf("/")),a.substring(0,c+1))},e.withinString=function(a,b,c){c||(c={});var d=c.start||e.findUri.start,f=c.end||e.findUri.end,g=c.trim||e.findUri.trim,h=/[a-z0-9-]=["']?$/i;for(d.lastIndex=0;;){var i=d.exec(a);if(!i)break;if(i=i.index,c.ignoreHtml){var j=a.slice(Math.max(i-3,0),i);if(j&&h.test(j))continue}var j=i+a.slice(i).search(f),k=a.slice(i,j).replace(g,"");c.ignore&&c.ignore.test(k)||(j=i+k.length,k=b(k,i,j,a),a=a.slice(0,i)+k+a.slice(j),d.lastIndex=i+k.length)}return d.lastIndex=0,a},e.ensureValidHostname=function(b){if(b.match(e.invalid_hostname_characters)){if(!a)throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(a.toASCII(b).match(e.invalid_hostname_characters))throw new TypeError("Hostname '"+b+"' contains characters other than [A-Z0-9.-]")}},e.noConflict=function(a){return a?(a={URI:this.noConflict()},URITemplate&&"function"==typeof URITemplate.noConflict&&(a.URITemplate=URITemplate.noConflict()),b&&"function"==typeof b.noConflict&&(a.IPv6=b.noConflict()),SecondLevelDomains&&"function"==typeof SecondLevelDomains.noConflict&&(a.SecondLevelDomains=SecondLevelDomains.noConflict()),a):(d.URI===this&&(d.URI=m),this)},n.build=function(a){return!0===a?this._deferred_build=!0:(void 0===a||this._deferred_build)&&(this._string=e.build(this._parts),this._deferred_build=!1),this},n.clone=function(){return new e(this)},n.valueOf=n.toString=function(){return this.build(!1)._string},q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"},r=function(a){return function(b,c){return void 0===b?this._parts[a]||"":(this._parts[a]=b||null,this.build(!c),this)}};for(p in q)n[p]=r(q[p]);q={query:"?",fragment:"#"},r=function(a,b){return function(c,d){return void 0===c?this._parts[a]||"":(null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1))),this._parts[a]=c,this.build(!d),this)}};for(p in q)n[p]=r(p,q[p]);q={search:["?","query"],hash:["#","fragment"]},r=function(a,b){return function(c,d){var e=this[a](c,d);return"string"==typeof e&&e.length?b+e:e}};for(p in q)n[p]=r(q[p][1],q[p][0]);n.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return this._parts.path=a?e.recodePath(a):"/",this.build(!b),this},n.path=n.pathname,n.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="",this._parts=e._parts();var d=a instanceof e,f="object"==typeof a&&(a.hostname||a.path||a.pathname);if(a.nodeName&&(f=e.getDomAttribute(a),a=a[f]||"",f=!1),!d&&f&&void 0!==a.pathname&&(a=a.toString()),"string"==typeof a)this._parts=e.parse(a,this._parts);else{if(!d&&!f)throw new TypeError("invalid input");for(c in d=d?a._parts:a)o.call(this._parts,c)&&(this._parts[c]=d[c])}return this.build(!b),this},n.is=function(a){var b=!1,d=!1,f=!1,g=!1,h=!1,i=!1,j=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,d=e.ip4_expression.test(this._parts.hostname),f=e.ip6_expression.test(this._parts.hostname),b=d||f,h=(g=!b)&&c&&c.has(this._parts.hostname),i=g&&e.idn_expression.test(this._parts.hostname),j=g&&e.punycode_expression.test(this._parts.hostname)),a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return f;case"idn":return i;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var s=n.protocol,t=n.port,u=n.hostname;n.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(e.protocol_expression)))throw new TypeError("Protocol '"+a+"' contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return s.call(this,a,b)},n.scheme=n.protocol,n.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError("Port '"+a+"' contains characters other than [0-9]");return t.call(this,a,b)},n.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};e.parseHost(a,c),a=c.hostname}return u.call(this,a,b)},n.host=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildHost(this._parts):"":(e.parseHost(a,this._parts),this.build(!b),this)},n.authority=function(a,b){return this._parts.urn?void 0===a?"":this:void 0===a?this._parts.hostname?e.buildAuthority(this._parts):"":(e.parseAuthority(a,this._parts),this.build(!b),this)},n.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var c=e.buildUserinfo(this._parts);return c.substring(0,c.length-1)}return"@"!==a[a.length-1]&&(a+="@"),e.parseUserinfo(a,this._parts),this.build(!b),this},n.resource=function(a,b){var c;return void 0===a?this.path()+this.search()+this.hash():(c=e.parse(a),this._parts.path=c.path,this._parts.query=c.query,this._parts.fragment=c.fragment,this.build(!b),this)},n.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}return c=this._parts.hostname.length-this.domain().length,c=this._parts.hostname.substring(0,c),c=RegExp("^"+f(c)),a&&"."!==a.charAt(a.length-1)&&(a+="."),a&&e.ensureValidHostname(a),this._parts.hostname=this._parts.hostname.replace(c,a),this.build(!b),this},n.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);return c&&2>c.length?this._parts.hostname:(c=this._parts.hostname.length-this.tld(b).length-1,c=this._parts.hostname.lastIndexOf(".",c-1)+1,this._parts.hostname.substring(c)||"")}if(!a)throw new TypeError("cannot set domain empty");return e.ensureValidHostname(a),!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=RegExp(f(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a)),this.build(!b),this},n.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;if("boolean"==typeof a&&(b=a,a=void 0),void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),d=this._parts.hostname.substring(d+1);return!0!==b&&c&&c.list[d.toLowerCase()]?c.get(this._parts.hostname)||d:d}if(!a)throw new TypeError("cannot set TLD empty");if(a.match(/[^a-zA-Z0-9-]/)){if(!c||!c.is(a))throw new TypeError("TLD '"+a+"' contains characters other than [A-Z0-9]");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a)}return this.build(!b),this},n.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?e.decodePath(c):c}return c=this._parts.path.length-this.filename().length,c=this._parts.path.substring(0,c),c=RegExp("^"+f(c)),this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a)),a&&"/"!==a.charAt(a.length-1)&&(a+="/"),a=e.recodePath(a),this._parts.path=this._parts.path.replace(c,a),this.build(!b),this},n.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?e.decodePathSegment(c):c}c=!1,"/"===a.charAt(0)&&(a=a.substring(1)),a.match(/\.?\//)&&(c=!0);var d=RegExp(f(this.filename())+"$");return a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a),c?this.normalizePath(b):this.build(!b),this},n.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),d=c.lastIndexOf(".");return-1===d?"":(c=c.substring(d+1),c=/^[a-z0-9%]+$/i.test(c)?c:"",a?e.decodePathSegment(c):c)}if("."===a.charAt(0)&&(a=a.substring(1)),c=this.suffix())d=a?RegExp(f(c)+"$"):RegExp(f("."+c)+"$");else{if(!a)return this;this._parts.path+="."+e.recodePath(a)}return d&&(a=e.recodePath(a),this._parts.path=this._parts.path.replace(d,a)),this.build(!b),this},n.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(d);if(void 0!==a&&"number"!=typeof a&&(c=b,b=a,a=void 0),void 0!==a&&"number"!=typeof a)throw Error("Bad segment '"+a+"', must be 0-based integer");if(f&&e.shift(),0>a&&(a=Math.max(e.length+a,0)),void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(h(b)){e=[],a=0;for(var g=b.length;g>a;a++)(b[a].length||e.length&&e[e.length-1].length)&&(e.length&&!e[e.length-1].length&&e.pop(),e.push(b[a]))}else(b||"string"==typeof b)&&(""===e[e.length-1]?e[e.length-1]=b:e.push(b));else b||"string"==typeof b&&b.length?e[a]=b:e.splice(a,1);return f&&e.unshift(""),this.path(e.join(d),c)},n.segmentCoded=function(a,b,c){var d,f;if("number"!=typeof a&&(c=b,b=a,a=void 0),void 0===b){if(a=this.segment(a,b,c),h(a))for(d=0,f=a.length;f>d;d++)a[d]=e.decode(a[d]);else a=void 0!==a?e.decode(a):void 0;return a}if(h(b))for(d=0,f=b.length;f>d;d++)b[d]=e.decode(b[d]);else b="string"==typeof b?e.encode(b):b;return this.segment(a,b,c)};var v=n.query;return n.query=function(a,b){if(!0===a)return e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof a){var c=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace),d=a.call(this,c);return this._parts.query=e.buildQuery(d||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this}return void 0!==a&&"string"!=typeof a?(this._parts.query=e.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):v.call(this,a,b)},n.setQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("object"==typeof a)for(var f in a)o.call(a,f)&&(d[f]=a[f]);else{if("string"!=typeof a)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");d[a]=void 0!==b?b:null}return this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.addQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.addQuery(d,a,void 0===b?null:b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.removeQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.removeQuery(d,a,b),this._parts.query=e.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof a&&(c=b),this.build(!c),this},n.hasQuery=function(a,b,c){var d=e.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return e.hasQuery(d,a,b,c)},n.setSearch=n.setQuery,n.addSearch=n.addQuery,n.removeSearch=n.removeQuery,n.hasSearch=n.hasQuery,n.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},n.normalizeProtocol=function(a){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a)),this},n.normalizeHostname=function(c){return this._parts.hostname&&(this.is("IDN")&&a?this._parts.hostname=a.toASCII(this._parts.hostname):this.is("IPv6")&&b&&(this._parts.hostname=b.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!c)),this},n.normalizePort=function(a){return"string"==typeof this._parts.protocol&&this._parts.port===e.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a)),this},n.normalizePath=function(a){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var b,c,d,f=this._parts.path,g="";for("/"!==f.charAt(0)&&(b=!0,f="/"+f),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),b&&(g=f.substring(1).match(/^(\.\.\/)+/)||"")&&(g=g[0]);c=f.indexOf("/.."),-1!==c;)0!==c?(d=f.substring(0,c).lastIndexOf("/"),-1===d&&(d=c),f=f.substring(0,d)+f.substring(c+3)):f=f.substring(3);return b&&this.is("relative")&&(f=g+f.substring(1)),f=e.recodePath(f),this._parts.path=f,this.build(!a),this},n.normalizePathname=n.normalizePath,n.normalizeQuery=function(a){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(e.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a)),this},n.normalizeFragment=function(a){return this._parts.fragment||(this._parts.fragment=null,this.build(!a)),this},n.normalizeSearch=n.normalizeQuery,n.normalizeHash=n.normalizeFragment,n.iso8859=function(){var a=e.encode,b=e.decode;return e.encode=escape,e.decode=decodeURIComponent,this.normalize(),e.encode=a,e.decode=b,this},n.unicode=function(){var a=e.encode,b=e.decode;return e.encode=l,e.decode=unescape,this.normalize(),e.encode=a,e.decode=b,this},n.readable=function(){var b=this.clone();b.username("").password("").normalize();var c="";if(b._parts.protocol&&(c+=b._parts.protocol+"://"),b._parts.hostname&&(b.is("punycode")&&a?(c+=a.toUnicode(b._parts.hostname),b._parts.port&&(c+=":"+b._parts.port)):c+=b.host()),b._parts.hostname&&b._parts.path&&"/"!==b._parts.path.charAt(0)&&(c+="/"),c+=b.path(!0),b._parts.query){for(var d="",f=0,g=b._parts.query.split("&"),h=g.length;h>f;f++){var i=(g[f]||"").split("="),d=d+("&"+e.decodeQuery(i[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==i[1]&&(d+="="+e.decodeQuery(i[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=e.decodeQuery(b.hash(),!0)},n.absoluteTo=function(a){var b,c,d=this.clone(),f=["protocol","username","password","hostname","port"];if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a instanceof e||(a=new e(a)),d._parts.protocol||(d._parts.protocol=a._parts.protocol),this._parts.hostname)return d;for(b=0;c=f[b];b++)d._parts[c]=a._parts[c];return d._parts.path?".."===d._parts.path.substring(-2)&&(d._parts.path+="/"):(d._parts.path=a._parts.path,d._parts.query||(d._parts.query=a._parts.query)),"/"!==d.path().charAt(0)&&(a=a.directory(),d._parts.path=(a?a+"/":"")+d._parts.path,d.normalizePath()),d.build(),d},n.relativeTo=function(a){var b,c,d,f,g=this.clone().normalize();if(g._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");if(a=new e(a).normalize(),b=g._parts,c=a._parts,d=g.path(),f=a.path(),"/"!==d.charAt(0))throw Error("URI is already relative");if("/"!==f.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");return b.protocol===c.protocol&&(b.protocol=null),b.username!==c.username||b.password!==c.password||null!==b.protocol||null!==b.username||null!==b.password||b.hostname!==c.hostname||b.port!==c.port?g.build():(b.hostname=null,b.port=null,d===f?(b.path="",g.build()):(a=e.commonPath(g.path(),a.path()))?(c=c.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../"),b.path=c+b.path.substring(a.length),g.build()):g.build())},n.equals=function(a){var b=this.clone();a=new e(a);var c,d={},f={},g={};if(b.normalize(),a.normalize(),b.toString()===a.toString())return!0;if(d=b.query(),f=a.query(),b.query(""),a.query(""),b.toString()!==a.toString()||d.length!==f.length)return!1;d=e.parseQuery(d,this._parts.escapeQuerySpace),f=e.parseQuery(f,this._parts.escapeQuerySpace);for(c in d)if(o.call(d,c)){if(h(d[c])){if(!j(d[c],f[c]))return!1}else if(d[c]!==f[c])return!1;g[c]=!0}for(c in f)if(o.call(f,c)&&!g[c])return!1;return!0},n.duplicateQueryParameters=function(a){return this._parts.duplicateQueryParameters=!!a,this},n.escapeQuerySpace=function(a){return this._parts.escapeQuerySpace=!!a,this},e}),function(a,b){"object"==typeof exports?module.exports=b(require("./URI")):"function"==typeof define&&define.amd?define(["./URI"],b):b(a.URI)}(this,function(a){var b=a.prototype,c=b.fragment;a.fragmentPrefix="?";var d=a._parts;return a._parts=function(){var b=d();return b.fragmentPrefix=a.fragmentPrefix,b},b.fragmentPrefix=function(a){return this._parts.fragmentPrefix=a,this},b.fragment=function(b,d){var e=this._parts.fragmentPrefix,f=this._parts.fragment||"";return!0===b?f.substring(0,e.length)!==e?{}:a.parseQuery(f.substring(e.length)):void 0!==b&&"string"!=typeof b?(this._parts.fragment=e+a.buildQuery(b),this.build(!d),this):c.call(this,b,d)},b.addFragment=function(b,c,d){var e=this._parts.fragmentPrefix,f=a.parseQuery((this._parts.fragment||"").substring(e.length));return a.addQuery(f,b,c),this._parts.fragment=e+a.buildQuery(f),"string"!=typeof b&&(d=c),this.build(!d),this},b.removeFragment=function(b,c,d){var e=this._parts.fragmentPrefix,f=a.parseQuery((this._parts.fragment||"").substring(e.length));return a.removeQuery(f,b,c),this._parts.fragment=e+a.buildQuery(f),"string"!=typeof b&&(d=c),this.build(!d),this},b.addHash=b.addFragment,b.removeHash=b.removeFragment,{}}),function(a){"use strict";function b(a){var c;if(null===a||void 0===a)return!1;if(d.isArray(a))return a.length>0;if("string"==typeof a||"number"==typeof a||"boolean"==typeof a)return!0;for(c in a)if(a.hasOwnProperty(c)&&b(a[c]))return!0;return!1}var c=function(){function a(a){this.options=a}return a.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},a}(),d=function(){function a(a){return"[object Array]"===Object.prototype.toString.apply(a)}function b(a){return"[object String]"===Object.prototype.toString.apply(a)}function c(a){return"[object Number]"===Object.prototype.toString.apply(a)}function d(a){return"[object Boolean]"===Object.prototype.toString.apply(a)}function e(a,b){var c,d="",e=!0;for(c=0;c<a.length;c+=1)e?e=!1:d+=b,d+=a[c];return d}function f(a,b){for(var c=[],d=0;d<a.length;d+=1)c.push(b(a[d]));return c}function g(a,b){for(var c=[],d=0;d<a.length;d+=1)b(a[d])&&c.push(a[d]);return c}function h(a){if("object"!=typeof a||null===a)return a;Object.freeze(a);var b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],"object"==typeof b&&i(b));return a}function i(a){return"function"==typeof Object.freeze?h(a):a}return{isArray:a,isString:b,isNumber:c,isBoolean:d,join:e,map:f,filter:g,deepFreeze:i}}(),e=function(){function a(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a}function b(a){return a>="0"&&"9">=a}function c(a){return b(a)||a>="a"&&"f">=a||a>="A"&&"F">=a}return{isAlpha:a,isDigit:b,isHexDigit:c}}(),f=function(){function a(a){var b,c,d="",e=g.encode(a);for(c=0;c<e.length;c+=1)b=e.charCodeAt(c),d+="%"+(16>b?"0":"")+b.toString(16).toUpperCase();return d}function b(a,b){return"%"===a.charAt(b)&&e.isHexDigit(a.charAt(b+1))&&e.isHexDigit(a.charAt(b+2))}function c(a,b){return parseInt(a.substr(b,2),16)}function d(a){if(!b(a,0))return!1;var d=c(a,1),e=g.numBytes(d);if(0===e)return!1;for(var f=1;e>f;f+=1)if(!b(a,3*f)||!g.isValidFollowingCharCode(c(a,3*f+1)))return!1;return!0}function f(a,d){var e=a.charAt(d);if(!b(a,d))return e;var f=c(a,d+1),h=g.numBytes(f);if(0===h)return e;for(var i=1;h>i;i+=1)if(!b(a,d+3*i)||!g.isValidFollowingCharCode(c(a,d+3*i+1)))return e;return a.substr(d,3*h)}var g={encode:function(a){return unescape(encodeURIComponent(a))},numBytes:function(a){return 127>=a?1:a>=194&&223>=a?2:a>=224&&239>=a?3:a>=240&&244>=a?4:0},isValidFollowingCharCode:function(a){return a>=128&&191>=a}};return{encodeCharacter:a,isPctEncoded:d,pctCharAt:f}}(),g=function(){function a(a){return e.isAlpha(a)||e.isDigit(a)||"_"===a||f.isPctEncoded(a)}function b(a){return e.isAlpha(a)||e.isDigit(a)||"-"===a||"."===a||"_"===a||"~"===a}function c(a){return":"===a||"/"===a||"?"===a||"#"===a||"["===a||"]"===a||"@"===a||"!"===a||"$"===a||"&"===a||"("===a||")"===a||"*"===a||"+"===a||","===a||";"===a||"="===a||"'"===a}return{isVarchar:a,isUnreserved:b,isReserved:c}}(),h=function(){function a(a,b){var c,d="",e="";for(("number"==typeof a||"boolean"==typeof a)&&(a=a.toString()),c=0;c<a.length;c+=e.length)e=a.charAt(c),d+=g.isUnreserved(e)||b&&g.isReserved(e)?e:f.encodeCharacter(e);return d}function b(b){return a(b,!0)}function c(a,b){var c=f.pctCharAt(a,b);return c.length>1?c:g.isReserved(c)||g.isUnreserved(c)?c:f.encodeCharacter(c)}function d(a){var b,c="",d="";for(b=0;b<a.length;b+=d.length)d=f.pctCharAt(a,b),c+=d.length>1?d:g.isReserved(d)||g.isUnreserved(d)?d:f.encodeCharacter(d);return c}return{encode:a,encodePassReserved:b,encodeLiteral:d,encodeLiteralCharacter:c}}(),i=function(){function a(a){b[a]={symbol:a,separator:"?"===a?"&":""===a||"+"===a||"#"===a?",":a,named:";"===a||"&"===a||"?"===a,ifEmpty:"&"===a||"?"===a?"=":"",first:"+"===a?"":a,encode:"+"===a||"#"===a?h.encodePassReserved:h.encode,toString:function(){return this.symbol}}}var b={};return a(""),a("+"),a("#"),a("."),a("/"),a(";"),a("?"),a("&"),{valueOf:function(a){return b[a]?b[a]:"=,!@|".indexOf(a)>=0?null:b[""]}}}(),j=function(){function a(a){this.literal=h.encodeLiteral(a)}return a.prototype.expand=function(){return this.literal},a.prototype.toString=a.prototype.expand,a}(),k=function(){function a(a){function b(){var b=a.substring(n,j);if(0===b.length)throw new c({expressionText:a,message:"a varname must be specified",position:j});m={varname:b,exploded:!1,maxLength:null},n=null}function d(){if(o===j)throw new c({expressionText:a,message:"after a ':' you have to specify the length",position:j});m.maxLength=parseInt(a.substring(o,j),10),o=null}var h,j,k=[],m=null,n=null,o=null,p="";for(h=function(b){var d=i.valueOf(b);if(null===d)throw new c({expressionText:a,message:"illegal use of reserved operator",position:j,operator:b});return d}(a.charAt(0)),j=h.symbol.length,n=j;j<a.length;j+=p.length){if(p=f.pctCharAt(a,j),null!==n){if("."===p){if(n===j)throw new c({expressionText:a,message:"a varname MUST NOT start with a dot",position:j});continue}if(g.isVarchar(p))continue;b()}if(null!==o){if(j===o&&"0"===p)throw new c({expressionText:a,message:"A :prefix must not start with digit 0",position:j});if(e.isDigit(p)){if(j-o>=4)throw new c({expressionText:a,message:"A :prefix must have max 4 digits",position:j});continue}d()}if(":"!==p)if("*"!==p){if(","!==p)throw new c({expressionText:a,message:"illegal character",character:p,position:j});k.push(m),m=null,n=j+1}else{if(null===m)throw new c({expressionText:a,message:"exploded without varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"exploded twice",position:j});if(m.maxLength)throw new c({expressionText:a,message:"an explode (*) MUST NOT follow to a prefix",position:j});m.exploded=!0}else{if(null!==m.maxLength)throw new c({expressionText:a,message:"only one :maxLength is allowed per varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"an exploeded varspec MUST NOT be varspeced",position:j});o=j+1}}return null!==n&&b(),null!==o&&d(),k.push(m),new l(a,h,k)}function b(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function d(d){var e,f,g,h=[],i=null,k="",l=!0,n=0;for(e=0;e<d.length;e+=1)if(f=d.charAt(e),null===n){if(null===i)throw new Error("reached unreachable code");if("{"===f)throw new c({templateText:d,message:"brace already opened",position:e});if("}"===f){if(i+1===e)throw new c({templateText:d,message:"empty braces",position:i});try{g=a(d.substring(i+1,e))}catch(o){if(o.prototype===c.prototype)throw new c({templateText:d,message:o.options.message,position:i+o.options.position,details:o.options});throw o}h.push(g),0===g.operator.symbol.length?k+="([^/]+)":l=!1,i=null,n=e+1}}else{if("}"===f)throw new c({templateText:d,message:"unopened brace closed",position:e});"{"===f&&(e>n&&(g=new j(d.substring(n,e)),h.push(g),k+=b(g.literal)),n=null,i=e)}if(null!==i)throw new c({templateText:d,message:"unclosed brace",position:i});return n<d.length&&(g=new j(d.substring(n)),h.push(g),k+=b(g.literal)),l===!1&&(k=void 0),new m(d,h,k)}return d}(),l=function(){function a(a){return JSON&&JSON.stringify?JSON.stringify(a):a}function c(a){if(!b(a))return!0;if(d.isString(a))return""===a;if(d.isNumber(a)||d.isBoolean(a))return!1;if(d.isArray(a))return 0===a.length;for(var c in a)if(a.hasOwnProperty(c))return!1;return!0}function e(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&c.push({name:b,value:a[b]});return c}function f(a,b,c){this.templateText=a,this.operator=b,this.varspecs=c}function g(a,b,c){var d="";if(c=c.toString(),b.named){if(d+=h.encodeLiteral(a.varname),""===c)return d+=b.ifEmpty;d+="="}return null!==a.maxLength&&(c=c.substr(0,a.maxLength)),d+=b.encode(c)}function i(a){return b(a.value)}function j(a,f,g){var j=[],k="";if(f.named){if(k+=h.encodeLiteral(a.varname),c(g))return k+=f.ifEmpty;k+="="}return d.isArray(g)?(j=g,j=d.filter(j,b),j=d.map(j,f.encode),k+=d.join(j,",")):(j=e(g),j=d.filter(j,i),j=d.map(j,function(a){return f.encode(a.name)+","+f.encode(a.value)}),k+=d.join(j,",")),k}function k(a,f,g){var j=d.isArray(g),k=[];return j?(k=g,k=d.filter(k,b),k=d.map(k,function(b){var d=h.encodeLiteral(a.varname);return d+=c(b)?f.ifEmpty:"="+f.encode(b)})):(k=e(g),k=d.filter(k,i),k=d.map(k,function(a){var b=h.encodeLiteral(a.name);return b+=c(a.value)?f.ifEmpty:"="+f.encode(a.value)})),d.join(k,f.separator)}function l(a,c){var f=[],g="";return d.isArray(c)?(f=c,f=d.filter(f,b),f=d.map(f,a.encode),g+=d.join(f,a.separator)):(f=e(c),f=d.filter(f,function(a){return b(a.value)}),f=d.map(f,function(b){return a.encode(b.name)+"="+a.encode(b.value)}),g+=d.join(f,a.separator)),g}return f.prototype.toString=function(){return this.templateText},f.prototype.expand=function(e){var f,h,i,m,n=[],o=!1,p=this.operator;for(f=0;f<this.varspecs.length;f+=1)if(h=this.varspecs[f],i=e[h.varname],null!==i&&void 0!==i)if(h.exploded&&(o=!0),m=d.isArray(i),"string"==typeof i||"number"==typeof i||"boolean"==typeof i)n.push(g(h,p,i));else{if(h.maxLength&&b(i))throw new Error("Prefix modifiers are not applicable to variables that have composite values. You tried to expand "+this+" with "+a(i));h.exploded?b(i)&&(p.named?n.push(k(h,p,i)):n.push(l(p,i))):(p.named||!c(i))&&n.push(j(h,p,i))}return 0===n.length?"":p.first+d.join(n,p.separator)},f}(),m=function(){function a(a,b,c){this.templateText=a,this.expressions=b,void 0!==c&&(this.regexp=new RegExp("^"+c+"$")),d.deepFreeze(this)}return a.prototype.toString=function(){return this.templateText},a.prototype.expand=function(a){var b,c="";for(b=0;b<this.expressions.length;b+=1)c+=this.expressions[b].expand(a);return c},a.prototype.extract=function(a){var b,c,d,e,f=1,g=!0,h={};if(void 0!==this.regexp&&this.regexp.test(a)){for(e=this.regexp.exec(a),b=0;b<this.expressions.length;b+=1)c=this.expressions[b],void 0===c.literal&&(void 0!==c.operator&&0===c.operator.symbol.length&&1===c.varspecs.length?(d=c.varspecs[0],d.exploded===!1&&null===d.maxLength&&-1===e[f].indexOf(",")?(h[d.varname]=decodeURIComponent(e[f]),f+=1):g=!1):g=!1);if(g)return h}return!1},a.parse=k,a.UriTemplateError=c,a}();a(m)}(function(a){"use strict";"undefined"!=typeof module?module.exports=a:"function"==typeof define?define([],function(){return a}):"undefined"!=typeof window?window.UriTemplate=a:global.UriTemplate=a}),function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){u(a),g(this,a)}function f(a){var b=o(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b,c){for(var d=Math.abs(a)+"",e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function j(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&ca.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function m(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function n(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Qa[a]||Ra[b]||b}return a}function o(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=n(c),b&&(d[b]=a[c]));return d}function p(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}ca[b]=function(e,f){var g,h,i=ca.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=ca().utc().set(d,a);return i.call(ca.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function r(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function s(a){return t(a)?366:365}function t(a){return a%4===0&&a%100!==0||a%400===0}function u(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[ia]<0||a._a[ia]>11?ia:a._a[ja]<1||a._a[ja]>r(a._a[ha],a._a[ia])?ja:a._a[ka]<0||a._a[ka]>23?ka:a._a[la]<0||a._a[la]>59?la:a._a[ma]<0||a._a[ma]>59?ma:a._a[na]<0||a._a[na]>999?na:-1,a._pf._overflowDayOfYear&&(ha>b||b>ja)&&(b=ja),a._pf.overflow=b)}function v(a){a._pf={empty:!1,unusedTokens:[],
unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function w(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function x(a){return a?a.toLowerCase().replace("_","-"):a}function y(a,b){return b._isUTC?ca(a).zone(b._offset||0):ca(a).local()}function z(a,b){return b.abbr=a,oa[a]||(oa[a]=new d),oa[a].set(b),oa[a]}function A(a){delete oa[a]}function B(a){var b,c,d,e,f=0,g=function(a){if(!oa[a]&&pa)try{require("./lang/"+a)}catch(b){}return oa[a]};if(!a)return ca.fn._lang;if(!k(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=x(a[f]).split("-"),b=e.length,d=x(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&m(e,d,!0)>=b-1)break;b--}f++}return ca.fn._lang}function C(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function D(a){var b,c,d=a.match(ta);for(b=0,c=d.length;c>b;b++)Va[d[b]]?d[b]=Va[d[b]]:d[b]=C(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function E(a,b){return a.isValid()?(b=F(b,a.lang()),Sa[b]||(Sa[b]=D(b)),Sa[b](a)):a.lang().invalidDate()}function F(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(ua.lastIndex=0;d>=0&&ua.test(a);)a=a.replace(ua,c),ua.lastIndex=0,d-=1;return a}function G(a,b){var c,d=b._strict;switch(a){case"DDDD":return Ga;case"YYYY":case"GGGG":case"gggg":return d?Ha:xa;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?Ia:ya;case"S":if(d)return Ea;case"SS":if(d)return Fa;case"SSS":case"DDD":return d?Ga:wa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Aa;case"a":case"A":return B(b._l)._meridiemParse;case"X":return Da;case"Z":case"ZZ":return Ba;case"T":return Ca;case"SSSS":return za;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Fa:va;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return d?Ea:va;default:return c=new RegExp(O(N(a.replace("\\","")),"i"))}}function H(a){a=a||"";var b=a.match(Ba)||[],c=b[b.length-1]||[],d=(c+"").match(Na)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?-e:e}function I(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[ia]=q(b)-1);break;case"MMM":case"MMMM":d=B(c._l).monthsParse(b),null!=d?e[ia]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[ja]=q(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=q(b));break;case"YY":e[ha]=q(b)+(q(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":e[ha]=q(b);break;case"a":case"A":c._isPm=B(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[ka]=q(b);break;case"m":case"mm":e[la]=q(b);break;case"s":case"ss":e[ma]=q(b);break;case"S":case"SS":case"SSS":case"SSSS":e[na]=q(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=H(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function J(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=L(a),a._w&&null==a._a[ja]&&null==a._a[ia]&&(f=function(b){var c=parseInt(b,10);return b?b.length<3?c>68?1900+c:2e3+c:c:null==a._a[ha]?ca().weekYear():a._a[ha]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Y(f(g.GG),g.W||1,g.E,4,1):(i=B(a._l),j=null!=g.d?U(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Y(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ha]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ha]?d[ha]:a._a[ha],a._dayOfYear>s(e)&&(a._pf._overflowDayOfYear=!0),c=T(e,0,a._dayOfYear),a._a[ia]=c.getUTCMonth(),a._a[ja]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[ka]+=q((a._tzm||0)/60),l[la]+=q((a._tzm||0)%60),a._d=(a._useUTC?T:S).apply(null,l)}}function K(a){var b;a._d||(b=o(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],J(a))}function L(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function M(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=B(a._l),h=""+a._i,i=h.length,j=0;for(d=F(a._f,g).match(ta)||[],b=0;b<d.length;b++)e=d[b],c=(h.match(G(e,a))||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Va[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),I(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[ka]<12&&(a._a[ka]+=12),a._isPm===!1&&12===a._a[ka]&&(a._a[ka]=0),J(a),u(a)}function N(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function O(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function P(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=g({},a),v(b),b._f=a._f[e],M(b),w(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function Q(a){var b,c=a._i,d=Ja.exec(c);if(d){for(a._pf.iso=!0,b=4;b>0;b--)if(d[b]){a._f=La[b-1]+(d[6]||" ");break}for(b=0;4>b;b++)if(Ma[b][1].exec(c)){a._f+=Ma[b][0];break}c.match(Ba)&&(a._f+="Z"),M(a)}else a._d=new Date(c)}function R(b){var c=b._i,d=qa.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?Q(b):k(c)?(b._a=c.slice(0),J(b)):l(c)?b._d=new Date(+c):"object"==typeof c?K(b):b._d=new Date(c)}function S(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function T(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function U(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function V(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function W(a,b,c){var d=ga(Math.abs(a)/1e3),e=ga(d/60),f=ga(e/60),g=ga(f/24),h=ga(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",ga(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,V.apply({},i)}function X(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=ca(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Y(a,b,c,d,e){var f,g,h=new Date(i(a,6,!0)+"-01-01").getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:s(a-1)+g}}function Z(a){var b=a._i,c=a._f;return"undefined"==typeof a._pf&&v(a),null===b?ca.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=B().preparse(b)),ca.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?P(a):M(a):R(a),new e(a))}function $(a,b){ca.fn[a]=ca.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),ca.updateOffset(this),this):this._d["get"+c+b]()}}function _(a){ca.duration.fn[a]=function(){return this._data[a]}}function aa(a,b){ca.duration.fn["as"+a]=function(){return+this/b}}function ba(a){var b=!1,c=ca;"undefined"==typeof ender&&(a?(fa.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)},g(fa.moment,c)):fa.moment=ca)}for(var ca,da,ea="2.5.0",fa=this,ga=Math.round,ha=0,ia=1,ja=2,ka=3,la=4,ma=5,na=6,oa={},pa="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,qa=/^\/?Date\((\-?\d+)/i,ra=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,sa=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,ta=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,ua=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,va=/\d\d?/,wa=/\d{1,3}/,xa=/\d{1,4}/,ya=/[+\-]?\d{1,6}/,za=/\d+/,Aa=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ba=/Z|[\+\-]\d\d:?\d\d/gi,Ca=/T/i,Da=/[\+\-]?\d+(\.\d{1,3})?/,Ea=/\d/,Fa=/\d\d/,Ga=/\d{3}/,Ha=/\d{4}/,Ia=/[+\-]?\d{6}/,Ja=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ka="YYYY-MM-DDTHH:mm:ssZ",La=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Ma=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Na=/([\+\-]|\d\d)/gi,Oa="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Pa={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Qa={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Ra={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Sa={},Ta="DDD w W M D d".split(" "),Ua="M D H h m s w W".split(" "),Va={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+i(Math.abs(a),6)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return q(this.milliseconds()/100)},SS:function(){return i(q(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},SSSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+":"+i(q(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+i(q(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Wa=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Ta.length;)da=Ta.pop(),Va[da+"o"]=c(Va[da],da);for(;Ua.length;)da=Ua.pop(),Va[da+da]=b(Va[da],2);for(Va.DDDD=b(Va.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=ca.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=ca([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return X(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),ca=function(b,c,d,e){return"boolean"==typeof d&&(e=d,d=a),Z({_i:b,_f:c,_l:d,_strict:e,_isUTC:!1})},ca.utc=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f=Z({_useUTC:!0,_isUTC:!0,_l:d,_i:b,_f:c,_strict:e}).utc()},ca.unix=function(a){return ca(1e3*a)},ca.duration=function(a,b){var c,d,e,g=a,h=null;return ca.isDuration(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=ra.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[ja])*c,h:q(h[ka])*c,m:q(h[la])*c,s:q(h[ma])*c,ms:q(h[na])*c}):(h=sa.exec(a))&&(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},g={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}),d=new f(g),ca.isDuration(a)&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},ca.version=ea,ca.defaultFormat=Ka,ca.updateOffset=function(){},ca.lang=function(a,b){var c;return a?(b?z(x(a),b):null===b?(A(a),a="en"):oa[a]||B(a),c=ca.duration.fn._lang=ca.fn._lang=B(a),c._abbr):ca.fn._lang._abbr},ca.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),B(a)},ca.isMoment=function(a){return a instanceof e},ca.isDuration=function(a){return a instanceof f},da=Wa.length-1;da>=0;--da)p(Wa[da]);for(ca.normalizeUnits=function(a){return n(a)},ca.invalid=function(a){var b=ca.utc(NaN);return null!=a?g(b._pf,a):b._pf.userInvalidated=!0,b},ca.parseZone=function(a){return ca(a).parseZone()},g(ca.fn=e.prototype,{clone:function(){return ca(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=ca(this).utc();return 0<a.year()&&a.year()<=9999?E(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):E(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return w(this)},isDSTShifted:function(){return this._a?this.isValid()&&m(this._a,(this._isUTC?ca.utc(this._a):ca(this._a)).toArray())>0:!1},parsingFlags:function(){return g({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=E(this,a||ca.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?ca.duration(+b,a):ca.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?ca.duration(+b,a):ca.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=y(a,this),g=6e4*(this.zone()-f.zone());return b=n(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-ca(this).startOf("month")-(f-ca(f).startOf("month")))/d,e-=6e4*(this.zone()-ca(this).startOf("month").zone()-(f.zone()-ca(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return ca.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(ca(),a)},calendar:function(){var a=y(ca(),this).startOf("day"),b=this.diff(a,"days",!0),c=-6>b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse";return this.format(this.lang().calendar(c,this))},isLeapYear:function(){return t(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=U(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),ca.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=n(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=n(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+ca(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+ca(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+y(a,this).startOf(b)},min:function(a){return a=ca.apply(null,arguments),this>a?this:a},max:function(a){return a=ca.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=H(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,ca.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?ca(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return r(this.year(),this.month())},dayOfYear:function(a){var b=ga((ca(this).startOf("day")-ca(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var b=X(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=X(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=X(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=n(a),this[a]()},set:function(a,b){return a=n(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=B(b),this)}}),da=0;da<Oa.length;da++)$(Oa[da].toLowerCase().replace(/s$/,""),Oa[da]);$("year","FullYear"),ca.fn.days=ca.fn.day,ca.fn.months=ca.fn.month,ca.fn.weeks=ca.fn.week,ca.fn.isoWeeks=ca.fn.isoWeek,ca.fn.toJSON=ca.fn.toISOString,g(ca.duration.fn=f.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,i=this._data;i.milliseconds=e%1e3,a=h(e/1e3),i.seconds=a%60,b=h(a/60),i.minutes=b%60,c=h(b/60),i.hours=c%24,f+=h(c/24),i.days=f%30,g+=h(f/30),i.months=g%12,d=h(g/12),i.years=d},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)},humanize:function(a){var b=+this,c=W(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=ca.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=ca.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=n(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=n(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:ca.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(da in Pa)Pa.hasOwnProperty(da)&&(aa(da,Pa[da]),_(da.toLowerCase()));aa("Weeks",6048e5),ca.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},ca.lang("en",{ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),pa?(module.exports=ca,ba(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config&&d.config()&&d.config().noGlobal!==!0&&ba(d.config().noGlobal===a),ca}):ba()}.call(this);var query_class_dict={};Query.prototype.exec=function(a,b){var c,d=[];if(!Array.isArray(a))throw new TypeError("Query().exec(): Argument 1 is not of type 'array'");if(void 0===b&&(b={}),"object"!=typeof b)throw new TypeError("Query().exec(): Optional argument 2 is not of type 'object'");for(c=0;c<a.length;c+=1)a[c]?d.push(this.match(a[c])):d.push(RSVP.resolve(!1));return(new RSVP.Queue).push(function(){return RSVP.all(d)}).push(function(c){var d;for(d=c.length-1;d>=0;d-=1)c[d]||a.splice(d,1);return b.sort_on?sortOn(b.sort_on,a):void 0}).push(function(){return b.limit?limit(b.limit,a):void 0}).push(function(){return select(b.select_list||[],a)}).push(function(){return a})},Query.prototype.match=function(){return RSVP.resolve(!0)},Query.prototype.parse=function(a){function b(a,c){function e(d){h.push(function(){return a.parsed=g.query_list[d],b(a,c)}).push(function(){g.query_list[d]=a.parsed})}var f,g=a.parsed,h=new RSVP.Queue;if("complex"===g.type){for(f=0;f<g.query_list.length;f+=1)e(f);return h.push(function(){return a.parsed=g,d.onParseComplexQuery(a,c)})}return"simple"===g.type?d.onParseSimpleQuery(a,c):void 0}var c,d=this;return c={parsed:JSON.parse(JSON.stringify(d.serialized()))},(new RSVP.Queue).push(function(){return d.onParseStart(c,a)}).push(function(){return b(c,a)}).push(function(){return d.onParseEnd(c,a)}).push(function(){return c.parsed})},Query.prototype.toString=function(){return""},Query.prototype.serialized=function(){return void 0},window.Query=Query,Query.parseStringToObject=parseStringToObject,inherits(ComplexQuery,Query),ComplexQuery.prototype.operator="AND",ComplexQuery.prototype.type="complex",ComplexQuery.prototype.match=function(a){var b=this.operator;return/^(?:AND|OR|NOT)$/i.test(b)||(b="AND"),this[b.toUpperCase()](a)},ComplexQuery.prototype.toString=function(){var a=[],b=this.operator;return"NOT"===this.operator?(a.push("NOT ("),a.push(this.query_list[0].toString()),a.push(")"),a.join(" ")):(this.query_list.forEach(function(c){a.push("("),a.push(c.toString()),a.push(")"),a.push(b)}),a.length-=1,a.join(" "))},ComplexQuery.prototype.serialized=function(){var a={type:"complex",operator:this.operator,query_list:[]};return this.query_list.forEach(function(b){a.query_list.push("function"==typeof b.toJSON?b.toJSON():b)}),a},ComplexQuery.prototype.toJSON=ComplexQuery.prototype.serialized,ComplexQuery.prototype.AND=function(a){function b(f){return f===!1?f:d.query_list.length===e?!0:void c.push(function(){var b=d.query_list[e].match(a);return e+=1,b}).push(b)}var c=new RSVP.Queue,d=this,e=0;return b(!0),c},ComplexQuery.prototype.OR=function(a){function b(f){return f===!0?f:d.query_list.length===e?!1:void c.push(function(){var b=d.query_list[e].match(a);return e+=1,b}).push(b)}var c=new RSVP.Queue,d=this,e=0;return b(!1),c},ComplexQuery.prototype.NOT=function(a){return(new RSVP.Queue).push(function(){return this.query_list[0].match(a)}).push(function(a){return!a})},query_class_dict.complex=ComplexQuery,window.ComplexQuery=ComplexQuery,QueryFactory.create=function(a,b){if(""===a)return new Query;if("string"==typeof a&&(a=parseStringToObject(a)),"string"==typeof(a||{}).type&&query_class_dict[a.type])return new query_class_dict[a.type](a,b);throw new TypeError("QueryFactory.create(): Argument 1 is not a search text or a parsable object")},window.QueryFactory=QueryFactory,Query.objectToSearchText=objectToSearchText;var checkKeySchema=function(a){var b;if(void 0!==a){if("object"!=typeof a)throw new TypeError("SimpleQuery().create(): key_schema is not of type 'object'");if(void 0===a.key_set)throw new TypeError("SimpleQuery().create(): key_schema has no 'key_set' property");for(b in a)if(a.hasOwnProperty(b))switch(b){case"key_set":case"cast_lookup":case"match_lookup":break;default:throw new TypeError("SimpleQuery().create(): key_schema has unknown property '"+b+"'")}}};inherits(SimpleQuery,Query),SimpleQuery.prototype.type="simple";var checkKey=function(a){var b;if(void 0===a.read_from)throw new TypeError("Custom key is missing the read_from property");for(b in a)if(a.hasOwnProperty(b))switch(b){case"read_from":case"cast_to":case"equal_match":break;default:throw new TypeError("Custom key has unknown property '"+b+"'")}};SimpleQuery.prototype.match=function(a){var b=null,c=null,d=null,e=null,f=this.operator,g=null,h=this.key;if(/^(?:!?=|<=?|>=?)$/i.test(f)||(f=/%/.test(this.value)?"like":"="),e=this[f],this._key_schema.key_set&&void 0!==this._key_schema.key_set[h]&&(h=this._key_schema.key_set[h]),"object"==typeof h){if(checkKey(h),b=a[h.read_from],c=h.equal_match,"string"==typeof c&&(c=this._key_schema.match_lookup[c]),void 0!==c&&(e="="===f||"like"===f?c:e),g=this.value,d=h.cast_to){"string"==typeof d&&(d=this._key_schema.cast_lookup[d]);try{g=d(g)}catch(i){g=void 0}try{b=d(b)}catch(i){b=void 0}}}else b=a[h],g=this.value;return void 0===b||void 0===g?RSVP.resolve(!1):e(b,g)},SimpleQuery.prototype.toString=function(){return(this.key?this.key+":":"")+(this.operator?" "+this.operator:"")+' "'+this.value+'"'},SimpleQuery.prototype.serialized=function(){var a={type:"simple",key:this.key,value:this.value};return void 0!==this.operator&&(a.operator=this.operator),a},SimpleQuery.prototype.toJSON=SimpleQuery.prototype.serialized,SimpleQuery.prototype["="]=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0===c.cmp(b));if(searchTextToRegExp(b.toString(),!1).test(c.toString()))return RSVP.resolve(!0)}return RSVP.resolve(!1)},SimpleQuery.prototype.like=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0===c.cmp(b));if(searchTextToRegExp(b.toString()).test(c.toString()))return RSVP.resolve(!0)}return RSVP.resolve(!1)},SimpleQuery.prototype["!="]=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0!==c.cmp(b));if(searchTextToRegExp(b.toString(),!1).test(c.toString()))return RSVP.resolve(!1)}return RSVP.resolve(!0)},SimpleQuery.prototype["<"]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)<0):RSVP.resolve(b>c)},SimpleQuery.prototype["<="]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)<=0):RSVP.resolve(b>=c)},SimpleQuery.prototype[">"]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)>0):RSVP.resolve(c>b)},SimpleQuery.prototype[">="]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)>=0):RSVP.resolve(c>=b)},query_class_dict.simple=SimpleQuery,window.SimpleQuery=SimpleQuery,Query.stringEscapeRegexpCharacters=stringEscapeRegexpCharacters,Query.select=select,Query.sortOn=sortOn,Query.limit=limit,Query.searchTextToRegExp=searchTextToRegExp,function(a,b){"use strict";var c,d="year",e="month",f="day",g="hour",h="minute",i="second",j="millisecond",k={year:0,month:1,day:2,hour:3,minute:4,second:5,millisecond:6},l=function(a,b){return k[a]<k[b]?a:b};c=function(a){if(!(this instanceof c))return new c(a);if(a instanceof c)return this.mom=a.mom.clone(),void(this._precision=a._precision);if(void 0===a)return this.mom=b(),void this.setPrecision(j);if(this.mom=null,this._str=a,a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d/)?(this.mom=b(a),this.setPrecision(j)):a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)?(this.mom=b(a),this.setPrecision(i)):a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/)?(this.mom=b(a),this.setPrecision(h)):a.match(/\d\d\d\d-\d\d-\d\d \d\d/)?(this.mom=b(a),this.setPrecision(g)):a.match(/\d\d\d\d-\d\d-\d\d/)?(this.mom=b(a),this.setPrecision(f)):a.match(/\d\d\d\d-\d\d/)?(this.mom=b(a),this.setPrecision(e)):a.match(/\d\d\d\d/)&&(this.mom=b(a),this.setPrecision(d)),!this.mom)throw new Error("Cannot parse: "+a)},c.prototype.setPrecision=function(a){this._precision=a},c.prototype.getPrecision=function(){return this._precision},c.prototype.cmp=function(a){var b=this.mom,c=a.mom,d=l(this._precision,a._precision);return b.isBefore(c,d)?-1:b.isSame(c,d)?0:1},c.prototype.toPrecisionString=function(a){var b;if(a=a||this._precision,b={millisecond:"YYYY-MM-DD HH:mm:ss.SSS",second:"YYYY-MM-DD HH:mm:ss",minute:"YYYY-MM-DD HH:mm",hour:"YYYY-MM-DD HH",day:"YYYY-MM-DD",month:"YYYY-MM", unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function w(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function x(a){return a?a.toLowerCase().replace("_","-"):a}function y(a,b){return b._isUTC?ca(a).zone(b._offset||0):ca(a).local()}function z(a,b){return b.abbr=a,oa[a]||(oa[a]=new d),oa[a].set(b),oa[a]}function A(a){delete oa[a]}function B(a){var b,c,d,e,f=0,g=function(a){if(!oa[a]&&pa)try{require("./lang/"+a)}catch(b){}return oa[a]};if(!a)return ca.fn._lang;if(!k(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=x(a[f]).split("-"),b=e.length,d=x(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&m(e,d,!0)>=b-1)break;b--}f++}return ca.fn._lang}function C(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function D(a){var b,c,d=a.match(ta);for(b=0,c=d.length;c>b;b++)Va[d[b]]?d[b]=Va[d[b]]:d[b]=C(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function E(a,b){return a.isValid()?(b=F(b,a.lang()),Sa[b]||(Sa[b]=D(b)),Sa[b](a)):a.lang().invalidDate()}function F(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(ua.lastIndex=0;d>=0&&ua.test(a);)a=a.replace(ua,c),ua.lastIndex=0,d-=1;return a}function G(a,b){var c,d=b._strict;switch(a){case"DDDD":return Ga;case"YYYY":case"GGGG":case"gggg":return d?Ha:xa;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?Ia:ya;case"S":if(d)return Ea;case"SS":if(d)return Fa;case"SSS":case"DDD":return d?Ga:wa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Aa;case"a":case"A":return B(b._l)._meridiemParse;case"X":return Da;case"Z":case"ZZ":return Ba;case"T":return Ca;case"SSSS":return za;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?Fa:va;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return d?Ea:va;default:return c=new RegExp(O(N(a.replace("\\","")),"i"))}}function H(a){a=a||"";var b=a.match(Ba)||[],c=b[b.length-1]||[],d=(c+"").match(Na)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?-e:e}function I(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[ia]=q(b)-1);break;case"MMM":case"MMMM":d=B(c._l).monthsParse(b),null!=d?e[ia]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[ja]=q(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=q(b));break;case"YY":e[ha]=q(b)+(q(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":case"YYYYYY":e[ha]=q(b);break;case"a":case"A":c._isPm=B(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[ka]=q(b);break;case"m":case"mm":e[la]=q(b);break;case"s":case"ss":e[ma]=q(b);break;case"S":case"SS":case"SSS":case"SSSS":e[na]=q(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=H(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function J(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=L(a),a._w&&null==a._a[ja]&&null==a._a[ia]&&(f=function(b){var c=parseInt(b,10);return b?b.length<3?c>68?1900+c:2e3+c:c:null==a._a[ha]?ca().weekYear():a._a[ha]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=Y(f(g.GG),g.W||1,g.E,4,1):(i=B(a._l),j=null!=g.d?U(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=Y(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[ha]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[ha]?d[ha]:a._a[ha],a._dayOfYear>s(e)&&(a._pf._overflowDayOfYear=!0),c=T(e,0,a._dayOfYear),a._a[ia]=c.getUTCMonth(),a._a[ja]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[ka]+=q((a._tzm||0)/60),l[la]+=q((a._tzm||0)%60),a._d=(a._useUTC?T:S).apply(null,l)}}function K(a){var b;a._d||(b=o(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],J(a))}function L(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function M(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=B(a._l),h=""+a._i,i=h.length,j=0;for(d=F(a._f,g).match(ta)||[],b=0;b<d.length;b++)e=d[b],c=(h.match(G(e,a))||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Va[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),I(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[ka]<12&&(a._a[ka]+=12),a._isPm===!1&&12===a._a[ka]&&(a._a[ka]=0),J(a),u(a)}function N(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function O(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function P(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=g({},a),v(b),b._f=a._f[e],M(b),w(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function Q(a){var b,c=a._i,d=Ja.exec(c);if(d){for(a._pf.iso=!0,b=4;b>0;b--)if(d[b]){a._f=La[b-1]+(d[6]||" ");break}for(b=0;4>b;b++)if(Ma[b][1].exec(c)){a._f+=Ma[b][0];break}c.match(Ba)&&(a._f+="Z"),M(a)}else a._d=new Date(c)}function R(b){var c=b._i,d=qa.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?Q(b):k(c)?(b._a=c.slice(0),J(b)):l(c)?b._d=new Date(+c):"object"==typeof c?K(b):b._d=new Date(c)}function S(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function T(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function U(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function V(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function W(a,b,c){var d=ga(Math.abs(a)/1e3),e=ga(d/60),f=ga(e/60),g=ga(f/24),h=ga(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",ga(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,V.apply({},i)}function X(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=ca(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function Y(a,b,c,d,e){var f,g,h=new Date(i(a,6,!0)+"-01-01").getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:s(a-1)+g}}function Z(a){var b=a._i,c=a._f;return"undefined"==typeof a._pf&&v(a),null===b?ca.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=B().preparse(b)),ca.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?P(a):M(a):R(a),new e(a))}function $(a,b){ca.fn[a]=ca.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),ca.updateOffset(this),this):this._d["get"+c+b]()}}function _(a){ca.duration.fn[a]=function(){return this._data[a]}}function aa(a,b){ca.duration.fn["as"+a]=function(){return+this/b}}function ba(a){var b=!1,c=ca;"undefined"==typeof ender&&(a?(fa.moment=function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)},g(fa.moment,c)):fa.moment=ca)}for(var ca,da,ea="2.5.0",fa=this,ga=Math.round,ha=0,ia=1,ja=2,ka=3,la=4,ma=5,na=6,oa={},pa="undefined"!=typeof module&&module.exports&&"undefined"!=typeof require,qa=/^\/?Date\((\-?\d+)/i,ra=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,sa=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,ta=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,ua=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,va=/\d\d?/,wa=/\d{1,3}/,xa=/\d{1,4}/,ya=/[+\-]?\d{1,6}/,za=/\d+/,Aa=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ba=/Z|[\+\-]\d\d:?\d\d/gi,Ca=/T/i,Da=/[\+\-]?\d+(\.\d{1,3})?/,Ea=/\d/,Fa=/\d\d/,Ga=/\d{3}/,Ha=/\d{4}/,Ia=/[+\-]?\d{6}/,Ja=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ka="YYYY-MM-DDTHH:mm:ssZ",La=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Ma=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Na=/([\+\-]|\d\d)/gi,Oa="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Pa={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Qa={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Ra={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Sa={},Ta="DDD w W M D d".split(" "),Ua="M D H h m s w W".split(" "),Va={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+i(Math.abs(a),6)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return q(this.milliseconds()/100)},SS:function(){return i(q(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},SSSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+":"+i(q(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+i(q(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Wa=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Ta.length;)da=Ta.pop(),Va[da+"o"]=c(Va[da],da);for(;Ua.length;)da=Ua.pop(),Va[da+da]=b(Va[da],2);for(Va.DDDD=b(Va.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=ca.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=ca([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return X(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),ca=function(b,c,d,e){return"boolean"==typeof d&&(e=d,d=a),Z({_i:b,_f:c,_l:d,_strict:e,_isUTC:!1})},ca.utc=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f=Z({_useUTC:!0,_isUTC:!0,_l:d,_i:b,_f:c,_strict:e}).utc()},ca.unix=function(a){return ca(1e3*a)},ca.duration=function(a,b){var c,d,e,g=a,h=null;return ca.isDuration(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=ra.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[ja])*c,h:q(h[ka])*c,m:q(h[la])*c,s:q(h[ma])*c,ms:q(h[na])*c}):(h=sa.exec(a))&&(c="-"===h[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},g={y:e(h[2]),M:e(h[3]),d:e(h[4]),h:e(h[5]),m:e(h[6]),s:e(h[7]),w:e(h[8])}),d=new f(g),ca.isDuration(a)&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},ca.version=ea,ca.defaultFormat=Ka,ca.updateOffset=function(){},ca.lang=function(a,b){var c;return a?(b?z(x(a),b):null===b?(A(a),a="en"):oa[a]||B(a),c=ca.duration.fn._lang=ca.fn._lang=B(a),c._abbr):ca.fn._lang._abbr},ca.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),B(a)},ca.isMoment=function(a){return a instanceof e},ca.isDuration=function(a){return a instanceof f},da=Wa.length-1;da>=0;--da)p(Wa[da]);for(ca.normalizeUnits=function(a){return n(a)},ca.invalid=function(a){var b=ca.utc(NaN);return null!=a?g(b._pf,a):b._pf.userInvalidated=!0,b},ca.parseZone=function(a){return ca(a).parseZone()},g(ca.fn=e.prototype,{clone:function(){return ca(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=ca(this).utc();return 0<a.year()&&a.year()<=9999?E(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):E(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return w(this)},isDSTShifted:function(){return this._a?this.isValid()&&m(this._a,(this._isUTC?ca.utc(this._a):ca(this._a)).toArray())>0:!1},parsingFlags:function(){return g({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=E(this,a||ca.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?ca.duration(+b,a):ca.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?ca.duration(+b,a):ca.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=y(a,this),g=6e4*(this.zone()-f.zone());return b=n(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-ca(this).startOf("month")-(f-ca(f).startOf("month")))/d,e-=6e4*(this.zone()-ca(this).startOf("month").zone()-(f.zone()-ca(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return ca.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(ca(),a)},calendar:function(){var a=y(ca(),this).startOf("day"),b=this.diff(a,"days",!0),c=-6>b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse";return this.format(this.lang().calendar(c,this))},isLeapYear:function(){return t(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=U(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),ca.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=n(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=n(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+ca(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+ca(a).startOf(b)},isSame:function(a,b){return b=b||"ms",+this.clone().startOf(b)===+y(a,this).startOf(b)},min:function(a){return a=ca.apply(null,arguments),this>a?this:a},max:function(a){return a=ca.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=H(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,ca.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?ca(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return r(this.year(),this.month())},dayOfYear:function(a){var b=ga((ca(this).startOf("day")-ca(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},quarter:function(){return Math.ceil((this.month()+1)/3)},weekYear:function(a){var b=X(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=X(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=X(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=n(a),this[a]()},set:function(a,b){return a=n(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=B(b),this)}}),da=0;da<Oa.length;da++)$(Oa[da].toLowerCase().replace(/s$/,""),Oa[da]);$("year","FullYear"),ca.fn.days=ca.fn.day,ca.fn.months=ca.fn.month,ca.fn.weeks=ca.fn.week,ca.fn.isoWeeks=ca.fn.isoWeek,ca.fn.toJSON=ca.fn.toISOString,g(ca.duration.fn=f.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,i=this._data;i.milliseconds=e%1e3,a=h(e/1e3),i.seconds=a%60,b=h(a/60),i.minutes=b%60,c=h(b/60),i.hours=c%24,f+=h(c/24),i.days=f%30,g+=h(f/30),i.months=g%12,d=h(g/12),i.years=d},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)},humanize:function(a){var b=+this,c=W(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=ca.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=ca.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=n(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=n(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:ca.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(da in Pa)Pa.hasOwnProperty(da)&&(aa(da,Pa[da]),_(da.toLowerCase()));aa("Weeks",6048e5),ca.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},ca.lang("en",{ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),pa?(module.exports=ca,ba(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config&&d.config()&&d.config().noGlobal!==!0&&ba(d.config().noGlobal===a),ca}):ba()}.call(this);var query_class_dict={};Query.prototype.exec=function(a,b){var c,d=[];if(!Array.isArray(a))throw new TypeError("Query().exec(): Argument 1 is not of type 'array'");if(void 0===b&&(b={}),"object"!=typeof b)throw new TypeError("Query().exec(): Optional argument 2 is not of type 'object'");for(c=0;c<a.length;c+=1)a[c]?d.push(this.match(a[c])):d.push(RSVP.resolve(!1));return(new RSVP.Queue).push(function(){return RSVP.all(d)}).push(function(c){var d;for(d=c.length-1;d>=0;d-=1)c[d]||a.splice(d,1);return b.sort_on?sortOn(b.sort_on,a):void 0}).push(function(){return b.limit?limit(b.limit,a):void 0}).push(function(){return select(b.select_list||[],a)}).push(function(){return a})},Query.prototype.match=function(){return RSVP.resolve(!0)},Query.prototype.parse=function(a){function b(a,c){function e(d){h.push(function(){return a.parsed=g.query_list[d],b(a,c)}).push(function(){g.query_list[d]=a.parsed})}var f,g=a.parsed,h=new RSVP.Queue;if("complex"===g.type){for(f=0;f<g.query_list.length;f+=1)e(f);return h.push(function(){return a.parsed=g,d.onParseComplexQuery(a,c)})}return"simple"===g.type?d.onParseSimpleQuery(a,c):void 0}var c,d=this;return c={parsed:JSON.parse(JSON.stringify(d.serialized()))},(new RSVP.Queue).push(function(){return d.onParseStart(c,a)}).push(function(){return b(c,a)}).push(function(){return d.onParseEnd(c,a)}).push(function(){return c.parsed})},Query.prototype.toString=function(){return""},Query.prototype.serialized=function(){return void 0},window.Query=Query,Query.parseStringToObject=parseStringToObject,inherits(ComplexQuery,Query),ComplexQuery.prototype.operator="AND",ComplexQuery.prototype.type="complex",ComplexQuery.prototype.match=function(a){var b=this.operator;return/^(?:AND|OR|NOT)$/i.test(b)||(b="AND"),this[b.toUpperCase()](a)},ComplexQuery.prototype.toString=function(){var a=[],b=this.operator;return"NOT"===this.operator?(a.push("NOT ("),a.push(this.query_list[0].toString()),a.push(")"),a.join(" ")):(this.query_list.forEach(function(c){a.push("("),a.push(c.toString()),a.push(")"),a.push(b)}),a.length-=1,a.join(" "))},ComplexQuery.prototype.serialized=function(){var a={type:"complex",operator:this.operator,query_list:[]};return this.query_list.forEach(function(b){a.query_list.push("function"==typeof b.toJSON?b.toJSON():b)}),a},ComplexQuery.prototype.toJSON=ComplexQuery.prototype.serialized,ComplexQuery.prototype.AND=function(a){function b(f){return f===!1?f:d.query_list.length===e?!0:void c.push(function(){var b=d.query_list[e].match(a);return e+=1,b}).push(b)}var c=new RSVP.Queue,d=this,e=0;return b(!0),c},ComplexQuery.prototype.OR=function(a){function b(f){return f===!0?f:d.query_list.length===e?!1:void c.push(function(){var b=d.query_list[e].match(a);return e+=1,b}).push(b)}var c=new RSVP.Queue,d=this,e=0;return b(!1),c},ComplexQuery.prototype.NOT=function(a){return(new RSVP.Queue).push(function(){return this.query_list[0].match(a)}).push(function(a){return!a})},query_class_dict.complex=ComplexQuery,window.ComplexQuery=ComplexQuery,QueryFactory.create=function(a,b){if(""===a)return new Query;if("string"==typeof a&&(a=parseStringToObject(a)),"string"==typeof(a||{}).type&&query_class_dict[a.type])return new query_class_dict[a.type](a,b);throw new TypeError("QueryFactory.create(): Argument 1 is not a search text or a parsable object")},window.QueryFactory=QueryFactory,Query.objectToSearchText=objectToSearchText;var checkKeySchema=function(a){var b;if(void 0!==a){if("object"!=typeof a)throw new TypeError("SimpleQuery().create(): key_schema is not of type 'object'");if(void 0===a.key_set)throw new TypeError("SimpleQuery().create(): key_schema has no 'key_set' property");for(b in a)if(a.hasOwnProperty(b))switch(b){case"key_set":case"cast_lookup":case"match_lookup":break;default:throw new TypeError("SimpleQuery().create(): key_schema has unknown property '"+b+"'")}}};inherits(SimpleQuery,Query),SimpleQuery.prototype.type="simple";var checkKey=function(a){var b;if(void 0===a.read_from)throw new TypeError("Custom key is missing the read_from property");for(b in a)if(a.hasOwnProperty(b))switch(b){case"read_from":case"cast_to":case"equal_match":break;default:throw new TypeError("Custom key has unknown property '"+b+"'")}};SimpleQuery.prototype.match=function(a){var b=null,c=null,d=null,e=null,f=this.operator,g=null,h=this.key;if(/^(?:!?=|<=?|>=?)$/i.test(f)||(f=/%/.test(this.value)?"like":"="),e=this[f],this._key_schema.key_set&&void 0!==this._key_schema.key_set[h]&&(h=this._key_schema.key_set[h]),"object"==typeof h){if(checkKey(h),b=a[h.read_from],c=h.equal_match,"string"==typeof c&&(c=this._key_schema.match_lookup[c]),void 0!==c&&(e="="===f||"like"===f?c:e),g=this.value,d=h.cast_to){"string"==typeof d&&(d=this._key_schema.cast_lookup[d]);try{g=d(g)}catch(i){g=void 0}try{b=d(b)}catch(i){b=void 0}}}else b=a[h],g=this.value;return void 0===b||void 0===g?RSVP.resolve(!1):e(b,g)},SimpleQuery.prototype.toString=function(){return(this.key?this.key+":":"")+(this.operator?" "+this.operator:"")+' "'+this.value+'"'},SimpleQuery.prototype.serialized=function(){var a={type:"simple",key:this.key,value:this.value};return void 0!==this.operator&&(a.operator=this.operator),a},SimpleQuery.prototype.toJSON=SimpleQuery.prototype.serialized,SimpleQuery.prototype["="]=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0===c.cmp(b));if(searchTextToRegExp(b.toString(),!1).test(c.toString()))return RSVP.resolve(!0)}return RSVP.resolve(!1)},SimpleQuery.prototype.like=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0===c.cmp(b));if(searchTextToRegExp(b.toString()).test(c.toString()))return RSVP.resolve(!0)}return RSVP.resolve(!1)},SimpleQuery.prototype["!="]=function(a,b){var c,d;for(Array.isArray(a)||(a=[a]),d=0;d<a.length;d+=1){if(c=a[d],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp)return RSVP.resolve(0!==c.cmp(b));if(searchTextToRegExp(b.toString(),!1).test(c.toString()))return RSVP.resolve(!1)}return RSVP.resolve(!0)},SimpleQuery.prototype["<"]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)<0):RSVP.resolve(b>c)},SimpleQuery.prototype["<="]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)<=0):RSVP.resolve(b>=c)},SimpleQuery.prototype[">"]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)>0):RSVP.resolve(c>b)},SimpleQuery.prototype[">="]=function(a,b){var c;return Array.isArray(a)||(a=[a]),c=a[0],"object"==typeof c&&c.hasOwnProperty("content")&&(c=c.content),"function"==typeof c.cmp?RSVP.resolve(c.cmp(b)>=0):RSVP.resolve(c>=b)},query_class_dict.simple=SimpleQuery,window.SimpleQuery=SimpleQuery,Query.stringEscapeRegexpCharacters=stringEscapeRegexpCharacters,Query.select=select,Query.sortOn=sortOn,Query.limit=limit,Query.searchTextToRegExp=searchTextToRegExp,function(a,b){"use strict";var c,d="year",e="month",f="day",g="hour",h="minute",i="second",j="millisecond",k={year:0,month:1,day:2,hour:3,minute:4,second:5,millisecond:6},l=function(a,b){return k[a]<k[b]?a:b};c=function(a){if(!(this instanceof c))return new c(a);if(a instanceof c)return this.mom=a.mom.clone(),void(this._precision=a._precision);if(void 0===a)return this.mom=b(),void this.setPrecision(j);if(this.mom=null,this._str=a,a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d/)?(this.mom=b(a),this.setPrecision(j)):a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)?(this.mom=b(a),this.setPrecision(i)):a.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)||a.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/)?(this.mom=b(a),this.setPrecision(h)):a.match(/\d\d\d\d-\d\d-\d\d \d\d/)?(this.mom=b(a),this.setPrecision(g)):a.match(/\d\d\d\d-\d\d-\d\d/)?(this.mom=b(a),this.setPrecision(f)):a.match(/\d\d\d\d-\d\d/)?(this.mom=b(a),this.setPrecision(e)):a.match(/\d\d\d\d/)&&(this.mom=b(a),this.setPrecision(d)),!this.mom)throw new Error("Cannot parse: "+a)},c.prototype.setPrecision=function(a){this._precision=a},c.prototype.getPrecision=function(){return this._precision},c.prototype.cmp=function(a){var b=this.mom,c=a.mom,d=l(this._precision,a._precision);return b.isBefore(c,d)?-1:b.isSame(c,d)?0:1},c.prototype.toPrecisionString=function(a){var b;if(a=a||this._precision,b={millisecond:"YYYY-MM-DD HH:mm:ss.SSS",second:"YYYY-MM-DD HH:mm:ss",minute:"YYYY-MM-DD HH:mm",hour:"YYYY-MM-DD HH",day:"YYYY-MM-DD",month:"YYYY-MM",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "jio", "name": "jio",
"version": "v3.2.0", "version": "v3.2.1",
"license": "LGPLv3", "license": "LGPLv3",
"author": "Nexedi SA", "author": "Nexedi SA",
"contributors": [ "contributors": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment