diff --git a/.travis.yml b/.travis.yml index af58f96..98a9c3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ addons: cache: directories: - ./node_modules + - ./coverage/lcov.info install: - npm install @@ -17,4 +18,6 @@ script: - npm run test -- --watch=false --browsers=ChromeHeadlessCI after_success: + - ls + - ls ./coverage - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js diff --git a/docs/404.html b/docs/404.html index 2c9804b..e36f370 100644 --- a/docs/404.html +++ b/docs/404.html @@ -12,5 +12,5 @@ - + diff --git a/docs/index.html b/docs/index.html index 2c9804b..e36f370 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,5 +12,5 @@ - + diff --git a/docs/main.394fd4006bdd8292b1e0.js b/docs/main.db6304788e296ef0019f.js similarity index 91% rename from docs/main.394fd4006bdd8292b1e0.js rename to docs/main.db6304788e296ef0019f.js index 997da21..2da0e72 100644 --- a/docs/main.394fd4006bdd8292b1e0.js +++ b/docs/main.db6304788e296ef0019f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},"4fRq":function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var i=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}},EcEN:function(t,e,n){var r=n("xDdU"),i=n("xk4V"),o=i;o.v1=r,o.v4=i,t.exports=o},I2ZF:function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")}},Q45J:function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=91)}([function(t,e,n){t.exports=n(63)},function(t,e){function n(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,u,"next",t)}function u(t){n(s,i,o,a,u,"throw",t)}a(void 0)})}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n=0&&n"}},{key:"uri",get:function(){return this.value},set:function(t){this.value=t}}])&&i(n.prototype,r),u&&i(n,u),e}();c.termType="NamedNode",c.prototype.classOrder=u.NamedNode,c.prototype.isVar=0,t.exports=c},function(t,e,n){"use strict";var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e;return(e=[{key:"substitute",value:function(t){return console.log("@@@ node substitute"+this),this}},{key:"compareTerm",value:function(t){return this.classOrdert.classOrder?1:this.valuet.value?1:0}},{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toCanonical()}},{key:"sameTerm",value:function(t){return this.equals(t)}},{key:"toCanonical",value:function(){return this.toNT()}},{key:"toNT",value:function(){return this.toString()}},{key:"toString",value:function(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}])&&function(t,e){for(var n=0;n0&&(e=e.slice(0,u)),0===t.length)return e;if(0===t.indexOf("#"))return e+t;if(t.indexOf(":")>=0)return t;if(n=e.indexOf(":"),0===e.length)return t;if(n<0)return r("Invalid base: "+e+" in join with given: "+t),t;if(i=e.slice(0,+n+1||9e9),0===t.indexOf("//"))return i+t;if(e.indexOf("//",n)===n+1){if((o=e.indexOf("/",n+3))<0)return e.length-n-3>0?e+"/"+t:i+t}else if((o=e.indexOf("/",n+1))<0)return e.length-n-1>0?e+"/"+t:i+t;if(0===t.indexOf("/"))return e.slice(0,o)+t;if((s=(a=e.slice(o)).lastIndexOf("/"))<0)return i+t;for(s>=0&&s0&&"/"!==e[n-1];)n--;if(n<3)return e;if(t.indexOf("//",n-2)>0||e.indexOf("//",n-2)>0)return e;if(t.indexOf(":",n)>0)return e;for(a=0,l=0,s=(h=t.slice(n)).length;l0)for(c=1,f=a;f>=1?c<=f:c>=f;f>=1?++c:--c)p+="../";return p+e.slice(n)};var i=n(2);function o(t){var e;return(e=t.indexOf("#"))<0?t:t.slice(0,e)}},function(t,e,n){"use strict";var r={BlankNode:n(9),Collection:n(20),convert:n(42),DataFactory:n(23),Empty:n(86),Fetcher:n(36),Formula:n(59),Store:n(18),jsonParser:n(87),Literal:n(15),log:n(13),N3Parser:n(27),NamedNode:n(2),Namespace:n(19),Node:n(3),parse:n(60),Query:n(26).Query,queryToSPARQL:n(88),RDFaProcessor:n(39),RDFParser:n(40),serialize:n(37),Serializer:n(38),SPARQLToQuery:n(89),sparqlUpdateParser:n(61),Statement:n(24),term:n(3).fromValue,UpdateManager:n(90),UpdatesSocket:n(62).UpdatesSocket,UpdatesVia:n(62).UpdatesVia,uri:n(4),Util:n(7),Variable:n(25)};r.IndexedFormula=r.Store,r.NextId=r.BlankNode.nextId,r.fromNT=r.Formula.prototype.fromNT,r.fetcher=r.DataFactory.fetcher,r.graph=r.DataFactory.graph,r.lit=r.DataFactory.lit,r.st=r.DataFactory.st,r.sym=r.DataFactory.namedNode,r.variable=r.DataFactory.variable,r.blankNode=r.DataFactory.blankNode,r.defaultGraph=r.DataFactory.defaultGraph,r.literal=r.DataFactory.literal,r.namedNode=r.DataFactory.namedNode,r.quad=r.DataFactory.quad,r.triple=r.DataFactory.triple,t.exports=r},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){var e=n(4).docpart,r=n(13),i=n(2);function o(t,e,n,r){var i,s="",a=[!1];if(void 0===t.nodeType)return s;if(1===t.nodeType){if(t.hasAttribute("class")&&"classWithChildText"in e&&t.matches(e.classWithChildText.class))s+=t.querySelector(e.classWithChildText.element).textContent;else if(!("skipNodeWithClass"in e&&t.matches("."+e.skipNodeWithClass))){var u=t.nodeName.toLowerCase();s+="<"+u;var l=[];for(i=t.attributes.length-1;i>=0;i--){var c=t.attributes[i];if(!(r.length>0&&r[c.name]||/^\d+$/.test(c.name))){if("class"===c.name&&"replaceClassItemWith"in e&&c.value.split(" ").indexOf(e.replaceClassItemWith.source)>-1){var h=new RegExp(e.replaceClassItemWith.source,"g");c.value=c.value.replace(h,e.replaceClassItemWith.target).trim()}"class"===c.name&&"skipClassWithValue"in e&&e.skipClassWithValue===c.value||l.push(c.name+"='"+c.value.replace(/&/g,"&").replace(//g,">").replace(/'/g,""")+"'")}}if(l.length>0&&("sortAttributes"in e&&e.sortAttributes&&l.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),s+=" "+l.join(" ")),n[u])s+=" />";else{for(s+=">",s+="html"===u?"\n ":"",a.push("style"===u||"script"===u),i=0;i\n":""}}}else if(8===t.nodeType)s+="\x3c!--"+t.nodeValue+"--\x3e";else if(3===t.nodeType||4===t.nodeType){var f=t.nodeValue.replace(/\n+$/,"");s+=a[a.length-1]?f:f.replace(/&/g,"&").replace(//g,">")}else console.log("Warning; Cannot handle serialising nodes of type: "+t.nodeType),console.log(t);return s}function s(t,e,n,r){var i=function(t){return"BlankNode"===t.termType?null:t},o=function(t){var e=n.statementsMatching(t).map(function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)}).concat(n.statementsMatching(void 0,void 0,t).map(function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)}));return e.sort(),e.join("\n")};return"BlankNode"===t.termType&&"BlankNode"===e.termType?0===t.compareTerm(e)?0:o(t)>o(e)?1:o(t) to <"+u+">"),o.fetch(u,{referringTerm:i})}},t.exports.ArrayIndexOf=function(t,e,n){n||(n=0);var r=t.length;for(n<0&&(n=r+n);n=0;n--)t.callbacks[e[n]]=[];t.addHook=function(e){t.callbacks[e]||(t.callbacks[e]=[])},t.addCallback=function(e,n){t.callbacks[e].push(n)},t.removeCallback=function(e,n){for(var r=0;r=0;r--)(i=t.callbacks[e][r])&&i.apply(t,n)&&o.push(i);for(r=o.length-1;r>=0;r--)s.push(o[r]);for(r=a;r-1)break;"("==o.charAt(0)&&(o="function"+o);var s=o.split("@");r.push(s)}for(i=0;i1)for(var n=1;nt.classOrder?1:this.idt.id?1:0}},{key:"copy",value:function(t){var n=new e;return t.copyTo(this,n),n}},{key:"toCanonical",value:function(){return"_:"+this.value}},{key:"toString",value:function(){return e.NTAnonymousNodePrefix+this.id}}])&&function(t,e){for(var n=0;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(66),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(6))},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(52).Buffer)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n1?r("Patch ambiguous. No patch done."):(a=c[0],void u(r))})}else u(r)}},{key:"declareExistential",value:function(t){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(t),t}},{key:"initPropertyActions",value:function(t){this.propertyActions[""]=[y],u(t,"sameAs")>=0&&(this.propertyActions[""]=[function(t,e,n,r,i){return t.equate(e,r),!0}]),u(t,"InverseFunctionalProperty")>=0&&(this.classActions[""]=[function(t,e,n,r,i){return t.newPropertyAction(e,g)}]),u(t,"FunctionalProperty")>=0&&(this.classActions[""]=[function(t,e,n,r,i){return t.newPropertyAction(e,d)}])}},{key:"add",value:function(t,n,r,i){var o,s,a;if(1===arguments.length){if(t instanceof Array)for(o=0;o";return!!this.subjectIndex[e]||!!this.objectIndex[e]||!!this.predicateIndex[e]}},{key:"newExistential",value:function(t){if(!t)return this.bnode();var e=this.sym(t);return this.declareExistential(e)}},{key:"newPropertyAction",value:function(t,e){var n=t.hashString();this.propertyActions[n]||(this.propertyActions[n]=[]),this.propertyActions[n].push(e);for(var r=this.statementsMatching(void 0,t,void 0),i=!1,o=0;o1&&(s=s.slice(0,1)),s||[];var p,d,g=1e10;for(d=0;d0&&t.forEach(function(t){n.elements.push(l.fromValue(t))}),n}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),(n=[{key:"append",value:function(t){return this.elements.push(t)}},{key:"close",value:function(){return this.closed=!0,this.closed}},{key:"shift",value:function(){return this.elements.shift()}},{key:"substitute",value:function(t){return new e(this.elements.map(function(e){e.substitute(t)}))}},{key:"toNT",value:function(){return a.NTAnonymousNodePrefix+this.id}},{key:"toString",value:function(){return"("+this.elements.join(" ")+")"}},{key:"unshift",value:function(t){return this.elements.unshift(t)}}])&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType=e.termType,t.value=n,t.base="varid:",t.uri=l.join(n,t.base),t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),(n=[{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toString()}},{key:"substitute",value:function(t){var e;return null!=(e=t[this.toNT()])?e:this}},{key:"toString",value:function(){return this.uri.slice(0,this.base.length)===this.base?"?"+this.uri.slice(this.base.length):"?"+this.uri}}])&&function(t,e){for(var n=0;n "+t[e]);return n},u=function(t){var e,n="Bindings: ",r=t.length;for(e=0;ei.length)&&(e.index=i)}}return null===e.index&&(e.index=t.statements),!0};function y(t,e){return t.nvars!==e.nvars?t.nvars-e.nvars:t.index.length-e.index.length}var m=function t(n,r,s,u,l,c,h){i.debug("Match begins, Branch count now: "+h.count+" for "+h.pattern_debug);var p,g,y=n.fetcher?n.fetcher:null,m=r.statements;if(0===m.length){if(i.debug("FOUND MATCH WITH BINDINGS:"+a(s)),0===r.optional.length)h.reportMatch(s);else{i.debug("OPTIONAL: "+r.optional);var v,w=new f(e,s),_=[];for(v=0;v in query: "+o),t(n,r,s,u,l,c,h)})};for(g=0;g0)throw"missing.js: oops nnonempty dict not imp";return[]},a=function(t){return t.length},u=function(t,e,n){if(void 0===t.slice)throw"@@ mising.js: No .slice function for "+t+" of type "+r(t);return void 0===n||null==n?t.slice(e):t.slice(e,n)},l=Error("dummy error stop iteration"),c=function(t){return this.last=0,this.li=t,this.next=function(){if(this.last==this.li.length)throw l;return this.li[this.last++]},this},h=function(t,e){return t.indexOf(e)},f=function(t,e){if(!t){if(e)throw"python Assertion failed: "+e;throw"(python) Assertion failed."}};String.prototype.encode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(this)},String.prototype.decode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return this};var p=function(t,e){return i.join(e,t)},d=0,g="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~:",y=(new RegExp("^[ \\t]*(#[^\\n]*)?\\r?\\n","g"),new RegExp("^[ \\t]*(#[^\\n]*)?$","g"),new RegExp("^[ \\t]*","g"),new RegExp("^[-+]?[0-9]+","g"),new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?(e[-+]?[0-9]+)?","g")),m=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),v=(new RegExp("^[0-9]+","g"),new RegExp('[\\\\\\r\\n\\"]',"g")),b=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");function w(t,e,r,i,o,a,u,l){void 0===e&&(e=null),void 0===r&&(r=""),void 0===i&&(i=null),void 0===o&&(o=""),void 0===a&&(a=null),void 0===u&&(u=""),void 0===l&&(l=null),this._bindings=new s([]),this._flags=u,""!=r&&(f(r.indexOf(":")>=0,"Document URI not absolute: "+r),this._bindings[""]=r+"#"),this._store=t,o&&t.setGenPrefix(o),this._thisDoc=r,this.source=t.sym(r),this.lines=0,this.statementCount=0,this.startOfLine=0,this.previousLine=0,this._genPrefix=o,this.keywords=new n(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new s([]),this._variables=new s([]),this._parentVariables=new s([]),this._reason=l,this._reason2=null,d&&(this._reason2=why_BecauseOfData(t.sym(r),this._reason)),this._baseURI=i||r||null,f(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._genPrefix=this._thisDoc?this._thisDoc+"#_g":RDFSink_uniqueURI()),this._formula=null==e?this._thisDoc?t.formula(r+"#_formula"):t.formula():e,this._context=this._formula,this._parentContext=null}function _(t,e,n,r,i){var o="Line "+(e+1)+" of <"+t+">: Bad syntax: "+i+'\nat: "'+n.slice(r,r+30)+'"',s=new Error(o);return s.lineNumber=e+1,s.characterInFile=r,s.syntaxProblem=i,s}return w.prototype.here=function(t){return this._genPrefix+"_L"+this.lines+"C"+(t-this.startOfLine+1)},w.prototype.formula=function(){return this._formula},w.prototype.loadStream=function(t){return this.loadBuf(t.read())},w.prototype.loadBuf=function(t){return this.startDoc(),this.feed(t),this.endDoc()},w.prototype.feed=function(t){for(var e=t.decode("utf-8"),n=0;n>=0;){var r=this.skipSpace(e,n);if(r<0)return;if((n=this.directiveOrStatement(e,r))<0)throw _(this._thisDoc,this.lines,e,r,"expected directive or statement")}},w.prototype.directiveOrStatement=function(t,e){var n,r=this.skipSpace(t,e);return r<0?r:(n=this.directive(t,r))>=0?this.checkDot(t,n):(n=this.statement(t,r))>=0?this.checkDot(t,n):n},w.prototype.tok=function(t,e,n){if("@"==e.slice(n,n+1))n+=1;else if(o(this.keywords,t)<0)return-1;var r=n+a(t);return e.slice(n,r)==t&&"\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~".indexOf(e.charAt(r))>=0?r:-1},w.prototype.directive=function(t,e){if((a=this.skipSpace(t,e))<0)return a;var r=new n([]);if((a=this.tok("bind",t,e))>0)throw _(this._thisDoc,this.lines,t,e,"keyword bind is obsolete: use @prefix");if((a=this.tok("keywords",t,e))>0){if((e=this.commaSeparatedList(t,a,r,!1))<0)throw _(this._thisDoc,this.lines,t,e,"'@keywords' needs comma separated list of words");return this.setKeywords(u(r,null,null)),e}if((a=this.tok("forAll",t,e))>0){if((e=this.commaSeparatedList(t,a,r,!0))<0)throw _(this._thisDoc,this.lines,t,e,"Bad variable list after @forAll");var i=new c(r);try{for(;;){var s=i.next();(o(this._variables,s)<0||o(this._parentVariables,s)>=0)&&(this._variables[s]=this._context.newUniversal(s))}}catch(t){if(t!=l)throw t}return e}if((a=this.tok("forSome",t,e))>0){if((e=this.commaSeparatedList(t,a,r,this.uri_ref2))<0)throw _(this._thisDoc,this.lines,t,e,"Bad variable list after @forSome");i=new c(r);try{for(;;)s=i.next(),this._context.declareExistential(s)}catch(t){if(t!=l)throw t}return e}if((a=this.tok("prefix",t,e))>=0){var a,h=new n([]);if((e=this.qname(t,a,h))<0)throw _(this._thisDoc,this.lines,t,a,"expected qname after @prefix");if((a=this.uri_ref2(t,e,h))<0)throw _(this._thisDoc,this.lines,t,e,"expected after @prefix _qname_");var d=h[1].uri;return this._baseURI?d=p(this._baseURI,d):f(d.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS"),f(d.indexOf(":")>=0),this._bindings[h[0][0]]=d,this.bind(h[0][0],encodeURI(d)),a}if((a=this.tok("base",t,e))>=0){if(h=new n([]),(e=this.uri_ref2(t,a,h))<0)throw _(this._thisDoc,this.lines,t,a,"expected after @base ");if(d=h[0].uri,!this._baseURI)throw _(this._thisDoc,this.lines,t,a,"With no previous base URI, cannot use relative URI in @base <"+d+">");return d=p(this._baseURI,d),f(d.indexOf(":")>=0),this._baseURI=d,e}return-1},w.prototype.bind=function(t,e){""==t||this._store.setPrefixForURI(t,e)},w.prototype.setKeywords=function(t){null==t?this.keywordsSet=0:(this.keywords=t,this.keywordsSet=1)},w.prototype.startDoc=function(){},w.prototype.endDoc=function(){return this._formula},w.prototype.makeStatement=function(t){t[0].add(t[2],t[1],t[3],this.source),this.statementCount+=1},w.prototype.statement=function(t,e){var r=new n([]);if((e=this.object(t,e,r))<0)return e;var i=this.property_list(t,e,r[0]);if(i<0)throw _(this._thisDoc,this.lines,t,e,"expected propertylist");return i},w.prototype.subject=function(t,e,n){return this.item(t,e,n)},w.prototype.verb=function(r,i,o){if((a=this.skipSpace(r,i))<0)return a;var s=new n([]);if((a=this.tok("has",r,i))>=0){if((i=this.prop(r,a,s))<0)throw _(this._thisDoc,this.lines,r,a,"expected property after 'has'");return o.push(new e(["->",s[0]])),i}if((a=this.tok("is",r,i))>=0){if((i=this.prop(r,a,s))<0)throw _(this._thisDoc,this.lines,r,a,"expected after 'is'");if((a=this.skipSpace(r,i))<0)throw _(this._thisDoc,this.lines,r,i,"End of file found, expected property after 'is'");var a;if((a=this.tok("of",r,i=a))<0)throw _(this._thisDoc,this.lines,r,i,"expected 'of' after 'is' ");return o.push(new e(["<-",s[0]])),a}if((a=this.tok("a",r,i))>=0)return o.push(new e(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),a;if("<="==r.slice(i,i+2))return o.push(new e(["<-",this._store.sym(t+"implies")])),i+2;if("="==r.slice(i,i+1))return">"==r.slice(i+1,i+2)?(o.push(new e(["->",this._store.sym(t+"implies")])),i+2):(o.push(new e(["->",this._store.sym("http://www.w3.org/2002/07/owl#sameAs")])),i+1);if(":="==r.slice(i,i+2))return o.push(new e(["->",t+"becomes"])),i+2;if((a=this.prop(r,i,s))>=0)return o.push(new e(["->",s[0]])),a;if(">-"==r.slice(i,i+2)||"<-"==r.slice(i,i+2))throw _(this._thisDoc,this.lines,r,a,">- ... -> syntax is obsolete.");return-1},w.prototype.prop=function(t,e,n){return this.item(t,e,n)},w.prototype.item=function(t,e,n){return this.path(t,e,n)},w.prototype.blankNode=function(t){return this._context.bnode(t,this._reason2)},w.prototype.path=function(t,n,r){if((s=this.nodeOrLiteral(t,n,r))<0)return s;for(;"!^.".indexOf(t.slice(s,s+1))>=0;){var i=t.slice(s,s+1);if("."==i){var o=t.slice(s+1,s+2);if(!o||g.indexOf(o)>=0&&":?<[{(".indexOf(o)<0)break}var s,a=r.pop(),u=this.blankNode(this.here(s));if((s=this.node(t,s+1,r))<0)throw _(this._thisDoc,this.lines,t,s,"EOF found in middle of path syntax");var l=r.pop();this.makeStatement(new e("^"==i?[this._context,l,u,a]:[this._context,l,a,u])),r.push(u)}return s},w.prototype.anonymousNode=function(t){if(e=this._anonymousNodes[t])return e;var e=this._store.bnode(t);return this._anonymousNodes[t]=e,e},w.prototype.node=function(t,r,i,o){void 0===o&&(o=null);var u=o;if((y=this.skipSpace(t,r))<0)return y;var h=t.slice(r=y,r+1);if("["==h){var f=this.here(r);if((y=this.skipSpace(t,r+1))<0)throw _(this._thisDoc,this.lines,t,r,"EOF after '['");if("="==t.slice(y,y+1)){r=y+1;var p=new n([]);if(!((y=this.objectList(t,r,p))>=0))throw _(this._thisDoc,this.lines,t,r,"objectList expected after [= ");if(u=p[0],a(p)>1){var d=new c(p);try{for(;;){var g=d.next();this.makeStatement(new e([this._context,this._store.sym("http://www.w3.org/2002/07/owl#sameAs"),u,g]))}}catch(t){if(t!=l)throw t}}if((y=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"EOF when objectList expected after [ = ");if(";"==t.slice(y,y+1))var y=y+1}if(null==u&&(u=this.blankNode(f)),(r=this.property_list(t,y,u))<0)throw _(this._thisDoc,this.lines,t,y,"property_list expected");if((y=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"EOF when ']' expected after [ ");if("]"!=t.slice(y,y+1))throw _(this._thisDoc,this.lines,t,y,"']' expected");return i.push(u),y+1}if("{"==h){if("$"==t.slice(r+1,r+2)){y=(r+=1)+1;for(var m=new n([]),v=!0;;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed '$}', found end.");if("$}"==t.slice(r,r+2)){y=r+2;break}if(v)v=!1;else{if(","!=t.slice(r,r+1))throw _(this._thisDoc,this.lines,t,r,"expected: ','");r+=1}var b=new n([]);if((y=this.item(t,r,b))<0)throw _(this._thisDoc,this.lines,t,r,"expected item in set or '$}'");m.push(b[0])}return i.push(this._store.newSet(m,this._context)),y}y=r+1;var w=this._parentContext;this._parentContext=this._context;var x=this._anonymousNodes,S=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new s([]),this._variables=this._variables.slice();var C=this._reason2;for(this._reason2=null,null==u&&(u=this._store.formula()),this._context=u;;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed '}', found end.");if("}"==t.slice(r,r+1)){y=r+1;break}if((y=this.directiveOrStatement(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"expected statement or '}'")}return this._anonymousNodes=x,this._variables=this._parentVariables,this._parentVariables=S,this._context=this._parentContext,this._reason2=C,this._parentContext=w,i.push(u.close()),y}if("("==h){var E=this._store.list;for("$"==t.slice(r+1,r+2)&&(E=this._store.newSet,r+=1),y=r+1,m=new n([]);;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed ')', found end.");if(")"==t.slice(r,r+1)){y=r+1;break}if(b=new n([]),(y=this.item(t,r,b))<0)throw _(this._thisDoc,this.lines,t,r,"expected item in list or ')'");m.push(b[0])}return i.push(E(m,this._context)),y}if((y=this.tok("this",t,r))>=0)throw _(this._thisDoc,this.lines,t,r,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");return(y=this.tok("true",t,r))>=0?(i.push(!0),y):(y=this.tok("false",t,r))>=0?(i.push(!1),y):null==u&&(y=this.uri_ref2(t,r,i))>=0?y:-1},w.prototype.property_list=function(t,r,i){for(;;){if((p=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"EOF found when expected verb in property list");if(":-"!=t.slice(p,p+2)){r=p;var o=new n([]);if((p=this.verb(t,r,o))<=0)return r;var s=new n([]);if((r=this.objectList(t,p,s))<0)throw _(this._thisDoc,this.lines,t,p,"objectList expected");var a=new c(s);try{for(;;){var u=a.next(),h=o[0],f=h[1];this.makeStatement(new e("->"==h[0]?[this._context,f,i,u]:[this._context,f,u,i]))}}catch(t){if(t!=l)throw t}if((p=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,p,"EOF found in list of objects");if(";"!=t.slice(r,r+1))return r;r+=1}else{r=p+2;var p,d=new n([]);if((p=this.node(t,r,d,i))<0)throw _(this._thisDoc,this.lines,t,r,"bad {} or () or [] node after :- ");r=p}}},w.prototype.commaSeparatedList=function(t,e,n,r){if((i=this.skipSpace(t,e))<0)throw _(this._thisDoc,this.lines,t,i,"EOF found expecting comma sep list");if("."==t.charAt(i))return e;if(r)var i=this.uri_ref2(t,i,n);else i=this.bareWord(t,i,n);if(i<0)return-1;for(;;){if((e=this.skipSpace(t,i))<0)return e;var o=t.slice(e,e+1);if(","!=o)return"."!=o?-1:e;if((i=r?this.uri_ref2(t,e+1,n):this.bareWord(t,e+1,n))<0)throw _(this._thisDoc,this.lines,t,i,"bad list content")}},w.prototype.objectList=function(t,e,n){if((e=this.object(t,e,n))<0)return-1;for(;;){var r=this.skipSpace(t,e);if(r<0)throw _(this._thisDoc,this.lines,t,r,"EOF found after object");if(","!=t.slice(r,r+1))return r;if((e=this.object(t,r+1,n))<0)return e}},w.prototype.checkDot=function(t,e){var n=this.skipSpace(t,e);if(n<0)return n;if("."==t.slice(n,n+1))return n+1;if("}"==t.slice(n,n+1))return n;if("]"==t.slice(n,n+1))return n;throw _(this._thisDoc,this.lines,t,n,"expected '.' or '}' or ']' at end of statement")},w.prototype.uri_ref2=function(t,e,r){var i=new n([]);if((v=this.qname(t,e,i))>=0){var s=i[0],l=s[0],c=s[1];if(null==l){f(0,"not used?");var h=this._baseURI+"#"}else if(!(h=this._bindings[l])){if("_"==l)return r.push(this.anonymousNode(c)),v;throw _(this._thisDoc,this.lines,t,e,"Prefix "+l+" not bound.")}var d=this._store.sym(h+c);return o(this._variables,d)>=0?r.push(this._variables[d]):r.push(d),v}if((e=this.skipSpace(t,e))<0)return-1;if("?"==t.charAt(e)){var g=new n([]);return(v=this.variable(t,e,g))>0?(r.push(g[0]),v):-1}if("<"==t.charAt(e)){for(var y=e+=1;e"==t.charAt(e)){var m=t.slice(y,e);return this._baseURI?m=p(this._baseURI,m):f(m.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs"),"#"==t.slice(e-1,e)&&"#"!=u(m,-1,null)&&(m+="#"),d=this._store.sym(m),o(this._variables,d)>=0?r.push(this._variables[d]):r.push(d),e+1}e+=1}throw _(this._thisDoc,this.lines,t,v,"unterminated URI reference")}if(this.keywordsSet){var v;if(g=new n([]),(v=this.bareWord(t,e,g))<0)return-1;if(o(this.keywords,g[0])>=0)throw _(this._thisDoc,this.lines,t,e,'Keyword "'+g[0]+'" not allowed here.');return r.push(this._store.sym(this._bindings[""]+g[0])),v}return-1},w.prototype.skipSpace=function(t,e){for(var n=e||0;n=0)throw _(this._thisDoc,this.lines,t,r,"Varible name can't start with '"+t.charAt(r)+"s'");for(;e=0)return-1;if(g.indexOf(i)>=0)return-1;for(e=r;e=0)return-1;if(g.indexOf(i)<0){var s=i;for(n+=1;n=0)return s;if((s=this.skipSpace(t,e))<0)return-1;var r=null,i=t.charAt(e=s);if('"'==i||"'"==i){r=t.slice(e,e+3==i+i)?i+i+i:i,e+=a(r);var o=this.strconst(t,e,r),s=o[0];return n.push(this._store.literal(o[1])),s}return-1},w.prototype.nodeOrLiteral=function(t,e,r){if((c=this.node(t,e,r))>=0)return c;if((c=this.skipSpace(t,e))<0)return-1;var i=t.charAt(e=c);if("-+0987654321".indexOf(i)>=0){if(m.lastIndex=0,null!=(p=m.exec(t.slice(e))))c=e+(o=p[0]).length,o.indexOf("T")>=0?r.push(this._store.literal(o,void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):r.push(this._store.literal(o,void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#date")));else{var o;if(y.lastIndex=0,null==(p=y.exec(t.slice(e))))throw _(this._thisDoc,this.lines,t,e,"Bad number or date syntax");(o=t.slice(e,c=e+y.lastIndex)).indexOf("e")>=0?r.push(this._store.literal(parseFloat(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):t.slice(e,c).indexOf(".")>=0?r.push(this._store.literal(parseFloat(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):r.push(this._store.literal(parseInt(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return c}if('"'==t.charAt(e)){if('"""'==t.slice(e,e+3))var s='"""';else s='"';e+=a(s);var u=null,l=this.strconst(t,e,s),c=l[0],h=l[1],f=null;if("@"==t.slice(c,c+1)){var p;if(b.lastIndex=0,null==(p=b.exec(t.slice(c+1))))throw _(this._thisDoc,startline,t,e,"Bad language code syntax on string literal, after @");f=t.slice(c+1,e=b.lastIndex+c+1),c=e}if("^^"==t.slice(c,c+2)){var d=new n([]);c=this.uri_ref2(t,c+2,d),u=d[0]}return r.push(this._store.literal(h,f,u)),c}return-1},w.prototype.strconst=function(t,n,r){for(var i=n,o="",s=this.lines;i=0)o+='a\b\f\r\t\v\n\\"'.charAt(u),i+=1;else if("u"==c)i=(l=this.uEscape(t,i+1,s))[0],o+=c=l[1];else{if("U"!=c)throw _(this._thisDoc,this.lines,t,n,"bad escape");var l,c;i=(l=this.UEscape(t,i+1,s))[0],o+=c=l[1]}}}else i=n+1;else i=n}else o+='"',i+=1}throw _(this._thisDoc,this.lines,t,n,"unterminated string literal")},w.prototype.uEscape=function(t,n,r){for(var i=n,o=0,s=0;o<4;){var a=t.slice(i,i+1).toLowerCase();if(i+=1,""==a)throw _(this._thisDoc,r,t,n,"unterminated string literal(3)");var u=h("0123456789abcdef",a);if(u<0)throw _(this._thisDoc,r,t,n,"bad string literal hex escape");s=16*s+u,o+=1}var l=String.fromCharCode(s);return new e([i,l])},w.prototype.UEscape=function(t,n,r){for(var i=n,o=0,s="\\U";o<8;){var a=t.slice(i,i+1).toLowerCase();if(i+=1,""==a)throw _(this._thisDoc,r,t,n,"unterminated string literal(3)");if(h("0123456789abcdef",a)<0)throw _(this._thisDoc,r,t,n,"bad string literal hex escape");s+=a,o+=1}var l,c=(l="0x"+u(s,2,10)-0,String.fromCharCode(l));return new e([i,c])},function(t,e,n,r,i,o,s,a){return new w(t,e,n,r,i,o,s,a)}}();t.exports=s},function(t,e){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=n(1);const i=new r.default;if(e.default=i,Object.getOwnPropertyNames(r.default.prototype).forEach(t=>{const e=i[t];"function"==typeof e&&(i[t]=e.bind(i))}),"undefined"!=typeof window)if("SolidAuthClient"in window)console.warn("Caution: multiple versions of solid-auth-client active.");else{let t=!1;Object.defineProperty(window,"SolidAuthClient",{enumerable:!0,get:()=>(t||(t=!0,console.warn("window.SolidAuthClient has been deprecated."),console.warn("Please use window.solid.auth instead.")),i)})}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return y});var r=n(2),i=n.n(r),o=n(3),s=n.n(o),a=n(4),u=n.n(a),l=n(5),c=n(81),h=n(9),f=n(10),p=n(7),d=n(12);const g=fetch;class y extends u.a{constructor(...t){super(...t),s()(this,"_pendingSession",void 0)}fetch(t,e){return Object(l.authnFetch)(Object(f.defaultStorage)(),g,t,e)}login(t,e){return e=i()({},m(Object(p.currentUrlNoParams)()),e),d.login(t,e)}async popupLogin(t){t=i()({},m(),t),/https?:/.test(t.popupUri)||(t.popupUri=new URL(t.popupUri||"/.well-known/solid/login",window.location).toString()),t.callbackUri||(t.callbackUri=t.popupUri);const e=Object(c.openIdpPopup)(t.popupUri),n=await Object(c.obtainSession)(t.storage,e,t);return this.emit("login",n),this.emit("session",n),n}async currentSession(t=Object(f.defaultStorage)()){let e=await Object(h.getSession)(t);if(!e){if(this._pendingSession)return this._pendingSession;try{this._pendingSession=d.currentSession(t),e=await this._pendingSession}catch(t){console.error(t)}delete this._pendingSession,e&&(await Object(h.saveSession)(t)(e),this.emit("login",e),this.emit("session",e))}return e}async trackSession(t){t(await this.currentSession()),this.on("session",t)}async logout(t=Object(f.defaultStorage)()){if(await Object(h.getSession)(t)){try{await d.logout(t,g),this.emit("logout"),this.emit("session",null)}catch(t){console.warn("Error logging out:"),console.error(t)}await Object(h.clearSession)(t)}}}function m(t){return{callbackUri:t?t.split("#")[0]:"",popupUri:"",storage:Object(f.defaultStorage)()}}},function(t,e,n){var r=n(3);t.exports=function(t){for(var e=1;e0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";n.r(e),n.d(e,"authnFetch",function(){return a}),n(6);var r=n(7),i=n(8),o=n(9),s=n(12);async function a(t,e,n,r){const a=await Object(o.getSession)(t);if(!a)return e(n,r);if(await u(t,n))return Object(s.fetchWithCredentials)(a,e,n,r);let l=await e(n,r);return 401===l.status&&(await Object(i.updateHostFromResponse)(t)(l),await u(t,n)&&(l=Object(s.fetchWithCredentials)(a,e,n,r))),l}async function u(t,e){const n=await Object(i.getHost)(t)(Object(r.toUrlString)(e));return null!=n&&n.requiresAuth}},function(t,e){t.exports=window.fetch},function(t,e,n){"use strict";n.r(e),n.d(e,"currentUrl",function(){return r}),n.d(e,"currentUrlNoParams",function(){return i}),n.d(e,"navigateTo",function(){return o}),n.d(e,"originOf",function(){return s}),n.d(e,"toUrlString",function(){return a});const r=()=>window.location.href,i=()=>window.location.origin+window.location.pathname,o=t=>{window.location.href=t},s=t=>new URL(t).origin,a=t=>("string"!=typeof t&&(t="url"in t?t.url:t.toString()),new URL(t,r()).toString())},function(t,e,n){"use strict";n.r(e),n.d(e,"getHost",function(){return u}),n.d(e,"saveHost",function(){return l}),n.d(e,"updateHostFromResponse",function(){return c});var r=n(2),i=n.n(r),o=n(9),s=n(10),a=n(12);function u(t){return async e=>{const n=new URL(e).host,r=await Object(o.getSession)(t);if(r&&n===new URL(r.idp).host)return{url:n,requiresAuth:!0};const i=(await Object(s.getData)(t)).hosts;return i&&i[n]}}function l(t){return async({url:e,requiresAuth:n})=>{await Object(s.updateStorage)(t,t=>i()({},t,{hosts:i()({},t.hosts,{[e]:{requiresAuth:n}})}))}}function c(t){return async e=>{if(a.requiresAuth(e)){const n=new URL(e.url).host;await l(t)({url:n,requiresAuth:!0})}}}},function(t,e,n){"use strict";n.r(e),n.d(e,"getSession",function(){return s}),n.d(e,"saveSession",function(){return a}),n.d(e,"clearSession",function(){return u});var r=n(2),i=n.n(r),o=n(10);async function s(t){return(await Object(o.getData)(t)).session||null}function a(t){return async e=>(await Object(o.updateStorage)(t,t=>i()({},t,{session:e}))).session}async function u(t){await Object(o.updateStorage)(t,t=>i()({},t,{session:null}))}},function(t,e,n){"use strict";n.r(e),n.d(e,"NAMESPACE",function(){return r}),n.d(e,"defaultStorage",function(){return i}),n.d(e,"getData",function(){return o}),n.d(e,"updateStorage",function(){return s}),n.d(e,"asyncStorage",function(){return a}),n.d(e,"memStorage",function(){return u}),n.d(e,"ipcStorage",function(){return l}),n(11);const r="solid-auth-client",i=()=>{try{if(window&&window.localStorage)return a(window.localStorage)}catch(t){if(!(t instanceof ReferenceError))throw t}return console.warn("'window.localStorage' unavailable. Creating a (not very useful) in-memory storage object as the default storage interface."),a(u())};async function o(t){let e,n;try{e=await t.getItem(r),n=JSON.parse(e||"{}")}catch(t){console.warn("Could not deserialize data:",e),console.error(t),n={}}return n}async function s(t,e){const n=e(await o(t));return await t.setItem(r,JSON.stringify(n)),n}function a(t){return{getItem:e=>Promise.resolve(t.getItem(e)),setItem:(e,n)=>Promise.resolve(t.setItem(e,n)),removeItem:e=>Promise.resolve(t.removeItem(e))}}const u=()=>{const t={};return{getItem:e=>void 0===t[e]?null:t[e],setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}};function l(t){return{getItem:e=>t.request("storage/getItem",e),setItem:(e,n)=>t.request("storage/setItem",e,n),removeItem:e=>t.request("storage/removeItem",e)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"Server",function(){return s}),n.d(e,"Client",function(){return a});var r=n(3),i=n.n(r);const o="solid-auth-client";class s{constructor(t,e,n){i()(this,"_clientWindow",void 0),i()(this,"_clientOrigin",void 0),i()(this,"_handler",void 0),i()(this,"_messageListener",void 0),this._clientWindow=t,this._clientOrigin=e,this._handler=n,this._messageListener=(t=>this._handleMessage(t))}async _handleMessage({data:t,origin:e}){if(e!==this._clientOrigin)return void console.warn(`solid-auth-client is listening to ${this._clientOrigin} `+`so ignored a message received from ${e}.`);const n=t&&t[o];if(n&&n.method){const t=n.id,e=n.method,r=n.args,i=await this._handler(e,...r);this._clientWindow.postMessage({[o]:{id:t,ret:i}},this._clientOrigin)}}start(){window.addEventListener("message",this._messageListener)}stop(){window.removeEventListener("message",this._messageListener)}}class a{constructor(t,e){i()(this,"_serverWindow",void 0),i()(this,"_serverOrigin",void 0),this._serverWindow=t,this._serverOrigin=e}request(t,...e){const n=Math.random();return this._serverWindow.postMessage({[o]:{id:n,method:t,args:e}},this._serverOrigin),new Promise((t,e)=>{window.addEventListener("message",i);const r=setTimeout(()=>{e(new Error("Could not connect to main window.")),window.removeEventListener("message",i)},2e3);function i({data:e}){const s=e&&e[o];s&&s.id===n&&s.hasOwnProperty("ret")&&(t(s.ret),clearTimeout(r),window.removeEventListener("message",i))}})}}},function(t,e,n){"use strict";n.r(e),n.d(e,"login",function(){return d}),n.d(e,"currentSession",function(){return g}),n.d(e,"logout",function(){return y}),n.d(e,"getRegisteredRp",function(){return m}),n.d(e,"requiresAuth",function(){return b}),n.d(e,"fetchWithCredentials",function(){return w});var r=n(13),i=n.n(r),o=n(2),s=n.n(o),a=n(15),u=n(19),l=n.n(u),c=n(80),h=n.n(c),f=n(7),p=n(10);async function d(t,e){try{const n=await m(t,e);return await async function(t){await Object(p.updateStorage)(t,t=>s()({},t,{appHashFragment:window.location.hash}))}(e.storage),async function(t,{callbackUri:e,storage:n}){const r=await Object(p.getData)(n),i=await t.createRequest({redirect_uri:e},r);return await Object(p.updateStorage)(n,()=>r),Object(f.navigateTo)(i)}(n,e)}catch(t){return console.warn("Error logging in with WebID-OIDC"),console.error(t),null}}async function g(t=Object(p.defaultStorage)()){try{const e=await v(t);if(!e)return null;const n=Object(f.currentUrl)();if(!/#(.*&)?access_token=/.test(n))return null;window.location.hash="",await async function(t){await Object(p.updateStorage)(t,t=>{let e=t.appHashFragment,n=void 0===e?"":e,r=i()(t,["appHashFragment"]);return window.location.hash=n,r})}(t);const r=await Object(p.getData)(t),o=await e.validateResponse(n,r);return o?s()({},o,{webId:o.idClaims.sub,idp:o.issuer}):null}catch(t){return console.warn("Error finding a WebID-OIDC session"),console.error(t),null}}async function y(t,e){const n=await v(t);if(n)try{await n.logout();try{await e("/.well-known/solid/logout",{credentials:"include"})}catch(t){}}catch(t){console.warn("Error logging out of the WebID-OIDC session"),console.error(t)}}async function m(t,e){let n=await v(e.storage);return n&&n.provider.url===t&&n.registration.redirect_uris.includes(e.callbackUri)||(n=await function(t,{storage:e,callbackUri:n}){return l.a.register(t,{issuer:t,grant_types:["implicit"],redirect_uris:[n],response_types:["id_token token"],scope:"openid profile"},{defaults:{authenticate:{redirect_uri:n,response_type:"id_token token"}},store:e})}(t,e),await async function(t,e,n){return await Object(p.updateStorage)(t,t=>s()({},t,{rpConfig:n})),n}(e.storage,0,n)),n}async function v(t){const e=(await Object(p.getData)(t)).rpConfig;return e?(e.store=t,l.a.from(e)):null}function b(t){if(401!==t.status)return!1;const e=t.headers.get("www-authenticate");if(!e)return!1;const n=a.parse(e);return"Bearer"===n.scheme&&n.params&&"openid webid"===n.params.scope}async function w(t,e,n,r){const i=await h.a.issueFor(Object(f.toUrlString)(n),t);return e(n,s()({},r,{credentials:"include",headers:s()({},r&&r.headers?r.headers:{},{authorization:`Bearer ${i}`})}))}},function(t,e,n){var r=n(14);t.exports=function(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"format",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.default}});var r=o(n(16)),i=o(n(18));function o(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(17);function i(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e@,;:\\"\/?={}\[\]\u0020\u0009]+$/,i=function(t){return"string"==typeof t&&r.test(t)};e.isToken=i,e.isScheme=i,e.quote=function(t){return`"${t.replace(/"/g,'\\"')}"`},e.unquote=function(t){return t.substr(1,t.length-2).replace(/\\"/g,'"')}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(17),i=/((?:[a-zA-Z0-9._~+\/-]+=*(?:\s+|$))|[^\u0000-\u001F\u007F()<>@,;:\\"\/?={}\[\]\u0020\u0009]+)(?:=([^\\"=\s,]+|"(?:[^"\\]|\\.)*"))?/g,o=function(t,e){var n='"'===e.charAt(0)?(0,r.unquote)(e):e.trim();return Array.isArray(t)?t.concat(n):"string"==typeof t?[t,n]:n};e.default=function(t){if("string"!=typeof t)throw new TypeError("Header value must be a string.");var e=t.indexOf(" "),n=t.substr(0,e);if(!(0,r.isScheme)(n))throw new TypeError(`Invalid scheme ${n}`);return function(t,e){for(var n=null,r={};;){var s=i.exec(e);if(null===s)break;s[2]?r[s[1]]=o(r[s[1]],s[2]):n=o(n,s[1])}return{scheme:t,params:r,token:n}}(n,t.substr(e))}},function(t,e,n){"use strict";t.exports=n(20)},function(t,e,n){(function(e){const r=n(22),i=n(6),{URL:o}=n(27),s=i.Headers?i.Headers:e.Headers,{JSONDocument:a}=n(28),{JWKSet:u}=n(37),l=n(68),c=n(70),h=n(79),f=n(74),p=n(69);class d extends a{static get schema(){return h}static from(t){let e=new d(t),n=e.validate();if(!n.valid)return Promise.reject(new Error(JSON.stringify(n)));let r=e.provider.jwks;return r?u.importKeys(r).then(t=>(e.provider.jwks=t,e)):e.jwks().then(()=>e)}static register(t,e,n){let r=new d({provider:{url:t},defaults:Object.assign({},n.defaults),store:n.store});return Promise.resolve().then(()=>r.discover()).then(()=>r.jwks()).then(()=>r.register(e)).then(()=>r)}discover(){try{let e=this.provider.url;r(e,'RelyingParty provider must define "url"');let n=new o(e);return n.pathname=".well-known/openid-configuration",i(n.toString()).then(f("Error fetching openid configuration")).then(t=>t.json().then(t=>this.provider.configuration=t))}catch(t){return Promise.reject(t)}}register(t){try{let e=this.provider.configuration;r(e,"OpenID Configuration is not initialized."),r(e.registration_endpoint,"OpenID Configuration is missing registration_endpoint.");let n=e.registration_endpoint,o="post",a=new s({"Content-Type":"application/json"}),u=JSON.stringify(Object.assign({},this.defaults.register,t));return i(n,{method:o,headers:a,body:u}).then(f("Error registering client")).then(t=>t.json().then(t=>this.registration=t))}catch(t){return Promise.reject(t)}}serialize(){return JSON.stringify(this)}jwks(){try{let e=this.provider.configuration;return r(e,"OpenID Configuration is not initialized."),r(e.jwks_uri,"OpenID Configuration is missing jwks_uri."),i(e.jwks_uri).then(f("Error resolving provider keys")).then(t=>t.json().then(t=>u.importKeys(t)).then(t=>this.provider.jwks=t))}catch(t){return Promise.reject(t)}}createRequest(t,e){return l.create(this,t,e||this.store)}validateResponse(t,e=this.store){let n;n=t.match(/^http(s?):\/\//)?{rp:this,redirect:t,session:e}:{rp:this,body:t,session:e};const r=new c(n);return c.validateResponse(r)}userinfo(){try{let e=this.provider.configuration;r(e,"OpenID Configuration is not initialized."),r(e.userinfo_endpoint,"OpenID Configuration is missing userinfo_endpoint.");let n=e.userinfo_endpoint,o=this.store.access_token;r(o,"Missing access token.");let a=new s({"Content-Type":"application/json",Authorization:`Bearer ${o}`});return i(n,{headers:a}).then(f("Error fetching userinfo")).then(t=>t.json())}catch(t){return Promise.reject(t)}}logoutRequest(t={}){const{id_token_hint:e,post_logout_redirect_uri:n,state:i}=t;let s;if(r(this.provider,"OpenID Configuration is not initialized"),r(s=this.provider.configuration,"OpenID Configuration is not initialized"),!s.end_session_endpoint)return console.log("OpenId Configuration for "+`${s.issuer} is missing end_session_endpoint`),null;if(n&&!e)throw new Error("id_token_hint is required when using post_logout_redirect_uri");const a={};e&&(a.id_token_hint=e),n&&(a.post_logout_redirect_uri=n),i&&(a.state=i);const u=new o(s.end_session_endpoint);return u.search=p.encode(a),u.href}logout(){let t;try{r(this.provider,"OpenID Configuration is not initialized."),r(t=this.provider.configuration,"OpenID Configuration is not initialized."),r(t.end_session_endpoint,"OpenID Configuration is missing end_session_endpoint.")}catch(t){return Promise.reject(t)}return t.end_session_endpoint?i(t.end_session_endpoint,{method:"get",credentials:"include"}).then(f("Error logging out")).then(()=>this.clearSession()):(this.clearSession(),Promise.resolve(void 0))}clearSession(){let t=this.store;t&&delete t[g]}popTokenFor(t,e){return PoPToken.issueFor(t,e)}}const g="oidc.session.privateKey";d.SESSION_PRIVATE_KEY=g,t.exports=d}).call(this,n(21))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(e){function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i=0;l--)if(c[l]!==h[l])return!1;for(l=c.length-1;l>=0;l--)if(!v(t[u=c[l]],e[u],n,r))return!1;return!0}(t,e,n,s))}return n?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&y(i,n,"Missing expected exception"+r);var s="string"==typeof r,a=!t&&i&&!n;if((!t&&o.isError(i)&&s&&w(i,n)||a)&&y(i,n,"Got unwanted exception"+r),t&&i&&n&&!w(i,n)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g(this.actual),128)+" "+this.operator+" "+d(g(this.expected),128),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=p(e),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=m,h.equal=function(t,e,n){t!=e&&y(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&y(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){v(t,e,!1)||y(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){v(t,e,!0)||y(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){v(t,e,!1)&&y(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){v(e,n,!0)&&y(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&y(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&y(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){_(!0,t,e,n)},h.doesNotThrow=function(t,e,n){_(!1,t,e,n)},h.ifError=function(t){if(t)throw t};var x=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(21))},function(t,e,n){(function(t,r){var i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"\x1b["+a.colors[n][0]+"m"+t+"\x1b["+a.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return s.forEach(function(t,n){e[t]=!0}),e}();if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),x(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(S(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return h(n)}var u,l="",w=!1,C=["{","}"];return p(n)&&(w=!0,C=["[","]"]),S(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(l=" "+RegExp.prototype.toString.call(n)),_(n)&&(l=" "+Date.prototype.toUTCString.call(n)),x(n)&&(l=" "+h(n)),0!==s.length||w&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=w?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(u,l,C)):C[0]+l+C[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=t.stylize(u.set?"[Getter/Setter]":"[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===C(t)}function x(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function S(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(o)&&(o=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=w,e.isDate=_,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(25);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(n=[E((t=new Date).getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),k[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(26),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,n(21),n(24))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,l=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h1)for(var n=1;nthis.root.depth&&(this.root.depth=this.level),this.level=this.level||0,this.schema=e}return i(t,[{key:"compile",value:function(){var t=this.root,e="",n="";if(n+=this.default(),n+=this.properties(),n+=this.items(),n+=this.member(),n+=this.item(),t===this){for(var r=1;r<=this.root.depth;r++)e+=this.declaration(r);return"\n options = options || {}\n\n if (options.filter === false) {\n Object.assign(target, JSON.parse(JSON.stringify(source)))\n }\n\n "+e+"\n "+n+"\n "}return n}},{key:"declaration",value:function(t){return"\n var target"+t+"\n var source"+t+"\n var count"+t+"\n "}},{key:"default",value:function(){var t=this.schema,e=this.level,n=this.key,r=this.index,i=t.default,o="";return t.hasOwnProperty("default")&&(n&&(o+="\n target"+e+"['"+n+"'] = "+JSON.stringify(i)+"\n "),r&&(o+="\n target"+e+"["+r+"] = "+JSON.stringify(i)+"\n "),e>1&&(o+="\n count"+e+"++\n "),o="\n if (options.defaults !== false) {\n "+o+"\n }\n "),o}},{key:"member",value:function(){var t=this.schema,e=this.level,n=this.key,r="";return!n||t.properties||t.additionalProperties||t.items||t.additionalItems||(r+="\n target"+e+"['"+n+"'] = source"+e+"['"+n+"']\n ",e>1&&(r+="\n count"+e+"++\n "),r="\n if (source"+e+".hasOwnProperty('"+n+"')) {\n "+r+"\n }\n "),r}},{key:"item",value:function(){var t=this.schema,e=this.level,n=this.index,r="";return!n||t.properties||t.additionalProperties||t.items||t.additionalItems||(r+="\n target"+e+"["+n+"] = source"+e+"["+n+"]\n ",e>1&&(r+="\n count"+e+"++\n "),r="\n if ("+n+" < len) {\n "+r+"\n }\n "),r}},{key:"properties",value:function(){var e=this.root,n=this.level,r=this.key,i=this.index,o=this.schema.properties,s="";return o&&(Object.keys(o).forEach(function(r){var i=new t(o[r],{key:r,root:e,level:n+1});s+=i.compile()}),e===this?s="\n if (typeof source === 'object' && source !== null && !Array.isArray(source)) {\n if (typeof target !== 'object') {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n count1 = 0\n\n "+s+"\n }\n ":(i&&(s="\n if ("+i+" < source"+n+".length || typeof source"+n+"["+i+"] === 'object') {\n\n source"+(n+1)+" = source"+n+"["+i+"] || {}\n count"+(n+1)+" = 0\n\n if ("+i+" < target"+n+".length || typeof target"+n+"["+i+"] !== 'object') {\n target"+(n+1)+" = {}\n if ("+i+" < source"+n+".length) {\n count"+(n+1)+"++\n }\n } else {\n target"+(n+1)+" = target"+n+"["+i+"]\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"["+i+"] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"["+i+"] = source"+n+"["+i+"]\n count"+n+"++\n }\n "),r&&(s="\n if ((typeof source"+n+"['"+r+"'] === 'object'\n && source"+n+"['"+r+"'] !== null\n && !Array.isArray(source"+n+"['"+r+"']))\n || !source"+n+".hasOwnProperty('"+r+"')) {\n\n source"+(n+1)+" = source"+n+"['"+r+"'] || {}\n count"+(n+1)+" = 0\n\n if (!target"+n+".hasOwnProperty('"+r+"')\n || typeof target"+n+"['"+r+"'] !== 'object'\n || target"+n+"['"+r+"'] === null\n || Array.isArray(target"+n+"['"+r+"'])) {\n target"+(n+1)+" = {}\n if (source"+n+".hasOwnProperty('"+r+"')) {\n count"+(n+1)+"++\n }\n } else {\n target"+(n+1)+" = target"+n+"['"+r+"']\n count"+(n+1)+"++\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"['"+r+"'] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"['"+r+"'] = source"+n+"['"+r+"']\n count"+n+"++\n }\n "))),s}},{key:"additionalProperties",value:function(){}},{key:"items",value:function(){var e=this.root,n=this.level,i=this.key,o=this.schema.items,s="";if(o){if(Array.isArray(o));else if("object"===(void 0===o?"undefined":r(o))&&null!==o){var a="i"+(n+1);s+="\n var sLen = source"+(n+1)+".length || 0\n var tLen = target"+(n+1)+".length || 0\n var len = 0\n\n if (sLen > len) { len = sLen }\n // THIS IS WRONG, CAUSED SIMPLE ARRAY INIT TO FAIL (OVERWRITE\n // EXISTING TARGET VALUES WITH UNDEFINED WHEN SOURCE IS SHORTER THAN\n // TARGET). LEAVING HERE UNTIL WE FINISH TESTING AND SEE WHY IT MIGHT\n // HAVE BEEN HERE IN THE FIRST PLACE.\n //\n // if (tLen > len) { len = tLen }\n\n for (var "+a+" = 0; "+a+" < len; "+a+"++) {\n "+new t(o,{index:a,root:e,level:n+1}).compile()+"\n }\n "}s=e===this?"\n if (Array.isArray(source)) {\n if (!Array.isArray(target)) {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n\n "+s+"\n }\n ":"\n if (Array.isArray(source"+n+"['"+i+"']) || !source"+n+".hasOwnProperty('"+i+"')) {\n\n source"+(n+1)+" = source"+n+"['"+i+"'] || []\n count"+(n+1)+" = 0\n\n if (!target"+n+".hasOwnProperty('"+i+"') || !Array.isArray(target"+n+"['"+i+"'])) {\n target"+(n+1)+" = []\n if (source"+n+".hasOwnProperty('"+i+"')) {\n count"+(n+1)+"++\n }\n\n } else {\n target"+(n+1)+" = target"+n+"['"+i+"']\n count"+(n+1)+"++\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"['"+i+"'] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"['"+i+"'] = source"+n+"['"+i+"']\n count"+n+"++\n }\n "}return s}},{key:"additionalItems",value:function(){}}],[{key:"compile",value:function(e){var n=new t(e).compile();try{return new Function("target","source","options",n)}catch(t){console.log(t,t.stack)}}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initialize(e,n)}return r(t,null,[{key:"schema",get:function(){throw new Error("Schema must be defined by classes extending JSONDocument")}}]),r(t,[{key:"initialize",value:function(){this.constructor.schema.initialize(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"validate",value:function(t){return(t||this.constructor.schema).validate(this)}},{key:"patch",value:function(t){new i(t).apply(this)}},{key:"select",value:function(){}},{key:"project",value:function(t){return t.project(this)}}],[{key:"serialize",value:function(t){return JSON.stringify(t)}},{key:"deserialize",value:function(t){try{return JSON.parse(t)}catch(t){throw new Error("Failed to parse JSON")}}}]),t}();t.exports=o},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.schema=e,Object.assign(this,n),this.address||(this.address=""),!0!==this.require&&(this.require=!1)}return i(t,null,[{key:"compile",value:function(e){var n='\n // "cursor"\n let value = data\n let container\n let stack = []\n let top = -1\n\n // error state\n let valid = true\n let errors = []\n\n // complex schema state\n let initialValidity\n let anyValid\n let notValid\n let countOfValid\n let initialErrorCount\n let accumulatedErrorCount\n\n // validation code\n '+new t(e).compile()+"\n\n // validation result\n return {\n valid,\n errors\n }\n ";return new Function("data",n)}},{key:"counter",get:function(){return s++}}]),i(t,[{key:"compile",value:function(){var t="";return this.require&&(t+=this.required()),t+=this.type(),t+=this.array(),t+=this.number(),t+=this.object(),t+=this.string(),t+=this.enum(),t+=this.anyOf(),t+=this.allOf(),(t+=this.not())+this.oneOf()}},{key:"push",value:function(){return"\n stack.push(value)\n container = value\n top++\n "}},{key:"pop",value:function(){return"\n if (stack.length > 1) {\n top--\n stack.pop()\n }\n\n value = container = stack[top]\n "}},{key:"type",value:function(){var t=this.schema.type,e="";return t&&(e+="\n // "+this.address+" type checking\n if (value !== undefined && "+(Array.isArray(t)?t:[t]).map(function(t){return"array"===t?"!Array.isArray(value)":"boolean"===t?"typeof value !== 'boolean'":"integer"===t?"!Number.isInteger(value)":"null"===t?"value !== null":"number"===t?"typeof value !== 'number'":"object"===t?"(typeof value !== 'object' || Array.isArray(value) || value === null)":"string"===t?"typeof value !== 'string'":void 0}).join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'type',\n message: 'invalid type'\n })\n }\n "),e}},{key:"array",value:function(){var t=this.validations(["additionalItems","items","minItems","maxItems","uniqueItems"]),e="";return t.length>0&&(e+="\n /**\n * Array validations\n */\n if (Array.isArray(value)) {\n "+t+"\n }\n "),e}},{key:"number",value:function(){var t=this.validations(["minimum","maximum","multipleOf"]),e="";return t.length>0&&(e+="\n /**\n * Number validations\n */\n if (typeof value === 'number') {\n "+t+"\n }\n "),e}},{key:"object",value:function(){var t=this.validations(["maxProperties","minProperties","additionalProperties","properties","patternProperties","dependencies","schemaDependencies","propertyDependencies"]),e="";return t.length>0&&(e+="\n /**\n * Object validations\n */\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n "+t+"\n }\n "),e}},{key:"string",value:function(){var t=this.validations(["maxLength","minLength","pattern","format"]),e="";return t.length>0&&(e+="\n /**\n * String validations\n */\n if (typeof value === 'string') {\n "+t+"\n }\n "),e}},{key:"validations",value:function(t){var e=this,n="";return Object.keys(this.schema).filter(function(e){return-1!==t.indexOf(e)}).forEach(function(t){n+=e[t]()}),n}},{key:"enum",value:function(){var t=this.schema.enum,e=this.address,n=["value !== undefined"],i="";return t&&(t.forEach(function(t){switch(void 0===t?"undefined":r(t)){case"boolean":case"number":n.push("value !== "+t);break;case"string":n.push('value !== "'+t+'"');break;case"object":n.push(null===t?"value !== null":"'"+JSON.stringify(t)+"' !== JSON.stringify(value)");break;default:throw new Error("Things are not well in the land of enum")}}),i+='\n /**\n * Validate "'+e+'" enum\n */\n if ('+n.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'enum',\n message: JSON.stringify(value) + ' is not an enumerated value'\n })\n }\n "),i}},{key:"anyOf",value:function(){var e=this.schema.anyOf,n=this.address,r="";return Array.isArray(e)&&(r+="\n initialValidity = valid\n initialErrorCount = errors.length\n anyValid = false\n ",e.forEach(function(e){var i=new t(e,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+i.compile()+"\n if (accumulatedErrorCount === errors.length) {\n anyValid = true\n }\n "}),r+="\n if (anyValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n }\n "),r}},{key:"allOf",value:function(){var e=this.schema.allOf,n=this.address,r="";return Array.isArray(e)&&e.forEach(function(e){var i=new t(e,{address:n});r+="\n "+i.compile()+"\n "}),r}},{key:"oneOf",value:function(){var e=this.schema.oneOf,n=this.address,r="";return Array.isArray(e)&&(r+="\n /**\n * Validate "+n+" oneOf\n */\n initialValidity = valid\n initialErrorCount = errors.length\n countOfValid = 0\n ",e.forEach(function(e){var i=new t(e,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+i.compile()+"\n if (accumulatedErrorCount === errors.length) {\n countOfValid += 1\n }\n "}),r+="\n if (countOfValid === 1) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors.push({\n keyword: 'oneOf',\n message: 'what is a reasonable error message for this case?'\n })\n }\n "),r}},{key:"not",value:function(){var e=this.schema.not,n=this.address,i="";return"object"!==(void 0===e?"undefined":r(e))||null===e||Array.isArray(e)||(i+="\n /**\n * NOT\n */\n if (value !== undefined) {\n initialValidity = valid\n initialErrorCount = errors.length\n notValid = true\n\n accumulatedErrorCount = errors.length\n\n "+new t(e,{address:n}).compile()+"\n\n if (accumulatedErrorCount === errors.length) {\n notValid = false\n }\n\n if (notValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors = errors.slice(0, initialErrorCount)\n errors.push({\n keyword: 'not',\n message: 'hmm...'\n })\n }\n }\n "),i}},{key:"properties",value:function(){var e=this.schema,n=this.address,i=e.properties,o=e.required,s=this.push();return o=Array.isArray(o)?o:[],"object"===(void 0===i?"undefined":r(i))&&Object.keys(i).forEach(function(e){var r=i[e],a=-1!==o.indexOf(e),u=new t(r,{address:[n,e].filter(function(t){return!!t}).join("."),require:a});s+="\n value = container['"+e+"']\n ",s+=u.compile()}),s+=this.pop()}},{key:"otherProperties",value:function(){return"\n /**\n * Validate Other Properties\n */\n "+this.push()+"\n\n for (let key in container) {\n value = container[key]\n matched = false\n\n "+this.patternValidations()+"\n "+this.additionalValidations()+"\n }\n\n "+this.pop()+"\n "}},{key:"patternValidations",value:function(){var e=this.schema.patternProperties,n="";return"object"===(void 0===e?"undefined":r(e))&&Object.keys(e).forEach(function(r){var i=new t(e[r]);n+="\n if (key.match('"+r+"')) {\n matched = true\n "+i.compile()+"\n }\n "}),n}},{key:"additionalValidations",value:function(){var e=this.schema,n=e.additionalProperties,i=this.address,o="",s=["matched !== true"];if(Object.keys(e.properties||{}).forEach(function(t){s.push("key !== '"+t+"'")}),"object"===(void 0===n?"undefined":r(n))){var a=new t(n,{address:i+"[APKey]"});o+="\n // validate additional properties\n if ("+s.join(" && ")+") {\n "+a.compile()+"\n }\n "}return!1===n&&(o+="\n // validate non-presence of additional properties\n if ("+s.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'additionalProperties',\n message: key + ' is not a defined property'\n })\n }\n "),o}},{key:"patternProperties",value:function(){var t="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,t+=this.otherProperties()),t}},{key:"additionalProperties",value:function(){var t="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,t+=this.otherProperties()),t}},{key:"minProperties",value:function(){return"\n // "+this.address+" min properties\n if (Object.keys(value).length < "+this.schema.minProperties+") {\n valid = false\n errors.push({\n keyword: 'minProperties',\n message: 'too few properties'\n })\n }\n "}},{key:"maxProperties",value:function(){return"\n // "+this.address+" max properties\n if (Object.keys(value).length > "+this.schema.maxProperties+") {\n valid = false\n errors.push({\n keyword: 'maxProperties',\n message: 'too many properties'\n })\n }\n "}},{key:"dependencies",value:function(){var e=this.schema.dependencies,n=this.address,i=this.push();return"object"===(void 0===e?"undefined":r(e))&&Object.keys(e).forEach(function(o){var s=e[o],a=[];if(Array.isArray(s))s.forEach(function(t){a.push("container['"+t+"'] === undefined")}),i+="\n if (container['"+o+"'] !== undefined && ("+a.join(" || ")+")) {\n valid = false\n errors.push({\n keyword: 'dependencies',\n message: 'unmet dependencies'\n })\n }\n ";else if("object"===(void 0===s?"undefined":r(s))){var u=new t(s,{address:n});i+="\n if (container['"+o+"'] !== undefined) {\n "+u.compile()+"\n }\n "}}),i+=this.pop()}},{key:"required",value:function(){return"\n // validate "+this.address+" presence\n if (value === undefined) {\n valid = false\n errors.push({\n keyword: 'required',\n message: 'is required'\n })\n }\n "}},{key:"additionalItems",value:function(){var e=this.schema,n=e.items,i=e.additionalItems,o="";if(!1===i&&Array.isArray(n)&&(o+="\n // don't allow additional items\n if (value.length > "+n.length+") {\n valid = false\n errors.push({\n keyword: 'additionalItems',\n message: 'additional items not allowed'\n })\n }\n "),"object"===(void 0===i?"undefined":r(i))&&null!==i&&Array.isArray(n)){var s=new t(i),a=t.counter;o+="\n // additional items\n "+this.push()+"\n\n for (var i"+a+" = "+n.length+"; i"+a+" <= container.length; i"+a+"++) {\n value = container[i"+a+"]\n "+s.compile()+"\n }\n\n "+this.pop()+"\n "}return o}},{key:"items",value:function(){var e=this.schema.items,n=this.address,i="";if(Array.isArray(e))i+=this.push(),e.forEach(function(e,r){var o=new t(e,{address:n+"["+r+"]"});i+="\n // item #"+r+"\n value = container["+r+"]\n "+o.compile()+"\n "}),i+=this.pop();else if("object"===(void 0===e?"undefined":r(e))&&null!==e){var o=new t(e),s=t.counter;i+="\n // items\n "+this.push()+"\n\n for (var i"+s+" = 0; i"+s+" < container.length; i"+s+"++) {\n // read array element\n value = container[i"+s+"]\n "+o.compile()+"\n }\n\n "+this.pop()+"\n "}return i}},{key:"minItems",value:function(){return"\n // "+this.address+" min items\n if (value.length < "+this.schema.minItems+") {\n valid = false\n errors.push({\n keyword: 'minItems',\n message: 'too few properties'\n })\n }\n "}},{key:"maxItems",value:function(){return"\n // "+this.address+" max items\n if (value.length > "+this.schema.maxItems+") {\n valid = false\n errors.push({\n keyword: 'maxItems',\n message: 'too many properties'\n })\n }\n "}},{key:"uniqueItems",value:function(){var t="";return!0===this.schema.uniqueItems&&(t+="\n // validate "+this.address+" unique items\n let values = value.map(v => JSON.stringify(v)) // TODO: optimize\n let set = new Set(values)\n if (values.length !== set.size) {\n valid = false\n errors.push({\n keyword: 'uniqueItems',\n message: 'items must be unique'\n })\n }\n "),t}},{key:"minLength",value:function(){return"\n // "+this.address+" validate minLength\n if (Array.from(value).length < "+this.schema.minLength+") {\n valid = false\n errors.push({\n keyword: 'minLength',\n message: 'too short'\n })\n }\n "}},{key:"maxLength",value:function(){return"\n // "+this.address+" validate maxLength\n if (Array.from(value).length > "+this.schema.maxLength+") {\n valid = false\n errors.push({\n keyword: 'maxLength',\n message: 'too long'\n })\n }\n "}},{key:"pattern",value:function(){var t=this.schema.pattern;if(t)return"\n // "+this.address+" validate pattern\n if (!value.match(new RegExp('"+t+"'))) {\n valid = false\n errors.push({\n keyword: 'pattern',\n message: 'does not match the required pattern'\n })\n }\n "}},{key:"format",value:function(){var t=this.schema.format,e=this.address,n=o.resolve(t);if(n)return"\n // "+e+" validate format\n if (!value.match("+n+")) {\n valid = false\n errors.push({\n keyword: 'format',\n message: 'is not \""+t+"\" format'\n })\n }\n "}},{key:"minimum",value:function(){var t=this.schema;return"\n // "+this.address+" validate minimum\n if (value "+(!0===t.exclusiveMinimum?"<=":"<")+" "+t.minimum+") {\n valid = false\n errors.push({\n keyword: 'minimum',\n message: 'too small'\n })\n }\n "}},{key:"maximum",value:function(){var t=this.schema;return"\n // "+this.address+" validate maximum\n if (value "+(!0===t.exclusiveMaximum?">=":">")+" "+t.maximum+") {\n valid = false\n errors.push({\n keyword: 'maximum',\n message: 'too large'\n })\n }\n "}},{key:"multipleOf",value:function(){var t=this.schema.multipleOf,e="";if("number"==typeof t){var n=t.toString().length-t.toFixed(0).length-1,r=n>0?Math.pow(10,n):1;e+="\n if ("+(n>0?"(value * "+r+") % "+t*r+" !== 0":"value % "+t+" !== 0")+") {\n valid = false\n errors.push({\n keyword: 'multipleOf',\n message: 'must be a multiple of "+t+"'\n })\n }\n "}return e}}]),t}();t.exports=a},function(t,e,n){"use strict";var r=n(38),i=n(57),o=n(60),s=n(62),a=n(67),u=n(64),l=n(66),c=n(58),h=n(61),f=n(65),p=n(63);t.exports={JWA:r,JWK:i,JWKSet:o,JWT:s,JWS:a,Base64URLSchema:u,JOSEHeaderSchema:l,JWKSchema:c,JWKSetSchema:h,JWTClaimsSetSchema:f,JWTSchema:p}},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(e,t.length-n),t,n,r)}function C(t,e,n){return r.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=t[i+2],128==(192&(o=t[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=t[i+2],a=t[i+3],128==(192&(o=t[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var n="",r=0;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}).apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(r,i),c=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function j(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(21))},function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[1];return 3*(e[0]+n)/4-n},e.toByteArray=function(t){for(var e,n=l(t),r=n[0],s=n[1],a=new o(NaN),u=0,c=s>0?r-4:r,h=0;h>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,l-=8);t[n+p-d]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){let n=e.length,r=n%4;if(!r)return e;let i=n,o=4-r,s=t.alloc(n+o);for(s.write(e);o--;)s.write("=",i++);return s.toString()}}).call(this,n(41).Buffer)},function(t,e,n){"use strict";var r=n(47),i=n(48),o=n(52),s=new(n(53));s.define("HS256","sign",new i({name:"HMAC",hash:{name:"SHA-256"}})),s.define("HS384","sign",new i({name:"HMAC",hash:{name:"SHA-384"}})),s.define("HS512","sign",new i({name:"HMAC",hash:{name:"SHA-512"}})),s.define("RS256","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),s.define("none","sign",new r({})),s.define("HS256","verify",new i({name:"HMAC",hash:{name:"SHA-256"}})),s.define("HS384","verify",new i({name:"HMAC",hash:{name:"SHA-384"}})),s.define("HS512","verify",new i({name:"HMAC",hash:{name:"SHA-512"}})),s.define("RS256","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),s.define("none","verify",new r({})),s.define("RS256","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),t.exports=s},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n(r(c.configuration,"RelyingParty provider OpenID Configuration is missing"),r(h.authenticate,"RelyingParty default authentication parameters are missing"),r(f,"RelyingParty client registration is missing"),p=c.configuration.issuer,d=c.configuration.authorization_endpoint,g={client_id:f.client_id},y=Object.assign(h.authenticate,g,n),r(p,"Missing issuer in provider OpenID Configuration"),r(d,"Missing authorization_endpoint in provider OpenID Configuration"),r(y.scope,"Missing scope parameter in authentication request"),r(y.response_type,"Missing response_type parameter in authentication request"),r(y.client_id,"Missing client_id parameter in authentication request"),r(y.redirect_uri,"Missing redirect_uri parameter in authentication request"),y.state=Array.from(o.getRandomValues(new Uint8Array(16))),y.nonce=Array.from(o.getRandomValues(new Uint8Array(16))),Promise.all([o.subtle.digest({name:"SHA-256"},new Uint8Array(y.state)),o.subtle.digest({name:"SHA-256"},new Uint8Array(y.nonce))]))).then(t=>{let n=i(e.from(t[0])),r=i(e.from(t[1]));s[`${p}/requestHistory/${n}`]=JSON.stringify(y),y.state=n,y.nonce=r}).then(()=>l.generateSessionKeys()).then(t=>{l.storeSessionKeys(t,y,s)}).then(()=>{if(c.configuration.request_parameter_supported)return l.encodeRequestParams(y).then(t=>{y=t})}).then(()=>{let t=new u(d);return t.search=a.encode(y),t.href})}static generateSessionKeys(){return o.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(t=>Promise.all([o.subtle.exportKey("jwk",t.publicKey),o.subtle.exportKey("jwk",t.privateKey)])).then(t=>{let[e,n]=t;return{public:e,private:n}})}static storeSessionKeys(t,e,n){n["oidc.session.privateKey"]=JSON.stringify(t.private),e.key=t.public}static encodeRequestParams(t){const e=["scope","client_id","response_type","state"],n=Object.keys(t).filter(t=>!e.includes(t));let r={};return n.forEach(e=>{r[e]=t[e]}),new s({header:{alg:"none"},payload:r},{filter:!1}).encode().then(e=>({scope:t.scope,client_id:t.client_id,response_type:t.response_type,request:e,state:t.state}))}}t.exports=l}).call(this,n(41).Buffer)},function(t,e){t.exports=class{static encode(t){let e=[];return Object.keys(t).forEach(function(n){e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]))}),e.join("&")}static decode(t){let e={};return t.split("&").forEach(function(t){let n=t.split("="),r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]);e[r]=i}),e}}},function(t,e,n){(function(e,r){const{URL:i}=n(27),o=n(22),s=n(49),a=n(39),u=n(6),l=u.Headers?u.Headers:e.Headers,c=n(69),h=n(71),f=n(73),p=n(74),d=n(76);class g{constructor({rp:t,redirect:e,body:n,session:r,mode:i,params:o={}}){this.rp=t,this.redirect=e,this.body=n,this.session=r,this.mode=i,this.params=o}static validateResponse(t){return Promise.resolve(t).then(this.parseResponse).then(this.errorResponse).then(this.matchRequest).then(this.validateStateParam).then(this.validateResponseMode).then(this.validateResponseParams).then(this.exchangeAuthorizationCode).then(this.validateIDToken).then(f.fromAuthResponse)}static parseResponse(t){let{redirect:e,body:n}=t;if(e&&n||!e&&!n)throw new d(400,"Invalid response mode");if(e){let n=new i(e),{search:r,hash:o}=n;if(r&&o||!r&&!o)throw new d(400,"Invalid response mode");r&&(t.params=c.decode(r.substring(1)),t.mode="query"),o&&(t.params=c.decode(o.substring(1)),t.mode="fragment")}return n&&(t.params=c.decode(n),t.mode="form_post"),t}static errorResponse(t){const e=t.params.error;if(e){const n={};n.error=e,n.error_description=t.params.error_description,n.error_uri=t.params.error_uri,n.state=t.params.state;const r=new Error(`AuthenticationResponse error: ${e}`);throw r.info=n,r}return t}static matchRequest(t){let{rp:e,params:n,session:r}=t,i=n.state,o=e.provider.configuration.issuer;if(!i)throw new Error("Missing state parameter in authentication response");let s=r[`${o}/requestHistory/${i}`];if(!s)throw new Error("Mismatching state parameter in authentication response");return t.request=JSON.parse(s),t}static validateStateParam(t){let e=new Uint8Array(t.request.state),n=t.params.state;return s.subtle.digest({name:"SHA-256"},e).then(e=>{if(n!==a(r.from(e)))throw new Error("Mismatching state parameter in authentication response");return t})}static validateResponseMode(t){if("code"!==t.request.response_type&&"query"===t.mode)throw new Error("Invalid response mode");return t}static validateResponseParams(t){let{request:e,params:n}=t,r=e.response_type.split(" ");return r.includes("code")&&o(n.code,"Missing authorization code in authentication response"),r.includes("id_token")&&o(n.id_token,"Missing id_token in authentication response"),r.includes("token")&&(o(n.access_token,"Missing access_token in authentication response"),o(n.token_type,"Missing token_type in authentication response")),t}static exchangeAuthorizationCode(t){let{rp:e,params:n,request:i}=t,s=n.code;if(!s||"code"!==i.response_type)return Promise.resolve(t);let{provider:a,registration:h}=e,f=h.client_id,d=h.client_secret;if(!d)return Promise.reject(new Error("Client cannot exchange authorization code because it is not a confidential client"));let g=a.configuration.token_endpoint,y=new l({"Content-Type":"application/x-www-form-urlencoded"}),m={grant_type:"authorization_code",code:s,redirect_uri:i.redirect_uri},v=h.token_endpoint_auth_method||"client_secret_basic";if("client_secret_basic"===v){let t=new r(`${f}:${d}`).toString("base64");y.set("Authorization",`Basic ${t}`)}"client_secret_post"===v&&(m.client_id=f,m.client_secret=d);let b=c.encode(m);return u(g,{method:"POST",headers:y,body:b}).then(p("Error exchanging authorization code")).then(t=>t.json()).then(e=>(o(e.access_token,"Missing access_token in token response"),o(e.token_type,"Missing token_type in token response"),o(e.id_token,"Missing id_token in token response"),t.params=Object.assign(t.params,e),t))}static validateIDToken(t){return t.params.id_token?Promise.resolve(t).then(g.decryptIDToken).then(g.decodeIDToken).then(g.validateIssuer).then(g.validateAudience).then(g.resolveKeys).then(g.verifySignature).then(g.validateExpires).then(g.verifyNonce).then(g.validateAcr).then(g.validateAuthTime).then(g.validateAccessTokenHash).then(g.validateAuthorizationCodeHash):Promise.resolve(t)}static decryptIDToken(t){return Promise.resolve(t)}static decodeIDToken(t){let e=t.params.id_token;try{t.decoded=h.decode(e)}catch(t){const n=new d(400,"Error decoding ID Token");throw n.cause=t,n.info={id_token:e},n}return t}static validateIssuer(t){if(t.decoded.payload.iss!==t.rp.provider.configuration.issuer)throw new Error("Mismatching issuer in ID Token");return t}static validateAudience(t){let e=t.rp.registration,{aud:n,azp:r}=t.decoded.payload;if("string"==typeof n&&n!==e.client_id)throw new Error("Mismatching audience in id_token");if(Array.isArray(n)&&!n.includes(e.client_id))throw new Error("Mismatching audience in id_token");if(Array.isArray(n)&&!r)throw new Error("Missing azp claim in id_token");if(r&&r!==e.client_id)throw new Error("Mismatching azp claim in id_token");return t}static resolveKeys(t){let e=t.rp,n=t.decoded;return Promise.resolve(e.provider.jwks).then(t=>t||e.jwks()).then(e=>{if(n.resolveKeys(e))return Promise.resolve(t);throw new Error("Cannot resolve signing key for ID Token")})}static verifySignature(t){let e=t.rp.registration.id_token_signed_response_alg||"RS256";if(t.decoded.header.alg!==e)throw new Error(`Expected ID Token to be signed with ${e}`);return t.decoded.verify().then(e=>{if(!e)throw new Error("Invalid ID Token signature");return t})}static validateExpires(t){if(t.decoded.payload.exp<=Math.floor(Date.now()/1e3))throw new Error("Expired ID Token");return t}static verifyNonce(t){let e=new Uint8Array(t.request.nonce),n=t.decoded.payload.nonce;if(!n)throw new Error("Missing nonce in ID Token");return s.subtle.digest({name:"SHA-256"},e).then(e=>{if(n!==a(r.from(e)))throw new Error("Mismatching nonce in ID Token");return t})}static validateAcr(t){return t}static validateAuthTime(t){return t}static validateAccessTokenHash(t){return t}static validateAuthorizationCodeHash(t){return t}}t.exports=g}).call(this,n(21),n(41).Buffer)},function(t,e,n){const{JWT:r}=n(37),i=n(72);t.exports=class extends r{static get schema(){return i}}},function(t,e,n){const{JWTSchema:r}=n(37),i=r.extend({properties:{header:{},payload:{properties:{iss:{type:"string",format:"url"},sub:{type:"string",maxLength:255},auth_time:{type:"integer",format:"NumericDate"},nonce:{type:"string"},acr:{type:"string"},amr:{type:"array",items:{type:"string"}},azp:{type:"string",format:"StringOrURI"}},required:["iss","sub","aud","exp","iat"]}}});t.exports=i},function(t,e,n){"use strict";const r=n(6),i=n(74),o=n(75);class s{constructor(t){this.credentialType=t.credentialType||"access_token",this.issuer=t.issuer,this.authorization=t.authorization||{},this.sessionKey=t.sessionKey,this.idClaims=t.idClaims,this.accessClaims=t.accessClaims}static from(t){return new s(t)}static fromAuthResponse(t){const e=n(20);let r=t.decoded&&t.decoded.payload||{},{rp:i}=t;return s.from({credentialType:(i.defaults.authenticate||{}).credential_type||i.defaults.popToken?"pop_token":"access_token",sessionKey:t.session[e.SESSION_PRIVATE_KEY],issuer:r.iss,idClaims:r,authorization:{client_id:i.registration.client_id,access_token:t.params.access_token,id_token:t.params.id_token,refresh_token:t.params.refresh_token}})}get fetch(){return(t,e)=>Promise.resolve().then(()=>this.hasCredentials()?this.fetchWithCredentials(t,e):r(t,e)).then(i("Error while fetching resource"))}bearerTokenFor(t){switch(this.credentialType){case"pop_token":return o.issueFor(t,this);default:return Promise.resolve(this.authorization[this.credentialType])}}hasCredentials(){switch(this.credentialType){case"pop_token":return!!this.authorization.id_token;default:return!!this.authorization[this.credentialType]}}fetchWithCredentials(t,e={}){return e.headers=e.headers||{},this.bearerTokenFor(t).then(n=>(e.headers.authorization=`Bearer ${n}`,r(t,e)))}}t.exports=s},function(t,e,n){"use strict";t.exports=function(t="fetch error"){return e=>{if(e.status>=200&&e.status<300)return e;let n=new Error(`${t}: ${e.status} ${e.statusText}`);throw n.response=e,n.statusCode=e.status,n}}},function(t,e,n){"use strict";const{URL:r}=n(27),{JWT:i,JWK:o}=n(37),s=3600;class a extends i{static issueFor(t,e){if(!t)throw new Error("Cannot issue PoPToken - missing resource server URI");if(!e.sessionKey)throw new Error("Cannot issue PoPToken - missing session key");if(!e.authorization.id_token)throw new Error("Cannot issue PoPToken - missing id token");let n=JSON.parse(e.sessionKey);return o.importKey(n).then(n=>{let i={aud:new r(t).origin,key:n,iss:e.authorization.client_id,id_token:e.authorization.id_token};return a.issue(i)}).then(t=>t.encode())}static issue(t){let{aud:e,iss:n,key:r}=t,i=r.alg,o=t.iat||Math.floor(Date.now()/1e3);return new a({header:{alg:i},payload:{iss:n,aud:e,exp:o+(t.max||s),iat:o,id_token:t.id_token,token_type:"pop"},key:r.cryptoKey},{filter:!1})}}t.exports=a},function(t,e,n){e=t.exports=s;var r=n(77),i=n(78),o=e;function s(t,e,n){if("string"==typeof t&&(t=o[t]),"number"!=typeof t)throw new TypeError("Non-numeric HTTP code");"object"==typeof e&&null!=e&&(n=e,e=null),r.call(this,e||i[t],n),this.code=t}for(var a in(s.prototype=Object.create(r.prototype,{constructor:{value:s,configurable:!0,writable:!0}})).name="HttpError",Object.defineProperties(s.prototype,{statusCode:u("code"),statusMessage:u("message"),status:{configurable:!0,get:function(){return this.code},set:function(t){Object.defineProperty(this,"status",{value:t,configurable:!0,enumerable:!0,writable:!0})}}}),s.prototype.toString=function(){return this.name+": "+this.code+" "+this.message},i)e[i[a].replace("'","").replace(/[- ]/g,"_").toUpperCase()]=+a;function u(t){return{configurable:!0,get:function(){return this[t]},set:function(e){return this[t]=e}}}},function(t,e){var n=Object.hasOwnProperty,r=Object.getPrototypeOf,i=Error.captureStackTrace;function o(t,e){if(t&&"object"==typeof t?(e=t,t=void 0):this.message=t,e)for(var o in e)this[o]=e[o];n.call(this,"name")||(this.name=n.call(r(this),"name")?this.name:this.constructor.name),!i||"stack"in this||i(this,this.constructor)}t.exports=o,(o.prototype=Object.create(Error.prototype,{constructor:{value:o,configurable:!0,writable:!0}})).name="StandardError"},function(t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,n){const{JSONSchema:r}=n(28),i=new r({type:"object",properties:{provider:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},configuration:{},jwks:{}},required:["url"]},defaults:{type:"object",properties:{popToken:{type:"boolean",default:!1},authenticate:{type:"object",properties:{redirect_uri:{type:"string",format:"uri"},response_type:{type:"string",default:"id_token token",enum:["code","token","id_token token","id_token token code"]},display:{type:"string",default:"page",enum:["page","popup"]},scope:{type:["string","array"],default:["openid"]}}},register:{}}},registration:{},store:{type:"object",default:{}}}});t.exports=i},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n{const u=new r.Server(e,Object(i.originOf)(n.popupUri||""),a(t,n,t=>{u.stop(),o(t)}));u.start()})}function a(t,{popupUri:e,callbackUri:n},r){return async(i,...o)=>{switch(i){case"getAppOrigin":return window.location.origin;case"storage/getItem":return t.getItem(...o);case"storage/setItem":return t.setItem(...o);case"storage/removeItem":return t.removeItem(...o);case"getLoginOptions":return{popupUri:e,callbackUri:n};case"foundSession":r(...o)}}}}]).default},function(t,e,n){(function(e){var n=String.fromCharCode,r="function"==typeof e?e:function(t){setTimeout(t,0)},i=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\[uU]|\\(.)/g,o={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},s=/[\x00-\x20<>\\"\{\}\|\^\`]/;function a(t){if(!(this instanceof a))return new a(t);if(t&&t.lineMode){this._tripleQuotedString=this._number=this._boolean=/$0^/;var e=this;this._tokenize=this.tokenize,this.tokenize=function(t,n){this._tokenize(t,function(t,r){!t&&/^(?:IRI|prefixed|literal|langcode|type|\.|eof)$/.test(r.type)?n&&n(t,r):n&&n(t||e._syntaxError(r.type,n=null))})}}}a.prototype={_iri:/^<((?:[^>\\]|\\[uU])+)>/,_unescapedIri:/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>/,_unescapedString:/^"[^"\\]+"(?=[^"\\])/,_singleQuotedString:/^"[^"\\]*(?:\\.[^"\\]*)*"(?=[^"\\])|^'[^'\\]*(?:\\.[^'\\]*)*'(?=[^'\\])/,_tripleQuotedString:/^""("[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*")""|^''('[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*')''/,_langcode:/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,_prefix:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,_prefixed:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?=\.?[,;\s#()\[\]\{\}"'<])/,_blank:/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=\.?[,;:\s#()\[\]\{\}"'<])/,_number:/^[\-+]?(?:\d+\.?\d*([eE](?:[\-\+])?\d+)|\d*\.?\d+)(?=[.,;:\s#()\[\]\{\}"'<])/,_boolean:/^(?:true|false)(?=[.,;:\s#()\[\]\{\}"'<])/,_keyword:/^@[a-z]+(?=[\s#<:])/,_sparqlKeyword:/^(?:PREFIX|BASE|GRAPH)(?=[\s#<:])/i,_shortPredicates:/^a(?=\s+|<)/,_newline:/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,_whitespace:/^[ \t]+/,_endOfFile:/^(?:#[^\n\r]*)?$/,_tokenizeToEnd:function(t,e){for(var n=this._input;;){for(var r;r=this._newline.exec(n);)n=n.substr(r[0].length,n.length),this._line++;if((r=this._whitespace.exec(n))&&(n=n.substr(r[0].length,n.length)),this._endOfFile.test(n))return e&&t(n=null,{line:this._line,type:"eof",value:"",prefix:""}),this._input=n;var i,o=this._line,a="",u="",l="",c=n[0],h=null,f=0,p=!1;switch(c){case"^":if(1===n.length)break;if("^"!==n[1])return d(this);if(this._prevTokenType="^","<"!==(n=n.substr(2))[0]){p=!0;break}case"<":if(h=this._unescapedIri.exec(n))a="IRI",u=h[1];else if(h=this._iri.exec(n)){if(null===(i=this._unescape(h[1]))||s.test(i))return d(this);a="IRI",u=i}break;case"_":((h=this._blank.exec(n))||e&&(h=this._blank.exec(n+" ")))&&(a="prefixed",l="_",u=h[1]);break;case'"':case"'":if(h=this._unescapedString.exec(n))a="literal",u=h[0];else if(h=this._singleQuotedString.exec(n)){if(null===(i=this._unescape(h[0])))return d(this);a="literal",u=i.replace(/^'|'$/g,'"')}else if(h=this._tripleQuotedString.exec(n)){if(this._line+=(i=h[1]||h[2]).split(/\r\n|\r|\n/).length-1,null===(i=this._unescape(i)))return d(this);a="literal",u=i.replace(/^'|'$/g,'"')}break;case"@":"literal"===this._prevTokenType&&(h=this._langcode.exec(n))?(a="langcode",u=h[1]):(h=this._keyword.exec(n))&&(a=h[0]);break;case".":if(1===n.length?e:n[1]<"0"||n[1]>"9"){a=".",f=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(h=this._number.exec(n))&&(a="literal",u='"'+h[0]+'"^^http://www.w3.org/2001/XMLSchema#'+(h[1]?"double":/^[+\-]?\d+$/.test(h[0])?"integer":"decimal"));break;case"B":case"b":case"p":case"P":case"G":case"g":(h=this._sparqlKeyword.exec(n))?a=h[0].toUpperCase():p=!0;break;case"f":case"t":(h=this._boolean.exec(n))?(a="literal",u='"'+h[0]+'"^^http://www.w3.org/2001/XMLSchema#boolean'):p=!0;break;case"a":(h=this._shortPredicates.exec(n))?(a="abbreviation",u="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):p=!0;break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":f=1,a=c;break;default:p=!0}if(p&&("@prefix"!==this._prevTokenType&&"PREFIX"!==this._prevTokenType||!(h=this._prefix.exec(n))?((h=this._prefixed.exec(n))||e&&(h=this._prefixed.exec(n+" ")))&&(a="prefixed",l=h[1]||"",u=this._unescape(h[2])):(a="prefix",u=h[1]||"")),"^"===this._prevTokenType&&(a="IRI"===a||"prefixed"===a?"type":""),!a)return e||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?d(this):this._input=n;t(null,{line:o,type:a,value:u,prefix:l}),this._prevTokenType=a,n=n.substr(f||h[0].length,n.length)}function d(e){t(e._syntaxError(/^\S*/.exec(n)[0]))}},_unescape:function(t){try{return t.replace(i,function(t,e,r,i){var s;if(e){if(s=parseInt(e,16),isNaN(s))throw new Error;return n(s)}if(r){if(s=parseInt(r,16),isNaN(s))throw new Error;return s<=65535?n(s):n(55296+(s-=65536)/1024,56320+(1023&s))}var a=o[i];if(!a)throw new Error;return a})}catch(t){return null}},_syntaxError:function(t){return this._input=null,new Error('Syntax error: unexpected "'+t+'" on line '+this._line+".")},tokenize:function(t,e){var n=this;function i(t){null!==n._input&&(n._input+=t,n._tokenizeToEnd(e,!1))}function o(){null!==n._input&&n._tokenizeToEnd(e,!0)}this._line=1,"string"==typeof t?(this._input=t,r(function(){n._tokenizeToEnd(e,!0)})):(this._input="",t&&"function"!=typeof t?("function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",i),t.on("end",o)):(this.addChunk=i,this.end=o,e||(e=t)))}},t.exports=a}).call(this,n(16).setImmediate)},function(t,e,n){var r=n(29),i="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o=i+"nil",s=i+"first",a=/^[a-z][a-z0-9+.-]*:/i,u=/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i,l=/(?:^|\/)\.\.?(?:$|[\/#?])/,c=0,h=0;function f(t){if(!(this instanceof f))return new f(t);this._tripleStack=[],this._graph=null,this._setBase((t=t||{}).documentIRI);var e="string"==typeof t.format&&t.format.match(/\w*$/)[0].toLowerCase(),n="turtle"===e,i="trig"===e,o=/triple/.test(e),s=/quad/.test(e),a=o||s;(this._supportsNamedGraphs=!n)||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||i||o),a&&(this._base="",this._resolveIRI=function(t){return this._error("Disallowed relative IRI",t),this._callback=p,this._subject=null}),this._blankNodePrefix="string"!=typeof t.blankNodePrefix?"":"_:"+t.blankNodePrefix.replace(/^_:/,""),this._lexer=t.lexer||new r({lineMode:a})}function p(){}f._resetBlankNodeIds=function(){c=h=0},f.prototype={_setBase:function(t){if(t){if(t.indexOf("#")>=0)throw new Error("Invalid base IRI "+t)}else t=null;(this._base=t)&&(this._basePath=t.replace(/[^\/?]*(?:\?.*)?$/,""),t=t.match(u),this._baseRoot=t[0],this._baseScheme=t[1])},_readInTopContext:function(t){switch(t.type){case"eof":return null!==this._graph?this._error("Unclosed graph",t):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"@prefix":return this._sparqlStyle=!1,this._readPrefix;case"PREFIX":return this._sparqlStyle=!0,this._readPrefix;case"@base":return this._sparqlStyle=!1,this._readBaseIRI;case"BASE":return this._sparqlStyle=!0,this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(t)}},_readSubject:function(t){switch(this._predicate=null,t.type){case"IRI":this._subject=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var e=this._prefixes[t.prefix];if(void 0===e)return this._error('Undefined prefix "'+t.prefix+':"',t);this._subject=e+t.value;break;case"[":return this._subject="_:b"+h++,this._tripleStack.push({subject:this._subject,predicate:null,object:null,type:"blank"}),this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:o,predicate:null,object:null,type:"list"}),this._subject=null,this._readListItem;case"}":return this._readPunctuation(t);default:return this._error("Expected subject but got "+t.type,t)}return this._readPredicateOrNamedGraph},_readPredicate:function(t){var e=t.type;switch(e){case"IRI":case"abbreviation":this._predicate=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":if("_"===t.prefix)return this._error("Disallowed blank node as predicate",t);var n=this._prefixes[t.prefix];if(void 0===n)return this._error('Undefined prefix "'+t.prefix+':"',t);this._predicate=n+t.value;break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+e,t):(this._subject=null,"]"===e?this._readBlankNodeTail(t):this._readPunctuation(t));case";":return this._readPredicate;default:return this._error('Expected predicate to follow "'+this._subject+'"',t)}return this._readObject},_readObject:function(t){switch(t.type){case"IRI":this._object=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var e=this._prefixes[t.prefix];if(void 0===e)return this._error('Undefined prefix "'+t.prefix+':"',t);this._object=e+t.value;break;case"literal":return this._object=t.value,this._readDataTypeOrLang;case"[":var n="_:b"+h++;return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:n,type:"blank"}),this._subject=n,this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:o,type:"list"}),this._subject=null,this._readListItem;default:return this._error('Expected object to follow "'+this._predicate+'"',t)}return this._getTripleEndReader()},_readPredicateOrNamedGraph:function(t){return"{"===t.type?this._readGraph(t):this._readPredicate(t)},_readGraph:function(t){return"{"!==t.type?this._error("Expected graph but got "+t.type,t):(this._graph=this._subject,this._subject=null,this._readSubject)},_readBlankNodeHead:function(t){return"]"===t.type?(this._subject=null,this._readBlankNodeTail(t)):(this._predicate=null,this._readPredicate(t))},_readBlankNodeTail:function(t){if("]"!==t.type)return this._readBlankNodePunctuation(t);null!==this._subject&&this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""});var e=this._tripleStack.pop();return this._subject=e.subject,null!==e.object?(this._predicate=e.predicate,this._object=e.object,this._getTripleEndReader()):null!==this._predicate?this._readPredicate:this._readPredicateOrNamedGraph},_readDataTypeOrLang:function(t){switch(t.type){case"type":var e;if(""===t.prefix)e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);else{var n=this._prefixes[t.prefix];if(void 0===n)return this._error('Undefined prefix "'+t.prefix+':"',t);e=n+t.value}return this._object+="^^"+e,this._getTripleEndReader();case"langcode":return this._object+="@"+t.value.toLowerCase(),this._getTripleEndReader();default:return this._getTripleEndReader().call(this,t)}},_readListItem:function(t){var e=null,n=null,r=this._subject,i=this._tripleStack,u=i[i.length-1],l=this._readListItem;switch(t.type){case"IRI":e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var c=this._prefixes[t.prefix];if(void 0===c)return this._error('Undefined prefix "'+t.prefix+':"',t);e=c+t.value;break;case"literal":e=t.value,l=this._readDataTypeOrLang;break;case"[":n="_:b"+h++,e="_:b"+h++,i.push({subject:n,predicate:s,object:e,type:"blank"}),this._subject=e,l=this._readBlankNodeHead;break;case"(":n="_:b"+h++,i.push({subject:n,predicate:s,object:o,type:"list"}),this._subject=null,l=this._readListItem;break;case")":if(i.pop(),0!==i.length&&"list"===i[i.length-1].type&&this._callback(null,{subject:u.subject,predicate:u.predicate,object:u.object,graph:this._graph||""}),this._subject=u.subject,null===u.predicate){if(l=this._readPredicate,u.subject===o)return l}else if(this._predicate=u.predicate,this._object=u.object,l=this._getTripleEndReader(),u.object===o)return l;n=o;break;default:return this._error('Expected list item instead of "'+t.type+'"',t)}return null===n&&(this._subject=n="_:b"+h++),null===r?u.object===o?u.object=n:u.subject=n:this._callback(null,{subject:r,predicate:"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",object:n,graph:this._graph||""}),null!==e&&this._callback(null,{subject:n,predicate:s,object:e,graph:this._graph||""}),l},_readPunctuation:function(t){var e,n=this._subject,r=this._graph;switch(t.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",t);this._graph=null;case".":this._subject=null,e=this._readInTopContext;break;case";":e=this._readPredicate;break;case",":e=this._readObject;break;case"IRI":if(this._supportsQuads&&null===this._graph){r=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t),n=this._subject,e=this._readQuadPunctuation;break}case"prefixed":if(this._supportsQuads&&null===this._graph){var i=this._prefixes[t.prefix];if(void 0===i)return this._error('Undefined prefix "'+t.prefix+':"',t);r=i+t.value,e=this._readQuadPunctuation;break}default:return this._error('Expected punctuation to follow "'+this._object+'"',t)}return null!==n&&this._callback(null,{subject:n,predicate:this._predicate,object:this._object,graph:r||""}),e},_readBlankNodePunctuation:function(t){var e;switch(t.type){case";":e=this._readPredicate;break;case",":e=this._readObject;break;default:return this._error('Expected punctuation to follow "'+this._object+'"',t)}return this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""}),e},_readQuadPunctuation:function(t){return"."!==t.type?this._error("Expected dot to follow quad",t):this._readInTopContext},_readPrefix:function(t){return"prefix"!==t.type?this._error("Expected prefix to follow @prefix",t):(this._prefix=t.value,this._readPrefixIRI)},_readPrefixIRI:function(t){return"IRI"!==t.type?this._error('Expected IRI to follow prefix "'+this._prefix+':"',t):(e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t),this._prefixes[this._prefix]=e,this._prefixCallback(this._prefix,e),this._readDeclarationPunctuation);var e},_readBaseIRI:function(t){if("IRI"!==t.type)return this._error("Expected IRI to follow base declaration",t);try{this._setBase(null===this._base||a.test(t.value)?t.value:this._resolveIRI(t))}catch(e){this._error(e.message,t)}return this._readDeclarationPunctuation},_readNamedGraphLabel:function(t){switch(t.type){case"IRI":case"prefixed":return this._readSubject(t),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",t)}},_readNamedGraphBlankLabel:function(t){return"]"!==t.type?this._error("Invalid graph label",t):(this._subject="_:b"+h++,this._readGraph)},_readDeclarationPunctuation:function(t){return this._sparqlStyle?this._readInTopContext(t):"."!==t.type?this._error("Expected declaration to end with a dot",t):this._readInTopContext},_getTripleEndReader:function(){var t=this._tripleStack;if(0===t.length)return this._readPunctuation;switch(t[t.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem}},_error:function(t,e){this._callback(new Error(t+" at line "+e.line+"."))},_resolveIRI:function(t){var e=t.value;switch(e[0]){case void 0:return this._base;case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return this._removeDotSegments(this._basePath+e)}},_removeDotSegments:function(t){if(!l.test(t))return t;for(var e="",n=t.length,r=-1,i=-1,o=0,s="/";r=i&&(e=e.substr(0,o)),"/"!==s)return e+"/"+t.substr(r+1);o=r+1}}}s=t[++r]}return e+t.substring(o)},parse:function(t,e,n){this._readCallback=this._readInTopContext,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix||"_:b"+c+++"_","function"==typeof t&&(n=e,e=t,t=null),this._callback=e||p,this._prefixCallback=n||p;var r=this;this._lexer.tokenize(t,function(t,e){null!==t?(r._callback(t),r._callback=p):void 0!==r._readCallback&&(r._readCallback=r._readCallback(e))}),t||(this.addChunk=this._lexer.addChunk,this.end=this._lexer.end)}},t.exports=f},function(t,e){var n={isIRI:function(t){if(!t)return t;var e=t[0];return'"'!==e&&"_"!==e},isLiteral:function(t){return t&&'"'===t[0]},isBlank:function(t){return t&&"_:"===t.substr(0,2)},getLiteralValue:function(t){var e=/^"([^]*)"/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]},getLiteralType:function(t){var e=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")},getLiteralLanguage:function(t){var e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]?e[1].toLowerCase():""},isPrefixedName:function(t){return t&&/^[^:\/"']*:[^:\/"']+$/.test(t)},expandPrefixedName:function(t,e){var n,r,i,o=/(?:^|"\^\^)([^:\/#"'\^_]*):[^\/]*$/.exec(t);return o&&(r=e[n=o[1]],i=o.index),void 0===r?t:0===i?r+t.substr(n.length+1):t.substr(0,i+3)+r+t.substr(i+n.length+4)},createIRI:function(t){return t&&'"'===t[0]?n.getLiteralValue(t):t},createLiteral:function(t,e){if(!e)switch(typeof t){case"boolean":e="http://www.w3.org/2001/XMLSchema#boolean";break;case"number":if(isFinite(t)){e=t%1==0?"http://www.w3.org/2001/XMLSchema#integer":"http://www.w3.org/2001/XMLSchema#decimal";break}default:return'"'+t+'"'}return'"'+t+(/^[a-z]+(-[a-z0-9]+)*$/i.test(e)?'"@'+e.toLowerCase():'"^^'+e)}};function r(t,e){for(var r in n)e?t.prototype[r]=i(n[r]):t[r]=n[r];return t}function i(t){return function(e){return t(this,e)}}t.exports=r(r)},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,a,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(n=this._events[t]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),s=(l=n.slice()).length,u=0;u0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){(e=t.exports=n(49)).Stream=e,e.Readable=e,e.Writable=n(34),e.Duplex=n(12),e.Transform=n(55),e.PassThrough=n(76)},function(t,e,n){"use strict";(function(e,r,i){var o=n(21);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(void 0),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;v.WritableState=m;var l=n(17);l.inherits=n(11);var c,h={deprecate:n(75)},f=n(51),p=n(22).Buffer,d=i.Uint8Array||function(){},g=n(53);function y(){}function m(t,e){a=a||n(12);var r=e instanceof a;this.objectMode=!!(t=t||{}).objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,l=t.writableHighWaterMark;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===t.decodeStrings),this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(C,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),C(t,e))}(t,n,r,e,i);else{var s=x(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,s,i):w(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||n(12),!(c.call(v,this)||this instanceof a))return new v(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function b(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),C(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=new Array(e.bufferedRequestCount),i=e.corkedRequestsFree;i.entry=n;for(var o=0,a=!0;n;)r[o]=n,n.isBuf||(a=!1),n=n.next,o+=1;r.allBuffers=a,b(t,e,!0,e.length,r,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk;if(b(t,e,!1,e.objectMode?1:u.length,u,n.encoding,n.callback),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),C(t,e)})}function C(t,e){var n=x(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(v,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===v&&t&&t._writableState instanceof m}})):c=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,s=!1,a=!i.objectMode&&(p.isBuffer(r=t)||r instanceof d);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}(this,i,t,n))&&(i.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,i)),e}(e,r);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,C(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(8),n(16).setImmediate,n(6))},function(t,e){var n=/^"([^]*)"(?:\^\^(.+)|@([\-a-z]+))?$/i,r=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,i=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,o={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function s(t,e){if(!(this instanceof s))return new s(t,e);if(t&&"function"!=typeof t.write&&(e=t,t=null),e=e||{},t)this._outputStream=t,this._endStream=void 0===e.end||!!e.end;else{var n="";this._outputStream={write:function(t,e,r){n+=t,r&&r()},end:function(t){t&&t(null,n)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(e.format)?this._writeTriple=this._writeTripleLine:(this._graph="",this._prefixIRIs=Object.create(null),e.prefixes&&this.addPrefixes(e.prefixes))}function a(t){var e=o[t];return void 0===e&&(1===t.length?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}s.prototype={_write:function(t,e){this._outputStream.write(t,"utf8",e)},_writeTriple:function(t,e,n,r,i){try{this._graph!==r&&(this._write((null===this._subject?"":this._graph?"\n}\n":".\n")+(r?this._encodeIriOrBlankNode(r)+" {\n":"")),this._subject=null,this._graph="["!==r[0]?r:"]"),this._write(this._subject===t?this._predicate===e?", "+this._encodeObject(n):";\n "+this._encodePredicate(this._predicate=e)+" "+this._encodeObject(n):(null===this._subject?"":".\n")+this._encodeSubject(this._subject=t)+" "+this._encodePredicate(this._predicate=e)+" "+this._encodeObject(n),i)}catch(t){i&&i(t)}},_writeTripleLine:function(t,e,n,r,i){delete this._prefixMatch;try{this._write(this._encodeIriOrBlankNode(t)+" "+this._encodeIriOrBlankNode(e)+" "+this._encodeObject(n)+(r?" "+this._encodeIriOrBlankNode(r)+".\n":".\n"),i)}catch(t){i&&i(t)}},_encodeIriOrBlankNode:function(t){var e=t[0];if("["===e||"("===e||"_"===e&&":"===t[1])return t;r.test(t)&&(t=t.replace(i,a));var n=this._prefixRegex.exec(t);return n?n[1]?this._prefixIRIs[n[1]]+n[2]:t:"<"+t+">"},_encodeLiteral:function(t,e,n){return r.test(t)&&(t=t.replace(i,a)),n?'"'+t+'"@'+n:e?'"'+t+'"^^'+this._encodeIriOrBlankNode(e):'"'+t+'"'},_encodeSubject:function(t){if('"'===t[0])throw new Error("A literal as subject is not allowed: "+t);return"["===t[0]&&(this._subject="]"),this._encodeIriOrBlankNode(t)},_encodePredicate:function(t){if('"'===t[0])throw new Error("A literal as predicate is not allowed: "+t);return"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===t?"a":this._encodeIriOrBlankNode(t)},_encodeObject:function(t){if('"'!==t[0])return this._encodeIriOrBlankNode(t);var e=n.exec(t);if(!e)throw new Error("Invalid literal: "+t);return this._encodeLiteral(e[1],e[2],e[3])},_blockedWrite:function(){throw new Error("Cannot write because the writer has been closed.")},addTriple:function(t,e,n,r,i){void 0===n?this._writeTriple(t.subject,t.predicate,t.object,t.graph||"",e):"string"!=typeof r?this._writeTriple(t,e,n,"",r):this._writeTriple(t,e,n,r,i)},addTriples:function(t){for(var e=0;e.\n"))}if(r){var s="",a="";for(var u in n)s+=s?"|"+u:u,a+=(a?"|":"")+n[u];s=s.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&"),this._prefixRegex=new RegExp("^(?:"+a+")[^/]*$|^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$")}this._write(r?"\n":"",e)},blank:function(t,e){var n,r,i=t;switch(void 0===t?i=[]:"string"==typeof t?i=[{predicate:t,object:e}]:"length"in t||(i=[t]),r=i.length){case 0:return"[]";case 1:if("["!==(n=i[0]).object[0])return"[ "+this._encodePredicate(n.predicate)+" "+this._encodeObject(n.object)+" ]";default:for(var o="[",s=0;s0&&s.add(n.resource,E.dc("title"),s.literal(a[0].textContent),n.resource);for(var u=this.dom.getElementsByTagName("link"),l=u.length-1;l>=0;l--)o=!1,(i=u[l].getAttribute("rel"))||(i=u[l].getAttribute("rev"),o=!0),i&&t.linkData(n.original,i,u[l].getAttribute("href"),n.resource,o);for(var c=this.dom.getElementsByTagName("script"),h=0;h]+\?>/))return t.addStatus(n.req,"Has an XML declaration. We'll assume it's XHTML as the content-type was text/html.\n"),new O(this.response).parse(t,e,n,r);if(e.match(/.*/))return t.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new O(this.response).parse(t,e,n,r);if(e.match(/[^(/))return t.addStatus(n.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new O(this.response).parse(t,e,n,r);var o=new RegExp("([\\s\\S]+?)","im").exec(e);return o&&i.add(n.resource,E.dc("title"),i.literal(o[1]),n.resource),i.add(n.resource,E.rdf("type"),E.link("WebPage"),t.appNode),t.addStatus(n.req,"non-XML HTML document, not parsed for data."),t.doneFetch(n,this.response)}}],[{key:"toString",value:function(){return"HTMLHandler"}},{key:"register",value:function(t){t.mediatypes["text/html"]={q:.9}}}]),e}();P.pattern=new RegExp("text/html");var A=function(t){function e(){return l(this,e),s(this,a(e).apply(this,arguments))}return u(e,k),o(e,[{key:"parse",value:function(t,e,n,r){return e.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)?(t.addStatus(n.req,"Warning: "+n.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new I(this.response).parse(t,e,n,r)):e.slice(0,500).match(/xmlns:/)?(t.addStatus(n.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new I(this.response).parse(t,e,n,r)):(t.addStatus(n.req,"Plain text document, no known RDF semantics."),t.doneFetch(n,this.response))}}],[{key:"toString",value:function(){return"TextHandler"}},{key:"register",value:function(t){t.mediatypes["text/plain"]={q:.5}}}]),e}();A.pattern=new RegExp("text/plain");var R=function(t){function e(){return l(this,e),s(this,a(e).apply(this,arguments))}return u(e,k),o(e,[{key:"parse",value:function(t,e,n,r){var i=t.store,o=f(i,i,n.original.uri,n.original.uri,null,null,"",null);try{o.loadBuf(e)}catch(e){return t.failFetch(n,"Error trying to parse "+n.resource+" as Notation3:\n"+e,"parse_error",r)}return t.addStatus(n.req,"N3 parsed: "+o.statementCount+" triples in "+o.lines+" lines."),t.store.add(n.original,E.rdf("type"),E.link("RDFDocument"),t.appNode),t.doneFetch(n,this.response)}}],[{key:"toString",value:function(){return"N3Handler"}},{key:"register",value:function(t){t.mediatypes["text/n3"]={q:"1.0"},t.mediatypes["text/turtle"]={q:1}}}]),e}();R.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");var N={RDFXMLHandler:T,XHTMLHandler:O,XMLHandler:I,HTMLHandler:P,TextHandler:A,N3Handler:R},j=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(l(this,t),this.store=e||new c,this.timeout=r.timeout||3e4,this._fetch=r.fetch||x,!this._fetch)throw new Error("No _fetch function availble for Fetcher");this.appNode=this.store.bnode(),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},b.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(N).map(function(t){return n.addHandler(N[t])})}return o(t,[{key:"load",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t instanceof Array)return Promise.all(t.map(function(t){return e.load(t,Object.assign({},n))}));var r=t.uri||t;return r=r.split("#")[0],n=this.initFetchOptions(r,n),this.pendingFetchPromise(r,n.baseURI,n)}},{key:"pendingFetchPromise",value:function(t,e,n){var r,i=this;return!n.force&&this.fetchQueue[e]?r=this.fetchQueue[e]:(r=Promise.race([this.setRequestTimeout(t,n),this.fetchUri(t,n)]),this.fetchQueue[e]=r,this.cleanupFetchRequest(e,n,this.timeout)),r.then(function(e){return t in i.timeouts&&(i.timeouts[t].forEach(clearTimeout),delete i.timeouts[t]),e})}},{key:"cleanupFetchRequest",value:function(t,e,n){var r=this;this.timeouts[t]=(this.timeouts[t]||[]).concat(setTimeout(function(){r.isPending(t)||delete r.fetchQueue[t]},n))}},{key:"initFetchOptions",value:function(e,n){var r=this.store;!n.method||"GET"===n.method.toUpperCase()||(n.force=!0),n.resource=r.sym(e),n.baseURI=n.baseURI||e,n.original=r.sym(n.baseURI),n.req=r.bnode(),n.headers=n.headers||{},n.contentType&&(n.headers["content-type"]=n.contentType),n.force&&(n.cache="no-cache");var i=this.acceptString();n.headers.accept=i;var o=t.offlineOverride(e);n.requestedURI=o,t.withCredentials(o,n)&&(n.credentials="include");var s=t.proxyIfNecessary(o);return o!==s&&(n.proxyUsed=!0),n.actualProxyURI=s,n}},{key:"fetchUri",value:function(e,n){var r=this;if(!e)return Promise.reject(new Error("Cannot fetch an empty uri"));if(t.unsupportedProtocol(e))return this.failFetch(n,"fetcher: Unsupported protocol","unsupported_protocol");var i=this.getState(e);if(n.force)delete this.nonexistent[e];else{if("fetched"===i)return Promise.resolve(this.doneFetch(n,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===i&&404===this.requested[e]){var o="Previously failed: "+this.requested[e];return this.failFetch(n,o,this.requested[e],{url:e,status:this.requested[e],statusText:o,responseText:o,headers:{},ok:!1,body:null,bodyUsed:!1,size:0,timeout:0})}}this.fireCallbacks("request",[e]),this.requested[e]=!0,n.noMeta||this.saveRequestMetadata(e,n);var s=n.actualProxyURI;return this._fetch(s,n).then(function(t){return r.handleResponse(t,e,n)},function(t){var e={url:s,status:999,statusText:(t.name||"network failure")+": "+(t.errno||t.code||t.type),responseText:t.message,headers:{},ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return console.log("Fetcher: <"+s+"> Non-HTTP fetch error: "+t),r.failFetch(n,"fetch failed: "+t,999,e)})}},{key:"nowOrWhenFetched",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=t.uri||t,"function"==typeof e?n=e:void 0===e||(e instanceof p?r.referringTerm=e:r=e),this.load(t,r).then(function(e){if(n)if(e)if(e.ok)n(!0,"OK",e);else{console.log("@@@ fetcher.js Should not take this path !!!!!!!!!!!!");var r="HTTP error: Status "+e.status+" ("+e.statusText+")";e.responseText&&(r+=" "+e.responseText),console.log(r+" fetching "+t),n(!1,r,e)}else{var i="@@ nowOrWhenFetched: no response object!";console.log(i),n(!1,i)}},function(e){var r=e.message||e.statusText;r="Failed to load <"+t+"> "+r,console.log(r),e.response&&e.response.status&&(r+=" status: "+e.response.status),n(!1,r,e.response)})}},{key:"addStatus",value:function(t,e){var n=new Date;e="["+n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()+"] "+e;var r=this.store,i=r.the(t,E.link("status"));i&&i.append?i.append(r.literal(e)):h.warn("web.js: No list to add to: "+i+","+e)}},{key:"failFetch",value:function(t,e,n,r){this.addStatus(t.req,e),t.noMeta||this.store.add(t.original,E.link("error"),e);var i=(t.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(t.resource.sameTerm(t.original)?console.log("@@ Recording "+i+" failure for "+t.original+": "+n):console.log("@@ Recording failure "+i+" original "+t.original+"( as "+t.resource+") : "+n),this.requested[v.docpart(t.original.uri)]=n,this.fireCallbacks("fail",[t.original.uri,e]));var o=new Error("Fetcher: "+e);return o.status=n,o.statusText=e,o.response=r,Promise.reject(o)}},{key:"linkData",value:function(t,e,n,r,i){if(n){var o,s=this.store,a=s.sym(v.join(n,t.uri));if("alternate"===e||"seeAlso"===e||"meta"===e||"describedby"===e){if(a.uri===t.uri)return;o=E.rdfs("seeAlso")}else o=s.sym("type"===e?"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":v.join(encodeURIComponent(e),"http://www.iana.org/assignments/link-relations/"));i?s.add(a,o,t,r):s.add(t,o,a,r)}}},{key:"parseLinkHeader",value:function(t,e,n){if(t)for(var r=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=t.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"\/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g),o=0;o"),a=s[0].substring(1),u=s[1].match(r),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=new p(t=t.uri||t).doc();return e.contentType=e.contentType||"text/turtle",e.data=w(n,this.store,n.uri,e.contentType),this.webOperation("PUT",t,e)}},{key:"webCopy",value:function(t,e,n){var r=this;return this.webOperation("GET",t).then(function(t){return r.webOperation("PUT",e,{data:t.responseText,contentType:n})})}},{key:"delete",value:function(t,e){var n=this;return this.webOperation("DELETE",t,e).then(function(e){return n.requested[t]=404,n.nonexistent[t]=!0,n.unload(n.store.sym(t)),e})}},{key:"createContainer",value:function(t,e,n){var r={"content-type":"text/turtle",link:E.ldp("BasicContainer")+'; rel="type"'};e&&(r.slug=e);var i={headers:r};return n&&(i.body=n),this.webOperation("POST",t,i)}},{key:"webOperation",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=n.uri||n,r.method=e,r.body=r.data||r.body,r.force=!0;var i=this;if(r.body&&!r.contentType)throw new Error("Web operation sending data must have a defined contentType.");return r.contentType&&(r.headers=r.headers||{},r.headers["content-type"]=r.contentType),t.withCredentials(n,r)&&(r.credentials="include"),new Promise(function(t,o){i._fetch(n,r).then(function(r){if(r.ok)r.body?r.text().then(function(e){r.responseText=e,t(r)}):t(r);else{var i="Web error: "+r.status;r.statusText&&(i+=" ("+r.statusText+")"),i+=" on "+e+" of <"+n+">",r.responseText&&(i+=": "+r.responseText);var s=new Error(i);s.response=r,o(s)}},function(t){o(new Error("Fetch error for "+e+" of <"+n+">:"+t))})})}},{key:"lookUpThing",value:function(t,e){var n=this,r=this.store.uris(t);return(r=r.map(function(t){return v.docpart(t)})).forEach(function(t){n.lookedUp[t]=!0}),this.load(r,{referringTerm:e})}},{key:"getHeader",value:function(t,e){for(var n=this.store,r=n.each(void 0,E.link("requestedURI"),t.uri),i=0;i=400)return 404===t.status&&(this.nonexistent[n.original.uri]=!0,this.nonexistent[e]=!0),this.saveErrorResponse(t,a).then(function(){return r.failFetch(n,n.resource+" "+t.statusText,t.status,t)});var c=null,h=null;if(l&&(h=v.join(l,e))!==e&&(c=h),200===t.status){this.addType(E.link("Document"),s,i,e),c&&this.addType(E.link("Document"),s,i,c),n.clearPreviousData&&i.removeDocument(n.resource);var f=u.includes("image/")||u.includes("application/pdf");u&&f&&(this.addType(i.sym("http://purl.org/dc/terms/Image"),s,i,e),c&&this.addType(i.sym("http://purl.org/dc/terms/Image"),s,i,c))}if(l){if(!n.force&&c&&"done"===this.requested[h])return this.doneFetch(n,t);this.requested[h]=!0}this.parseLinkHeader(o.get("link"),n.original,s);var p=this.handlerForContentType(u,t);return p?t.text().then(function(e){return t.responseText=e,p.parse(r,e,n,t)}):(this.addStatus(s,"Fetch over. No data handled."),this.doneFetch(n,t))}},{key:"saveErrorResponse",value:function(t,e){var n=this.store;return t.text().then(function(t){t.length>10&&n.add(e,E.http("content"),n.literal(t),e)})}},{key:"handlerForContentType",value:function(t,e){if(!t)return null;var n=this.handlers.find(function(e){return t.match(e.pattern)});return n?new n(e):null}},{key:"guessContentType",value:function(t){return C[t.split(".").pop()]}},{key:"normalizedContentType",value:function(t,e){if(t.forceContentType)return t.forceContentType;var n=e.get("content-type");if(!n||n.includes("application/octet-stream")){var r=this.guessContentType(t.resource.uri);if(r)return r}var i=v.protocol(t.resource.uri);return!n&&["file","chrome"].includes(i)?"text/xml":n}},{key:"redirectToProxy",value:function(t,e){var n=this;this.addStatus(e.req,"BLOCKED -> Cross-site Proxy to <"+t+">"),e.proxyUsed=!0;var r=this.store,i=e.req;e.noMeta||(r.add(i,E.link("redirectedTo"),r.sym(t),i),this.addStatus(i,"redirected to new request")),this.requested[e.resource.uri]="redirected",this.redirectedTo[e.resource.uri]=t;var o=Object.assign({},e);return o.baseURI=e.resource.uri,this.fetchUri(t,o).then(function(t){return o.noMeta||r.add(i,E.link("redirectedRequest"),o.req,n.appNode),t})}},{key:"setRequestTimeout",value:function(t,e){var n=this;return new Promise(function(r){n.timeouts[t]=(n.timeouts[t]||[]).concat(setTimeout(function(){!n.isPending(t)||e.retriedWithNoCredentials||e.proxyUsed||r(n.failFetch(e,"Request to ".concat(t," timed out"),"timeout"))},n.timeout))})}},{key:"addFetchCallback",value:function(t,e){this.fetchCallbacks[t]?this.fetchCallbacks[t].push(e):this.fetchCallbacks[t]=[e]}},{key:"acceptString",value:function(){var t="";for(var e in this.mediatypes)for(var n in""!==t&&(t+=", "),t+=e,this.mediatypes[e])t+=";"+n+"="+this.mediatypes[e][n];return t}}],[{key:"crossSiteProxy",value:function(e){return t.crossSiteProxyTemplate?t.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):void 0}},{key:"offlineOverride",value:function(t){var e,n=t;return"undefined"!=typeof window&&window.panes&&(e=window.panes.UI)&&e.preferences&&e.preferences.get("offlineModeUsingLocalhost")&&"http://"===n.slice(0,7)&&"localhost/"!==n.slice(7,17)&&(n="http://localhost/"+n.slice(7),h.warn("Localhost kludge for offline use: actually getting <"+n+">")),n}},{key:"proxyIfNecessary",value:function(e){var n;if("undefined"!=typeof window&&window.panes&&(n=window.panes.UI)&&n.isExtension)return e;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){var r=function t(e,n){var r=n[e.shift()];return r?"string"==typeof r?r+e.join("/"):e?t(e,r):null:null}(e.split("/").slice(2),$SolidTestEnvironment.localSiteMap);if(r)return r}return t.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===e.slice(0,5)?t.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):e}},{key:"unsupportedProtocol",value:function(t){var e=v.protocol(t);return"tel"===e||"mailto"===e||"urn"===e}},{key:"withCredentials",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.startsWith("https:");return void 0!==e.withCredentials&&(n=e.withCredentials),n}}]),t}();t.exports=j,t.exports.HANDLERS=N,t.exports.CONTENT_TYPE_BY_EXT=C},function(t,e,n){"use strict";t.exports=function(t,e,n,o,s,a){n=n||t.uri,a=a||{},o=o||"text/turtle";try{var u=i(e);a.flags&&u.setFlags(a.flags);var l,c=e.statementsMatching(void 0,void 0,void 0,t);switch(u.suggestNamespaces(e.namespaces),u.setBase(n),o){case"application/rdf+xml":return h(null,u.statementsToXML(c));case"text/n3":case"application/n3":return h(null,u.statementsToN3(c));case"text/turtle":case"application/x-turtle":return u.setFlags("si"),h(null,u.statementsToN3(c));case"application/n-triples":return u.setFlags("deinprstux"),h(null,u.statementsToNTriples(c));case"application/ld+json":u.setFlags("deinprstux"),l=u.statementsToNTriples(c),r.convertToJson(l,s);break;case"application/n-quads":case"application/nquads":return u.setFlags("deinprstux q"),h(null,u.statementsToNTriples(c));default:throw new Error("Serialize: Content-type "+o+" not supported for data write.")}}catch(t){if(s)return s(t);throw t}function h(t,e){return s?void s(t,e):e}};var r=n(42),i=n(38)},function(t,e,n){"use strict";var r=n(2),i=n(9),o=n(4),s=n(7),a=n(41),u=function(){var t=function(t){this.flags="",this.base=null,this.prefixes=[],this.namespaces=[],this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqustuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=t};return t.prototype.setBase=function(t){return this.base=t,this},t.prototype.setFlags=function(t){return this.flags=t||"",this},t.prototype.toStr=function(t){var e=t.toNT();return"Graph"===t.termType&&(this.formulas[e]=t),e},t.prototype.fromStr=function(t){if("{"===t[0]){var e=this.formulas[t];return e||console.log("No formula object for "+t),e}return this.store.fromNT(t)},t.prototype.suggestPrefix=function(t,e){"default"!==t.slice(0,7)&&"ns"!==t.slice(0,2)&&t&&e&&(t in this.namespaces||e in this.prefixes||(this.prefixes[e]=t,this.namespaces[t]=e))},t.prototype.suggestNamespaces=function(t){for(var e in t)return this.suggestPrefix(e,t[e]),this},t.prototype.checkIntegrity=function(){var t,e;for(t in this.namespaces)if(this.prefixes[this.namespaces[t]]!==t)throw new Error("Serializer integity error 1: "+t+", "+this.namespaces[t]+", "+this.prefixes[this.namespaces[t]]+"!");for(e in this.prefixes)if(this.namespaces[this.prefixes[e]]!==e)throw new Error("Serializer integity error 2: "+e+", "+this.prefixs[e]+", "+this.namespaces[this.prefixes[e]]+"!")},t.prototype.makeUpPrefix=function(e){var n=e,r=(function(n){return!!t.prototype.validPrefix.test(n)&&"ns"!==n&&!(n in this.namespaces)&&(this.prefixes[e]=n,this.namespaces[n]=e,n)}).bind(this);"#/".indexOf(n[n.length-1])>=0&&(n=n.slice(0,-1));var i=n.lastIndexOf("/");i>=0&&(n=n.slice(i+1));for(var o=0;o?@[\\]^`{|}~")+":",t.prototype.explicitURI=function(t){return"<"+(t=this.flags.indexOf("r")<0&&this.base?o.refTo(this.base,t):this.flags.indexOf("u")>=0?function(t){for(var e,n="",r=0;r65535?"\\U"+("00000000"+e.toString(16)).slice(-8):e>126?"\\u"+("0000"+e.toString(16)).slice(-4):t[r];return n}(t):encodeURI(t))+">"},t.prototype.statementsToNTriples=function(t){var e=t.slice();e.sort();for(var n="",r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o=this,s=this.store,a=function t(e){if("Collection"!==e.termType)return o.atomicTermToN3(e);for(var a=e.elements,u=s.sym(r+"nill"),l=a.length-1;l>=0;l--){var c=new i;n+=t(c)+" "+t(s.sym(r+"first"))+" "+t(a[l])+".\n",n+=t(c)+" "+t(s.sym(r+"rest"))+" "+t(u)+".\n",u=c}return o.atomicTermToN3(u)},u=0;u=0&&(c+=a(l.why)+" "),n+=c+=".\n"}return n},t.prototype.statementsToN3=function(e){var n=this.store,r={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};e.sort(function(t,e){return s.heavyCompareSPO(t,e,n,r)}),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var i={};this.flags.indexOf("s")<0&&(i["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(i["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(i["http://www.w3.org/2000/10/swap/log#implies"]="=>");var o=function(t){for(var e="",n=0;n=0){r=r.slice(0,-1)+u+"\n",i+=1;continue}if(i<4*n+4||i+u.length+1<80&&";.".indexOf(r[r.length-2])<0)r=r.slice(0,-1)+" "+u+"\n",i+=u.length+1;else{var h=o(4*n)+u;r+=h+"\n",i=h.length,n<0&&(r+="\n",i=1e5)}}}return r}(d)},t.prototype.atomicTermToN3=function(t,e){switch(t.termType){case"BlankNode":case"Variable":return t.toNT();case"Literal":var n=t.value;if("string"!=typeof n)throw new TypeError("Value of RDF literal node must be a string");if(t.datatype&&this.flags.indexOf("x")<0)switch(t.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return n;case"http://www.w3.org/2001/XMLSchema#decimal":return n.indexOf(".")<0&&(n+=".0"),n;case"http://www.w3.org/2001/XMLSchema#double":return n.indexOf(".")<0&&(n+=".0"),n.indexOf("e")<0&&(n+="e0"),n;case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===t.value?"true":"false"}var r=this.stringToN3(t.value);return t.language?r+="@"+t.language:t.datatype.equals(a.string)||(r+="^^"+this.atomicTermToN3(t.datatype,e)),r;case"NamedNode":return this.symbolToN3(t);default:throw new Error("Internal: atomicTermToN3 cannot handle "+t+" of termType: "+t.termType)}},t.prototype.validPrefix=new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/),t.prototype.forbidden1=new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm),t.prototype.forbidden3=new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm),t.prototype.stringToN3=function(e,n){n||(n="e");var r,i,o,s,a,u="";for(e.length>20&&'"'!==e.slice(-1)&&n.indexOf("n")<0&&(e.indexOf("\n")>0||e.indexOf('"')>0)?(s='"""',a=t.prototype.forbidden3):(s='"',a=t.prototype.forbidden1),r=0;r=0?u+="\\"+'bfrtvn\\"'[o]:n.indexOf("e")>=0?u+="\\u"+("000"+l.charCodeAt(0).toString(16).toLowerCase()).slice(-4):u+=l,r=i+1}return s+u+e.slice(r)+s},t.prototype.symbolToN3=function(e){var n=e.uri,r=n.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=n.lastIndexOf("/")),r>=0&&this.flags.indexOf("p")<0&&(0===n.indexOf("http")||0===n.indexOf("ws")||0===n.indexOf("file"))){for(var i=!0,o=r+1;o=0){i=!1;break}if(i){var s=n.slice(r+1),a=n.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(s)<0?s:":"+s;var u=this.prefixes[a];if(u||(u=this.makeUpPrefix(a)),u)return this.namespacesUsed[a]=!0,u+":"+s}}return this.explicitURI(n)},t.prototype.writeStore=function(t){var e=this.store,n=e.fetcher,r=n&&n.appNode,i=this.store.index[3];for(var o in i){var s=e.fromNT(o);r&&s.sameTerm(r)||t("\n"+this.atomicTermToN3(s)+" "+this.atomicTermToN3(e.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(e.statementsMatching(void 0,void 0,void 0,s))+" }.\n")}e.statementsMatching(void 0,e.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(n){t("\n<"+n.object.value+"> log:metadata {\n");var r=e.statementsMatching(void 0,void 0,void 0,n.subject);t(this.statementsToN3(this.statementsToN3(r))),t("}.\n")});var a=[];r&&a.push(r);var u=[];a.map(function(t){u=u.concat(e.statementsMatching(void 0,void 0,void 0,t))}),t(this.statementsToN3(u))},t.prototype.statementsToXML=function(e){var n=[];n["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var i="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",o=function(t){for(var e="",n=0;n',f(s.object,e),""]:["<"+o+' rdf:nodeID="'+s.object.toNT().slice(2)+'"/>']);break;case"NamedNode":l=l.concat(["<"+o+' rdf:resource="'+h(s.object)+'"/>']);break;case"Literal":l=l.concat(["<"+o+(s.object.datatype.equals(a.string)?"":' rdf:datatype="'+c(s.object.datatype.uri)+'"')+(s.object.language?' xml:lang="'+s.object.language+'"':"")+">"+c(s.object.value)+""]);break;case"Collection":l=l.concat(["<"+o+' rdf:parseType="Collection">',p(s.object,e),""]);break;default:throw new Error("Can't serialize object of type "+s.object.termType+" into XML")}}else n=s.object;var b=n?g(n):"rdf:Description",w="";return"BlankNode"===t.termType?e.incoming[t]&&1===e.incoming[t].length||(w=' rdf:nodeID="'+t.toNT().slice(2)+'"'):w=' rdf:about="'+h(t)+'"',["<"+b+w+">"].concat([l]).concat([""])}).bind(this);function p(t,e){for(var n=[],r=0;r',""]):n.concat(["<"+g(o.predicate)+' rdf:parseType="Resource">',d(o.object,e),""]);break;case"NamedNode":n=n.concat(["<"+g(o.predicate)+' rdf:resource="'+h(o.object)+'"/>']);break;case"Literal":n=n.concat(["<"+g(o.predicate)+(o.object.datatype.equals(a.string)?"":' rdf:datatype="'+c(o.object.datatype.value)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+c(o.object.value)+""]);break;case"Collection":n=n.concat(["<"+g(o.predicate)+' rdf:parseType="Collection">',p(o.object,e),""]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}return n}).bind(this),g=(function(e){var r=e.uri,i=r.indexOf("#");if(i<0&&this.flags.indexOf("/")<0&&(i=r.lastIndexOf("/")),i<0)throw new Error("Cannot make qname out of <"+r+">");for(var o=i+1;o=0)throw new Error('Invalid character "'+r[o]+'" cannot be in XML qname for URI: '+r);var s=r.slice(i+1),a=r.slice(0,i+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return s;var u=this.prefixes[a];return u||(u=this.makeUpPrefix(a)),n[a]=!0,u+":"+s}).bind(this),y=l(e),m=""],-1)},function(e){return new t(e)}}();t.exports=u},function(t,e,n){"use strict";function r(t,e){for(var n=0;n=0){var s=e.substring(0,o);if(""===s)return(i=n[""])?i+e.substring(o+1):null;if("_"===s)return"_:"+e.substring(o+1);if(t.NCNAME.test(s)&&(i=n[s]))return i+e.substring(o+1)}return null}},{key:"parseCURIEOrURI",value:function(t,e,n){return this.parseCURIE(t,e,n)||this.resolveAndNormalize(n,t)}},{key:"parsePredicate",value:function(t,e,n,r,i,o){if(""===t)return null;var s=this.parseTermOrCURIEOrAbsURI(t,e,o?null:n,r,i);return s&&0===s.indexOf("_:")?null:s}},{key:"parsePrefixMappings",value:function(t,e){for(var n=this.tokenize(t),r=null,i=0;i=0&&(t=t.substring(0,e)),n&&n.baseURIMap&&(t=n.baseURIMap(t)),t};for(i.push({current:e,context:this.push(null,o(e.baseURI))});i.length>0;){var s=i.shift();if(s.parent){if(s.context.parent&&s.context.parent.listMapping===s.listMapping)continue;for(var a in s.listMapping){var l=s.listMapping[a];if(0!==l.length){for(var h=[],f=0;f0?this.addTriple(d,r.spec,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:t.objectURI,value:k=O}):k=this.vocabulary}for(var I=0;I0?M:null}var L,U,F=d.getAttributeNode("rel"),V=d.getAttributeNode("rev"),B=d.getAttributeNode("typeof"),z=d.getAttributeNode("property"),H=d.getAttributeNode("datatype"),q=this.inHTMLMode?d.getAttributeNode("datetime"):null,W=d.getAttributeNode("content"),G=d.getAttributeNode("about"),$=d.getAttributeNode("src"),J=d.getAttributeNode("resource"),K=d.getAttributeNode("href"),Y=d.getAttributeNode("inlist"),Q=[];if(F){U=this.tokenize(F.value);for(var X=0;X=0?e+=t.nodeName.split(":")[1]:e+=t.nodeName),e}).bind(this),u=!0;t.parent;){var l=t.element,c=l.attributes;if(l.nodeType===i||l.nodeType===o)t.parent.nodeType===t.NODE&&(t.addArc(e+"value"),t=this.buildFrame(t)),t.addLiteral(l.nodeValue);else if(a(l)!==e+"RDF")if(t.parent&&t.parent.collection&&(t.addCollectionArc(),(t=this.buildFrame(t,t.element)).parent.element=null),t.parent&&t.parent.nodeType&&t.parent.nodeType!==t.ARC){t.addArc(a(l)),this.reify&&(s=this.getAttributeNodeNS(l,e,"ID"))&&(t.rdfid=s.nodeValue,l.removeAttributeNode(s));var h=this.getAttributeNodeNS(l,e,"parseType"),f=this.getAttributeNodeNS(l,e,"datatype");if(f&&(t.datatype=f.nodeValue,l.removeAttributeNode(f)),h){var p=h.nodeValue;"Literal"===p?(t.datatype=e+"XMLLiteral",(t=this.buildFrame(t)).addLiteral(l.childNodes),u=!1):"Resource"===p?((t=this.buildFrame(t,t.element)).parent.element=null,t.addBNode()):"Collection"===p&&((t=this.buildFrame(t,t.element)).parent.element=null,t.addCollection()),l.removeAttributeNode(h)}if(0!==c.length){var d=this.getAttributeNodeNS(l,e,"resource"),g=this.getAttributeNodeNS(l,e,"nodeID");t=this.buildFrame(t),d?(t.addNode(d.nodeValue),l.removeAttributeNode(d)):g?(t.addBNode(g.nodeValue),l.removeAttributeNode(g)):t.addBNode();for(var y=c.length-1;y>=0;y--){var m=this.buildFrame(t);m.addArc(a(c[y])),a(c[y])===e+"type"?this.buildFrame(m).addNode(c[y].nodeValue):this.buildFrame(m).addLiteral(c[y].nodeValue)}}else 0===l.childNodes.length&&this.buildFrame(t).addLiteral("")}else{var v=this.getAttributeNodeNS(l,e,"about");if(s=this.getAttributeNodeNS(l,e,"ID"),v&&s)throw new Error("RDFParser: "+l.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!v&&s)t.addNode("#"+s.nodeValue),l.removeAttributeNode(s);else if(null==v&&null==s){var b=this.getAttributeNodeNS(l,e,"nodeID");b?(t.addBNode(b.nodeValue),l.removeAttributeNode(b)):t.addBNode()}else t.addNode(v.nodeValue),l.removeAttributeNode(v);var w=this.getAttributeNodeNS(l,e,"type");e+"Description"!==a(l)&&(w={nodeValue:a(l)}),null!=w&&(this.store.add(t.node,this.store.sym(e+"type"),this.store.sym(r.join(w.nodeValue,t.base)),this.why),w.nodeName&&l.removeAttributeNode(w));for(var _=c.length-1;_>=0;_--)this.store.add(t.node,this.store.sym(a(c[_])),this.store.literal(c[_].nodeValue,t.lang),this.why)}for(l=t.element;t.parent;){for(var x=t;null==l;)l=(t=t.parent).element;var S=l.childNodes&&l.childNodes[t.lastChild];if(S&&u){if((S.nodeType===n||S.nodeType===i||S.nodeType===o)&&(S.nodeType!==i&&S.nodeType!==o||1===l.childNodes.length)){t.lastChild++,t=this.buildFrame(x,l.childNodes[t.lastChild-1]);break}t.lastChild++}else{if(t.terminateFrame(),!(t=t.parent))break;l=t.element,u=!0}}}},this.cleanParser=function(){this.bnodes={},this.why=null},this.buildFrame=function(t,e){var n=this.frameFactory(this,t,e);if(t&&(n.base=t.base,n.lang=t.lang),!e||e.nodeType===i||e.nodeType===o)return n;var s=e.attributes,a=e.getAttributeNode("xml:base");null!=a&&(n.base=a.nodeValue,e.removeAttribute("xml:base"));var u=e.getAttributeNode("xml:lang");null!=u&&(n.lang=u.nodeValue,e.removeAttribute("xml:lang"));for(var l=s.length-1;l>=0;l--)if("xml"===s[l].nodeName.substr(0,3)){if("xmlns:"===s[l].name.slice(0,6)){var c=s[l].nodeValue;this.base&&(c=r.join(c,this.base)),this.store.setPrefixForURI(s[l].name.slice(6),c)}e.removeAttributeNode(s[l])}return n}}},function(t,e,n){"use strict";var r=n(2),i=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};i.boolean=new r("http://www.w3.org/2001/XMLSchema#boolean"),i.dateTime=new r("http://www.w3.org/2001/XMLSchema#dateTime"),i.decimal=new r("http://www.w3.org/2001/XMLSchema#decimal"),i.double=new r("http://www.w3.org/2001/XMLSchema#double"),i.integer=new r("http://www.w3.org/2001/XMLSchema#integer"),i.langString=new r("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.string=new r("http://www.w3.org/2001/XMLSchema#string"),t.exports=i},function(t,e,n){"use strict";t.exports.convertToJson=function(t,e){var n,s=o.Parser(),a=o.Writer({format:"N-Quads"});r.waterfall([function(e){s.parse(t,e)},function(t,e,n){null!==t&&a.addTriple(t),"function"==typeof n&&a.end(n)},function(t,e){try{i.fromRDF(t,{format:"application/nquads"},e)}catch(t){e(t)}},function(t,r){n=JSON.stringify(t),e(null,n)}],function(t,r){e(t,n)})},t.exports.convertToNQuads=function(t,e){var n,i=o.Parser(),s=o.Writer({format:"N-Quads"});r.waterfall([function(e){i.parse(t,e)},function(t,e,n){null!==t&&s.addTriple(t),"function"==typeof n&&s.end(n)},function(t,r){e(null,n=t)}],function(t,r){e(t,n)})};var r=n(65),i=n(43),o=n(45)},function(t,e,n){(function(r,i,o,s){var a;!function(){var u=void 0!==r&&r.versions&&r.versions.node,l=!u&&("undefined"!=typeof window||"undefined"!=typeof self);l&&void 0===i&&("undefined"!=typeof window?i=window:"undefined"!=typeof self?i=self:"undefined"!=typeof $&&(i=$));var c=function(t){function e(){}t.compact=function(e,n,r,i){return arguments.length<2?t.nextTick(function(){i(new TypeError("Could not compact, too few arguments."))}):("function"==typeof r&&(i=r,r={}),r=r||{},null===n?t.nextTick(function(){i(new T("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"}))}):null===e?t.nextTick(function(){i(null,null)}):("base"in r||(r.base="string"==typeof e?e:""),"compactArrays"in r||(r.compactArrays=!0),"graph"in r||(r.graph=!1),"skipExpansion"in r||(r.skipExpansion=!1),"documentLoader"in r||(r.documentLoader=t.loadDocument),"link"in r||(r.link=!1),r.link&&(r.skipExpansion=!0),void function(e,n,r){if(n.skipExpansion)return t.nextTick(function(){r(null,e)});t.expand(e,n,r)}(e,r,function(e,o){if(e)return i(new T("Could not expand input before compaction.","jsonld.CompactError",{cause:e}));var s=Q(r);t.processContext(s,n,r,function(t,e){if(t)return i(new T("Could not process context before compaction.","jsonld.CompactError",{cause:t}));var s;try{s=(new O).compact(e,null,o,r)}catch(t){return i(t)}!function(t,e,r,o){o.compactArrays&&!o.graph&&tt(e)?1===e.length?e=e[0]:0===e.length&&(e={}):o.graph&&Z(e)&&(e=[e]),Z(n)&&"@context"in n&&(n=n["@context"]),tt(n=ft(n))||(n=[n]);var s=n;n=[];for(var a=0;a0)&&n.push(s[a]);var u=n.length>0;if(1===n.length&&(n=n[0]),tt(e)){var l=J(r,"@graph"),c=e;e={},u&&(e["@context"]=n),e[l]=c}else if(Z(e)&&u)for(var h in c=e,e={"@context":n},c)e[h]=c[h];i(null,e,r)}(0,s,e,r)})})))},t.expand=function(e,n,r){if(arguments.length<1)return t.nextTick(function(){r(new TypeError("Could not expand, too few arguments."))});function i(t){"base"in n||(n.base=t.documentUrl||"");var e={document:ft(t.document),remoteContext:{"@context":t.contextUrl}};if("expandContext"in n){var i=ft(n.expandContext);e.expandContext="object"==typeof i&&"@context"in i?i:{"@context":i}}dt(e,n,function(t,e){if(t)return r(t);var i;try{var o=new O,s=Q(n),a=e.document,u=e.remoteContext["@context"];e.expandContext&&(s=o.processContext(s,e.expandContext["@context"],n)),u&&(s=o.processContext(s,u,n)),Z(i=o.expand(s,null,a,n,!1))&&"@graph"in i&&1===Object.keys(i).length?i=i["@graph"]:null===i&&(i=[]),tt(i)||(i=[i])}catch(t){return r(t)}r(null,i)})}"function"==typeof n&&(r=n,n={}),"documentLoader"in(n=n||{})||(n.documentLoader=t.loadDocument),"keepFreeFloatingNodes"in n||(n.keepFreeFloatingNodes=!1),t.nextTick(function(){if("string"!=typeof e)i({contextUrl:null,documentUrl:null,document:e});else{var t=function(t,e){if(t)return r(t);try{if(!e.document)throw new T("No remote document found at the given URL.","jsonld.NullRemoteDocument");"string"==typeof e.document&&(e.document=JSON.parse(e.document))}catch(t){return r(new T("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",cause:t,remoteDoc:e}))}i(e)},o=n.documentLoader(e,t);o&&"then"in o&&o.then(t.bind(null,null),t)}})},t.flatten=function(e,n,r,i){if(arguments.length<1)return t.nextTick(function(){i(new TypeError("Could not flatten, too few arguments."))});"function"==typeof r?(i=r,r={}):"function"==typeof n&&(i=n,n=null,r={}),"base"in(r=r||{})||(r.base="string"==typeof e?e:""),"documentLoader"in r||(r.documentLoader=t.loadDocument),t.expand(e,r,function(e,o){if(e)return i(new T("Could not expand input before flattening.","jsonld.FlattenError",{cause:e}));var s;try{s=(new O).flatten(o)}catch(t){return i(t)}if(null===n)return i(null,s);r.graph=!0,r.skipExpansion=!0,t.compact(s,n,r,function(t,e){if(t)return i(new T("Could not compact flattened output.","jsonld.FlattenError",{cause:t}));i(null,e)})})},t.frame=function(e,n,r,i){if(arguments.length<2)return t.nextTick(function(){i(new TypeError("Could not frame, too few arguments."))});function o(n){var o,s=n.document;s?(o=s["@context"],n.contextUrl?(o?tt(o)?o.push(n.contextUrl):o=[o,n.contextUrl]:o=n.contextUrl,s["@context"]=o):o=o||{}):o={},t.expand(e,r,function(e,n){if(e)return i(new T("Could not expand input before framing.","jsonld.FrameError",{cause:e}));var a=ft(r);a.isFrame=!0,a.keepFreeFloatingNodes=!0,t.expand(s,a,function(e,r){if(e)return i(new T("Could not expand frame before framing.","jsonld.FrameError",{cause:e}));var s;try{s=(new O).frame(n,r,a)}catch(t){return i(t)}a.graph=!0,a.skipExpansion=!0,a.link={},t.compact(s,o,a,function(e,n,r){if(e)return i(new T("Could not compact framed output.","jsonld.FrameError",{cause:e}));var o=J(r,"@graph");a.link={},n[o]=function e(n,r,i){if(tt(r)){for(var o=[],s=0;s0&&"/"!==o.substr(-1)&&(o+="/"),o+=r.path),i.path=o}i.query=r.query}i.path=_t(i.path,!!i.authority);var s=i.protocol;return null!==i.authority&&(s+="//"+i.authority),s+=i.path,null!==i.query&&(s+="?"+i.query),null!==r.fragment&&(s+="#"+r.fragment),""===s&&(s="./"),s}(e,n)},t.documentLoader=function(e,n){var r=new T("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed"});return u?n(r,{contextUrl:null,documentUrl:e,document:null}):t.promisify(function(t){t(r)})},t.loadDocument=function(e,n){var r=t.documentLoader(e,n);r&&"then"in r&&r.then(n.bind(null,null),n)},t.promises=function(e){e=e||{};var r=Array.prototype.slice,o=t.promisify,s=e.api||{},a=e.version||"jsonld.js";"string"==typeof e.api&&(e.version||(a=e.api),s={}),s.expand=function(e){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");return o.apply(null,[t.expand].concat(r.call(arguments)))},s.compact=function(e,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");return o.apply(null,[function(e,n,r,i){"function"==typeof r&&(i=r,r={}),t.compact(e,n,r=r||{},function(t,e){i(t,e)})}].concat(r.call(arguments)))},s.flatten=function(e){if(arguments.length<1)throw new TypeError("Could not flatten, too few arguments.");return o.apply(null,[t.flatten].concat(r.call(arguments)))},s.frame=function(e,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");return o.apply(null,[t.frame].concat(r.call(arguments)))},s.fromRDF=function(e){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");return o.apply(null,[t.fromRDF].concat(r.call(arguments)))},s.toRDF=function(e){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");return o.apply(null,[t.toRDF].concat(r.call(arguments)))},s.normalize=function(e){if(arguments.length<1)throw new TypeError("Could not normalize, too few arguments.");return o.apply(null,[t.normalize].concat(r.call(arguments)))},"jsonld.js"===a&&(s.link=function(e,n){if(arguments.length<2)throw new TypeError("Could not link, too few arguments.");return o.apply(null,[t.link].concat(r.call(arguments)))},s.objectify=function(e){return o.apply(null,[t.objectify].concat(r.call(arguments)))},s.createNodeMap=function(e){return o.apply(null,[t.createNodeMap].concat(r.call(arguments)))},s.merge=function(e){return o.apply(null,[t.merge].concat(r.call(arguments)))});try{t.Promise=i.Promise||n(44).Promise}catch(t){var u=function(){throw new Error("Unable to find a Promise implementation.")};for(var l in s)s[l]=u}return s},t.promisify=function(e){if(!t.Promise)try{t.Promise=i.Promise||n(44).Promise}catch(t){throw new Error("Unable to find a Promise implementation.")}var r=Array.prototype.slice.call(arguments,1);return new t.Promise(function(t,n){e.apply(null,r.concat(function(e,r){e?n(e):t(r)}))})},t.promises({api:t.promises}),(e.prototype=t.promises({version:"json-ld-1.0"})).toString=function(){return this instanceof e?"[object JsonLdProcessor]":"[object JsonLdProcessorPrototype]"},t.JsonLdProcessor=e;var a=!!Object.defineProperty;if(a)try{Object.defineProperty({},"x",{})}catch(t){a=!1}a&&(Object.defineProperty(e,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(e.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:e})),l&&void 0===i.JsonLdProcessor&&(a?Object.defineProperty(i,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e}):i.JsonLdProcessor=e);var c="function"==typeof o&&o,h=c?function(t){c(t)}:function(t){setTimeout(t,0)};t.nextTick="object"==typeof r&&"function"==typeof r.nextTick?r.nextTick:h,t.setImmediate=c?h:t.nextTick,t.parseLinkHeader=function(t){for(var e={},n=t.match(/(?:<[^>]*?>|"[^"]*?"|[^,])+/g),r=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,i=0;i=+new Date)return e.ctx;delete this.cache[t],this.order.splice(this.order.indexOf(t),1)}return null},t.DocumentCache.prototype.set=function(t,e){this.order.length===this.size&&delete this.cache[this.order.shift()],this.order.push(t),this.cache[t]={ctx:e,expires:+new Date+this.expires}},t.ActiveContextCache=function(t){this.order=[],this.cache={},this.size=t||100},t.ActiveContextCache.prototype.get=function(t,e){var n=JSON.stringify(t),r=JSON.stringify(e),i=this.cache[n];return i&&r in i?i[r]:null},t.ActiveContextCache.prototype.set=function(t,e,n){if(this.order.length===this.size){var r=this.order.shift();delete this.cache[r.activeCtx][r.localCtx]}var i=JSON.stringify(t),o=JSON.stringify(e);this.order.push({activeCtx:i,localCtx:o}),i in this.cache||(this.cache[i]={}),this.cache[i][o]=ft(n)},t.cache={activeCtx:new t.ActiveContextCache},t.documentLoaders={},t.documentLoaders.jquery=function(e,n){n=n||{};var r=new t.RequestQueue;return("usePromise"in n?n.usePromise:"undefined"!=typeof Promise)?r.wrapLoader(function(e){return t.promisify(i,e)}):r.wrapLoader(i);function i(r,i){return 0!==r.indexOf("http:")&&0!==r.indexOf("https:")?i(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):n.secure&&0!==r.indexOf("https")?i(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):void e.ajax({url:r,accepts:{json:"application/ld+json, application/json"},headers:{Accept:"application/ld+json, application/json"},dataType:"json",crossDomain:!0,success:function(e,n,o){var s={contextUrl:null,documentUrl:r,document:e},a=o.getResponseHeader("Content-Type"),u=o.getResponseHeader("Link");if(u&&"application/ld+json"!==a){if(tt(u=t.parseLinkHeader(u)[E]))return i(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:r}),s);u&&(s.contextUrl=u.target)}i(null,s)},error:function(t,e,n){i(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:r,cause:n}),{contextUrl:null,documentUrl:r,document:null})}})}},t.documentLoaders.node=function(e){var r=!("strictSSL"in(e=e||{}))||e.strictSSL,i="maxRedirects"in e?e.maxRedirects:-1,o="request"in e?e.request:n(10),s="application/ld+json, application/json",a=n(10),u=new t.RequestQueue;if(e.usePromise)return u.wrapLoader(function(e){return t.promisify(c,e,[])});var l=e.headers||{};if("Accept"in l||"accept"in l)throw new RangeError('Accept header may not be specified as an option; only "'+s+'" is supported.');return u.wrapLoader(function(t,e){c(t,[],e)});function c(n,u,l){if(0!==n.indexOf("http:")&&0!==n.indexOf("https:"))return l(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});if(e.secure&&0!==n.indexOf("https"))return l(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});var h=null;if(null!==h)return l(null,h);var f={Accept:s};for(var p in e.headers)f[p]=e.headers[p];o({url:n,headers:f,strictSSL:r,followRedirect:!1},function(e,r,o){if(h={contextUrl:null,documentUrl:n,document:o||null},e)return l(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:n,cause:e}),h);if(r.statusCode>=400)return l(new T("URL could not be dereferenced: "+a.STATUS_CODES[r.statusCode],"jsonld.InvalidUrl",{code:"loading document failed",url:n,httpStatusCode:r.statusCode}),h);if(r.headers.link&&"application/ld+json"!==r.headers["content-type"]){var s=t.parseLinkHeader(r.headers.link)[E];if(tt(s))return l(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:n}),h);s&&(h.contextUrl=s.target)}if(r.statusCode>=300&&r.statusCode<400&&r.headers.location)return u.length===i?l(new T("URL could not be dereferenced; there were too many redirects.","jsonld.TooManyRedirects",{code:"loading document failed",url:n,httpStatusCode:r.statusCode,redirects:u}),h):-1!==u.indexOf(n)?l(new T("URL could not be dereferenced; infinite redirection was detected.","jsonld.InfiniteRedirectDetected",{code:"recursive context inclusion",url:n,httpStatusCode:r.statusCode,redirects:u}),h):(u.push(n),c(r.headers.location,u,l));u.push(n),l(e,h)})}},t.documentLoaders.xhr=function(e){e=e||{};var n=/(^|(\r\n))link:/i,r=new t.RequestQueue;return("usePromise"in e?e.usePromise:"undefined"!=typeof Promise)?r.wrapLoader(function(e){return t.promisify(i,e)}):r.wrapLoader(i);function i(r,i){if(0!==r.indexOf("http:")&&0!==r.indexOf("https:"))return i(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null});if(e.secure&&0!==r.indexOf("https"))return i(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null});var o=new(e.xhr||XMLHttpRequest);o.onload=function(){if(o.status>=400)return i(new T("URL could not be dereferenced: "+o.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:r,httpStatusCode:o.status}),{contextUrl:null,documentUrl:r,document:null});var e,s={contextUrl:null,documentUrl:r,document:o.response},a=o.getResponseHeader("Content-Type");if(n.test(o.getAllResponseHeaders())&&(e=o.getResponseHeader("Link")),e&&"application/ld+json"!==a){if(tt(e=t.parseLinkHeader(e)[E]))return i(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:r}),s);e&&(s.contextUrl=e.target)}i(null,s)},o.onerror=function(){i(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null})},o.open("GET",r,!0),o.setRequestHeader("Accept","application/ld+json, application/json"),o.send()}},t.useDocumentLoader=function(e){if(!(e in t.documentLoaders))throw new T('Unknown document loader type: "'+e+'"',"jsonld.UnknownDocumentLoader",{type:e});t.documentLoader=t.documentLoaders[e].apply(t,Array.prototype.slice.call(arguments,1))},t.processContext=function(e,n){var r={},i=2;arguments.length>3&&(r=arguments[2]||{},i+=1);var o=arguments[i];if("base"in r||(r.base=""),"documentLoader"in r||(r.documentLoader=t.loadDocument),null===n)return o(null,Q(r));Z(n=ft(n))&&"@context"in n||(n={"@context":n}),dt(n,r,function(t,n){if(t)return o(t);try{n=(new O).processContext(e,n,r)}catch(t){return o(t)}o(null,n)})},t.hasProperty=function(t,e){var n=!1;if(e in t){var r=t[e];n=!tt(r)||r.length>0}return n},t.hasValue=function(e,n,r){var i=!1;if(t.hasProperty(e,n)){var o=e[n],s=lt(o);if(tt(o)||s){s&&(o=o["@list"]);for(var a=0;a0){var E=J(e,f);t.addValue(o,E,k)}}else{var k;if(nt(p))k=J(e,p,null,{vocab:"@type"===f});else{k=[];for(var O=0;O1&&!(2===k&&"@index"in a))throw new T('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:a});"@set"in a&&(a=a["@set"],k=(f=Object.keys(a)).length)}else 1===k&&"@language"in a&&(a=null);return!Z(a)||i.keepFreeFloatingNodes||o||null!==n&&"@graph"!==h||(0===k||"@value"in a||"@list"in a||1===k&&"@id"in a)&&(a=null),a},O.prototype.createNodeMap=function(t,e){var n={"@default":{}};return F(t,n,"@default",(e=e||{}).namer||e.issuer||new mt("_:b")),V(n)},O.prototype.flatten=function(t){for(var e=this.createNodeMap(t),n=[],r=Object.keys(e).sort(),i=0;i=r.MAX_TOTAL_DEPTH)return n(new Error("Maximum total call stack depth exceeded; normalization aborting."));!function i(){if(r.depth===r.MAX_DEPTH)return r.depth=0,r.running=!1,t.nextTick(i);var o=(new Date).getTime();if(r.running||(r.start=(new Date).getTime(),r.deadline=r.start+r.timeSlice),o1)return o();var a=s[0];r.canonicalIssuer.getId(a),delete i[a],delete r.hashToBlankNodes[t],e=!0,o()},t)}],t)},t)},function(t){var e=Object.keys(r.hashToBlankNodes).sort();r.forEach(e,function(t,e,n){var i=[],o=r.hashToBlankNodes[t];r.waterfall([function(t){r.forEach(o,function(t,e,n){if(r.canonicalIssuer.hasId(t))return n();var o=new mt("_:b");o.getId(t),r.hashNDegreeQuads(t,o,function(t,e){if(t)return n(t);i.push(e),n()})},t)},function(t){i.sort(function(t,e){return t.hashe.hash?1:0}),r.forEach(i,function(t,e,n){for(var i in t.issuer.existing)r.canonicalIssuer.getId(i);n()},t)}],n)},t)},function(t){var e=[];r.waterfall([function(t){r.forEach(r.quads,function(t,n,i){r.forEachComponent(t,function(t){"blank node"===t.type&&0!==t.value.indexOf(r.canonicalIssuer.prefix)&&(t.value=r.canonicalIssuer.getId(t.value))}),e.push(yt(t)),i()},t)},function(t){if(e.sort(),"application/nquads"===r.options.format)return n=e.join(""),t();n=gt(e.join("")),t()}],t)}],function(t){e(t,n)})},M.prototype.hashFirstDegreeQuads=function(t,e){var n=this,r=n.blankNodeInfo[t];if("hash"in r)return e(null,r.hash);var i=[];n.forEach(r.quads,function(e,r,o){var s={predicate:e.predicate};n.forEachComponent(e,function(e,r){s[r]=n.modifyFirstDegreeComponent(t,e,r)}),i.push(yt(s)),o()},function(t){if(t)return e(t);i.sort(),r.hash=bt.hashNQuads(n.name,i),e(null,r.hash)})},M.prototype.modifyFirstDegreeComponent=function(t,e){return"blank node"!==e.type?e:((e=ft(e)).value=e.value===t?"_:a":"_:z",e)},M.prototype.hashRelatedBlankNode=function(t,e,n,r,i){var o,s=this;s.waterfall([function(e){return s.canonicalIssuer.hasId(t)?(o=s.canonicalIssuer.getId(t),e()):n.hasId(t)?(o=n.getId(t),e()):void s.hashFirstDegreeQuads(t,function(t,n){if(t)return e(t);o=n,e()})}],function(t){if(t)return i(t);var n=new bt(s.name);return n.update(r),"g"!==r&&n.update(s.getRelatedPredicate(e)),n.update(o),i(null,n.digest())})},M.prototype.getRelatedPredicate=function(t){return"<"+t.predicate.value+">"},M.prototype.hashNDegreeQuads=function(t,e,n){var r,i=this,o=new bt(i.name);i.waterfall([function(n){i.createHashToRelated(t,e,function(t,e){if(t)return n(t);r=e,n()})},function(t){var n=Object.keys(r).sort();i.forEach(n,function(t,n,s){o.update(t);var a,u="",l=new vt(r[t]);i.whilst(function(){return l.hasNext()},function(t){var n=l.next(),r=e.clone(),o="",s=[];i.waterfall([function(e){i.forEach(n,function(e,n,a){if(i.canonicalIssuer.hasId(e)?o+=i.canonicalIssuer.getId(e):(r.hasId(e)||s.push(e),o+=r.getId(e)),0!==u.length&&o.length>=u.length&&o>u)return t();a()},e)},function(e){i.forEach(s,function(e,n,s){i.hashNDegreeQuads(e,r,function(n,i){return n?s(n):(o+=r.getId(e),o+="<"+i.hash+">",r=i.issuer,0!==u.length&&o.length>=u.length&&o>u?t():void s())})},e)},function(t){(0===u.length||o=0;--n)if(e[n]["@id"]===t["@id"])return!0;return!1}function H(t,e,n){var r="@"+n,i=r in t?t[r][0]:e[n];return"embed"===n&&(!0===i?i="@last":!1===i?i="@never":"@always"!==i&&"@never"!==i&&"@link"!==i&&(i="@last")),i}function q(e,n,r){if("@type"in n&&(1!==n["@type"].length||!Z(n["@type"][0]))){for(var i=n["@type"],o=0;o=0;--d)for(var k=S[d],T=k.terms,O=0;O0&&s.length>a&&o[0]===s[0];)o.shift(),s.shift();var u="";if(o.length>0){o.pop();for(var l=0;l=(i=s[u].iri).length?"":i[r])in a?a[o].push(s[u]):a[o]=[s[u]];for(var e in a)""!==e&&n(a,e,r+1)}function r(t,e,n,r){r in n||(n[r]=e)}}function X(t){if(!nt(t))return!1;switch(t){case"@base":case"@context":case"@container":case"@default":case"@embed":case"@explicit":case"@graph":case"@id":case"@index":case"@language":case"@list":case"@omitDefault":case"@preserve":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@vocab":return!0}return!1}function Z(t){return"[object Object]"===Object.prototype.toString.call(t)}function tt(t){return Array.isArray(t)}function et(t){if(!nt(t)&&!function(t){return Z(t)&&0===Object.keys(t).length}(t)){var e=!1;if(tt(t)){e=!0;for(var n=0;n1||!("@id"in t)),e}function at(t){return Z(t)&&1===Object.keys(t).length&&"@id"in t}function ut(t){return Z(t)&&"@value"in t}function lt(t){return Z(t)&&"@list"in t}function ct(t){var e=!1;return Z(t)&&(e="@id"in t?0===t["@id"].indexOf("_:"):0===Object.keys(t).length||!("@value"in t||"@set"in t||"@list"in t)),e}function ht(t){return nt(t)&&-1!==t.indexOf(":")}function ft(t){if(t&&"object"==typeof t){var e;if(tt(t)){e=[];for(var n=0;nk)return r=new T("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"loading remote context failed",max:k}),s(r);var a={},u=function(){pt(t,a,!0,o),s(null,t)};if(!pt(t,a,!1,o))return u();var l=[];for(var c in a)!1===a[c]&&l.push(c);for(var h=l.length,f=0;f]*)>)|(_:(?:[A-Za-z0-9]+)))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-z0-9]+))|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-z]+(?:-[a-z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-z0-9]+)))[ \\t]*\\.))[ \\t]*(?:#.*)?$'),r={},i=t.split(/(?:\r\n)|(?:\n)|(?:\r)/g),o=0,s=0;s":n.value,s+=" ",s+="IRI"===r.type?"<"+r.value+">":r.value,s+=" ","IRI"===i.type?s+="<"+i.value+">":"blank node"===i.type?s+=i.value:(s+='"'+i.value.replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\"/g,'\\"')+'"',i.datatype===C?i.language&&(s+="@"+i.language):i.datatype!==v&&(s+="^^<"+i.datatype+">")),null!=o&&(0!==o.indexOf("_:")?s+=" <"+o+">":s+=" "+o),s+" .\n"}function mt(t){this.prefix=t,this.counter=0,this.existing={}}Object.keys||(Object.keys=function(t){if(t!==Object(t))throw new TypeError("Object.keys called on non-object");var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),t.registerRDFParser("application/nquads",gt),t.registerRDFParser("rdfa-api",function(t){for(var e={"@default":[]},n=t.getSubjects(),r=0;re)&&(s&&i>0&&o>this.list[i-1]||!s&&ithis.list[i+1])&&(e=o,n=i)}if(null===e)this.done=!0;else{var a=this.left[e]?n-1:n+1;for(this.list[n]=this.list[a],this.list[a]=e,i=0;ie&&(this.left[this.list[i]]=!this.left[this.list[i]])}return t};var bt=function(t){if(!(this instanceof bt))return new bt(t);if(-1===["URDNA2015","URGNA2012"].indexOf(t))throw new Error("Invalid RDF Dataset Normalization algorithm: "+t);bt._init.call(this,t)};if(bt.hashNQuads=function(t,e){for(var n=new bt(t),r=0;r0;)1&r&&(e._padding+=n),(r>>>=1)>0&&(n+=n)}this.start()};e.prototype.start=function(){this.messageLength=0,this.fullMessageLength=[];for(var t=this._algorithm.messageLengthSize/4,n=0;n>>0,n>>>0];for(var r=this.fullMessageLength.length-1;r>=0;--r)this.fullMessageLength[r]+=n[1],n[1]=n[0]+(this.fullMessageLength[r]/4294967296>>>0),this.fullMessageLength[r]=this.fullMessageLength[r]>>>0,n[0]=n[1]/4294967296>>>0;for(this._input.putBytes(t.bytes());this._input.length()>=this._algorithm.blockSize;)this.state=this._algorithm.digest(this.state,this._input);return(this._input.read>2048||0===this._input.length())&&this._input.compact(),this},e.prototype.digest=function(){var t=new e.ByteBuffer;t.putBytes(this._input.bytes()),t.putBytes(e._padding.substr(0,this._algorithm.blockSize-(this.fullMessageLength[this.fullMessageLength.length-1]+this._algorithm.messageLengthSize&this._algorithm.blockSize-1)));for(var n=new e.ByteBuffer,r=0;r>>28);this._algorithm.writeMessageLength(t,n);var i=this._algorithm.digest(this.state.copy(),t),o=new e.ByteBuffer;return i.write(o),o},e.ByteBuffer=function(t){this.data="string"==typeof t?t:"",this.read=0},e.ByteBuffer.prototype.putInt32=function(t){this.data+=String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)},e.ByteBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},e.ByteBuffer.prototype.putBytes=function(t){this.data+=t},e.ByteBuffer.prototype.bytes=function(){return this.data.slice(this.read)},e.ByteBuffer.prototype.length=function(){return this.data.length-this.read},e.ByteBuffer.prototype.compact=function(){this.data=this.data.slice(this.read),this.read=0},e.ByteBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=64;){for(i=t.h0,o=t.h1,s=t.h2,a=t.h3,u=t.h4,l=0;l<16;++l)r=e.getInt32(),h[l]=r,r=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<20;++l)r=(r=h[l-3]^h[l-8]^h[l-14]^h[l-16])<<1|r>>>31,h[l]=r,r=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<32;++l)r=(r=h[l-3]^h[l-8]^h[l-14]^h[l-16])<<1|r>>>31,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+1859775393+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<40;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+1859775393+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<60;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<80;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+3395469782+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+s|0,t.h3=t.h3+a|0,t.h4=t.h4+u|0,c-=64}return t},n._createState=function(){var t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520,copy:function(){var e=n._createState();return e.h0=t.h0,e.h1=t.h1,e.h2=t.h2,e.h3=t.h3,e.h4=t.h4,e},write:function(e){e.putInt32(t.h0),e.putInt32(t.h1),e.putInt32(t.h2),e.putInt32(t.h3),e.putInt32(t.h4)}};return t};var r={_k:null,_w:null,Algorithm:function(){this.name="sha256",this.blockSize=64,this.digestLength=32,this.messageLengthSize=8}};r.Algorithm.prototype.start=function(){return r._k||r._init(),r._createState()},r.Algorithm.prototype.writeMessageLength=function(t,e){t.putBytes(e.bytes())},r.Algorithm.prototype.digest=function(t,e){for(var n,i,o,s,a,u,l,c,h,f,p,d,g=e.length(),y=r._k,m=r._w;g>=64;){for(s=0;s<16;++s)m[s]=e.getInt32();for(;s<64;++s)n=((n=m[s-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=m[s-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,m[s]=n+m[s-7]+i+m[s-16]|0;for(a=t.h0,u=t.h1,l=t.h2,c=t.h3,h=t.h4,f=t.h5,p=t.h6,d=t.h7,s=0;s<64;++s)o=a&u|l&(a^u),n=d+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(p^h&(f^p))+y[s]+m[s],d=p,p=f,f=h,h=c+n|0,c=l,l=u,u=a,a=n+(i=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+o)|0;t.h0=t.h0+a|0,t.h1=t.h1+u|0,t.h2=t.h2+l|0,t.h3=t.h3+c|0,t.h4=t.h4+h|0,t.h5=t.h5+f|0,t.h6=t.h6+p|0,t.h7=t.h7+d|0,g-=64}return t},r._createState=function(){var t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225,copy:function(){var e=r._createState();return e.h0=t.h0,e.h1=t.h1,e.h2=t.h2,e.h3=t.h3,e.h4=t.h4,e.h5=t.h5,e.h6=t.h6,e.h7=t.h7,e},write:function(e){e.putInt32(t.h0),e.putInt32(t.h1),e.putInt32(t.h2),e.putInt32(t.h3),e.putInt32(t.h4),e.putInt32(t.h5),e.putInt32(t.h6),e.putInt32(t.h7)}};return t},r._init=function(){r._k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r._w=new Array(64)}}(),!p)var wt=function(){p=n(10).XMLSerializer};function _t(t,e){var n="";0===t.indexOf("/")&&(n="/");for(var r=t.split("/"),i=[];r.length>0;)"."===r[0]||""===r[0]&&r.length>1?r.shift():".."!==r[0]?i.push(r.shift()):(r.shift(),e||i.length>0&&".."!==i[i.length-1]?i.pop():i.push(".."));return n+i.join("/")}if(t.url={},t.url.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},t.url.parse=function(e,n){for(var r={},i=t.url.parsers[n||"full"],o=i.regex.exec(e),s=i.keys.length;s--;)r[i.keys[s]]=void 0===o[s]?null:o[s];return r.normalizedPath=_t(r.path,!!r.authority),r},u?t.useDocumentLoader("node"):"undefined"!=typeof XMLHttpRequest&&t.useDocumentLoader("xhr"),u){t.use=function(e){switch(e){case"request":t.request=n(10);break;default:throw new T("Unknown extension.","jsonld.UnknownExtension",{extension:e})}};var xt={exports:{},filename:s};n(10)(xt,"version"),t.version=xt.exports.version}return t},h=function(){return c(function(){return h()})};!u&&n(68)?void 0===(a=(function(){return c(h),h}).apply(e,[]))||(t.exports=a):(c(h),t.exports&&(t.exports=h),l&&("undefined"==typeof jsonld?jsonld=jsonldjs=h:jsonldjs=h))}()}).call(this,n(8),n(6),n(16).setImmediate,"/")},function(t,e,n){(function(r,i,o){var s;(function(){"use strict";function a(t){return"function"==typeof t}var u,l,c=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},h=0,f=function(t,e){k[h]=t,k[h+1]=e,2===(h+=2)&&(l?l(T):b())},p="undefined"!=typeof window?window:void 0,d=p||{},g=d.MutationObserver||d.WebKitMutationObserver,y=void 0!==r&&"[object process]"==={}.toString.call(r),m="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){setTimeout(T,1)}}var b,w,_,x,S,C,E,k=new Array(1e3);function T(){for(var t=0;t<"]=0,this._entityCount=0,this._blankNodeIndex=0,e||!t||t[0]||(e=t,t=null),this._prefixes=Object.create(null),e&&e.prefixes&&this.addPrefixes(e.prefixes),t&&this.addTriples(t)}i.prototype={get size(){var t=this._size;if(null!==t)return t;var e,n,r=this._graphs;for(var i in r)for(var o in e=r[i].subjects)for(var s in n=e[o])t+=Object.keys(n[s]).length;return this._size=t},_addToIndex:function(t,e,n,r){var i=t[e]||(t[e]={});(i[n]||(i[n]={}))[r]=null},_removeFromIndex:function(t,e,n,r){var i,o=t[e],s=o[n];for(i in delete s[r],s)return;for(i in delete o[n],o)return;delete t[e]},_findInIndex:function(t,e,n,r,i,o,s,a){var u,l,c,h=[],f=Object.keys(this._entities);for(var p in e&&((u=t,t={})[e]=u[e]),t){var d=f[p];if(l=t[p])for(var g in n&&((u=l,l={})[n]=u[n]),l){var y=f[g];if(c=l[g])for(var m=(r?r in c?[r]:[]:Object.keys(c)),v=m.length-1;v>=0;v--){var b={subject:"",predicate:"",object:"",graph:a};b[i]=d,b[o]=y,b[s]=f[m[v]],h.push(b)}}}return h},_countInIndex:function(t,e,n,r){var i,o,s,a=0;for(var u in e&&((i=t,t={})[e]=i[e]),t)if(o=t[u])for(var l in n&&((i=o,o={})[n]=i[n]),o)(s=o[l])&&(r?r in s&&a++:a+=Object.keys(s).length);return a},addTriple:function(t,e,n,r){e||(r=t.graph,n=t.object,e=t.predicate,t=t.subject);var i=this._graphs[r=r||""];i||(i=this._graphs[r]={subjects:{},predicates:{},objects:{}},Object.freeze(i));var o=this._entities;t=o[t]||(o[t]=++this._entityCount),e=o[e]||(o[e]=++this._entityCount),n=o[n]||(o[n]=++this._entityCount),this._addToIndex(i.subjects,t,e,n),this._addToIndex(i.predicates,e,n,t),this._addToIndex(i.objects,n,t,e),this._size=null},addTriples:function(t){for(var e=t.length-1;e>=0;e--)this.addTriple(t[e])},addPrefix:function(t,e){this._prefixes[t]=e},addPrefixes:function(t){for(var e in t)this.addPrefix(e,t[e])},removeTriple:function(t,e,n,r){e||(r=t.graph,n=t.object,e=t.predicate,t=t.subject),r=r||"";var i,o,s,a=this._entities,u=this._graphs;if((t=a[t])&&(e=a[e])&&(n=a[n])&&(i=u[r])&&(o=i.subjects[t])&&(s=o[e])&&n in s){for(t in this._removeFromIndex(i.subjects,t,e,n),this._removeFromIndex(i.predicates,e,n,t),this._removeFromIndex(i.objects,n,t,e),null!==this._size&&this._size--,i.subjects)return;delete u[r]}},removeTriples:function(t){for(var e=t.length-1;e>=0;e--)this.removeTriple(t[e])},find:function(t,e,n,i){var o=this._prefixes;return this.findByIRI(r(t,o),r(e,o),r(n,o),r(i,o))},findByIRI:function(t,e,n,r){var i=this._graphs[r=r||""],o=this._entities;return i?t&&!(t=o[t])?[]:e&&!(e=o[e])?[]:n&&!(n=o[n])?[]:t?n?this._findInIndex(i.objects,n,t,e,"object","subject","predicate",r):this._findInIndex(i.subjects,t,e,null,"subject","predicate","object",r):e?this._findInIndex(i.predicates,e,n,null,"predicate","object","subject",r):n?this._findInIndex(i.objects,n,null,null,"object","subject","predicate",r):this._findInIndex(i.subjects,null,null,null,"subject","predicate","object",r):[]},count:function(t,e,n,i){var o=this._prefixes;return this.countByIRI(r(t,o),r(e,o),r(n,o),r(i,o))},countByIRI:function(t,e,n,r){var i=this._graphs[r=r||""],o=this._entities;return i?t&&!(t=o[t])?0:e&&!(e=o[e])?0:n&&!(n=o[n])?0:t?n?this._countInIndex(i.objects,n,t,e):this._countInIndex(i.subjects,t,e,n):e?this._countInIndex(i.predicates,e,n,t):this._countInIndex(i.objects,n,t,e):0},createBlankNode:function(t){var e,n;if(t)for(e=t="_:"+t,n=1;this._entities[e];)e=t+n++;else do{e="_:b"+this._blankNodeIndex++}while(this._entities[e]);return this._entities[e]=++this._entityCount,e}},t.exports=i},function(t,e,n){var r=n(48).Transform,i=n(56),o=n(30);function s(t){if(!(this instanceof s))return new s(t);r.call(this,{decodeStrings:!0}),this._readableState.objectMode=!0;var e=this,n=new o(t);n.parse(function(t,n){n&&e.push(n)||t&&e.emit("error",t)},this.emit.bind(this,"prefix")),this._transform=function(t,e,r){n.addChunk(t),r()},this._flush=function(t){n.end(),t()}}i.inherits(s,r),t.exports=s},function(t,e,n){t.exports=i;var r=n(32).EventEmitter;function i(){r.call(this)}n(11)(i,r),i.Readable=n(33),i.Writable=n(77),i.Duplex=n(78),i.Transform=n(79),i.PassThrough=n(80),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===r.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",l),t.on("error",l),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},function(t,e,n){"use strict";(function(e,r){var i=n(21);t.exports=b;var o,s=n(50);b.ReadableState=v,n(32);var a=function(t,e){return t.listeners(e).length},u=n(51),l=n(22).Buffer,c=e.Uint8Array||function(){},h=n(17);h.inherits=n(11);var f=n(72),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var d,g=n(73),y=n(53);h.inherits(b,u);var m=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(o=o||n(12));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(54).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(12),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,C(t)}}(t,s)):(i||(o=function(t,e){var n,r;return l.isBuffer(r=e)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=l.from(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):k(t,s)):_(t,s,e,!1))):r||(s.reading=!1)),!s.ended&&(s.needReadable||s.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){p("emit readable"),t.emit("readable"),P(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;return to.length?o.length:t;if(i+=s===o.length?o:o.slice(0,t),0==(t-=s)){s===o.length?(++r,e.head=n.next?n.next:e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=l.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0==(t-=s)){s===o.length?(++i,e.head=r.next?r.next:e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e),r}(t,e.buffer,e.decoder),n);var n}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):C(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&R(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?A(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===r.stdout||t===r.stderr?v:l;function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",function e(r,i){p("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",m),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",e),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",d),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())});var c=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",c);var h=!1,f=!1;function d(e){p("ondata"),f=!1,!1!==t.write(e)||f||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,f=!0),n.pause())}function g(e){p("onerror",e),v(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",m),v()}function m(){p("onfinish"),t.removeListener("close",y),v()}function v(){p("unpipe"),n.unpipe(t)}return n.on("data",d),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",y),t.once("finish",m),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(e,t.length-n),t,n,r)}function C(t,e,n){return r.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=t[i+2],128==(192&(o=t[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=t[i+2],a=t[i+3],128==(192&(o=t[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var n="",r=0;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}).apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(r,i),c=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function j(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(6))},function(t,e,n){"use strict";var r=n(21);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";var r=n(22).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";t.exports=s;var r=n(12),i=n(17);function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"\x1b["+a.colors[n][0]+"m"+t+"\x1b["+a.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return s.forEach(function(t,n){e[t]=!0}),e}();if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),x(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(S(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return h(n)}var u,l="",w=!1,C=["{","}"];return p(n)&&(w=!0,C=["[","]"]),S(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(l=" "+RegExp.prototype.toString.call(n)),_(n)&&(l=" "+Date.prototype.toUTCString.call(n)),x(n)&&(l=" "+h(n)),0!==s.length||w&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=w?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(u,l,C)):C[0]+l+C[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=t.stylize(u.set?"[Getter/Setter]":"[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===C(t)}function x(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function S(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(o)&&(o=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=w,e.isDate=_,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(81);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(n=[E((t=new Date).getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),k[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(11),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,n(6),n(8))},function(t,e,n){var r=n(48).Transform,i=n(56),o=n(35);function s(t){if(!(this instanceof s))return new s(t);r.call(this,{encoding:"utf8"}),this._writableState.objectMode=!0;var e=this,n=new o({write:function(t,n,r){e.push(t),r&&r()},end:function(t){e.push(null),t&&t()}},t);this._transform=function(t,e,r){n.addTriple(t,r)},this._flush=function(t){n.end(t)}}i.inherits(s,r),t.exports=s},function(t,e){function n(t,e){for(var n in t)e[n]=t[n]}function r(t,e){var r=t.prototype;if(Object.create){var i=Object.create(e.prototype);r.__proto__=i}if(!(r instanceof e)){function o(){}o.prototype=e.prototype,n(r,o=new o),t.prototype=r=o}r.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),r.constructor=t)}var i="http://www.w3.org/1999/xhtml",o={},s=o.ELEMENT_NODE=1,a=o.ATTRIBUTE_NODE=2,u=o.TEXT_NODE=3,l=o.CDATA_SECTION_NODE=4,c=o.ENTITY_REFERENCE_NODE=5,h=o.ENTITY_NODE=6,f=o.PROCESSING_INSTRUCTION_NODE=7,p=o.COMMENT_NODE=8,d=o.DOCUMENT_NODE=9,g=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,v={},b={},w=(v.INDEX_SIZE_ERR=(b[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(b[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(b[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(b[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(b[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(b[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(b[7]="No modification allowed",7),v.NOT_FOUND_ERR=(b[8]="Not found",8)),x=(v.NOT_SUPPORTED_ERR=(b[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(b[10]="Attribute in use",10));function S(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,b[t]),this.message=b[t],Error.captureStackTrace&&Error.captureStackTrace(this,S);return n.code=t,e&&(this.message=this.message+": "+e),n}function C(){}function E(t,e){this._node=t,this._refresh=e,k(this)}function k(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);nt(t,"length",r.length),n(r,t),t._inc=e}}function T(){}function O(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function I(t,e,n,r){if(r?e[O(e,r)]=n:e[e.length++]=n,t){n.ownerElement=t;var i=t.ownerDocument;i&&(r&&M(i,t,r),function(t,e,n){i&&i._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(e._nsMap[n.prefix?n.localName:""]=n.value)}(0,t,n))}}function P(t,e,n){var r=O(e,n);if(!(r>=0))throw S(_,new Error(t.tagName+"@"+n));for(var i=e.length-1;r"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function j(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(j(t,e))return!0}while(t=t.nextSibling)}function D(){}function M(t,e,n,r){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete e._nsMap[n.prefix?n.localName:""]}function L(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function U(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,L(t.ownerDocument,t),e}function F(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===y){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var s=n?n.previousSibling:t.lastChild;i.previousSibling=s,o.nextSibling=n,s?s.nextSibling=i:t.firstChild=i,null==n?t.lastChild=o:n.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return L(t.ownerDocument||t,t),e.nodeType==y&&(e.firstChild=e.lastChild=null),e}function V(){this._nsMap={}}function B(){}function z(){}function H(){}function q(){}function W(){}function G(){}function $(){}function J(){}function K(){}function Y(){}function Q(){}function X(){}function Z(t,e){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var s=[{namespace:o,prefix:null}];return et(this,n,t,e,s),n.join("")}function tt(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix==r)return s.namespace!=i}return!0}function et(t,e,n,r,o){if(r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case s:o||(o=[]);var h=t.attributes,m=h.length,v=t.firstChild,b=t.tagName;n=i===t.namespaceURI||n,e.push("<",b);for(var w=0;w"),n&&/^script$/i.test(b))for(;v;)v.data?e.push(v.data):et(v,e,n,r,o),v=v.nextSibling;else for(;v;)et(v,e,n,r,o),v=v.nextSibling;e.push("")}else e.push("/>");return;case d:case y:for(v=t.firstChild;v;)et(v,e,n,r,o),v=v.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,N),'"');case u:return e.push(t.data.replace(/[<&]/g,N));case l:return e.push("");case p:return e.push("\x3c!--",t.data,"--\x3e");case g:var E=t.publicId,k=t.systemId;if(e.push("');else if(k&&"."!=k)e.push(' SYSTEM "',k,'">');else{var T=t.internalSubset;T&&e.push(" [",T,"]"),e.push(">")}return;case f:return e.push("");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function nt(t,e,n){t[e]=n}v.INVALID_STATE_ERR=(b[11]="Invalid state",11),v.SYNTAX_ERR=(b[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(b[13]="Invalid modification",13),v.NAMESPACE_ERR=(b[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(b[15]="Invalid access",15),S.prototype=Error.prototype,n(v,S),C.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var n=[],r=0;r0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n)for(var r in n)if(n[r]==t)return r;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},n(o,R),n(o,R.prototype),D.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==y){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return null==this.documentElement&&t.nodeType==s&&(this.documentElement=t),F(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),U(this,t)},importNode:function(t,e){return function t(e,n,r){var i;switch(n.nodeType){case s:(i=n.cloneNode(!1)).ownerDocument=e;case y:break;case a:r=!0}if(i||(i=n.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,r)for(var o=n.firstChild;o;)i.appendChild(t(e,o,r)),o=o.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return j(this.documentElement,function(n){if(n.nodeType==s&&n.getAttribute("id")==t)return e=n,!0}),e},createElement:function(t){var e=new V;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new C,(e.attributes=new T)._ownerElement=e,e},createDocumentFragment:function(){var t=new Y;return t.ownerDocument=this,t.childNodes=new C,t},createTextNode:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new q;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new B;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new K;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new V,r=e.split(":"),i=n.attributes=new T;return n.childNodes=new C,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new B,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}},r(D,R),D.prototype.getElementsByTagName=(V.prototype={nodeType:s,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===y?this.insertBefore(t,null):function(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e),r=t.lastChild}return r=t.lastChild,e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,L(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new E(this,function(e){var n=[];return j(e,function(r){r===e||r.nodeType!=s||"*"!==t&&r.tagName!=t||n.push(r)}),n})},getElementsByTagNameNS:function(t,e){return new E(this,function(n){var r=[];return j(n,function(i){i===n||i.nodeType!==s||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||r.push(i)}),r})}}).getElementsByTagName,D.prototype.getElementsByTagNameNS=V.prototype.getElementsByTagNameNS,r(V,R),B.prototype.nodeType=a,r(B,R),z.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){this.nodeValue=this.data=t=this.data+t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(b[w])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){n=this.data.substring(0,t)+n+this.data.substring(t+e),this.nodeValue=this.data=n,this.length=n.length}},r(z,R),H.prototype={nodeName:"#text",nodeType:u,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,z),q.prototype={nodeName:"#comment",nodeType:p},r(q,z),W.prototype={nodeName:"#cdata-section",nodeType:l},r(W,z),G.prototype.nodeType=g,r(G,R),$.prototype.nodeType=m,r($,R),J.prototype.nodeType=h,r(J,R),K.prototype.nodeType=c,r(K,R),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=y,r(Y,R),Q.prototype.nodeType=f,r(Q,R),X.prototype.serializeToString=function(t,e,n){return Z.call(t,e,n)},R.prototype.toString=Z;try{Object.defineProperty&&(Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case s:case y:var n=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case s:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),nt=function(t,e,n){t["$$"+e]=n})}catch(t){}e.DOMImplementation=A,e.XMLSerializer=X},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(9),u=n(14),l=n(20),c=n(15),h=n(13),f=n(2),p=n(3),d=n(37),g=n(24),y=n(25),m=function(t){function e(t,n,r,s){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=i(this,o(e).call(this))).termType=e.termType,a.statements=t||[],a.constraints=n||[],a.initBindings=r||[],a.optional=s||[],a}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,p),(n=[{key:"add",value:function(t,e,n,r){return this.statements.push(new g(t,e,n,r))}},{key:"addStatement",value:function(t){return this.statements.push(t)}},{key:"bnode",value:function(t){return new a(t)}},{key:"addAll",value:function(t){var e=this;t.forEach(function(t){e.add(t.subject,t.predicate,t.object,t.graph)})}},{key:"any",value:function(t,e,n,r){var i=this.anyStatementMatching(t,e,n,r);if(null!=i)return null==t?i.subject:null==e?i.predicate:null==n?i.object:void 0}},{key:"anyValue",value:function(t,e,n,r){var i=this.any(t,e,n,r);return i?i.value:void 0}},{key:"anyStatementMatching",value:function(t,e,n,r){var i=this.statementsMatching(t,e,n,r,!0);if(i&&0!==i.length)return i[0]}},{key:"statementsMatching",value:function(t,e,n,r,i){return this.statements.filter(function(i){return(!t||t.sameTerm(i.subject))&&(!e||e.sameTerm(i.predicate))&&(!n||t.sameTerm(i.object))&&(!r||r.sameTerm(i.subject))})}},{key:"bottomTypeURIs",value:function(t){var e,n,r,i,o,s,a;for(i in e=[],t)if(t.hasOwnProperty(i)){for(a=t[i],n=!0,r=0,o=(s=this.each(void 0,this.sym("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.sym(i))).length;r as "+d+":\n"+t+":\n"+t.stack);g(t,n)}}(t)}function b(){g&&g(null,n)}function w(t,e){t&&g(t,n);try{y.parse(e,_)}catch(t){g(t,n)}}function _(t,e,r){if(t&&g(t,n),e)m.push(e);else{for(var i=0;i: Bad syntax:\n "+i+'\n at: "'+n.slice(r,r+30)+'"'};o=0;var p=e.sym(n+"#query");for(h.query=p;;){if((s=c.skipSpace(t,o))<0)return h;if(";"===t[s]){if((o=c.skipSpace(t,s+1))<0)return h;s=o}var d=!1;for(a=0;a=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(64),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",l="object"==typeof t,c=e.regeneratorRuntime;if(c)l&&(t.exports=c);else{(c=e.regeneratorRuntime=l?t.exports:{}).wrap=w;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",g={},y={};y[s]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(A([])));v&&v!==r&&i.call(v,s)&&(y=v);var b=C.prototype=x.prototype=Object.create(y);S.prototype=b.constructor=C,C.constructor=S,C[u]=S.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(b),t},c.awrap=function(t){return{__await:t}},E(k.prototype),k.prototype[a]=function(){return this},c.AsyncIterator=k,c.async=function(t,e,n,r){var i=new k(w(t,e,n,r));return c.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[u]="Generator",b[s]=function(){return this},b.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(u&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function w(t,e,n,r){var i=Object.create((e&&e.prototype instanceof x?e:x).prototype),o=new P(r||[]);return i._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=_(t,e,n);if("normal"===u.type){if(r=n.done?d:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function C(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,s){var a=_(t[n],t,r);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,s)})}s(a.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function T(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,T(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=_(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=t.length&&n()}h(t,function(t){e(t,u(i))})},a.forEach=a.each,a.eachSeries=function(t,e,n){if(n=n||function(){},!t.length)return n();var r=0,i=function(){e(t[r],function(e){e?(n(e),n=function(){}):(r+=1)>=t.length?n():i()})};i()},a.forEachSeries=a.eachSeries,a.eachLimit=function(t,e,n,r){d(e).apply(null,[t,n,r])},a.forEachLimit=a.eachLimit;var d=function(t){return function(e,n,r){if(r=r||function(){},!e.length||t<=0)return r();var i=0,o=0,s=0;!function a(){if(i>=e.length)return r();for(;s=e.length?r():a())})}()}},g=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[a.each].concat(e))}},y=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[a.eachSeries].concat(e))}},m=function(t,e,n,r){if(e=f(e,function(t,e){return{index:e,value:t}}),r){var i=[];t(e,function(t,e){n(t.value,function(n,r){i[t.index]=r,e(n)})},function(t){r(t,i)})}else t(e,function(t,e){n(t.value,function(t){e(t)})})};a.map=g(m),a.mapSeries=y(m),a.mapLimit=function(t,e,n,r){return v(e)(t,n,r)};var v=function(t){return function(t,e){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[d(t)].concat(n))}}(t,m)};a.reduce=function(t,e,n,r){a.eachSeries(t,function(t,r){n(e,t,function(t,n){e=n,r(t)})},function(t){r(t,e)})},a.inject=a.reduce,a.foldl=a.reduce,a.reduceRight=function(t,e,n,r){var i=f(t,function(t){return t}).reverse();a.reduce(i,e,n,r)},a.foldr=a.reduceRight;var b=function(t,e,n,r){var i=[];t(e=f(e,function(t,e){return{index:e,value:t}}),function(t,e){n(t.value,function(n){n&&i.push(t),e()})},function(t){r(f(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};a.filter=g(b),a.filterSeries=y(b),a.select=a.filter,a.selectSeries=a.filterSeries;var w=function(t,e,n,r){var i=[];t(e=f(e,function(t,e){return{index:e,value:t}}),function(t,e){n(t.value,function(n){n||i.push(t),e()})},function(t){r(f(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};a.reject=g(w),a.rejectSeries=y(w);var _=function(t,e,n,r){t(e,function(t,e){n(t,function(n){n?(r(t),r=function(){}):e()})},function(t){r()})};a.detect=g(_),a.detectSeries=y(_),a.some=function(t,e,n){a.each(t,function(t,r){e(t,function(t){t&&(n(!0),n=function(){}),r()})},function(t){n(!1)})},a.any=a.some,a.every=function(t,e,n){a.each(t,function(t,r){e(t,function(t){t||(n(!1),n=function(){}),r()})},function(t){n(!0)})},a.all=a.every,a.sortBy=function(t,e,n){a.map(t,function(t,n){e(t,function(e,r){e?n(e):n(null,{value:t,criteria:r})})},function(t,e){if(t)return n(t);n(null,f(e.sort(function(t,e){var n=t.criteria,r=e.criteria;return nr?1:0}),function(t){return t.value}))})},a.auto=function(t,e){e=e||function(){};var n=p(t),r=n.length;if(!r)return e();var i={},o=[],s=function(t){o.unshift(t)},u=function(){r--,h(o.slice(0),function(t){t()})};s(function(){if(!r){var t=e;e=function(){},t(null,i)}}),h(n,function(n){var r=c(t[n])?t[n]:[t[n]],l=function(t){var r=Array.prototype.slice.call(arguments,1);if(r.length<=1&&(r=r[0]),t){var o={};h(p(i),function(t){o[t]=i[t]}),o[n]=r,e(t,o),e=function(){}}else i[n]=r,a.setImmediate(u)},f=r.slice(0,Math.abs(r.length-1))||[],d=function(){return e=function(t,e){return t&&i.hasOwnProperty(e)},r=!0,((t=f).reduce?t.reduce(e,r):(h(t,function(t,n,i){r=e(r,t)}),r))&&!i.hasOwnProperty(n);var t,e,r};if(d())r[r.length-1](l,i);else{var g=function(){d()&&(function(t){for(var e=0;e>>1);n(e,t[o])>=0?r=o:i=o-1}return r}(t.tasks,o,n)+1,0,o),t.saturated&&t.tasks.length===t.concurrency&&t.saturated(),a.setImmediate(t.process)})}(r,t,e,i)},delete r.unshift,r},a.cargo=function(t,e){var n=!1,r=[],i={tasks:r,payload:e,saturated:null,empty:null,drain:null,drained:!0,push:function(t,n){c(t)||(t=[t]),h(t,function(t){r.push({data:t,callback:"function"==typeof n?n:null}),i.drained=!1,i.saturated&&r.length===e&&i.saturated()}),a.setImmediate(i.process)},process:function o(){if(!n){if(0===r.length)return i.drain&&!i.drained&&i.drain(),void(i.drained=!0);var s=r.splice(0,"number"==typeof e?e:r.length),a=f(s,function(t){return t.data});i.empty&&i.empty(),n=!0,t(a,function(){n=!1;var t=arguments;h(s,function(e){e.callback&&e.callback.apply(null,t)}),o()})}},length:function(){return r.length},running:function(){return n}};return i};var C=function(t){return function(e){var n=Array.prototype.slice.call(arguments,1);e.apply(null,n.concat([function(e){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(e?console.error&&console.error(e):console[t]&&h(n,function(e){console[t](e)}))}]))}};a.log=C("log"),a.dir=C("dir"),a.memoize=function(t,e){var n={},r={};e=e||function(t){return t};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),s=e.apply(null,i);s in n?a.nextTick(function(){o.apply(null,n[s])}):s in r?r[s].push(o):(r[s]=[o],t.apply(null,i.concat([function(){n[s]=arguments;var t=r[s];delete r[s];for(var e=0,i=t.length;e2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};a.applyEach=g(E),a.applyEachSeries=y(E),a.forever=function(t,e){!function n(r){if(r){if(e)return e(r);throw r}t(n)}()},t.exports?t.exports=a:void 0===(i=(function(){return a}).apply(e,[]))||(t.exports=i)}()}).call(this,n(8),n(16).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,u=1,l={},c=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){d(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}):t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)},f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0?r-4:r,h=0;h>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,l-=8);t[n+p-d]|=128*g}},function(t,e){},function(t,e,n){"use strict";var r=n(22).Buffer,i=n(74);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e=r.allocUnsafe(t>>>0),n=this.head,i=0;n;)n.data.copy(e,i),i+=n.data.length,n=n.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(6))},function(t,e,n){"use strict";t.exports=o;var r=n(55),i=n(17);function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(11),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(34)},function(t,e,n){t.exports=n(12)},function(t,e,n){t.exports=n(33).Transform},function(t,e,n){t.exports=n(33).PassThrough},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(3),u=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType="DefaultGraph",t.value="",t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,a),(n=[{key:"toCanonical",value:function(){return this.value}}])&&function(t,e){for(var n=0;n=e+n||e?new java.lang.String(t,e,n)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}r.prototype.parseFromString=function(t,e){var n=this.options,r=new l,o=n.domBuilder||new i,a=n.errorHandler,u=n.locator,c=n.xmlns||{},h={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(t,e,n){if(!t){if(e instanceof i)return e;t=e}var r={},o=t instanceof Function;function a(e){var i=t[e];!i&&o&&(i=2==t.length?function(n){t(e,n)}:t),r[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+s(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(a,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(e)&&(h.nbsp="\xa0",h.copy="\xa9",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,c,h):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,s=i.createElementNS(t,n||e),a=r.length;u(this,s),this.currentElement=s,this.locator&&o(this.locator,s);for(var l=0;l":switch(y){case o:n.setTagName(t.slice(e,g));case c:case h:case f:break;case l:case s:"/"===(v=t.slice(e,g)).slice(-1)&&(n.closed=!0,v=v.slice(0,-1));case a:y===a&&(v=d),y==l?(p.warning('attribute "'+v+'" missed quot(")!!'),n.add(d,v.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===r[""]&&v.match(/^(?:disabled|checked|selected)$/i)||p.warning('attribute "'+v+'" missed value!! "'+v+'" instead!!'),n.add(v,v,e));break;case u:throw new Error("attribute value missed!!")}return g;case"\x80":m=" ";default:if(m<=" ")switch(y){case o:n.setTagName(t.slice(e,g)),y=h;break;case s:d=t.slice(e,g),y=a;break;case l:var v=t.slice(e,g).replace(/&#?\w+;/g,i);p.warning('attribute "'+v+'" missed quot(")!!'),n.add(d,v,e);case c:y=h}else switch(y){case a:"http://www.w3.org/1999/xhtml"===r[""]&&d.match(/^(?:disabled|checked|selected)$/i)||p.warning('attribute "'+d+'" missed value!! "'+d+'" instead2!!'),n.add(d,d,e),e=g,y=s;break;case c:p.warning('attribute space is required"'+d+'"!!');case h:y=s,e=g;break;case u:y=l,e=g;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function y(t,e,n){for(var r=t.tagName,i=null,o=t.length;o--;){var s=t[o],a=s.qName,u=s.value;if((f=a.indexOf(":"))>0)var l=s.prefix=a.slice(0,f),c=a.slice(f+1),h="xmlns"===l&&c;else c=a,l=null,h="xmlns"===a&&"";s.localName=c,!1!==h&&(null==i&&(i={},b(n,n={})),n[h]=i[h]=u,s.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(h,u))}for(o=t.length;o--;)(l=(s=t[o]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]));var f;(f=r.indexOf(":"))>0?(l=t.prefix=r.slice(0,f),c=t.localName=r.slice(f+1)):(l=null,c=t.localName=r);var p=t.uri=n[l||""];if(e.startElement(p,c,r,t),!t.closed)return t.currentNSMap=n,t.localNSMap=i,!0;if(e.endElement(p,c,r),i)for(l in i)e.endPrefixMapping(l)}function m(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=t.indexOf("",e),s=t.substring(e+1,o);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),o):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),o)}return e+1}function v(t,e,n,r){var i=r[n];return null==i&&((i=t.lastIndexOf(""))e?(n.comment(t,e+4,i-e-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,i-e-9),n.endCDATA(),i+3}var o=function(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=e,i.exec(t);n=i.exec(t);)if(r.push(n),n[1])return r}(t,e),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var a=o[1][0],u=s>3&&/^public$/i.test(o[2][0])&&o[3][0],l=s>4&&o[4][0],c=o[s-1];return n.startDTD(a,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function _(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function x(t){}function S(t,e){return t.__proto__=e,t}p.prototype={parse:function(t,e,n){var r=this.domBuilder;r.startDocument(),b(e,e={}),function(t,e,n,r,i){function o(t){var e=t.slice(1,-1);return e in n?n[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10);return String.fromCharCode(e,56320+(1023&t))}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function s(e){if(e>b){var n=t.substring(b,e).replace(/&#?\w+;/g,o);h&&a(b),r.characters(n,0,e-b),b=e}}function a(e,n){for(;e>=l&&(n=c.exec(t));)l=(u=n.index)+n[0].length,h.lineNumber++;h.columnNumber=e-u+1}for(var u=0,l=0,c=/.*(?:\r\n?|\n)|.*$/g,h=r.locator,f=[{currentNSMap:e}],p={},b=0;;){try{var S=t.indexOf("<",b);if(S<0){if(!t.substr(b).match(/^\s*$/)){var C=r.doc,E=C.createTextNode(t.substr(b));C.appendChild(E),r.currentElement=E}return}switch(S>b&&s(S),t.charAt(S+1)){case"/":var k=t.indexOf(">",S+3),T=t.substring(S+2,k),O=f.pop();k<0?(T=t.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+T+" is not complete:"+O.tagName),k=S+1+T.length):T.match(/\sb?b=k:s(Math.max(S,b)+1)}}(t,e,n,r,this.errorHandler),r.endDocument()}},x.prototype={setTagName:function(t){if(!i.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,n){if(!i.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},S({},S.prototype)instanceof S||(S=function(t,e){function n(){}for(e in n.prototype=e,n=new n,t)n[e]=t[e];return n}),e.XMLReader=p},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(3),u=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType=e.termType,t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,a),(n=[{key:"toString",value:function(){return"()"}}])&&function(t,e){for(var n=0;n]*>$/)}function l(t){return"string"==typeof t&&(t.match(/^_:/)||t.match(/^$/))}function c(t){return"string"==typeof t&&t.match(/^:|^[^_][^:]*:/)}function h(t){return t.split(":")[0]}function f(t){return t.split(":")[1]}function p(t){return u(t)?t.slice(1,t.length-1):t}function d(t){t=t.replace(/\(/g," ( ").replace(/\)/g," ) ").replace(//g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),r.info("New str into spaceDelimit: \n"+t);var e,n=[],i=t.split(" ");for(var o in i)"string"==typeof(e=i[o])&&e.match(/[^ \n\t]/)&&(n=n.concat(i[o]));return n}function g(t,e){for(var n=0;n"===t[1]?(r.debug("Constraint added: "+t),e.constraints[t[0]]=new v(t[2])):"<"===t[1]?(r.debug("Constraint added: "+t),e.constraints[t[0]]=new v(t[2])):r.warn("I don't know how to handle the constraint: "+t)}function _(t,e){r.debug("Optional query: "+t+" not yet implemented.");var i=n.formula();x(t,i),e.optional.push(i)}function x(t,e){var i,o,d=function(t){for(var e,i=[],o=0;o"):e,a(t[o])?i[o]=s(t[o].slice(1)):l(t[o])?(r.info(t[o]+" was identified as a bnode."),i[o]=n.bnode()):u(t[o])?(r.info(t[o]+" was identified as a symbol."),i[o]=n.sym(p(t[o]))):c(t[o])?(r.info(t[o]+" was identified as a prefixed symbol"),E[h(t[o])]?i[o]=n.sym(t[o]=E[h(t[o])]+f(t[o])):(r.error("SPARQL error: "+t[o]+" with prefix "+h(t[o])+" does not have a correct prefix entry."),i[o]=t[o])):i[o]=t[o]):i[o]=t[o];return i}(t);for(r.debug("WHERE: "+d);g("OPTIONAL",d);)o=g("OPTIONAL",d),r.debug("OPT: "+o+" "+d[o]+" in "+d),"{"!==d[o+1]&&r.warn("Bad optional opening bracket in word "+o),-1===(i=m(d.slice(o+2),"{","}"))?r.error("No matching bracket in word "+o):(_(d.slice(o+2,o+2+i),e),o=g("OPTIONAL",d),i=m(d.slice(o+2),"{","}"),d.splice(o,i+3));for(r.debug("WHERE after optionals: "+d);g("FILTER",d);){var v=g("FILTER",d);"("!==d[v+1]&&r.warn("Bad filter opening bracket in word "+v),-1===(i=m(d.slice(v+2),"(",")"))?r.error("No matching bracket in word "+v):(w(d.slice(v+2,v+2+i),e),v=g("FILTER",d),i=m(d.slice(v+2),"(",")"),d.splice(v,i+3))}r.debug("WHERE after filters and optionals: "+d),function(t,e){var n=new Array(1);n[0]=-1;for(var i=n.concat(y(".",t)),o=[],s=0;s"),"is"===e[n]&&"of"===e[n+2]){e.splice(n,1),e.splice(n+1,1);var r=e[n-1];e[n-1]=e[n+1],e[n+1]=r}return e}(),r.info("SPARQL Tokens: "+i),i}(t),E=function(t){var e,n=y("PREFIX",t),i=[];for(var o in n){var s=t[n[o]+1],a=t[n[o]+2];if("string"==typeof(e=s)&&e.match(/:$/))if(u(a)){r.info("Prefix found: "+s+" -> "+a);var l=h(s),c=p(a);i[l]=c}else r.error("Invalid SPARQL symbol: "+a);else r.error("Invalid SPARQL prefix: "+s)}return i}(C);E.rdf||(E.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),E.rdfs||(E.rdfs="http://www.w3.org/2000/01/rdf-schema#");var k=g("SELECT",C),T=g("WHERE",C);if(k<0||T<0||k>T)return r.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(t,e){for(var n in r.info("SPARQL vars: "+t),t)if(a(t[n])){r.info("Added "+t[n]+" to query variables from SPARQL");var i=s(t[n].slice(1));e.vars.push(i),i.label=t[n].slice(1)}else r.warn("Incorrect SPARQL variable in SELECT: "+t[n])}(C.slice(k+1,T),S),x(C.slice(T+2,C.length-1),S.pat),e)return S;for(var O in S.pat.statements){var I=S.pat.statements[O];"NamedNode"===I.subject.termType&&n.fetcher&&n.fetcher.lookUpThing(I.subject,"sparql:"+I.subject),"NamedNode"===I.object.termType&&n.fetcher&&n.fetcher.lookUpThing(I.object,"sparql:"+I.object)}return S}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(18),o=n(4).docpart,s=n(36),a=n(23).namedNode,u=n(19),l=n(38),c=n(4).join,h=n(7),f=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||new i,this.store=e,e.updater)throw new Error("You can't have two UpdateManagers for the same store");e.fetcher||(e.fetcher=new s(e)),e.updater=this,this.ifps={},this.fps={},this.ns={},this.ns.link=u("http://www.w3.org/2007/ont/link#"),this.ns.http=u("http://www.w3.org/2007/ont/http#"),this.ns.httph=u("http://www.w3.org/2007/ont/httph#"),this.ns.ldp=u("http://www.w3.org/ns/ldp#"),this.ns.rdf=u("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.rdfs=u("http://www.w3.org/2000/01/rdf-schema#"),this.ns.rdf=u("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.owl=u("http://www.w3.org/2002/07/owl#"),this.patchControl=[]}var e;return(e=[{key:"patchControlFor",value:function(t){return this.patchControl[t.uri]||(this.patchControl[t.uri]=[]),this.patchControl[t.uri]}},{key:"editable",value:function(t,e){if(!t)return!1;if(e||(e=this.store),"file:///"===t.slice(0,8)){if(e.holds(e.sym(t),a("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),a("http://www.w3.org/2007/ont/link#MachineEditableDocument")))return"LOCALFILE";var n=e.statementsMatching(e.sym(t));return console.log("UpdateManager.editable: Not MachineEditableDocument file "+t+"\n"),console.log(n.map(function(t){return t.toNT()}).join("\n")),!1}var r,i,s=!1,u=e.each(void 0,this.ns.link("requestedURI"),o(t));if(e.holds(a(t),this.ns.rdf("type"),this.ns.ldp("Resource")))return"SPARQL";for(var l=0;l=0)return"SPARQL";var p=e.each(c,this.ns.httph("ms-author-via"));if(p.length)for(var d=0;d=0)return"SPARQL";if(i.indexOf("DAV")>=0)return"DAV"}var g=e.each(c,this.ns.http("status"));if(g.length)for(var y=0;y"),r.store.fetcher.webOperation("PATCH",t,{noMeta:!0,contentType:"application/sparql-update",body:e})}).then(function(r){if(!r.ok){var i="UpdateManager: update failed for <"+t+"> status="+r.status+", "+r.statusText+"\n for query: "+e;throw console.log(i),new Error(i)}console.log("UpdateManager: update Ok for <"+t+">"),n(t,r.ok,r.responseText,r)}).catch(function(e){n(t,!1,e.message,e)})}},{key:"update_statement",value:function(t){if(!t||t.why){var e=this,n=this.statementContext(t);return{statement:t?[t.subject,t.predicate,t.object,t.why]:void 0,statementNT:t?this.anonymizeNT(t):void 0,where:e.contextWhere(n),set_object:function(t,n){var r=this.where;r+="DELETE DATA { "+this.statementNT+" } ;\n",r+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(t)+" . }\n",e.fire(this.statement[3].uri,r,n)}}}}},{key:"insert_statement",value:function(t,e){var n=t instanceof Array?t[0]:t,r=this.contextWhere(this.statementContext(n));if(t instanceof Array){for(var i="",o=0;o 1 different downstream actions")}else n.downstreamAction=e;else e(t)}},{key:"clearUpstreamCount",value:function(t){this.patchControlFor(t).upstreamCount=0}},{key:"getUpdatesVia",value:function(t){var e=this.store.fetcher.getHeader(t,"updates-via");return e&&e.length?e[0].trim():null}},{key:"addDownstreamChangeListener",value:function(t,e){var n=this,r=this.patchControlFor(t);r.downstreamChangeListeners||(r.downstreamChangeListeners=[]),r.downstreamChangeListeners.push(e),this.setRefreshHandler(t,function(t){n.reloadAndSync(t)})}},{key:"reloadAndSync",value:function(t){var e=this.patchControlFor(t),n=this;if(e.reloading)console.log(" Already reloading - stop");else{e.reloading=!0;var r=1e3;!function i(){console.log("try reload - timeout = "+r),n.reload(n.store,t,function(n,o,s){if(e.reloading=!1,n){if(e.downstreamChangeListeners)for(var a=0;a=0))return void console.log("just an echo: "+l.upstreamCount);console.log("Assume a real downstream change: "+l.upstreamCount+" -> 0"),l.upstreamCount=0,i.requestDownstreamAction(t,r)}}}(),!0):(console.log("Server doies not support live updates thoughUpdates-Via :-("),!1)}},{key:"update",value:function(t,e,n,o){var s=this;try{var a=this.store,u=t?t instanceof i?t.statements:t instanceof Array?t:[t]:[],l=e?e instanceof i?e.statements:e instanceof Array?e:[e]:[];if(!(u instanceof Array))throw new Error("Type Error "+r(u)+": "+u);if(!(l instanceof Array))throw new Error("Type Error "+r(l)+": "+l);if(0===u.length&&0===l.length)return n(null,!0);var c=u.length?u[0].why:l[0].why;if(!c){var f="Error patching: statement does not specify which document to patch:"+u[0]+", "+l[0];throw console.log(f),new Error(f)}var p=this.patchControlFor(c),d=Date.now(),g=["subject","predicate","object","why"],y={delete:u,insert:l};["insert","delete"].map(function(t){y[t].map(function(t){if(!c.sameTerm(t.why))throw new Error("update: destination "+c+" inconsistent with delete quad "+t.why);g.map(function(e){if(void 0===t[e])throw new Error("update: undefined "+e+" of statement.")})})});var m=this.editable(c.uri,a);if(!1===m)throw new Error("Update: Can't make changes in uneditable "+c);if(void 0===m){if(o)throw new Error("Update: Loaded "+c+"but stil can't figure out what editing protcol it supports.");return console.log("Update: have not loaded ".concat(c," before: loading now...")),void this.store.fetcher.load(c).then(function(r){s.update(t,e,n,!0)},function(t){throw new Error("Update: Can't read ".concat(c," before patching: ").concat(t))})}if(m.indexOf("SPARQL")>=0){var v=[];u.length&&(v=this.statementArrayBnodes(u)),l.length&&(v=v.concat(this.statementArrayBnodes(l)));var b=this.bnodeContext(v,c),w=this.contextWhere(b),_="";if(w.length){if(u.length){_+="DELETE { ";for(var x=0;x=0)this.updateDav(c,u,l,n);else{if(!(m.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+m+"' for "+c);try{this.updateLocalFile(c,u,l,n)}catch(t){n(c.uri,!1,"Exception trying to write back file <"+c.uri+">\n")}}}catch(t){n(void 0,!1,"Exception in update: "+t+"\n"+h.stackString(t))}}},{key:"updateDav",value:function(t,e,n,r){var i=this.store,o=i.any(t,this.ns.link("request"));if(!o)throw new Error("No record of our HTTP GET request for document: "+t);var s=i.any(o,this.ns.link("response"));if(!s)return null;for(var a=i.the(s,this.ns.httph("content-type")).value,u=i.statementsMatching(void 0,void 0,void 0,t).slice(),l=0;l>>");var d=t.uri.slice(7),g=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);if(g.initWithPath(d),!g.exists())throw new Error("Rewriting file <"+t.uri+"> but it does not exist!");var y=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);y.init(g,42,parseInt("0666",8),0),y.write(p,p.length),y.close();for(var m=0;m3&&void 0!==arguments[3]?arguments[3]:"";return n=n||{},console.log("deepCopying "+t+"\n"+r+"-> "+e),t.match(/\/$/)||(t+="/"),e.match(/\/$/)||(e+="/"),new Promise(function(i,o){M(t).then(function(s){for(var a=[],u=s.folders.concat(s.files),l=function(){var i=u[c],o=function(t,e,n){if(!n.startsWith(t))throw new Error("source {".concat(n,"} is not in tree {").concat(t,"}"));return e+n.slice(t.length)}(t,e,i.url);"folder"===i.type?O(o).then(function(){a.push(m(i.url,o,n,r+" "))}):(console.log("copying "+o),a.push(_(i.url,o)))},c=0;c; rel="type"',s="text/turtle");var u={method:"POST",headers:{slug:n,link:a},body:i};void 0===s&&"undefined"==typeof window||(u.headers["Content-Type"]=s),r.auth.fetch(e,u).then(function(n){var r=n.headers.get("location"),i=r.substr(r.lastIndexOf("/")+1);t(e+i)},function(t){o(t)})}));case 1:case"end":return t.stop()}},t,this)}))).apply(this,arguments)}function O(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){D(e).then(function(e){t()},function(r){I(e,void 0,"folder").then(function(e){t(e)},function(t){n(t)})})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function I(t,e,n){return(function(){return a()(o.a.mark(function t(e,n,r){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){var o=e.replace(/\/$/,"").replace(/.*\//,"");k(e.substring(0,e.lastIndexOf(o)),o,n,r).then(function(e){t(e)},function(t){i(t)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function P(){return(function(){return a()(o.a.mark(function t(){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.auth.logout());case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function A(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",N(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function R(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",N(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function N(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){L(e,{method:"DELETE"}).then(function(e){t(e)},function(e){t(e)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function j(t,e,n){return(function(){return a()(o.a.mark(function t(e,n,r){var i;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N(e);case 2:if(!(i=t.sent).match||!i.match(/409/)){t.next=5;break}throw new Error("Coulnd't delete, conflict!");case 5:return t.next=7,I(e,n,r);case 7:return t.abrupt("return",i=t.sent);case 9:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function D(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){L(e).then(function(e){t(e)},function(t){return n("fetch error "+t)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function M(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return"/"!=e.substr(-1)&&(e+="/"),t.abrupt("return",new Promise(function(t,n){L(e).then(function(r){y(r,e,"text/turtle").then(function(n){t(d(n,e,r))},function(t){return n(t)})},function(t){return n(t)})}));case 2:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function L(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){r.auth.fetch(e,n).then(function(n){n.ok||i(n.status+" ("+n.statusText+") "+e);var r=n.headers._headers?n.headers._headers["content-type"]:"";(r=r.toString()).match(/(image|audio|video)/)?n.buffer().then(function(e){t(e)},function(t){return i("buffer error "+t)}):n.text?n.text().then(function(e){t(e)},function(t){return i("buffer error "+t)}):t(n)},function(t){i("fetch errror "+t+e)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function U(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.auth.getCredentials(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function F(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!0);case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function V(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof window){t.next=2;break}return t.abrupt("return",F(e));case 2:return t.abrupt("return",new Promise(function(t,r){L(e,{encoding:null}).then(function(i){n.match(/\/$/)||(n+="/");var o=n+e.replace(/.*\//,"");try{fs.writeFileSync(o,i),t(o)}catch(t){r("write error "+o+" "+t)}},function(t){r("fetch error "+t)})}));case 3:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function B(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof window){t.next=2;break}return t.abrupt("return",F(n));case 2:return t.abrupt("return",new Promise(function(t,r){var i=fs.readFileSync(e,"utf-8");n.match(/\/$/)||(n+="/"),A(n+=e.replace(/.*\//,"")).then(function(){I(n,i).then(function(){t(e)},function(t){r("create "+t)})},function(t){r("delete error "+t)})}));case 3:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}n.d(e,"copyFolder",function(){return m}),n.d(e,"guessFileType",function(){return v}),n.d(e,"processFolder",function(){return b}),n.d(e,"text2graph",function(){return w}),n.d(e,"copyFile",function(){return _}),n.d(e,"fetchAndParse",function(){return x}),n.d(e,"popupLogin",function(){return S}),n.d(e,"checkSession",function(){return C}),n.d(e,"login",function(){return E}),n.d(e,"add",function(){return k}),n.d(e,"createFolder",function(){return O}),n.d(e,"createFile",function(){return I}),n.d(e,"logout",function(){return P}),n.d(e,"deleteFile",function(){return A}),n.d(e,"deleteFolder",function(){return R}),n.d(e,"remove",function(){return N}),n.d(e,"updateFile",function(){return j}),n.d(e,"readFile",function(){return D}),n.d(e,"readFolder",function(){return M}),n.d(e,"fetch",function(){return L}),n.d(e,"getCredentials",function(){return U}),n.d(e,"doWin",function(){return F}),n.d(e,"downloadFile",function(){return V}),n.d(e,"uploadFile",function(){return B}),void 0!==l.a&&(r={auth:l.a})}])},crnd:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},xDdU:function(t,e,n){var r,i,o=n("4fRq"),s=n("I2ZF"),a=0,u=0;t.exports=function(t,e,n){var l=e&&n||0,c=e||[],h=(t=t||{}).node||r,f=void 0!==t.clockseq?t.clockseq:i;if(null==h||null==f){var p=o();null==h&&(h=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=i=16383&(p[6]<<8|p[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),g=void 0!==t.nsecs?t.nsecs:u+1,y=d-a+(g-u)/1e4;if(y<0&&void 0===t.clockseq&&(f=f+1&16383),(y<0||d>a)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=g,i=f;var m=(1e4*(268435455&(d+=122192928e5))+g)%4294967296;c[l++]=m>>>24&255,c[l++]=m>>>16&255,c[l++]=m>>>8&255,c[l++]=255&m;var v=d/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=f>>>8|128,c[l++]=255&f;for(var b=0;b<6;++b)c[l+b]=h[b];return e||s(c)}},xk4V:function(t,e,n){var r=n("4fRq"),i=n("I2ZF");t.exports=function(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var s=(t=t||{}).random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;++a)e[o+a]=s[a];return e||i(s)}},zUnb:function(t,e,n){"use strict";n.r(e);var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function a(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})}function l(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function f(){for(var t=[],e=0;e0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(et);function ct(t){return t}function ht(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),at(ct,t)}function ft(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof D?t[0]:ht(n)(ot(t,r))}function pt(){return function(t){return t.lift(new dt(t))}}var dt=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new gt(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),gt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return i(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(I),yt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new x).add(this.source.subscribe(new vt(this.getSubject(),this))),t.closed?(this._connection=null,t=x.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return pt()(this)},e}(D).prototype,mt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:yt._subscribe},_isComplete:{value:yt._isComplete,writable:!0},getSubject:{value:yt.getSubject},connect:{value:yt.connect},refCount:{value:yt.refCount}},vt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return i(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(V);function bt(){return new B}function wt(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}var _t=function(){function t(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?wt({providedIn:e.providedIn||"root",factory:e.factory}):void 0}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),xt="__parameters__",St="__prop__metadata__";function Ct(t){return function(){for(var e=[],n=0;n ");else if("object"==typeof e){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):Ut(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+t.replace(re,"\n ")}function ue(t,e){return new Error(ae(t,e))}function le(t){for(var e in t)if(t[e]===te)return e;throw Error("!prop")}var ce=void 0;function he(t){var e=ce;return ce=t,e}function fe(t,e){if(void 0===e&&(e=0),void 0===ce)throw new Error("inject() must be called from an injection context");if(null===ce){var n=t.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;if(8&e)return null;throw new Error("Injector: NOT_FOUND ["+Ut(t)+"]")}return ce.get(t,8&e?null:void 0,e)}var pe=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),de=new(function(){return function(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}())("6.1.10"),ge="ngDebugContext",ye="ngOriginalError",me="ngErrorLogger";function ve(t){return t[ge]}function be(t){return t[ye]}function we(t){for(var e=[],n=1;n0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(t){return t.timeoutId!==i}),t(r._didWork,r.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})},t.prototype.whenStable=function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t}(),hn=function(){function t(){this._applications=new Map,fn.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),fn.findTestabilityInTree(this,t,e)},s([a("design:paramtypes",[])],t)}(),fn=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),pn=!0,dn=!1,gn=new _t("AllowMultipleToken");function yn(){return dn=!0,pn}var mn=function(){return function(t,e){this.name=t,this.token=e}}();function vn(t,e,n){void 0===n&&(n=[]);var r="Platform: "+e,i=new _t(r);return function(e){void 0===e&&(e=[]);var o=bn();if(!o||o.injector.get(gn,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{var s=n.concat(e).concat({provide:i,useValue:!0});!function(t){if(un&&!un.destroyed&&!un.injector.get(gn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");un=t.get(wn);var e=t.get(Pe,null);e&&e.forEach(function(t){return t()})}(Kt.create({providers:s,name:r}))}return function(t){var e=bn();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function bn(){return un&&!un.destroyed?un:null}var wn=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n,r=this,i="noop"===(n=e?e.ngZone:void 0)?new ln:("zone.js"===n?void 0:n)||new en({enableLongStackTrace:yn()}),o=[{provide:en,useValue:i}];return i.run(function(){var e=Kt.create({providers:o,parent:r.injector,name:t.moduleType.name}),n=t.create(e),s=n.injector.get(_e,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Sn(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(t){s.handleError(t)}})}),function(t,e,i){try{var o=((s=n.injector.get(ke)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return Se(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(a){throw e.runOutsideAngular(function(){return t.handleError(a)}),a}var s}(s,i)})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var r=this.injector.get(Me),i=_n({},e);return r.createCompiler([i]).compileModuleAsync(t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(xn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+Ut(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function _n(t,e){return Array.isArray(e)?e.reduce(_n,t):o({},t,e)}var xn=function(){function t(t,e,n,r,i,o){var s=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=yn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new D(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new D(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){en.assertNotInAngularZone(),Mt(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){en.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=ft(a,u.pipe(function(t){return pt()((e=bt,function(t){var n;n="function"==typeof e?e:function(){return e};var r=Object.create(t,mt);return r.source=t,r.subjectFactory=n,r})(t));var e}))}var e;return e=t,t.prototype.bootstrap=function(t,e){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof Ue?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var i=n instanceof Ge?null:this._injector.get($e),o=n.create(Kt.NULL,[],e||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(cn,null);return s&&o.injector.get(hn).registerApplication(o.location.nativeElement,s),this._loadComponent(o),yn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(r){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(r)})}finally{this._runningTick=!1,Ze(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;Sn(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Re,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),Sn(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Xe("ApplicationRef#tick()"),t}();function Sn(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Cn=function(){return function(){}}(),En=function(){return function(){}}(),kn=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({}),Tn=function(){return function(){}}(),On=function(){return function(t){this.nativeElement=t}}(),In=function(){return function(){}}(),Pn=function(){function t(){this.dirty=!0,this._results=[],this.changes=new tn,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[Dt()]=function(){return this._results[Dt()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var r=Array.isArray(n)?t(n):n;return e.concat(r)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),An=function(){return function(){}}(),Rn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Nn=function(){function t(t,e){this._compiler=t,this._config=e||Rn}return t.prototype.load=function(t){return this._compiler instanceof De?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,r=h(t.split("#"),2),i=r[0],o=r[1];return void 0===o&&(o="default"),n("crnd")(i).then(function(t){return t[o]}).then(function(t){return jn(t,i,o)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=h(t.split("#"),2),r=e[0],i=e[1],o="NgFactory";return void 0===i&&(i="default",o=""),n("crnd")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(t){return t[i+o]}).then(function(t){return jn(t,r,i)})},t}();function jn(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}var Dn=function(){return function(){}}(),Mn=function(){return function(){}}(),Ln=function(){return function(){}}(),Un=function(){return function(t,e){this.name=t,this.callback=e}}(),Fn=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof Vn?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),Vn=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=e,i}return i(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,i=this.childNodes.indexOf(t);-1!==i&&((n=this.childNodes).splice.apply(n,f([i+1,0],e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return function t(e,n,r){e.childNodes.forEach(function(e){e instanceof Vn&&(n(e)&&r.push(e),t(e,n,r))})}(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return function t(e,n,r){e instanceof Vn&&e.childNodes.forEach(function(e){n(e)&&r.push(e),e instanceof Vn&&t(e,n,r)})}(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(Fn),Bn=new Map;function zn(t){return Bn.get(t)||null}function Hn(t){Bn.set(t.nativeNode,t)}function qn(t,e){var n=$n(t),r=$n(e);return n&&r?function(t,e,n){for(var r=t[Dt()](),i=e[Dt()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(t,e,qn):!(n||!t||"object"!=typeof t&&"function"!=typeof t||r||!e||"object"!=typeof e&&"function"!=typeof e)||Lt(t,e)}var Wn=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),Gn=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function $n(t){return!!Jn(t)&&(Array.isArray(t)||!(t instanceof Map)&&Dt()in t)}function Jn(t){return null!==t&&("function"==typeof t||"object"==typeof t)}var Kn=function(){function t(){}return t.prototype.supports=function(t){return $n(t)},t.prototype.create=function(t){return new Qn(t)},t}(),Yn=function(t,e){return e},Qn=function(){function t(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Yn}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,i=null;e||n;){var o=!n||e&&e.currentIndex',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t=""+t+"";try{t=encodeURI(t)}catch(r){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t=""+t+"";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(n){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){for(var e=t.attributes,n=e.length-1;0")}else this.sanitizedSomething=!0},t.prototype.endElement=function(t){var e=t.nodeName.toLowerCase();Tr.hasOwnProperty(e)&&!Sr.hasOwnProperty(e)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(jr(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e},t}(),Rr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nr=/([^\#-~ |!])/g;function jr(t){return t.replace(/&/g,"&").replace(Rr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Nr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function Dr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Mr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Lr=/^url\(([^)]+)\)$/,Ur=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({}),Fr=function(){return function(){}}();function Vr(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.initIndex=-1,!0):i===n}function Br(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function zr(t,e){return t.nodes[e]}function Hr(t,e){return t.nodes[e]}function qr(t,e){return t.nodes[e]}function Wr(t,e){return t.nodes[e]}function Gr(t,e){return t.nodes[e]}var $r={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Jr(t,e,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){var n=new Error(t);return Kr(n,e),n}(i,t)}function Kr(t,e){t[ge]=e,t[me]=e.logError.bind(e)}function Yr(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}var Qr=function(){},Xr=new Map;function Zr(t){var e=Xr.get(t);return e||(e=Ut(t)+"_"+Xr.size,Xr.set(t,e)),e}function ti(t,e,n,r){if(Wn.isWrapped(r)){r=Wn.unwrap(r);var i=t.def.nodes[e].bindingIndex+n,o=Wn.unwrap(t.oldValues[i]);t.oldValues[i]=new Wn(o)}return r}var ei="$$undefined",ni="$$empty";function ri(t){return{id:ei,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}var ii=0;function oi(t,e,n,r){return!(!(2&t.state)&&Lt(t.oldValues[e.bindingIndex+n],r))}function si(t,e,n,r){return!!oi(t,e,n,r)&&(t.oldValues[e.bindingIndex+n]=r,!0)}function ai(t,e,n,r){var i=t.oldValues[e.bindingIndex+n];if(1&t.state||!qn(i,r)){var o=e.bindings[n].name;throw Jr($r.createDebugContext(t,e.nodeIndex),o+": "+i,o+": "+r,0!=(1&t.state))}}function ui(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function li(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function ci(t,e,n,r){try{return ui(33554432&t.def.nodes[e].flags?Hr(t,e).componentView:t),$r.handleEvent(t,e,n,r)}catch(i){t.root.errorHandler.handleError(i)}}function hi(t){return t.parent?Hr(t.parent,t.parentNodeDef.nodeIndex):null}function fi(t){return t.parent?t.parentNodeDef.parent:null}function pi(t,e){switch(201347067&e.flags){case 1:return Hr(t,e.nodeIndex).renderElement;case 2:return zr(t,e.nodeIndex).renderText}}function di(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function gi(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function yi(t){return 1<-1}(r)||"root"===i.providedIn&&r._def.isRoot))){var l=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:e.token.ngInjectableDef.factory,deps:[],index:l,token:e.token},t._providers[l]=Mi,t._providers[l]=zi(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{he(o)}}function zi(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(Bi(t,n[0]));case 2:return new e(Bi(t,n[0]),Bi(t,n[1]));case 3:return new e(Bi(t,n[0]),Bi(t,n[1]),Bi(t,n[2]));default:for(var i=new Array(r),o=0;o=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,$i(n,e),$r.dirtyParentQueries(r),Wi(r),r}function qi(t,e,n){var r=e?pi(e,e.def.lastRenderRootNode):t.renderElement,i=n.renderer.parentNode(r),o=n.renderer.nextSibling(r);xi(n,2,i,o,void 0)}function Wi(t){xi(t,3,null,null,void 0)}function Gi(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function $i(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var Ji=new Object;function Ki(t,e,n,r,i,o){return new Yi(t,e,n,r,i,o)}var Yi=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return i(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){if(!r)throw new Error("ngModule should be provided");var i=_i(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=$r.createRootView(t,e||[],n,i,r,Ji),a=qr(s,o).instance;return n&&s.renderer.setAttribute(Hr(s,0).renderElement,"ng-version",de.full),new Qi(s,new eo(s),a)},e}(Ue),Qi=function(t){function e(e,n,r){var i=t.call(this)||this;return i._view=e,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return i(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new On(Hr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new oo(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(Le);function Xi(t,e,n){return new Zi(t,e,n)}var Zi=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new On(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new oo(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=fi(t),t=t.parent;return t?new oo(t,e):new oo(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=Hi(this._data,t);$r.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new eo(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,i){var o=n||this.parentInjector;i||t instanceof Ge||(i=o.get($e));var s=t.create(o,r,void 0,i);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=t;return o=(n=this._data).viewContainer._embeddedViews,null==(r=e)&&(r=o.length),(i=s._view).viewContainerParent=this._view,Gi(o,r,i),function(t,e){var n=hi(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(e),function(t,n){if(!(4&n.flags)){e.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,e.parentNodeDef)}}(n,i),$r.dirtyParentQueries(i),qi(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(t._view);return i=e,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],$i(o,r),null==i&&(i=o.length),Gi(o,i,s),$r.dirtyParentQueries(s),Wi(s),qi(n,i>0?o[i-1]:null,s),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Hi(this._data,t);e&&$r.destroyView(e)},t.prototype.detach=function(t){var e=Hi(this._data,t);return e?new eo(e):null},t}();function to(t){return new eo(t)}var eo=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return xi(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){ui(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{$r.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){$r.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),$r.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,Wi(this._view),$r.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function no(t,e){return new ro(t,e)}var ro=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return i(e,t),e.prototype.createEmbeddedView=function(t){return new eo($r.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new On(Hr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(Dn);function io(t,e){return new oo(t,e)}var oo=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=Kt.THROW_IF_NOT_FOUND),$r.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:Zr(t)},e)},t}();function so(t,e){var n=t.def.nodes[e];if(1&n.flags){var r=Hr(t,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return zr(t,n.nodeIndex).renderText;if(20240&n.flags)return qr(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function ao(t){return new uo(t.renderer)}var uo=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=h(Oi(e),2),r=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,r),r},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var r=0;r0,r=e.provider;switch(201347067&e.flags){case 512:return Io(t,e.parent,n,r.value,r.deps);case 1024:return function(t,e,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(Ao(t,e,n,i[0]));case 2:return r(Ao(t,e,n,i[0]),Ao(t,e,n,i[1]));case 3:return r(Ao(t,e,n,i[0]),Ao(t,e,n,i[1]),Ao(t,e,n,i[2]));default:for(var s=Array(o),a=0;a0)l=g,Ko(g)||(c=g);else for(;l&&d===l.nodeIndex+l.childCount;){var v=l.parent;v&&(v.childFlags|=l.childFlags,v.childMatchedQueries|=l.childMatchedQueries),c=(l=v)&&Ko(l)?l.renderParent:l}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:t,nodes:e,updateDirectives:n||Qr,updateRenderer:r||Qr,handleEvent:function(t,n,r,i){return e[n].element.handleEvent(t,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:p}}function Ko(t){return 0!=(1&t.flags)&&null===t.element.name}function Yo(t,e,n){var r=e.element&&e.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function Qo(t,e,n,r){var i=ts(t.root,t.renderer,t,e,n);return es(i,t.component,r),ns(i),i}function Xo(t,e,n){var r=ts(t,t.renderer,null,null,e);return es(r,n,n),ns(r),r}function Zo(t,e,n,r){var i,o=e.element.componentRendererType;return i=o?t.root.rendererFactory.createRenderer(r,o):t.root.renderer,ts(t.root,i,t,e.element.componentProvider,n)}function ts(t,e,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function es(t,e,n){t.component=e,t.context=n}function ns(t){var e;di(t)&&(e=Hr(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,r=t.nodes,i=0;i0&&Di(t,e,0,n)&&(p=!0),f>1&&Di(t,e,1,r)&&(p=!0),f>2&&Di(t,e,2,i)&&(p=!0),f>3&&Di(t,e,3,o)&&(p=!0),f>4&&Di(t,e,4,s)&&(p=!0),f>5&&Di(t,e,5,a)&&(p=!0),f>6&&Di(t,e,6,u)&&(p=!0),f>7&&Di(t,e,7,l)&&(p=!0),f>8&&Di(t,e,8,c)&&(p=!0),f>9&&Di(t,e,9,h)&&(p=!0),p}(t,e,n,r,i,o,s,a,u,l,c,h);case 2:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=!1,p=e.bindings,d=p.length;if(d>0&&si(t,e,0,n)&&(f=!0),d>1&&si(t,e,1,r)&&(f=!0),d>2&&si(t,e,2,i)&&(f=!0),d>3&&si(t,e,3,o)&&(f=!0),d>4&&si(t,e,4,s)&&(f=!0),d>5&&si(t,e,5,a)&&(f=!0),d>6&&si(t,e,6,u)&&(f=!0),d>7&&si(t,e,7,l)&&(f=!0),d>8&&si(t,e,8,c)&&(f=!0),d>9&&si(t,e,9,h)&&(f=!0),f){var g=e.text.prefix;d>0&&(g+=$o(n,p[0])),d>1&&(g+=$o(r,p[1])),d>2&&(g+=$o(i,p[2])),d>3&&(g+=$o(o,p[3])),d>4&&(g+=$o(s,p[4])),d>5&&(g+=$o(a,p[5])),d>6&&(g+=$o(u,p[6])),d>7&&(g+=$o(l,p[7])),d>8&&(g+=$o(c,p[8])),d>9&&(g+=$o(h,p[9]));var y=zr(t,e.nodeIndex).renderText;t.renderer.setValue(y,g)}return f}(t,e,n,r,i,o,s,a,u,l,c,h);case 16384:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=qr(t,e.nodeIndex),p=f.instance,d=!1,g=void 0,y=e.bindings.length;return y>0&&oi(t,e,0,n)&&(d=!0,g=No(t,f,e,0,n,g)),y>1&&oi(t,e,1,r)&&(d=!0,g=No(t,f,e,1,r,g)),y>2&&oi(t,e,2,i)&&(d=!0,g=No(t,f,e,2,i,g)),y>3&&oi(t,e,3,o)&&(d=!0,g=No(t,f,e,3,o,g)),y>4&&oi(t,e,4,s)&&(d=!0,g=No(t,f,e,4,s,g)),y>5&&oi(t,e,5,a)&&(d=!0,g=No(t,f,e,5,a,g)),y>6&&oi(t,e,6,u)&&(d=!0,g=No(t,f,e,6,u,g)),y>7&&oi(t,e,7,l)&&(d=!0,g=No(t,f,e,7,l,g)),y>8&&oi(t,e,8,c)&&(d=!0,g=No(t,f,e,8,c,g)),y>9&&oi(t,e,9,h)&&(d=!0,g=No(t,f,e,9,h,g)),g&&p.ngOnChanges(g),65536&e.flags&&Br(t,256,e.nodeIndex)&&p.ngOnInit(),262144&e.flags&&p.ngDoCheck(),d}(t,e,n,r,i,o,s,a,u,l,c,h);case 32:case 64:case 128:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=e.bindings,p=!1,d=f.length;if(d>0&&si(t,e,0,n)&&(p=!0),d>1&&si(t,e,1,r)&&(p=!0),d>2&&si(t,e,2,i)&&(p=!0),d>3&&si(t,e,3,o)&&(p=!0),d>4&&si(t,e,4,s)&&(p=!0),d>5&&si(t,e,5,a)&&(p=!0),d>6&&si(t,e,6,u)&&(p=!0),d>7&&si(t,e,7,l)&&(p=!0),d>8&&si(t,e,8,c)&&(p=!0),d>9&&si(t,e,9,h)&&(p=!0),p){var g=Wr(t,e.nodeIndex),y=void 0;switch(201347067&e.flags){case 32:y=new Array(f.length),d>0&&(y[0]=n),d>1&&(y[1]=r),d>2&&(y[2]=i),d>3&&(y[3]=o),d>4&&(y[4]=s),d>5&&(y[5]=a),d>6&&(y[6]=u),d>7&&(y[7]=l),d>8&&(y[8]=c),d>9&&(y[9]=h);break;case 64:y={},d>0&&(y[f[0].name]=n),d>1&&(y[f[1].name]=r),d>2&&(y[f[2].name]=i),d>3&&(y[f[3].name]=o),d>4&&(y[f[4].name]=s),d>5&&(y[f[5].name]=a),d>6&&(y[f[6].name]=u),d>7&&(y[f[7].name]=l),d>8&&(y[f[8].name]=c),d>9&&(y[f[9].name]=h);break;case 128:var m=n;switch(d){case 1:y=m.transform(n);break;case 2:y=m.transform(r);break;case 3:y=m.transform(r,i);break;case 4:y=m.transform(r,i,o);break;case 5:y=m.transform(r,i,o,s);break;case 6:y=m.transform(r,i,o,s,a);break;case 7:y=m.transform(r,i,o,s,a,u);break;case 8:y=m.transform(r,i,o,s,a,u,l);break;case 9:y=m.transform(r,i,o,s,a,u,l,c);break;case 10:y=m.transform(r,i,o,s,a,u,l,c,h)}}g.value=y}return p}(t,e,n,r,i,o,s,a,u,l,c,h);default:throw"unreachable"}}(t,e,r,i,o,s,a,u,l,c,h,p):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var r=!1,i=0;i0&&ai(t,e,0,n),f>1&&ai(t,e,1,r),f>2&&ai(t,e,2,i),f>3&&ai(t,e,3,o),f>4&&ai(t,e,4,s),f>5&&ai(t,e,5,a),f>6&&ai(t,e,6,u),f>7&&ai(t,e,7,l),f>8&&ai(t,e,8,c),f>9&&ai(t,e,9,h)}(t,e,r,i,o,s,a,u,l,c,h,f):function(t,e,n){for(var r=0;r0){var o=new Set(t.modules);Cs.forEach(function(e,r){if(o.has(r.ngInjectableDef.providedIn)){var i={token:r,flags:e.flags|(n?4096:0),deps:vi(e.deps),value:e.value,index:t.providers.length};t.providers.push(i),t.providersByKey[Zr(r)]=i}})}}(t=t.factory(function(){return Qr})),t):t}(r))}var Ss=new Map,Cs=new Map,Es=new Map;function ks(t){Ss.set(t.token,t),"function"==typeof t.token&&t.token.ngInjectableDef&&"function"==typeof t.token.ngInjectableDef.providedIn&&Cs.set(t.token,t)}function Ts(t,e){var n=_i(e.viewDefFactory),r=_i(n.nodes[0].element.componentView);Es.set(t,r)}function Os(){Ss.clear(),Cs.clear(),Es.clear()}function Is(t){if(0===Ss.size)return t;var e=function(t){for(var e=[],n=null,r=0;r0?e.substring(1):e},e.prototype.prepareExternalUrl=function(t){var e=aa.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(oa),ca=function(t){function e(e,n){var r=t.call(this)||this;if(r._platformLocation=e,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return i(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return aa.joinWithSlash(this._baseHref,t)},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.pathname+aa.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?""+e+n:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(oa),ha=void 0,fa=["en",[["a","p"],["AM","PM"],ha],[["AM","PM"],ha,ha],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ha,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ha,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ha,"{1} 'at' {0}",ha],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],pa={},da=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),ga=new _t("UseV4Plurals"),ya=function(){return function(){}}(),ma=function(t){function e(e,n){var r=t.call(this)||this;return r.locale=e,r.deprecatedPluralFn=n,r}return i(e,t),e.prototype.getPluralCategory=function(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return function(t){var e=t.toLowerCase().replace(/_/g,"-"),n=pa[e];if(n)return n;var r=e.split("-")[0];if(n=pa[r])return n;if("en"===r)return fa;throw new Error('Missing locale data for the locale "'+t+'".')}(t)[18]}(e||this.locale)(t)){case da.Zero:return"zero";case da.One:return"one";case da.Two:return"two";case da.Few:return"few";case da.Many:return"many";default:return"other"}},e}(ya),va=function(){function t(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&($n(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Ut(t.item));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})},t.prototype._applyClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))},t.prototype._removeClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})},t}(),ba=function(){function t(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),wa=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOfDirty=!0,this._differ=null}return Object.defineProperty(t.prototype,"ngForOf",{set:function(t){this._ngForOf=t,this._ngForOfDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){yn()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,r,i){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new ba(null,e._ngForOf,-1,-1),i),s=new _a(t,o);n.push(s)}else null==i?e._viewContainer.remove(r):(o=e._viewContainer.get(r),e._viewContainer.move(o,i),s=new _a(t,o),n.push(s))});for(var r=0;r0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r0;s||(s=t[o]=[]);var u=Su(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:u,handler:i});else{for(var l=!1,c=0;c-1},e}(nu),Au=["alt","control","meta","shift"],Ru={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},Nu=function(t){function e(e){return t.call(this,e)||this}var n;return i(e,t),n=e,e.prototype.supports=function(t){return null!=n.parseEventName(t)},e.prototype.addEventListener=function(t,e,r){var i=n.parseEventName(e),o=n.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return La().onAndCancel(t,i.domEventName,o)})},e.parseEventName=function(t){var e=t.toLowerCase().split("."),r=e.shift();if(0===e.length||"keydown"!==r&&"keyup"!==r)return null;var i=n._normalizeKey(e.pop()),o="";if(Au.forEach(function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),o+=t+".")}),o+=i,0!=e.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},e.getEventFullKey=function(t){var e="",n=La().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Au.forEach(function(r){r!=n&&(0,Ru[r])(t)&&(e+=r+".")}),e+=n},e.eventCallback=function(t,e,r){return function(i){n.getEventFullKey(i)===t&&r.runGuarded(function(){return e(i)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e}(nu),ju=function(){return function(){}}(),Du=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return i(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case Ur.NONE:return e;case Ur.HTML:return e instanceof Lu?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){var n=null;try{xr=xr||new yr(t);var r=e?String(e):"";n=xr.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=xr.getInertBodyElement(r)}while(r!==o);var s=new Ar,a=s.sanitizeChildren(Dr(n)||n);return yn()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var u=Dr(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}(this._doc,String(e)));case Ur.STYLE:return e instanceof Uu?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(Lr);return e&&br(e[1])===e[1]||t.match(Mr)&&function(t){for(var e=!0,n=!0,r=0;r=this.toastrConfig.maxOpened&&(s=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));var a=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;var u=e;e&&r.enableHtml&&(u=this.sanitizer.sanitize(Ur.HTML,e));var l=new Zu(a),c=new Wu(this.index,r,u,n,t,l),h=new tl(c,this._injector),f=new Ju(r.toastComponent,h),p=a.attach(f,this.toastrConfig.newestOnTop);l.componentInstance=p._component;var d={toastId:this.index,message:e||"",toastRef:l,onShown:l.afterActivate(),onHidden:l.afterClosed(),onTap:c.onTap(),onAction:c.onAction(),portal:p};return s||setTimeout(function(){d.toastRef.activate(),i.currentlyActive=i.currentlyActive+1}),this.toasts.push(d),d},t.ngInjectableDef=wt({factory:function(){return new t(fe($u),fe(Xu),fe($t),fe(ju),fe(en))},token:t,providedIn:"root"}),t}(),nl=function(){function t(t,e,n){var r=this;this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=e.toastType+" "+e.config.toastClass,this.sub=e.toastRef.afterActivate().subscribe(function(){r.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(function(){r.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(function(){r.resetTimeout()})}return t.prototype.ngOnDestroy=function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)},t.prototype.activateToast=function(){var t=this;this.state=o({},this.state,{value:"active"}),!this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(function(){return t.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.updateProgress=function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime();this.width=(this.hideTime-t)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}},t.prototype.resetTimeout=function(){var t=this;clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=o({},this.state,{value:"active"}),this.outsideTimeout(function(){return t.remove()},this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10)},t.prototype.remove=function(){var t=this;"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=o({},this.state,{value:"removed"}),this.outsideTimeout(function(){return t.toastrService.remove(t.toastPackage.toastId)},+this.toastPackage.config.easeTime))},t.prototype.tapToast=function(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())},t.prototype.stickAround=function(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)},t.prototype.delayedHideToast=function(){var t=this;this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(function(){return t.remove()},this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.outsideTimeout=function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return n.timeout=setTimeout(function(){return n.runInsideAngular(t)},e)}):this.timeout=setTimeout(function(){return t()},e)},t.prototype.outsideInterval=function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return n.intervalId=setInterval(function(){return n.runInsideAngular(t)},e)}):this.intervalId=setInterval(function(){return t()},e)},t.prototype.runInsideAngular=function(t){this.ngZone?this.ngZone.run(function(){return t()}):t()},t}(),rl=o({},Gu,{toastComponent:nl}),il=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:$u,useValue:{default:rl,config:e}}]}},t}(),ol=$rdf.Namespace("http://www.w3.org/2006/vcard/ns#"),sl=$rdf.Namespace("http://xmlns.com/foaf/0.1/"),al=function(){function t(t){var e=this;this.toastr=t,this.store=$rdf.graph(),this.fetcher=$rdf.Fetcher,this.updateManager=$rdf.UpdateManager,this.getSession=function(){return u(e,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this,[4,solid.auth.currentSession(localStorage)];case 1:return t.session=e.sent(),[2]}})})},this.getValueFromVcard=function(t,n){return e.getValueFromNamespace(t,ol,n)},this.getValueFromFoaf=function(t,n){return e.getValueFromNamespace(t,sl,n)},this.transformDataForm=function(t,n,r){var i=[],o=[],s=Object.keys(t.value),a=JSON.parse(localStorage.getItem("oldProfileData"))||{};return s.map(function(s){var u=ol(e.getFieldName(s)),l=e.getUriForField(s,n),c=r,h=e.getFieldValue(t,s),f=e.getOldFieldValue(s,a);f||!h||"phone"!==s&&"email"!==s?a[s]&&t.value[s]&&!t.controls[s].pristine?(o.push($rdf.st(l,u,f,c)),i.push($rdf.st(l,u,h,c))):!a[s]||t.value[s]||t.controls[s].pristine?a[s]||!t.value[s]||t.controls[s].pristine||i.push($rdf.st(l,u,h,c)):o.push($rdf.st(l,u,f,c)):e.addNewLinkedField(s,i,u,h,c,n)}),{insertions:i,deletions:o}},this.updateProfile=function(t){return u(e,void 0,void 0,function(){var e,n,r,i=this;return l(this,function(o){return e=$rdf.sym(this.session.webId),n=$rdf.NamedNode.fromValue(this.session.webId.split("#")[0]),((r=this.transformDataForm(t,e,n)).insertions.length>0||r.deletions.length>0)&&this.updateManager.update(r.deletions,r.insertions,function(e,n,r){n?(i.toastr.success("Your Solid profile has been successfully updated","Success!"),t.form.markAsPristine(),t.form.markAsTouched()):i.toastr.error("Message: "+r,"An error has occurred")}),[2]})})},this.getAddress=function(){var t=e.getValueFromVcard("hasAddress");return t?{locality:e.getValueFromVcard("locality",t),country_name:e.getValueFromVcard("country-name",t),region:e.getValueFromVcard("region",t),street:e.getValueFromVcard("street-address",t)}:{}},this.getEmail=function(){var t=e.getValueFromVcard("hasEmail");return t?e.getValueFromVcard("value",t).split("mailto:")[1]:""},this.getPhone=function(){var t=e.getValueFromVcard("hasTelephone");if(t)return e.getValueFromVcard("value",t).split("tel:+")[1]},this.getProfile=function(){return u(e,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return this.session?[3,2]:[4,this.getSession()];case 1:e.sent(),e.label=2;case 2:console.log("Wait for it..."),null==this.session&&console.log("NULL SESSION!!!"),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,this.fetcher.load(this.session.webId)];case 4:return e.sent(),console.log("Profile loaded: "+this.getValueFromVcard("fn")),[2,{fn:this.getValueFromVcard("fn"),company:this.getValueFromVcard("organization-name"),phone:this.getPhone(),role:this.getValueFromVcard("role"),image:this.getValueFromVcard("hasPhoto"),address:this.getAddress(),email:this.getEmail()}];case 5:return t=e.sent(),console.log("Error fetching data: "+t),[3,6];case 6:return[2]}})})},this.fetcher=new $rdf.Fetcher(this.store,{}),this.updateManager=new $rdf.UpdateManager(this.store),this.getSession()}return t.prototype.addNewLinkedField=function(t,e,n,r,i,o){var s=t+":"+Date.now(),a=$rdf.sym(this.session.webId.split("#")[0]+"#"+s),u="phone"===t?$rdf.sym(ol("hasTelephone")):$rdf.sym(ol("hasEmail"));e.push($rdf.st(a,n,r,i));var l="phone"===t?$rdf.literal("Home"):$rdf.literal("Personal");e.push($rdf.st(a,ol("type"),l,i)),e.push($rdf.st(o,u,a,i))},t.prototype.getUriForField=function(t,e){var n,r;switch(t){case"phone":(n=this.getValueFromVcard("hasTelephone"))&&(r=$rdf.sym(n));break;case"email":(n=this.getValueFromVcard("hasEmail"))&&(r=$rdf.sym(n));break;default:r=e}return r},t.prototype.getFieldValue=function(t,e){var n;if(t.value[e]){switch(e){case"phone":n=$rdf.sym("tel:+"+t.value[e]);break;case"email":n=$rdf.sym("mailto:"+t.value[e]);break;default:n=t.value[e]}return n}},t.prototype.getOldFieldValue=function(t,e){var n;if(e&&e[t]){switch(t){case"phone":n=$rdf.sym("tel:+"+e[t]);break;case"email":n=$rdf.sym("mailto:"+e[t]);break;default:n=e[t]}return n}},t.prototype.getFieldName=function(t){switch(t){case"company":return"organization-name";case"phone":case"email":return"value";default:return t}},t.prototype.getValueFromNamespace=function(t,e,n){var r=this.store.any($rdf.sym(n||this.session.webId),e(t));return r?r.value:""},t.prototype.getContacts=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:t=this.session.webId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetcher.load(this.store.sym(t).doc())];case 2:return n.sent(),[2,this.store.each(this.store.sym(t),sl("knows"))];case 3:return e=n.sent(),console.log("Error fetching contacts data: "+e),[3,4];case 4:return[2]}})})},t.prototype.getWebID=function(){return this.session.webId},t.prototype.getUserName=function(){return this.getValueFromVcard("fn")},t.ngInjectableDef=wt({factory:function(){return new t(fe(el))},token:t,providedIn:"root"}),t}(),ul=new D(function(t){return t.complete()});function ll(t){return t?function(t){return new D(function(e){return t.schedule(function(){return e.complete()})})}(t):ul}function cl(t){var e=new D(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}function hl(){for(var t=[],e=0;e0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?yl(function(e,n){return t(e,n,r)}):ct,_l(1),n?Il(e):Tl(function(){return new pl}))}}function Nl(t,e){return function(n){return n.lift(new jl(t,e,n))}}var jl=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Dl(t,this.predicate,this.thisArg,this.source))},t}(),Dl=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return i(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(I);function Ml(t){return function(e){var n=new Ll(t),r=e.lift(n);return n.caught=r}}var Ll=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ul(t,this.selector,this.caught))},t}(),Ul=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return i(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(i){return void t.prototype.error.call(this,i)}this._unsubscribeAndRecycle();var r=new q(this,void 0,void 0);this.add(r),tt(this,n,void 0,void 0,r)}},e}(et);function Fl(t){return function(e){return 0===t?ll():e.lift(new Vl(t))}}var Vl=function(){function t(t){if(this.total=t,this.total<0)throw new wl}return t.prototype.call=function(t,e){return e.subscribe(new Bl(t,this.total))},t}(),Bl=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return i(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(I);function zl(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?yl(function(e,n){return t(e,n,r)}):ct,Fl(1),n?Il(e):Tl(function(){return new pl}))}}function Hl(t,e){return at(t,e,1)}function ql(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Wl(t,e,n))}}var Wl=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Gl(t,this.accumulator,this.seed,this.hasSeed))},t}(),Gl=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return i(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(r){this.destination.error(r)}this.seed=e,this.destination.next(e)},e}(I),$l=function(){return function(t,e){this.id=t,this.url=e}}(),Jl=function(t){function e(e,n,r,i){void 0===r&&(r="imperative"),void 0===i&&(i=null);var o=t.call(this,e,n)||this;return o.navigationTrigger=r,o.restoredState=i,o}return i(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}($l),Kl=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.urlAfterRedirects=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}($l),Yl=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.reason=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}($l),Ql=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.error=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}($l),Xl=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),Zl=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),tc=function(t){function e(e,n,r,i,o){var s=t.call(this,e,n)||this;return s.urlAfterRedirects=r,s.state=i,s.shouldActivate=o,s}return i(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}($l),ec=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),nc=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),rc=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),ic=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),oc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),sc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),ac=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),uc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),lc=function(){function t(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}return t.prototype.toString=function(){return"Scroll(anchor: '"+this.anchor+"', position: '"+(this.position?this.position[0]+", "+this.position[1]:null)+"')"},t}(),cc=function(){return function(){}}(),hc="primary",fc=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return this.params.hasOwnProperty(t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();function pc(t){return new fc(t)}function dc(t,e,n){var r=n.path.split("/");if(r.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.length0?t[t.length-1]:null}function Sc(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Cc(t){return t.pipe(ht(),Nl(function(t){return!0===t}))}function Ec(t){return Ce(t)?t:Se(t)?st(Promise.resolve(t)):hl(t)}function kc(t,e,n){return n?function(t,e){return wc(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!Pc(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!e.children[r])return!1;if(!t(e.children[r],n.children[r]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return e[n]===t[n]})}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,r,i){if(n.segments.length>i.length)return!!Pc(s=n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!Pc(n.segments,i))return!1;for(var o in r.children){if(!n.children[o])return!1;if(!t(n.children[o],r.children[o]))return!1}return!0}var s=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!!Pc(n.segments,s)&&!!n.children[hc]&&e(n.children[hc],r,a)}(e,n,n.segments)}(t.root,e.root)}var Tc=function(){function t(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=pc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return jc.serialize(this)},t}(),Oc=function(){function t(t,e){var n=this;this.segments=t,this.children=e,this.parent=null,Sc(e,function(t,e){return t.parent=n})}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return Dc(this)},t}(),Ic=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=pc(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return Bc(this)},t}();function Pc(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}function Ac(t,e){var n=[];return Sc(t.children,function(t,r){r===hc&&(n=n.concat(e(t,r)))}),Sc(t.children,function(t,r){r!==hc&&(n=n.concat(e(t,r)))}),n}var Rc=function(){return function(){}}(),Nc=function(){function t(){}return t.prototype.parse=function(t){var e=new Gc(t);return new Tc(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){var e,n;return"/"+function t(e,n){if(!e.hasChildren())return Dc(e);if(n){var r=e.children[hc]?t(e.children[hc],!1):"",i=[];return Sc(e.children,function(e,n){n!==hc&&i.push(n+":"+t(e,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=Ac(e,function(n,r){return r===hc?[t(e.children[hc],!1)]:[r+":"+t(n,!1)]});return Dc(e)+"/("+o.join("//")+")"}(t.root,!0)+(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return Lc(t)+"="+Lc(e)}).join("&"):Lc(t)+"="+Lc(n)})).length?"?"+n.join("&"):"")+("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"")},t}(),jc=new Nc;function Dc(t){return t.segments.map(function(t){return Bc(t)}).join("/")}function Mc(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Lc(t){return Mc(t).replace(/%3B/gi,";")}function Uc(t){return Mc(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Fc(t){return decodeURIComponent(t)}function Vc(t){return Fc(t.replace(/\+/g,"%20"))}function Bc(t){return""+Uc(t.path)+(e=t.parameters,Object.keys(e).map(function(t){return";"+Uc(t)+"="+Uc(e[t])}).join(""));var e}var zc=/^[^\/()?;=#]+/;function Hc(t){var e=t.match(zc);return e?e[0]:""}var qc=/^[^=?&#]+/,Wc=/^[^?&#]+/,Gc=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Oc([],{}):new Oc([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[hc]=new Oc(t,e)),n},t.prototype.parseSegment=function(){var t=Hc(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new Ic(Fc(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=Hc(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var r=Hc(this.remaining);r&&this.capture(n=r)}t[Fc(e)]=Fc(n)}},t.prototype.parseQueryParam=function(t){var e,n=(e=this.remaining.match(qc))?e[0]:"";if(n){this.capture(n);var r="";if(this.consumeOptional("=")){var i=function(t){var e=t.match(Wc);return e?e[0]:""}(this.remaining);i&&this.capture(r=i)}var o=Vc(n),s=Vc(r);if(t.hasOwnProperty(o)){var a=t[o];Array.isArray(a)||(t[o]=a=[a]),a.push(s)}else t[o]=s}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=Hc(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=hc);var o=this.parseChildren();e[i]=1===Object.keys(o).length?o[hc]:new Oc([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),$c=function(){return function(t){this.segmentGroup=t||null}}(),Jc=function(){return function(t){this.urlTree=t}}();function Kc(t){return new D(function(e){return e.error(new $c(t))})}function Yc(t){return new D(function(e){return e.error(new Jc(t))})}function Qc(t){return new D(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))})}var Xc=function(){function t(t,e,n,r,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=t.get($e)}return t.prototype.apply=function(){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,hc).pipe(nt(function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)})).pipe(Ml(function(e){if(e instanceof Jc)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof $c)throw t.noMatchError(e);throw e}))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,hc).pipe(nt(function(n){return e.createUrlTree(n,t.queryParams,t.fragment)})).pipe(Ml(function(t){if(t instanceof $c)throw e.noMatchError(t);throw t}))},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,n){var r,i=t.segments.length>0?new Oc([],((r={})[hc]=t,r)):t;return new Tc(i,e,n)},t.prototype.expandSegmentGroup=function(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(nt(function(t){return new Oc([],t)})):this.expandSegment(t,n,e,n.segments,r,!0)},t.prototype.expandChildren=function(t,e,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return hl({});var o=[],s=[],a={};return Sc(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(t,e,l,u)).pipe(nt(function(t){return a[i]=t}));i===hc?o.push(c):s.push(c)}),hl.apply(null,o.concat(s)).pipe(gl(),Rl(),nt(function(){return a}))}(n.children)},t.prototype.expandSegment=function(t,e,n,r,i,o){var s=this;return hl.apply(void 0,f(n)).pipe(nt(function(a){return s.expandSegmentAgainstRoute(t,e,n,a,r,i,o).pipe(Ml(function(t){if(t instanceof $c)return hl(null);throw t}))}),gl(),zl(function(t){return!!t}),Ml(function(t,n){if(t instanceof pl||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,r,i))return hl(new Oc([],{}));throw new $c(e)}throw t}))},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.expandSegmentAgainstRoute=function(t,e,n,r,i,o,s){return nh(r)!==o?Kc(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,i):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o):Kc(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Yc(o):this.lineralizeSegments(n,o).pipe(at(function(n){var o=new Oc(n,{});return i.expandSegment(t,o,e,n,r,!1)}))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){var s=this,a=Zc(e,r,i),u=a.consumedSegments,l=a.lastChild,c=a.positionalParamSegments;if(!a.matched)return Kc(e);var h=this.applyRedirectCommands(u,r.redirectTo,c);return r.redirectTo.startsWith("/")?Yc(h):this.lineralizeSegments(r,h).pipe(at(function(r){return s.expandSegment(t,e,n,r.concat(i.slice(l)),o,!1)}))},t.prototype.matchSegmentAgainstRoute=function(t,e,n,r){var i=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(nt(function(t){return n._loadedConfig=t,new Oc(r,{})})):hl(new Oc(r,{}));var s=Zc(e,n,r),a=s.consumedSegments,u=s.lastChild;if(!s.matched)return Kc(e);var l=r.slice(u);return this.getChildConfig(t,n).pipe(at(function(t){var n=t.module,r=t.routes,s=function(t,e,n,r){return n.length>0&&function(t,e,n){return r.some(function(n){return eh(t,e,n)&&nh(n)!==hc})}(t,n)?{segmentGroup:th(new Oc(e,function(t,e){var n,r,i={};i[hc]=e;try{for(var o=c(t),s=o.next();!s.done;s=o.next()){var a=s.value;""===a.path&&nh(a)!==hc&&(i[nh(a)]=new Oc([],{}))}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(r,new Oc(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return r.some(function(n){return eh(t,e,n)})}(t,n)?{segmentGroup:th(new Oc(t.segments,function(t,e,n,r){var i,s,a={};try{for(var u=c(n),l=u.next();!l.done;l=u.next()){var h=l.value;eh(t,e,h)&&!r[nh(h)]&&(a[nh(h)]=new Oc([],{}))}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}return o({},r,a)}(t,n,r,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,a,l,r),u=s.segmentGroup,h=s.slicedSegments;return 0===h.length&&u.hasChildren()?i.expandChildren(n,r,u).pipe(nt(function(t){return new Oc(a,t)})):0===r.length&&0===h.length?hl(new Oc(a,{})):i.expandSegment(n,u,r,h,hc,!0).pipe(nt(function(t){return new Oc(a.concat(t.segments),t.children)}))}))},t.prototype.getChildConfig=function(t,e){var n=this;return e.children?hl(new gc(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?hl(e._loadedConfig):function(t,e){var n=e.canLoad;return n&&0!==n.length?Cc(st(n).pipe(nt(function(n){var r=t.get(n);return Ec(r.canLoad?r.canLoad(e):r(e))}))):hl(!0)}(t.injector,e).pipe(at(function(r){return r?n.configLoader.load(t.injector,e).pipe(nt(function(t){return e._loadedConfig=t,t})):function(t){return new D(function(e){return e.error(((n=Error("NavigationCancelingError: Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false")).ngNavigationCancelingError=!0,n));var n})}(e)})):hl(new gc([],t))},t.prototype.lineralizeSegments=function(t,e){for(var n=[],r=e.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return hl(n);if(r.numberOfChildren>1||!r.children[hc])return Qc(t.redirectTo);r=r.children[hc]}},t.prototype.applyRedirectCommands=function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,n,r){var i=this.createSegmentGroup(t,e.root,n,r);return new Tc(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var n={};return Sc(t,function(t,r){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);n[r]=e[i]}else n[r]=t}),n},t.prototype.createSegmentGroup=function(t,e,n,r){var i=this,o=this.createSegments(t,e.segments,n,r),s={};return Sc(e.children,function(e,o){s[o]=i.createSegmentGroup(t,e,n,r)}),new Oc(o,s)},t.prototype.createSegments=function(t,e,n,r){var i=this;return e.map(function(e){return e.path.startsWith(":")?i.findPosParam(t,e,r):i.findOrReturn(e,n)})},t.prototype.findPosParam=function(t,e,n){var r=n[e.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return r},t.prototype.findOrReturn=function(t,e){var n,r,i=0;try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.path===t.path)return e.splice(i),a;i++}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return t},t}();function Zc(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(e.matcher||dc)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function th(t){if(1===t.numberOfChildren&&t.children[hc]){var e=t.children[hc];return new Oc(t.segments.concat(e.segments),e.children)}return t}function eh(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function nh(t){return t.outlet||hc}var rh=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=ih(t,this._root);return e?e.children.map(function(t){return t.value}):[]},t.prototype.firstChild=function(t){var e=ih(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=oh(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})},t.prototype.pathFromRoot=function(t){return oh(t,this._root).map(function(t){return t.value})},t}();function ih(t,e){var n,r;if(t===e.value)return e;try{for(var i=c(e.children),o=i.next();!o.done;o=i.next()){var s=ih(t,o.value);if(s)return s}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return null}function oh(t,e){var n,r;if(t===e.value)return[e];try{for(var i=c(e.children),o=i.next();!o.done;o=i.next()){var s=oh(t,o.value);if(s.length)return s.unshift(e),s}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return[]}var sh=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ah(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var uh=function(t){function e(e,n){var r=t.call(this,e)||this;return r.snapshot=n,dh(r,e),r}return i(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(rh);function lh(t,e){var n=function(t,e){var n=new fh([],{},{},"",{},hc,e,null,t.root,-1,{});return new ph("",new sh(n,[]))}(t,e),r=new dl([new Ic("",{})]),i=new dl({}),o=new dl({}),s=new dl({}),a=new dl(""),u=new ch(r,i,s,a,o,hc,e,n.root);return u.snapshot=n.root,new uh(new sh(u,[]),n)}var ch=function(){function t(t,e,n,r,i,o,s,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(nt(function(t){return pc(t)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(nt(function(t){return pc(t)}))),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function hh(t,e){void 0===e&&(e="emptyOnly");var n=t.pathFromRoot,r=0;if("always"!==e)for(r=n.length-1;r>=1;){var i=n[r],s=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(s.component)break;r--}}return function(t){return t.reduce(function(t,e){return{params:o({},t.params,e.params),data:o({},t.data,e.data),resolve:o({},t.resolve,e._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var fh=function(){function t(t,e,n,r,i,o,s,a,u,l,c){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this.routeConfig=a,this._urlSegment=u,this._lastPathIndex=l,this._resolve=c}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=pc(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=pc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),ph=function(t){function e(e,n){var r=t.call(this,n)||this;return r.url=e,dh(r,n),r}return i(e,t),e.prototype.toString=function(){return gh(this._root)},e}(rh);function dh(t,e){e.value._routerState=t,e.children.forEach(function(e){return dh(t,e)})}function gh(t){var e=t.children.length>0?" { "+t.children.map(gh).join(", ")+" } ":"";return""+t.value+e}function yh(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,wc(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),wc(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;n0&&bh(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(r&&r!==xc(n))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),xh=function(){return function(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}();function Sh(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[hc]:""+t}function Ch(t,e,n){if(t||(t=new Oc([],{})),0===t.segments.length&&t.hasChildren())return Eh(t,e,n);var r=function(t,e,n){for(var r=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i=n.length)return o;var s=t.segments[i],a=Sh(n[r]),u=r0&&void 0===a)break;if(a&&u&&"object"==typeof u&&void 0===u.outlets){if(!Ih(a,u,s))return o;r+=2}else{if(!Ih(a,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex=2?function(e){return N(ql(t,void 0),_l(1),Il(void 0))(e)}:function(e){return N(ql(function(e,n,r){return t(e)}),_l(1))(e)}}(function(t,e){return t})):hl(null)},t.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},t.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},t.prototype.setupChildRouteGuards=function(t,e,n,r){var i=this,o=ah(e);t.children.forEach(function(t){i.setupRouteGuards(t,o[t.value.outlet],n,r.concat([t.value])),delete o[t.value.outlet]}),Sc(o,function(t,e){return i.deactivateRouteAndItsChildren(t,n.getContext(e))})},t.prototype.setupRouteGuards=function(t,e,n,r){var i=t.value,o=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var a=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);a?this.canActivateChecks.push(new Ph(r)):(i.data=o.data,i._resolvedData=o._resolvedData),this.setupChildRouteGuards(t,e,i.component?s?s.children:null:n,r),a&&this.canDeactivateChecks.push(new Ah(s.outlet.component,o))}else o&&this.deactivateRouteAndItsChildren(e,s),this.canActivateChecks.push(new Ph(r)),this.setupChildRouteGuards(t,null,i.component?s?s.children:null:n,r)},t.prototype.shouldRunGuardsAndResolvers=function(t,e,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!mh(t,e)||!wc(t.queryParams,e.queryParams);case"paramsChange":default:return!mh(t,e)}},t.prototype.deactivateRouteAndItsChildren=function(t,e){var n=this,r=ah(t),i=t.value;Sc(r,function(t,r){n.deactivateRouteAndItsChildren(t,i.component?e?e.children.getContext(r):null:e)}),this.canDeactivateChecks.push(new Ah(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))},t.prototype.runCanDeactivateChecks=function(){var t=this;return st(this.canDeactivateChecks).pipe(at(function(e){return t.runCanDeactivate(e.component,e.route)}),Nl(function(t){return!0===t}))},t.prototype.runCanActivateChecks=function(){var t=this;return st(this.canActivateChecks).pipe(Hl(function(e){return Cc(st([t.fireChildActivationStart(e.route.parent),t.fireActivationStart(e.route),t.runCanActivateChild(e.path),t.runCanActivate(e.route)]))}),Nl(function(t){return!0===t}))},t.prototype.fireActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new ac(t)),hl(!0)},t.prototype.fireChildActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new oc(t)),hl(!0)},t.prototype.runCanActivate=function(t){var e=this,n=t.routeConfig?t.routeConfig.canActivate:null;return n&&0!==n.length?Cc(st(n).pipe(nt(function(n){var r=e.getToken(n,t);return Ec(r.canActivate?r.canActivate(t,e.future):r(t,e.future)).pipe(zl())}))):hl(!0)},t.prototype.runCanActivateChild=function(t){var e=this,n=t[t.length-1];return Cc(st(t.slice(0,t.length-1).reverse().map(function(t){return e.extractCanActivateChild(t)}).filter(function(t){return null!==t})).pipe(nt(function(t){return Cc(st(t.guards).pipe(nt(function(r){var i=e.getToken(r,t.node);return Ec(i.canActivateChild?i.canActivateChild(n,e.future):i(n,e.future)).pipe(zl())})))})))},t.prototype.extractCanActivateChild=function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null},t.prototype.runCanDeactivate=function(t,e){var n=this,r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return r&&0!==r.length?st(r).pipe(at(function(r){var i=n.getToken(r,e);return Ec(i.canDeactivate?i.canDeactivate(t,e,n.curr,n.future):i(t,e,n.curr,n.future)).pipe(zl())})).pipe(Nl(function(t){return!0===t})):hl(!0)},t.prototype.runResolve=function(t,e){return this.resolveNode(t._resolve,t).pipe(nt(function(n){return t._resolvedData=n,t.data=o({},t.data,hh(t,e).resolve),null}))},t.prototype.resolveNode=function(t,e){var n=this,r=Object.keys(t);if(0===r.length)return hl({});if(1===r.length){var i=r[0];return this.getResolver(t[i],e).pipe(nt(function(t){var e;return(e={})[i]=t,e}))}var o={};return st(r).pipe(at(function(r){return n.getResolver(t[r],e).pipe(nt(function(t){return o[r]=t,t}))})).pipe(Rl(),nt(function(){return o}))},t.prototype.getResolver=function(t,e){var n=this.getToken(t,e);return Ec(n.resolve?n.resolve(e,this.future):n(e,this.future))},t.prototype.getToken=function(t,e){var n=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(n?n.module.injector:this.moduleInjector).get(t)},t}(),Nh=function(){return function(){}}(),jh=function(){function t(t,e,n,r,i,o){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){try{var t=Lh(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,hc),n=new fh([],Object.freeze({}),Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,{},hc,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new sh(n,e),i=new ph(this.url,r);return this.inheritParamsAndData(i._root),hl(i)}catch(s){return new D(function(t){return t.error(s)})}},t.prototype.inheritParamsAndData=function(t){var e=this,n=t.value,r=hh(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})},t.prototype.processSegmentGroup=function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)},t.prototype.processChildren=function(t,e){var n,r=this,i=Ac(e,function(e,n){return r.processSegmentGroup(t,e,n)});return n={},i.forEach(function(t){var e=n[t.value.outlet];if(e){var r=e.url.map(function(t){return t.toString()}).join("/"),i=t.value.url.map(function(t){return t.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[t.value.outlet]=t.value}),i.sort(function(t,e){return t.value.outlet===hc?-1:e.value.outlet===hc?1:t.value.outlet.localeCompare(e.value.outlet)}),i},t.prototype.processSegment=function(t,e,n,r){var i,o;try{for(var s=c(t),a=s.next();!a.done;a=s.next()){var u=a.value;try{return this.processSegmentAgainstRoute(u,e,n,r)}catch(l){if(!(l instanceof Nh))throw l}}}catch(h){i={error:h}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}if(this.noLeftoversInUrl(e,n,r))return[];throw new Nh},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.processSegmentAgainstRoute=function(t,e,n,r){if(t.redirectTo)throw new Nh;if((t.outlet||hc)!==r)throw new Nh;var i,s=[],a=[];if("**"===t.path){var u=n.length>0?xc(n).parameters:{};i=new fh(n,u,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Vh(t),r,t.component,t,Dh(e),Mh(e)+n.length,Bh(t))}else{var l=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new Nh;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(e.matcher||dc)(n,t,e);if(!r)throw new Nh;var i={};Sc(r.posParams,function(t,e){i[e]=t.path});var s=r.consumed.length>0?o({},i,r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s}}(e,t,n);s=l.consumedSegments,a=n.slice(l.lastChild),i=new fh(s,l.parameters,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Vh(t),r,t.component,t,Dh(e),Mh(e)+s.length,Bh(t))}var c=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),h=Lh(e,s,a,c,this.relativeLinkResolution),f=h.segmentGroup,p=h.slicedSegments;if(0===p.length&&f.hasChildren()){var d=this.processChildren(c,f);return[new sh(i,d)]}if(0===c.length&&0===p.length)return[new sh(i,[])];var g=this.processSegment(c,f,p,hc);return[new sh(i,g)]},t}();function Dh(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function Mh(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Lh(t,e,n,r,i){if(n.length>0&&function(t,e,n){return r.some(function(n){return Uh(t,e,n)&&Fh(n)!==hc})}(t,n)){var s=new Oc(e,function(t,e,n,r){var i,o,s={};s[hc]=r,r._sourceSegment=t,r._segmentIndexShift=e.length;try{for(var a=c(n),u=a.next();!u.done;u=a.next()){var l=u.value;if(""===l.path&&Fh(l)!==hc){var h=new Oc([],{});h._sourceSegment=t,h._segmentIndexShift=e.length,s[Fh(l)]=h}}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return s}(t,e,r,new Oc(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return r.some(function(n){return Uh(t,e,n)})}(t,n)){var a=new Oc(t.segments,function(t,e,n,r,i,s){var a,u,l={};try{for(var h=c(r),f=h.next();!f.done;f=h.next()){var p=f.value;if(Uh(t,n,p)&&!i[Fh(p)]){var d=new Oc([],{});d._sourceSegment=t,d._segmentIndexShift="legacy"===s?t.segments.length:e.length,l[Fh(p)]=d}}}catch(g){a={error:g}}finally{try{f&&!f.done&&(u=h.return)&&u.call(h)}finally{if(a)throw a.error}}return o({},i,l)}(t,e,n,r,t.children,i));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}var u=new Oc(t.segments,t.children);return u._sourceSegment=t,u._segmentIndexShift=e.length,{segmentGroup:u,slicedSegments:n}}function Uh(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Fh(t){return t.outlet||hc}function Vh(t){return t.data||{}}function Bh(t){return t.resolve||{}}var zh=function(){return function(){}}(),Hh=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),qh=new _t("ROUTES"),Wh=function(){function t(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}return t.prototype.load=function(t,e){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(nt(function(r){n.onLoadEndListener&&n.onLoadEndListener(e);var i=r.create(t);return new gc(_c(i.injector.get(qh)).map(bc),i)}))},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?st(this.loader.load(t)):Ec(t()).pipe(at(function(t){return t instanceof Je?hl(t):st(e.compiler.compileModuleAsync(t))}))},t}(),Gh=function(){return function(){}}(),$h=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();function Jh(t){throw t}function Kh(t,e,n){return e.parse("/")}function Yh(t,e){return hl(null)}var Qh=function(){function t(t,e,n,r,i,o,s,a){var u=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=a,this.navigations=new dl(null),this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new B,this.errorHandler=Jh,this.malformedUriErrorHandler=Kh,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Yh,afterPreactivation:Yh},this.urlHandlingStrategy=new $h,this.routeReuseStrategy=new Hh,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=i.get($e),this.console=i.get(Ne);var l=i.get(en);this.isNgZoneEnabled=l instanceof en,this.resetConfig(a),this.currentUrlTree=new Tc(new Oc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new Wh(o,s,function(t){return u.triggerEvent(new rc(t))},function(t){return u.triggerEvent(new ic(t))}),this.routerState=lh(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.parseUrl(e.url),r="popstate"===e.type?"popstate":"hashchange",i=e.state&&e.state.navigationId?{navigationId:e.state.navigationId}:null;setTimeout(function(){t.scheduleNavigation(n,r,i,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){yc(t),this.config=t.map(bc),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,r=e.queryParams,i=e.fragment,s=e.preserveQueryParams,a=e.queryParamsHandling,u=e.preserveFragment;yn()&&s&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,c=u?this.currentUrlTree.fragment:i,h=null;if(a)switch(a){case"merge":h=o({},this.currentUrlTree.queryParams,r);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=r||null}else h=s?this.currentUrlTree.queryParams:r||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,n,r,i){if(0===n.length)return wh(e.root,e.root,e,r,i);var o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new _h(!0,0,t);var e=0,n=!1,r=t.reduce(function(t,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return Sc(r.outlets,function(t,e){o[e]="string"==typeof t?t.split("/"):t}),f(t,[{outlets:o}])}if(r.segmentPath)return f(t,[r.segmentPath])}return"string"!=typeof r?f(t,[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):f(t,[r])},[]);return new _h(n,e,r)}(n);if(o.toRoot())return wh(e.root,new Oc([],{}),e,r,i);var s=function(t,n,r){if(t.isAbsolute)return new xh(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new xh(r.snapshot._urlSegment,!0,0);var i=bh(t.commands[0])?0:1;return function(e,n,o){for(var s=r.snapshot._urlSegment,a=r.snapshot._lastPathIndex+i,u=t.numberOfDoubleDots;u>a;){if(u-=a,!(s=s.parent))throw new Error("Invalid number of '../'");a=s.segments.length}return new xh(s,!1,a-u)}()}(o,0,t),a=s.processChildren?Eh(s.segmentGroup,s.index,o.commands):Ch(s.segmentGroup,s.index,o.commands);return wh(s.segmentGroup,a,e,r,i)}(l,this.currentUrlTree,t,h,c)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),yn()&&this.isNgZoneEnabled&&!en.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=t instanceof Tc?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function(t){for(var e=0;e active",animation:{type:4,styles:null,timings:"{{ easeTime }}ms {{ easing }}"},options:null},{type:1,expr:"active => removed",animation:{type:4,styles:null,timings:"{{ easeTime }}ms {{ easing }}"},options:null}],options:{}}]}});function zf(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"button",[["aria-label","Close"],["class","toast-close-button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.remove()&&r),r},null,null)),(t()(),Ai(1,0,null,null,1,"span",[["aria-hidden","true"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\xd7"]))],null,null)}function Hf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],[[8,"className",0],[1,"aria-label",0]],null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,n.options.titleClass,n.title),t(e,1,0,n.title)})}function qf(t){return Jo(0,[(t()(),Ai(0,0,null,null,0,"div",[["aria-live","polite"],["role","alertdialog"]],[[8,"className",0],[8,"innerHTML",1]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n.options.messageClass,n.message)})}function Wf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["aria-live","polite"],["role","alertdialog"]],[[8,"className",0],[1,"aria-label",0]],null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,n.options.messageClass,n.message),t(e,1,0,n.message)})}function Gf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"div",[["class","toast-progress"]],[[4,"width",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.width+"%")})}function $f(t){return Jo(0,[(t()(),Pi(16777216,null,null,1,null,zf)),wo(1,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Hf)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,qf)),wo(5,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Wf)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Gf)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,n.options.closeButton),t(e,3,0,n.title),t(e,5,0,n.message&&n.options.enableHtml),t(e,7,0,n.message&&!n.options.enableHtml),t(e,9,0,n.options.progressBar)},null)}function Jf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["toast-component",""]],[[8,"className",0],[40,"@flyInOut",0]],[[null,"click"],[null,"mouseenter"],[null,"mouseleave"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,1).tapToast()&&r),"mouseenter"===e&&(r=!1!==so(t,1).stickAround()&&r),"mouseleave"===e&&(r=!1!==so(t,1).delayedHideToast()&&r),r},$f,Bf)),wo(1,180224,null,0,nl,[el,Wu,en],null,null)],null,function(t,e){t(e,0,0,so(e,1).toastClasses,so(e,1).state)})}var Kf=Ki("[toast-component]",nl,Jf,{},{},[]),Yf=function(){return function(){}}(),Qf=function(){return function(){}}(),Xf="*";function Zf(t,e){return void 0===e&&(e=null),{type:2,steps:t,options:e}}function tp(t){return{type:6,styles:t,offset:null}}function ep(t){Promise.resolve(null).then(t)}var np=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.init=function(){},t.prototype.play=function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0},t.prototype.triggerMicrotask=function(){var t=this;ep(function(){return t._onFinish()})},t.prototype._onStart=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.pause=function(){},t.prototype.restart=function(){},t.prototype.finish=function(){this._onFinish()},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){},t.prototype.setPosition=function(t){},t.prototype.getPosition=function(){return 0},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),rp=function(){function t(t){var e=this;this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var n=0,r=0,i=0,o=this.players.length;0==o?ep(function(){return e._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++n==o&&e._onFinish()}),t.onDestroy(function(){++r==o&&e._onDestroy()}),t.onStart(function(){++i==o&&e._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this.players.forEach(function(t){return t.init()})},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype._onStart=function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})},t.prototype.pause=function(){this.players.forEach(function(t){return t.pause()})},t.prototype.restart=function(){this.players.forEach(function(t){return t.restart()})},t.prototype.finish=function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})},t.prototype.destroy=function(){this._onDestroy()},t.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype.setPosition=function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})},t.prototype.getPosition=function(){var t=0;return this.players.forEach(function(e){var n=e.getPosition();t=Math.min(n,t)}),t},t.prototype.beforeDestroy=function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),ip="!";function op(){throw Error("Host already has a portal attached")}var sp=function(){function t(){}return t.prototype.attach=function(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&op(),this._attachedHost=t,t.attach(this)},t.prototype.detach=function(){var t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),ap=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.component=e,o.viewContainerRef=n,o.injector=r,o.componentFactoryResolver=i,o}return i(e,t),e}(sp),up=function(t){function e(e,n,r){var i=t.call(this)||this;return i.templateRef=e,i.viewContainerRef=n,i.context=r,i}return i(e,t),Object.defineProperty(e.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e,n){return void 0===n&&(n=this.context),this.context=n,t.prototype.attach.call(this,e)},e.prototype.detach=function(){return this.context=void 0,t.prototype.detach.call(this)},e}(sp),lp=function(){function t(){this._isDisposed=!1}return t.prototype.hasAttached=function(){return!!this._attachedPortal},t.prototype.attach=function(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&op(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof ap?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof up?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()},t.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},t.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},t}(),cp=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.outletElement=e,o._componentFactoryResolver=n,o._appRef=r,o._defaultInjector=i,o}return i(e,t),e.prototype.attachComponentPortal=function(t){var e,n=this,r=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(r,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=r.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e},e.prototype.attachTemplatePortal=function(t){var e=this,n=t.viewContainerRef,r=n.createEmbeddedView(t.templateRef,t.context);return r.detectChanges(),r.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),this.setDisposeFn(function(){var t=n.indexOf(r);-1!==t&&n.remove(t)}),r},e.prototype.dispose=function(){t.prototype.dispose.call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)},e.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},e}(lp),hp=function(t){function e(e,n){var r=t.call(this)||this;return r._componentFactoryResolver=e,r._viewContainerRef=n,r._isInitialized=!1,r.attached=new tn,r}return i(e,t),Object.defineProperty(e.prototype,"portal",{get:function(){return this._attachedPortal},set:function(e){(!this.hasAttached()||e||this._isInitialized)&&(this.hasAttached()&&t.prototype.detach.call(this),e&&t.prototype.attach.call(this,e),this._attachedPortal=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attachedRef",{get:function(){return this._attachedRef},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._isInitialized=!0},e.prototype.ngOnDestroy=function(){t.prototype.dispose.call(this),this._attachedPortal=null,this._attachedRef=null},e.prototype.attachComponentPortal=function(e){e.setAttachedHost(this);var n=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),i=n.createComponent(r,n.length,e.injector||n.injector);return t.prototype.setDisposeFn.call(this,function(){return i.destroy()}),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i},e.prototype.attachTemplatePortal=function(e){var n=this;e.setAttachedHost(this);var r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context);return t.prototype.setDisposeFn.call(this,function(){return n._viewContainerRef.clear()}),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r},e}(lp),fp=function(){return function(){}}(),pp=function(){function t(t,e){this._parentInjector=t,this._customTokens=e}return t.prototype.get=function(t,e){var n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)},t}(),dp=27;function gp(){for(var t=[],e=0;e0?ot(t,n):ll(n):cl(t[0]),e)}}var yp=new _t("cdk-dir-doc",{providedIn:"root",factory:function(){return fe(Aa)}}),mp=function(){function t(t){if(this.value="ltr",this.change=new tn,t){var e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}return t.prototype.ngOnDestroy=function(){this.change.complete()},t.ngInjectableDef=wt({factory:function(){return new t(fe(yp,8))},token:t,providedIn:"root"}),t}(),vp=function(){return function(){}}();function bp(t){return Array.isArray(t)?t:[t]}function wp(t){return null==t?"":"string"==typeof t?t:t+"px"}function _p(t,e,n,r){return g(n)&&(r=n,n=void 0),r?_p(t,e,n).pipe(nt(function(t){return p(t)?r.apply(void 0,t):r(t)})):new D(function(r){!function t(e,n,r,i,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var a=e;e.addEventListener(n,r,o),s=function(){return a.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),s=function(){return u.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var l=e;e.addListener(n,r),s=function(){return l.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,h=e.length;c1?Array.prototype.slice.call(arguments):t)},r,n)})}var xp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return i(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return i(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(x)),Sp=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),Cp=new(function(t){function e(n,r){void 0===r&&(r=Sp.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return i(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Sp))(xp),Ep=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new kp(t,this.durationSelector))},t}(),kp=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return i(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=b(this.durationSelector)(t);if(e===m)this.destination.error(m.e);else{var n=tt(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(et);function Tp(t){return!p(t)&&t-parseFloat(t)+1>=0}function Op(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function Ip(t,e){return void 0===e&&(e=Cp),n=function(){return function(t,e,n){void 0===t&&(t=0);var r=-1;return Tp(e)?r=Number(e)<1?1:Number(e):H(e)&&(n=e),H(n)||(n=Cp),new D(function(e){var i=Tp(t)?t:+t-n.now();return n.schedule(Op,i,{index:0,period:r,subscriber:e})})}(t,e)},function(t){return t.lift(new Ep(n))};var n}function Pp(t){return function(e){return e.lift(new Ap(t))}}var Ap=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Rp(t),r=tt(n,this.notifier);return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),Rp=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(et),Np="undefined"!=typeof Intl&&Intl.v8BreakIterator,jp=function(){function t(t){this._platformId=t,this.isBrowser=this._platformId?this._platformId===Ra:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Np)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t.ngInjectableDef=wt({factory:function(){return new t(fe(Ae,8))},token:t,providedIn:"root"}),t}(),Dp=function(){return function(){}}(),Mp=function(){function t(t,e){this._ngZone=t,this._platform=e,this._scrolled=new B,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return t.prototype.register=function(t){var e=this;this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(function(){return e._scrolled.next(t)}))},t.prototype.deregister=function(t){var e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))},t.prototype.scrolled=function(t){var e=this;return void 0===t&&(t=20),this._platform.isBrowser?new D(function(n){e._globalSubscription||e._addGlobalListener();var r=t>0?e._scrolled.pipe(Ip(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){r.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):hl()},t.prototype.ngOnDestroy=function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()},t.prototype.ancestorScrolled=function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(yl(function(t){return!t||n.indexOf(t)>-1}))},t.prototype.getAncestorScrollContainers=function(t){var e=this,n=[];return this.scrollContainers.forEach(function(r,i){e._scrollableContainsElement(i,t)&&n.push(i)}),n},t.prototype._scrollableContainsElement=function(t,e){var n=e.nativeElement,r=t.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1},t.prototype._addGlobalListener=function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return _p(window.document,"scroll").subscribe(function(){return t._scrolled.next()})})},t.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},t.ngInjectableDef=wt({factory:function(){return new t(fe(en),fe(jp))},token:t,providedIn:"root"}),t}(),Lp=function(){return function(){}}(),Up=function(){function t(t,e){var n=this;this._platform=t,e.runOutsideAngular(function(){n._change=t.isBrowser?ft(_p(window,"resize"),_p(window,"orientationchange")):hl(),n._invalidateCache=n.change().subscribe(function(){return n._updateViewportSize()})})}return t.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},t.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t},t.prototype.getViewportRect=function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,r=e.height;return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}},t.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=document.documentElement,e=t.getBoundingClientRect();return{top:-e.top||document.body.scrollTop||window.scrollY||t.scrollTop||0,left:-e.left||document.body.scrollLeft||window.scrollX||t.scrollLeft||0}},t.prototype.change=function(t){return void 0===t&&(t=20),t>0?this._change.pipe(Ip(t)):this._change},t.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},t.ngInjectableDef=wt({factory:function(){return new t(fe(jp),fe(en))},token:t,providedIn:"root"}),t}(),Fp=function(){function t(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=wp(-this._previousScrollPosition.left),t.style.top=wp(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){if(this._isEnabled){var t=this._document.documentElement,e=t.style,n=this._document.body.style,r=e.scrollBehavior||"",i=n.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),e.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.scrollBehavior=r,n.scrollBehavior=i}},t.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}();function Vp(){return Error("Scroll strategy has already been attached.")}var Bp=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=function(){i.disable(),i._overlayRef.hasAttached()&&i._ngZone.run(function(){return i._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw Vp();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),zp=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}();function Hp(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function qp(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var Wp=function(){function t(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw Vp();this._overlayRef=t},t.prototype.enable=function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),r=n.width,i=n.height;Hp(e,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),Gp=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=function(){return new zp},this.close=function(t){return new Bp(i._scrollDispatcher,i._ngZone,i._viewportRuler,t)},this.block=function(){return new Fp(i._viewportRuler,i._document)},this.reposition=function(t){return new Wp(i._scrollDispatcher,i._viewportRuler,i._ngZone,t)},this._document=r}return t.ngInjectableDef=wt({factory:function(){return new t(fe(Mp),fe(Up),fe(en),fe(Aa))},token:t,providedIn:"root"}),t}(),$p=function(){return function(t){var e=this;this.scrollStrategy=new zp,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t&&Object.keys(t).forEach(function(n){void 0!==t[n]&&(e[n]=t[n])})}}(),Jp=function(){return function(t,e,n,r,i){this.offsetX=n,this.offsetY=r,this.panelClass=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}(),Kp=function(){return function(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}();function Yp(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "top", "bottom" or "center".')}function Qp(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "start", "end" or "center".')}var Xp=function(){function t(t){var e=this;this._attachedOverlays=[],this._keydownListener=function(t){for(var n=e._attachedOverlays,r=n.length-1;r>-1;r--)if(n[r]._keydownEventSubscriptions>0){n[r]._keydownEvents.next(t);break}},this._document=t}return t.prototype.ngOnDestroy=function(){this._detach()},t.prototype.add=function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()},t.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)},t.ngInjectableDef=wt({factory:function(){return new t(fe(Aa))},token:t,providedIn:"root"}),t}(),Zp=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.ngInjectableDef=wt({factory:function(){return new t(fe(Aa))},token:t,providedIn:"root"}),t}(),td=function(){function t(t,e,n,r,i,o,s,a){var u=this;this._portalOutlet=t,this._host=e,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._backdropElement=null,this._backdropClick=new B,this._attachments=new B,this._detachments=new B,this._locationChanges=x.EMPTY,this._keydownEventsObservable=new D(function(t){var e=u._keydownEvents.subscribe(t);return u._keydownEventSubscriptions++,function(){e.unsubscribe(),u._keydownEventSubscriptions--}}),this._keydownEvents=new B,this._keydownEventSubscriptions=0,r.scrollStrategy&&r.scrollStrategy.attach(this),this._positionStrategy=r.positionStrategy}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,n=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(Fl(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(function(){return e.dispose()})),n},t.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),t}},t.prototype.dispose=function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEventsObservable},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._positionStrategy&&this._positionStrategy.apply()},t.prototype.updatePositionStrategy=function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))},t.prototype.updateSize=function(t){this._config=o({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=o({},this._config,{direction:t}),this._updateElementDirection()},t.prototype.addPanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!0)},t.prototype.removePanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!1)},t.prototype.getDirection=function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"},t.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},t.prototype._updateElementSize=function(){var t=this._pane.style;t.width=wp(this._config.width),t.height=wp(this._config.height),t.minWidth=wp(this._config.minWidth),t.minHeight=wp(this._config.minHeight),t.maxWidth=wp(this._config.maxWidth),t.maxHeight=wp(this._config.maxHeight)},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",function(e){return t._backdropClick.next(e)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},t.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var n,r=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null),t._config.backdropClass&&t._toggleClasses(e,t._config.backdropClass,!1),clearTimeout(n)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){e.addEventListener("transitionend",r)}),e.style.pointerEvents="none",n=this._ngZone.runOutsideAngular(function(){return setTimeout(r,500)})}},t.prototype._toggleClasses=function(t,e,n){var r=t.classList;bp(e).forEach(function(t){n?r.add(t):r.remove(t)})},t.prototype._detachContentWhenStable=function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._ngZone.onStable.asObservable().pipe(Pp(ft(t._attachments,t._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())})})},t}(),ed=function(){function t(t,e,n,r,i){var o=this;this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=i,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new B,this._resizeSubscription=x.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this._appliedPanelClasses=[],this.positionChanges=new D(function(t){var e=o._positionChanges.subscribe(t);return o._positionChangeSubscriptions++,function(){e.unsubscribe(),o._positionChangeSubscriptions--}}),this.setOrigin(t)}return Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){e._isInitialRender=!0,e.apply()})},t.prototype.apply=function(){if(!(this._isDisposed||this._platform&&!this._platform.isBrowser))if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var t,e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=[],o=0,s=this._preferredPositions;of&&(f=y,h=g)}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}},t.prototype.detach=function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()},t.prototype.dispose=function(){this._isDisposed||(this._boundingBox&&nd(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)},t.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withPositions=function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},t.prototype.withViewportMargin=function(t){return this._viewportMargin=t,this},t.prototype.withFlexibleDimensions=function(t){return void 0===t&&(t=!0),this._hasFlexibleDimensions=t,this},t.prototype.withGrowAfterOpen=function(t){return void 0===t&&(t=!0),this._growAfterOpen=t,this},t.prototype.withPush=function(t){return void 0===t&&(t=!0),this._canPush=t,this},t.prototype.withLockedPosition=function(t){return void 0===t&&(t=!0),this._positionLocked=t,this},t.prototype.setOrigin=function(t){return this._origin=t,this},t.prototype.withDefaultOffsetX=function(t){return this._offsetX=t,this},t.prototype.withDefaultOffsetY=function(t){return this._offsetY=t,this},t.prototype.withTransformOriginOn=function(t){return this._transformOriginSelector=t,this},t.prototype._getOriginPoint=function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var r=this._isRtl()?t.right:t.left,i=this._isRtl()?t.left:t.right;n="start"==e.originX?r:i}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}},t.prototype._getOverlayPoint=function(t,e,n){var r;return r="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+r,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}},t.prototype._getOverlayFit=function(t,e,n,r){var i=t.x,o=t.y,s=this._getOffset(r,"x"),a=this._getOffset(r,"y");s&&(i+=s),a&&(o+=a);var u=0-o,l=o+e.height-n.height,c=this._subtractOverflows(e.width,0-i,i+e.width-n.width),h=this._subtractOverflows(e.height,u,l),f=c*h;return{visibleArea:f,isCompletelyWithinViewport:e.width*e.height===f,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}},t.prototype._canFitWithFlexibleDimensions=function(t,e,n){if(this._hasFlexibleDimensions){var r=n.bottom-e.y,i=n.right-e.x,o=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=r)&&(t.fitsInViewportHorizontally||null!=s&&s<=i)}},t.prototype._pushOverlayOnScreen=function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var r,i,o=this._viewportRect,s=Math.max(t.x+e.width-o.right,0),a=Math.max(t.y+e.height-o.bottom,0),u=Math.max(o.top-n.top-t.y,0),l=Math.max(o.left-n.left-t.x,0);return this._previousPushAmount={x:r=e.width<=o.width?l||-s:t.x0){var n=this._getScrollVisibility(),r=new Kp(t,n);this._positionChanges.next(r)}this._isInitialRender=!1},t.prototype._setTransformOrigin=function(t){if(this._transformOriginSelector){var e,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var i=0;ih&&!this._isInitialRender&&!this._growAfterOpen&&(r=t.y-h/2)}if("end"===e.overlayX&&!l||"start"===e.overlayX&&l)a=u.right-t.x+this._viewportMargin,o=t.x-u.left;else if("start"===e.overlayX&&!l||"end"===e.overlayX&&l)s=t.x,o=u.right-t.x;else{c=Math.min(u.right-t.x+u.left,t.x);var f=this._lastBoundingBoxSize.width;s=t.x-c,(o=2*c)>f&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.x-f/2)}return{top:r,left:s,bottom:i,right:a,width:o,height:n}},t.prototype._setBoundingBoxStyles=function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right="",r.width=r.height="100%";else{var i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=wp(n.height),r.top=wp(n.top),r.bottom=wp(n.bottom),r.width=wp(n.width),r.left=wp(n.left),r.right=wp(n.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",i&&(r.maxHeight=wp(i)),o&&(r.maxWidth=wp(o))}this._lastBoundingBoxSize=n,nd(this._boundingBox.style,r)},t.prototype._resetBoundingBoxStyles=function(){nd(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},t.prototype._resetOverlayElementStyles=function(){nd(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})},t.prototype._setOverlayElementStyles=function(t,e){var n={};if(this._hasExactPosition()){var r=this._viewportRuler.getViewportScrollPosition();nd(n,this._getExactOverlayY(e,t,r)),nd(n,this._getExactOverlayX(e,t,r))}else n.position="static";var i="",o=this._getOffset(e,"x"),s=this._getOffset(e,"y");o&&(i+="translateX("+o+"px) "),s&&(i+="translateY("+s+"px)"),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),nd(this._pane.style,n)},t.prototype._getExactOverlayY=function(t,e,n){var r={top:null,bottom:null},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));var o=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return i.y-=o,"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)+"px":r.top=wp(i.y),r},t.prototype._getExactOverlayX=function(t,e,n){var r={left:null,right:null},i=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?r.right=this._document.documentElement.clientWidth-(i.x+this._overlayRect.width)+"px":r.left=wp(i.x),r},t.prototype._getScrollVisibility=function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:qp(t,n),isOriginOutsideView:Hp(t,n),isOverlayClipped:qp(e,n),isOverlayOutsideView:Hp(e,n)}},t.prototype._subtractOverflows=function(t){for(var e=[],n=1;n-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._afterAllClosed.next()))},t.prototype._hideNonDialogContentFromAssistiveTechnology=function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var r=e[n];r===t||"SCRIPT"===r.nodeName||"STYLE"===r.nodeName||r.hasAttribute("aria-live")||(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}},t.prototype._closeDialogs=function(t){for(var e=t.length;e--;)t[e].close()},t}(),_d=function(){return function(){}}(),xd=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Sd(t,this.dueTime,this.scheduler))},t}(),Sd=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return i(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Cd,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(I);function Cd(t){t.debouncedNext()}var Ed=function(){function t(t){this._platform=t}return t.prototype.isDisabled=function(t){return t.hasAttribute("disabled")},t.prototype.isVisible=function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility},t.prototype.isTabbable=function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(e){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){var r=n&&n.nodeName.toLowerCase();if(-1===Td(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===r)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),o=Td(t);if(t.hasAttribute("contenteditable"))return-1!==o;if("iframe"===i)return!1;if("audio"===i){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===i){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==i||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&t.tabIndex>=0},t.prototype.isFocusable=function(t){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||kd(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)},t.ngInjectableDef=wt({factory:function(){return new t(fe(jp))},token:t,providedIn:"root"}),t}();function kd(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Td(t){if(!kd(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Od=function(){function t(t,e,n,r,i){void 0===i&&(i=!1);var o=this;this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._hasAttached=!1,this._startAnchorListener=function(){return o.focusLastTabbableElement()},this._endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this._startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this._endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null},t.prototype.attachAnchors=function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t._startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t._endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},t.prototype.focusInitialElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})},t.prototype.focusFirstTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})},t.prototype.focusLastTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})},t.prototype._getRegionBoundary=function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-"+t+"], [cdkFocusRegion"+t+"], [cdk-focus-"+t+"]"),n=0;n=0;n--){var r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null},t.prototype._createAnchor=function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t},t.prototype._toggleAnchorTabIndex=function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")},t.prototype._executeOnStable=function(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(Fl(1)).subscribe(t)},t}(),Id=function(){function t(t,e,n){this._checker=t,this._ngZone=e,this._document=n}return t.prototype.create=function(t,e){return void 0===e&&(e=!1),new Od(t,this._checker,this._ngZone,this._document,e)},t.ngInjectableDef=wt({factory:function(){return new t(fe(Ed),fe(en),fe(Aa))},token:t,providedIn:"root"}),t}(),Pd=new _t("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Ad=function(){function t(t,e){this._sanityChecksEnabled=t,this._hammerLoader=e,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}return t.prototype._areChecksEnabled=function(){return this._sanityChecksEnabled&&yn()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){var t=this._window;return t&&(t.__karma__||t.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkThemeIsPresent=function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.prototype._checkHammerIsAvailable=function(){!this._hasCheckedHammer&&this._window&&(!this._areChecksEnabled()||this._window.Hammer||this._hammerLoader||console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)},t}(),Rd=ri({encapsulation:2,styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}@media (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],data:{animation:[{type:7,name:"dialogContainer",definitions:[{type:0,name:"void, exit",styles:{type:6,styles:{opacity:0,transform:"scale(0.7)"},offset:null},options:void 0},{type:0,name:"enter",styles:{type:6,styles:{transform:"none"},offset:null},options:void 0},{type:1,expr:"* => enter",animation:{type:4,styles:{type:6,styles:{transform:"none",opacity:1},offset:null},timings:"150ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void, * => exit",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"75ms cubic-bezier(0.4, 0.0, 0.2, 1)"},options:null}],options:{}}]}});function Nd(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function jd(t){return Jo(0,[Lo(402653184,1,{_portalOutlet:0}),(t()(),Pi(16777216,null,null,1,null,Nd)),wo(2,212992,[[1,4]],0,hp,[qe,Mn],{portal:[0,"portal"]},null)],function(t,e){t(e,2,0,"")},null)}function Dd(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"mat-dialog-container",[["aria-modal","true"],["class","mat-dialog-container"],["tabindex","-1"]],[[1,"id",0],[1,"role",0],[1,"aria-labelledby",0],[1,"aria-label",0],[1,"aria-describedby",0],[40,"@dialogContainer",0]],[["component","@dialogContainer.start"],["component","@dialogContainer.done"]],function(t,e,n){var r=!0;return"component:@dialogContainer.start"===e&&(r=!1!==so(t,1)._onAnimationStart(n)&&r),"component:@dialogContainer.done"===e&&(r=!1!==so(t,1)._onAnimationDone(n)&&r),r},jd,Rd)),wo(1,49152,null,0,pd,[On,Id,Ln,[2,Aa],hd],null,null)],null,function(t,e){t(e,0,0,so(e,1)._id,so(e,1)._config.role,so(e,1)._config.ariaLabel?null:so(e,1)._ariaLabelledBy,so(e,1)._config.ariaLabel,so(e,1)._config.ariaDescribedBy||null,so(e,1)._state)})}var Md=Ki("mat-dialog-container",pd,Dd,{},{},[]),Ld=function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;ot?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return Vd(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return Vd(t.value)?null:Bd.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(Vd(e.value))return null;var n=e.value?e.value.length:0;return nt?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),function(t){if(Vd(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:r,actualValue:e}}}):t.nullValidator;var n,r},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(Hd);return 0==e.length?null:function(t){return Wd(function(t,n){return e.map(function(e){return e(t)})}(t))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(Hd);return 0==e.length?null:function(t){return function t(){for(var e,n=[],r=0;r=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name},t}(),ng=function(){function t(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(tg),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')},t}(),rg='\n

\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',ig='\n
\n
\n \n
\n
';function og(t,e){return f(e.path,[t])}function sg(t,e){t||ug(e,"Cannot find control with"),e.valueAccessor||ug(e,"No value accessor for form control with"),t.validator=zd.compose([t.validator,e.validator]),t.asyncValidator=zd.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&ag(t,e)})}(t,e),function(t,e){t.registerOnChange(function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&ag(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function ag(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function ug(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function lg(t){return null!=t?zd.compose(t.map(Yd)):null}function cg(t){return null!=t?zd.composeAsync(t.map(Qd)):null}var hg=[$d,function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),Xd,function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Lt}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){var e,n;try{for(var r=c(Array.from(this._optionMap.keys())),i=r.next();!i.done;i=r.next()){var o=i.value;if(this._compareWith(this._optionMap.get(o),t))return o}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t},t}(),function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Lt}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var r=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(r.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(bg),xg=function(t){function e(e,n,r){var i=t.call(this,yg(n),mg(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return i(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,r){n._throwIfControlMissing(r),n.at(r).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,r){n.at(r)&&n.at(r).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof wg?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=c(this.controls),r=n.next();!r.done;r=n.next())if(r.value.enabled)return!1}catch(i){t={error:i}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(bg),Sg=Promise.resolve(null),Cg=function(t){function e(e,n){var r=t.call(this)||this;return r.submitted=!1,r._directives=[],r.ngSubmit=new tn,r.form=new _g({},lg(e),cg(n)),r}return i(e,t),e.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),sg(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;Sg.then(function(){var n,r,i=e._findContainer(t.path);i&&i.removeControl(t.name),(r=(n=e._directives).indexOf(t))>-1&&n.splice(r,1)})},e.prototype.addFormGroup=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path),r=new _g({});(function(t,e){null==t&&ug(e,"Cannot find control with"),t.validator=zd.compose([t.validator,e.validator]),t.asyncValidator=zd.composeAsync([t.asyncValidator,e.asyncValidator])})(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;Sg.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this.submitted=!0,e=this._directives,this.form._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},e}(Fd),Eg=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n
\n \n \n
\n ')},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+rg+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+ig)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+rg+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+ig)},t}(),kg=function(t){function e(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}var n;return i(e,t),n=e,e.prototype._checkParentType=function(){this._parent instanceof n||this._parent instanceof Cg||Eg.modelGroupParentException()},e}(fg),Tg=Promise.resolve(null),Og=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.control=new wg,o._registered=!1,o.update=new tn,o._parent=e,o._rawValidators=n||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e)||ug(t,"Value accessor was not provided as an array for form control with");var n=void 0,r=void 0,i=void 0;return e.forEach(function(e){var o;e.constructor===Kd?n=e:(o=e,hg.some(function(t){return o.constructor===t})?(r&&ug(t,"More than one built-in value accessor matches form control with"),r=e):(i&&ug(t,"More than one custom value accessor matches form control with"),i=e))}),i||r||n||(ug(t,"No valid value accessor for form control with"),null)}(o,i),o}return i(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Lt(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?og(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return lg(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return cg(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){sg(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof kg)&&this._parent instanceof fg?Eg.formGroupNameException():this._parent instanceof kg||this._parent instanceof Cg||Eg.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Eg.missingNameException()},e.prototype._updateValue=function(t){var e=this;Tg.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,r=""===n||n&&"false"!==n;Tg.then(function(){r&&!e.control.disabled?e.control.disable():!r&&e.control.disabled&&e.control.enable()})},e}(tg),Ig=new _t("NgModelWithFormControlWarning"),Pg=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t);return new _g(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)},t.prototype.control=function(t,e,n){return new wg(t,e,n)},t.prototype.array=function(t,e,n){var r=this,i=t.map(function(t){return r._createControl(t)});return new xg(i,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){n[r]=e._createControl(t[r])}),n},t.prototype._createControl=function(t){return t instanceof wg||t instanceof _g||t instanceof xg?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)},t}(),Ag=function(){return function(){}}(),Rg=function(){return function(){}}(),Ng=function(){return function(){}}(),jg=function(){function t(){}var e;return e=t,t.withConfig=function(t){return{ngModule:e,providers:[{provide:Ig,useValue:t.warnOnNgModelWithFormControl}]}},t}(),Dg=function(){return function(t){this.template=t}}(),Mg=function(){function t(){}return t.prototype.warn=function(t){console.warn(t)},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}();function Lg(t){return null!=t}function Ug(t){return"object"==typeof t&&Lg(t)}function Fg(t){return t instanceof Function}var Vg={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};function Bg(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return Vg[t]||t})}function zg(){return"axxxxxxxxxxx".replace(/[x]/g,function(t){return(16*Math.random()|0).toString(16)})}var Hg=function(){function t(t,e){this._ngSelect=t,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}return Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filteredItems",{get:function(){return this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"markedIndex",{get:function(){return this._markedIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){return this._selectionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"markedItem",{get:function(){return this._filteredItems[this._markedIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"noItemsToSelect",{get:function(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxItemsSelected",{get:function(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastSelectedItem",{get:function(){return this.selectedItems[this.selectedItems.length-1]},enumerable:!0,configurable:!0}),t.prototype.setItems=function(t){var e=this;this._items=t.map(function(t,n){return e.mapItem(t,n)}),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=f(this._items)},t.prototype.select=function(t){if(!t.selected&&!this.maxItemsSelected){var e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(t,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&e&&this._hideSelected(t)}},t.prototype.unselect=function(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&Lg(t.index)&&this._ngSelect.multiple&&this._showSelected(t))},t.prototype.findItem=function(t){var e,n=this;return e=this._ngSelect.compareWith?function(e){return n._ngSelect.compareWith(e.value,t)}:this._ngSelect.bindValue?function(e){return!e.children&&n.resolveNested(e.value,n._ngSelect.bindValue)===t}:function(e){return e.value===t||!e.children&&e.label&&e.label===n.resolveNested(t,n._ngSelect.bindLabel)},this._items.find(function(t){return e(t)})},t.prototype.addItem=function(t){var e=this.mapItem(t,this._items.length);return this._items.push(e),this._filteredItems.push(e),e},t.prototype.clearSelected=function(){this._selectionModel.clear(),this._items.forEach(function(t){t.selected=!1,t.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()},t.prototype.findByLabel=function(t){return t=Bg(t).toLocaleLowerCase(),this.filteredItems.find(function(e){return Bg(e.label).toLocaleLowerCase().substr(0,t.length)===t})},t.prototype.filter=function(t){var e,n;if(t){this._filteredItems=[],t=this._ngSelect.searchFn?t:Bg(t).toLocaleLowerCase();var r=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected,o=function(e){var n,o,a,u=[];try{for(var l=c(s._groups.get(e)),p=l.next();!p.done;p=l.next()){var d=p.value;i&&(d.parent&&d.parent.selected||d.selected)||r(t,s._ngSelect.searchFn?d.value:d)&&u.push(d)}}catch(m){n={error:m}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}if(u.length>0){var g=h(u.slice(-1),1)[0];if(g.parent){var y=s._items.find(function(t){return t===g.parent});s._filteredItems.push(y)}(a=s._filteredItems).push.apply(a,f(u))}},s=this;try{for(var a=c(Array.from(this._groups.keys())),u=a.next();!u.done;u=a.next())o(u.value)}catch(l){e={error:l}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}else this.resetFilteredItems()},t.prototype.resetFilteredItems=function(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(function(t){return!t.selected}):this._items)},t.prototype.unmarkItem=function(){this._markedIndex=-1},t.prototype.markNextItem=function(){this._stepToItem(1)},t.prototype.markPreviousItem=function(){this._stepToItem(-1)},t.prototype.markItem=function(t){this._markedIndex=this._filteredItems.indexOf(t)},t.prototype.markSelectedOrDefault=function(t){if(0!==this._filteredItems.length){var e=this._ngSelect.hideSelected?-1:this._filteredItems.indexOf(this.lastSelectedItem);this._markedIndex=this.lastSelectedItem&&e>-1?e:t?this.filteredItems.findIndex(function(t){return!t.disabled}):-1}},t.prototype.resolveNested=function(t,e){if(!Ug(t))return t;if(-1===e.indexOf("."))return t[e];for(var n=e.split("."),r=t,i=0,o=n.length;i-1},t.prototype._getNextItemIndex=function(t){return t>0?this._markedIndex===this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1},t.prototype._stepToItem=function(t){0===this._filteredItems.length||this._filteredItems.every(function(t){return t.disabled})||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))},t.prototype._groupBy=function(t,e){var n,r,i=Fg(this._ngSelect.groupBy),o=new Map;try{for(var s=c(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=i?e(u.value):u.value[e];l=Lg(l)?l:void 0;var h=o.get(l);h?h.push(u):o.set(l,[u])}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o},t.prototype._flatten=function(t){var e,n,r=Fg(this._ngSelect.groupBy),i=[],o=t.get(void 0)||[];i.push.apply(i,f(o));var s=o.length,a=function(e){if(!Lg(e))return"continue";var n={label:e,children:void 0,parent:null,index:s++,disabled:!u._ngSelect.selectableGroup,htmlId:zg()},o=r?u._ngSelect.bindLabel:u._ngSelect.groupBy,a=u._ngSelect.groupValue||function(){var t;return(t={})[o]=e,t},l=t.get(e).map(function(t){return t.parent=n,t.children=void 0,t.index=s++,t});n.children=l,n.value=a(e,l.map(function(t){return t.value})),i.push(n),i.push.apply(i,f(l))},u=this;try{for(var l=c(Array.from(t.keys())),h=l.next();!h.done;h=l.next())a(h.value)}catch(p){e={error:p}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return i},t}(),qg=function(){var t={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};return t[t.Tab]="Tab",t[t.Enter]="Enter",t[t.Esc]="Esc",t[t.Space]="Space",t[t.ArrowUp]="ArrowUp",t[t.ArrowDown]="ArrowDown",t[t.Backspace]="Backspace",t}(),Wg=function(){function t(){}return t.prototype.requestAnimationFrame=function(t){return window.requestAnimationFrame(t)},t.prototype.setTimeout=function(t,e){return window.setTimeout(t,e)},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Gg=function(){function t(){}return t.prototype.calculateItems=function(t,e,n){var r=t.childHeight*t.itemsLength;e.scrollTop>r&&(e.scrollTop=r);var i=Math.max(0,e.scrollTop)/r*t.itemsLength,o=Math.min(t.itemsLength,Math.ceil(i)+(t.itemsPerCol+1)),s=Math.max(0,o-t.itemsPerCol-1),a=Math.min(s,Math.floor(i)),u=t.childHeight*Math.ceil(a)-t.childHeight*Math.min(a,n);return u=isNaN(u)?0:u,a=isNaN(a)?-1:a,o=isNaN(o)?-1:o,a-=n,o+=n,{topPadding:u,scrollHeight:r,start:a=Math.max(0,a),end:o=Math.min(t.itemsLength,o)}},t.prototype.calculateDimensions=function(t,e,n,r){var i=n.getBoundingClientRect(),o=r.children[e]?r.children[e].getBoundingClientRect():{width:i.width,height:i.height,top:0},s=Math.max(1,Math.floor(i.height/o.height));return{itemsLength:t,viewWidth:i.width,viewHeight:i.height,childWidth:o.width,childHeight:o.height,itemsPerCol:s}},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),$g=function(){function t(t,e,n,r,i,o){this._renderer=t,this._zone=e,this._virtualScrollService=n,this._window=r,this._document=o,this.items=[],this.position="auto",this.bufferAmount=4,this.virtualScroll=!1,this.update=new tn,this.scroll=new tn,this.scrollToEnd=new tn,this.outsideClick=new tn,this._destroy$=new B,this._startupLoop=!0,this._isScrolledToMarked=!1,this._scrollToEndFired=!1,this._disposeScrollListener=function(){},this._disposeDocumentResizeListener=function(){},this._dropdown=i.nativeElement}return t.prototype.handleMousedown=function(t){"INPUT"!==t.target.tagName&&(t.preventDefault(),t.stopPropagation())},t.prototype.ngOnInit=function(){var t=this;this._select=this._dropdown.parentElement,this._handleScroll(),this._document&&ft(_p(this._document,"touchstart",{capture:!0}),_p(this._document,"mousedown",{capture:!0})).pipe(Pp(this._destroy$)).subscribe(function(e){return t._handleOutsideClick(e)})},t.prototype.ngOnChanges=function(t){t.items&&(this._isScrolledToMarked=!1,this._handleItemsChange(t.items))},t.prototype.ngOnDestroy=function(){this._disposeDocumentResizeListener(),this._disposeScrollListener(),this._destroy$.next(),this._destroy$.complete(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)},t.prototype.ngAfterContentInit=function(){var t=this;this._whenContentReady().then(function(){t.appendTo&&(t._appendDropdown(),t._handleDocumentResize()),t.updateDropdownPosition()})},t.prototype.refresh=function(){var t=this;return new Promise(function(e){t._zone.runOutsideAngular(function(){t._window.requestAnimationFrame(function(){t._updateItems().then(e)})})})},t.prototype.scrollInto=function(t){if(t){var e=this.items.indexOf(t);if(!(e<0||e>=this.items.length)){var n=this._calculateDimensions(this.virtualScroll?0:e),r=this.scrollElementRef.nativeElement,i=Math.floor(n.viewHeight/n.childHeight)-1;if(this.virtualScroll)r.scrollTop=e*n.childHeight-n.childHeight*Math.min(e,i);else{var o=Array.from(this.contentElementRef.nativeElement.children).slice(0,e).reduce(function(t,e){return t+e.clientHeight},0);r.scrollTop=o-n.childHeight*Math.min(e,i)}}}},t.prototype.scrollIntoTag=function(){var t=this.scrollElementRef.nativeElement,e=this._calculateDimensions();t.scrollTop=e.childHeight*(e.itemsLength+1)},t.prototype.updateDropdownPosition=function(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),"top"===this._currentPosition?(this._renderer.addClass(this._dropdown,"ng-select-top"),this._renderer.removeClass(this._dropdown,"ng-select-bottom"),this._renderer.addClass(this._select,"ng-select-top"),this._renderer.removeClass(this._select,"ng-select-bottom")):(this._renderer.addClass(this._dropdown,"ng-select-bottom"),this._renderer.removeClass(this._dropdown,"ng-select-top"),this._renderer.addClass(this._select,"ng-select-bottom"),this._renderer.removeClass(this._select,"ng-select-top")),this.appendTo&&this._updateAppendedDropdownPosition(),this._dropdown.style.opacity="1"},t.prototype._handleOutsideClick=function(t){this._select.contains(t.target)||this._dropdown.contains(t.target)||t.target&&t.target.shadowRoot&&t.path&&t.path[0]&&this._select.contains(t.path[0])||this.outsideClick.emit()},t.prototype._handleScroll=function(){var t=this;this._disposeScrollListener=this._renderer.listen(this.scrollElementRef.nativeElement,"scroll",function(){t.refresh(),t._fireScrollToEnd()})},t.prototype._handleItemsChange=function(t){var e=this;this._scrollToEndFired=!1,this._previousStart=void 0,this._previousEnd=void 0,(void 0!==t&&void 0===t.previousValue||void 0!==t.previousValue&&0===t.previousValue.length)&&(this._startupLoop=!0),this.items=t.currentValue||[],this.refresh().then(function(){e.appendTo&&"top"===e._currentPosition&&e._updateAppendedDropdownPosition()})},t.prototype._updateItems=function(){var t=this;if(en.assertNotInAngularZone(),!this.virtualScroll)return this._zone.run(function(){t.update.emit(t.items.slice()),t._scrollToMarked()}),Promise.resolve();var e=function(n){var r=t._calculateDimensions(),i=t._virtualScrollService.calculateItems(r,t.scrollElementRef.nativeElement,t.bufferAmount||0);t.paddingElementRef.nativeElement.style.height=i.scrollHeight+"px",t.contentElementRef.nativeElement.style.transform="translateY("+i.topPadding+"px)",i.start!==t._previousStart||i.end!==t._previousEnd?(t._zone.run(function(){t.update.emit(t.items.slice(i.start,i.end)),t.scroll.emit({start:i.start,end:i.end})}),t._previousStart=i.start,t._previousEnd=i.end,!0===t._startupLoop&&e(n)):!0===t._startupLoop&&(t._startupLoop=!1,t._scrollToMarked(),n())};return new Promise(function(t){return e(t)})},t.prototype._fireScrollToEnd=function(){this._scrollToEndFired||this.scrollElementRef.nativeElement.scrollTop+this._dropdown.clientHeight>=(this.virtualScroll?this.paddingElementRef.nativeElement:this.contentElementRef.nativeElement).clientHeight&&(this.scrollToEnd.emit(),this._scrollToEndFired=!0)},t.prototype._calculateDimensions=function(t){return void 0===t&&(t=0),this._virtualScrollService.calculateDimensions(this.items.length,t,this.scrollElementRef.nativeElement,this.contentElementRef.nativeElement)},t.prototype._handleDocumentResize=function(){var t=this;this.appendTo&&(this._disposeDocumentResizeListener=this._renderer.listen("window","resize",function(){t._updateAppendedDropdownPosition()}))},t.prototype._scrollToMarked=function(){!this._isScrolledToMarked&&this.markedItem&&(this._isScrolledToMarked=!0,this.scrollInto(this.markedItem))},t.prototype._calculateCurrentPosition=function(t){if("auto"!==this.position)return this.position;var e=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop;return e.top+window.pageYOffset+e.height+t.getBoundingClientRect().height>n+document.documentElement.clientHeight?"top":"bottom"},t.prototype._appendDropdown=function(){var t=document.querySelector(this.appendTo);if(!t)throw new Error("appendTo selector "+this.appendTo+" did not found any parent element");t.appendChild(this._dropdown)},t.prototype._updateAppendedDropdownPosition=function(){var t=document.querySelector(this.appendTo)||document.body,e=this._select.getBoundingClientRect(),n=t.getBoundingClientRect(),r=e.left-n.left;this._dropdown.style.top=e.top-n.top+("bottom"===this._currentPosition?e.height:-this._dropdown.clientHeight)+"px",this._dropdown.style.bottom="auto",this._dropdown.style.left=r+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"},t.prototype._whenContentReady=function(){var t=this;if(0===this.items.length)return Promise.resolve();var e=function(n){t._dropdown.querySelector(".ng-option")?n():t._zone.runOutsideAngular(function(){setTimeout(function(){return e(n)},5)})};return new Promise(function(t){return e(t)})},t}(),Jg=function(){function t(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0}return t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Kg=new _t("ng-select-selection-model"),Yg=function(){function t(t,e,n,r,i,o,s){var a=this;this.classes=t,this.tabIndex=e,this._cd=o,this._console=s,this.items=[],this.clearable=!0,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.labelForId=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.isOpen=!1,this.blurEvent=new tn,this.focusEvent=new tn,this.changeEvent=new tn,this.openEvent=new tn,this.closeEvent=new tn,this.searchEvent=new tn,this.clearEvent=new tn,this.addEvent=new tn,this.removeEvent=new tn,this.scroll=new tn,this.scrollToEnd=new tn,this.disabled=!1,this.viewPortItems=[],this.filterValue=null,this.dropdownId=zg(),this.selectedItemId=0,this._defaultLabel="label",this._primitive=!0,this._pressedKeys=[],this._destroy$=new B,this._keyPress$=new B,this._onChange=function(t){},this._onTouched=function(){},this.clearItem=function(t){var e=a.selectedItems.find(function(e){return e.value===t});a.unselect(e)},this._mergeGlobalConfig(n),this.itemsList=new Hg(this,r()),this.element=i.nativeElement}return Object.defineProperty(t.prototype,"compareWith",{get:function(){return this._compareWith},set:function(t){if(!Fg(t))throw Error("`compareWith` must be a function.");this._compareWith=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clearSearchOnAdd",{get:function(){return Lg(this._clearSearchOnAdd)?this._clearSearchOnAdd:this.closeOnSelect},set:function(t){this._clearSearchOnAdd=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filtered",{get:function(){return!!this.filterValue&&this.searchable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){return this.itemsList.selectedItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedValues",{get:function(){return this.selectedItems.map(function(t){return t.value})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasValue",{get:function(){return this.selectedItems.length>0},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._handleKeyPresses()},t.prototype.ngOnChanges=function(t){t.multiple&&this.itemsList.clearSelected(),t.items&&this._setItems(t.items.currentValue||[]),t.isOpen&&(this._manualOpen=!0)},t.prototype.ngAfterViewInit=function(){this.items&&0===this.items.length&&this._setItemsFromNgOptions()},t.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},t.prototype.handleKeyDown=function(t){if(qg[t.which])switch(t.which){case qg.ArrowDown:this._handleArrowDown(t);break;case qg.ArrowUp:this._handleArrowUp(t);break;case qg.Space:this._handleSpace(t);break;case qg.Enter:this._handleEnter(t);break;case qg.Tab:this._handleTab(t);break;case qg.Esc:this.close(),t.preventDefault(),t.stopPropagation();break;case qg.Backspace:this._handleBackspace()}else t.key&&1===t.key.length&&this._keyPress$.next(t.key.toLocaleLowerCase())},t.prototype.handleMousedown=function(t){var e=t.target;"INPUT"!==e.tagName&&t.preventDefault(),t.stopPropagation(),"ng-clear"!==e.className?"ng-arrow-wrapper"!==e.className?e.className.includes("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle()):this.handleArrowClick():this.handleClearClick()},t.prototype.handleArrowClick=function(){this.isOpen?this.close():this.open()},t.prototype.handleClearClick=function(){this.hasValue&&this.clearModel(),this._clearSearch(),this.focus(),this._isTypeahead&&this.typeahead.next(null),this.clearEvent.emit()},t.prototype.clearModel=function(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())},t.prototype.writeValue=function(t){this.itemsList.clearSelected(),this._handleWriteValue(t),this._cd.markForCheck()},t.prototype.registerOnChange=function(t){this._onChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this._cd.markForCheck()},t.prototype.toggle=function(){this.isOpen?this.close():this.open()},t.prototype.open=function(){this.disabled||this.isOpen||this.itemsList.maxItemsSelected||this._manualOpen||(this._isTypeahead||this.addTag||!this.itemsList.noItemsToSelect)&&(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.filterValue||this.focus(),this.detectChanges())},t.prototype.close=function(){this.isOpen&&!this._manualOpen&&(this.isOpen=!1,this._clearSearch(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())},t.prototype.toggleItem=function(t){!t||t.disabled||this.disabled||(this.multiple&&t.selected?this.unselect(t):this.select(t))},t.prototype.select=function(t){t.selected||(this.itemsList.select(t),this.clearSearchOnAdd&&this._clearSearch(),this.multiple&&this.addEvent.emit(t.value),this._updateNgModel()),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()},t.prototype.focus=function(){this.filterInput.nativeElement.focus()},t.prototype.unselect=function(t){this.itemsList.unselect(t),this.focus(),this._updateNgModel(),this.removeEvent.emit(t)},t.prototype.selectTag=function(){var t,e,n=this;e=Fg(this.addTag)?this.addTag(this.filterValue):this._primitive?this.filterValue:((t={})[this.bindLabel]=this.filterValue,t);var r=function(t){return n._isTypeahead||!n.isOpen?n.itemsList.mapItem(t,null):n.itemsList.addItem(t)};e instanceof Promise?e.then(function(t){return n.select(r(t))}).catch(function(){}):e&&this.select(r(e))},t.prototype.showClear=function(){return this.clearable&&(this.hasValue||this.filterValue)&&!this.disabled},Object.defineProperty(t.prototype,"showAddTag",{get:function(){if(!this.filterValue)return!1;var t=this.filterValue.toLowerCase();return this.addTag&&!this.itemsList.filteredItems.some(function(e){return e.label.toLowerCase()===t})&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(function(e){return e.label.toLowerCase()===t}))&&!this.loading},enumerable:!0,configurable:!0}),t.prototype.showNoItemsFound=function(){var t=0===this.itemsList.filteredItems.length;return(t&&!this._isTypeahead&&!this.loading||t&&this._isTypeahead&&this.filterValue&&!this.loading)&&!this.showAddTag},t.prototype.showTypeToSearch=function(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this.filterValue&&!this.loading},t.prototype.filter=function(t){this.filterValue=t,this.open(),this._isTypeahead?this.typeahead.next(this.filterValue):(this.itemsList.filter(this.filterValue),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit(t)},t.prototype.onInputFocus=function(t){this.focused||(this.element.classList.add("ng-select-focused"),this.focusEvent.emit(t),this.focused=!0)},t.prototype.onInputBlur=function(t){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(t),this.isOpen||this.disabled||this._onTouched(),this.focused=!1},t.prototype.onItemHover=function(t){t.disabled||this.itemsList.markItem(t)},t.prototype.detectChanges=function(){this._cd.destroyed||this._cd.detectChanges()},t.prototype.updateDropdownPosition=function(){this.dropdownPanel&&this.dropdownPanel.updateDropdownPosition()},t.prototype._setItems=function(t){var e=t[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=Lg(e)?!Ug(e):this._primitive,this.itemsList.setItems(t),t.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&Lg(this.filterValue)&&!this._isTypeahead&&this.itemsList.filter(this.filterValue),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)},t.prototype._setItemsFromNgOptions=function(){var t=this;this.ngOptions.changes.pipe(gp(this.ngOptions),Pp(this._destroy$),yl(function(t){return!!t.length})).subscribe(function(e){var n;t.bindLabel=t._defaultLabel,function(e){t.items=e.map(function(t){return{$ngOptionValue:t.value,$ngOptionLabel:t.elementRef.nativeElement.innerHTML,disabled:t.disabled}}),t.itemsList.setItems(t.items),t.hasValue&&t.itemsList.mapSelectedItems(),t.detectChanges()}(e),n=ft(t.ngOptions.changes,t._destroy$),ft.apply(void 0,f(t.ngOptions.map(function(t){return t.stateChange$}))).pipe(Pp(n)).subscribe(function(e){t.itemsList.findItem(e.value).disabled=e.disabled,t._cd.markForCheck()})})},t.prototype._isValidWriteValue=function(t){var e=this;if(!Lg(t)||this.multiple&&""===t||Array.isArray(t)&&0===t.length)return!1;var n=function(t){return!(!Lg(e.compareWith)&&Ug(t)&&e.bindValue&&(e._console.warn("Binding object("+JSON.stringify(t)+") with bindValue is not allowed."),1))};return this.multiple?Array.isArray(t)?t.every(function(t){return n(t)}):(this._console.warn("Multiple select ngModel should be array."),!1):n(t)},t.prototype._handleWriteValue=function(t){var e=this;if(this._isValidWriteValue(t)){var n=function(t){var n,r=e.itemsList.findItem(t);if(r)e.itemsList.select(r);else{var i=Ug(t);i||!i&&!e.bindValue?e.itemsList.select(e.itemsList.mapItem(t,null)):e.bindValue&&((n={})[e.bindLabel]=null,n[e.bindValue]=t,e.itemsList.select(e.itemsList.mapItem(r=n,null)))}};this.multiple?t.forEach(function(t){return n(t)}):n(t)}},t.prototype._handleKeyPresses=function(){var t,e=this;this.searchable||this._keyPress$.pipe(Pp(this._destroy$),Cl(function(t){return e._pressedKeys.push(t)}),(200,void 0===t&&(t=Cp),function(e){return e.lift(new xd(200,t))}),yl(function(){return e._pressedKeys.length>0}),nt(function(){return e._pressedKeys.join("")})).subscribe(function(t){var n=e.itemsList.findByLabel(t);n&&(e.isOpen?(e.itemsList.markItem(n),e._cd.markForCheck()):e.select(n)),e._pressedKeys=[]})},t.prototype._updateNgModel=function(){var t,e,n=[];try{for(var r=c(this.selectedItems),i=r.next();!i.done;i=r.next()){var o,s=i.value;if(this.bindValue)o=s.children?s.value[this.groupBy]:this.itemsList.resolveNested(s.value,this.bindValue),n.push(o);else n.push(s.value)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}var a=this.selectedItems.map(function(t){return t.value});this.multiple?(this._onChange(n),this.changeEvent.emit(a)):(this._onChange(Lg(n[0])?n[0]:null),this.changeEvent.emit(a[0])),this._cd.markForCheck()},t.prototype._clearSearch=function(){this.filterValue&&(this.filterValue=null,this.itemsList.resetFilteredItems())},t.prototype._scrollToMarked=function(){this.isOpen&&this.dropdownPanel&&this.dropdownPanel.scrollInto(this.itemsList.markedItem)},t.prototype._scrollToTag=function(){this.isOpen&&this.dropdownPanel&&this.dropdownPanel.scrollIntoTag()},t.prototype._handleTab=function(t){this.isOpen&&(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),t.preventDefault()):this.showAddTag?(this.selectTag(),t.preventDefault()):this.close():this.close())},t.prototype._handleEnter=function(t){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}t.preventDefault(),t.stopPropagation()},t.prototype._handleSpace=function(t){this.isOpen||this._manualOpen||(this.open(),t.preventDefault())},t.prototype._handleArrowDown=function(t){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),t.preventDefault()},t.prototype._handleArrowUp=function(t){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),t.preventDefault())},t.prototype._nextItemIsTag=function(t){var e=this.itemsList.markedIndex+t;return this.addTag&&this.filterValue&&this.itemsList.markedItem&&(e<0||e===this.itemsList.filteredItems.length)},t.prototype._handleBackspace=function(){!this.filterValue&&this.clearable&&this.hasValue&&(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())},Object.defineProperty(t.prototype,"_isTypeahead",{get:function(){return this.typeahead&&this.typeahead.observers.length>0},enumerable:!0,configurable:!0}),t.prototype._mergeGlobalConfig=function(t){this.placeholder=this.placeholder||t.placeholder,this.notFoundText=this.notFoundText||t.notFoundText,this.typeToSearchText=this.typeToSearchText||t.typeToSearchText,this.addTagText=this.addTagText||t.addTagText,this.loadingText=this.loadingText||t.loadingText,this.clearAllText=this.clearAllText||t.clearAllText,this.virtualScroll=Lg(this.virtualScroll)?this.virtualScroll:!!Lg(t.disableVirtualScroll)&&!t.disableVirtualScroll,this.openOnEnter=Lg(this.openOnEnter)?this.openOnEnter:t.openOnEnter},t}();function Qg(){return new Xg}var Xg=function(){function t(){this._selected=[]}return Object.defineProperty(t.prototype,"value",{get:function(){return this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(t,e,n){if(t.selected=!0,!n&&t.children||this._selected.push(t),e)if(t.parent){var r=t.parent.children.length,i=t.parent.children.filter(function(t){return t.selected}).length;t.parent.selected=r===i}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),n||(this._selected=f(this._selected,t.children)))},t.prototype.unselect=function(t,e){var n;if(this._selected=this._selected.filter(function(e){return e!==t}),t.selected=!1,e)if(t.parent&&t.parent.selected){var r=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),(n=this._selected).push.apply(n,f(r.filter(function(e){return e!==t}))),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))},t.prototype.clear=function(){this._selected=[]},t.prototype._setChildrenSelectedState=function(t,e){t.forEach(function(t){return t.selected=e})},t.prototype._removeChildren=function(t){this._selected=this._selected.filter(function(e){return e.parent!==t})},t.prototype._removeParent=function(t){this._selected=this._selected.filter(function(e){return e!==t})},t}(),Zg=function(){return function(){}}(),ty=ri({encapsulation:2,styles:[".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{color:#333;cursor:default;display:flex;outline:0;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none;border:0;box-shadow:none;outline:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute;z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:.8s linear infinite load8;animation:.8s linear infinite load8}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}"],data:{}});function ey(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["aria-hidden","true"],["class","ng-value-icon left"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.unselect(t.parent.context.$implicit)&&r),r},null,null)),(t()(),Wo(-1,null,["\xd7"])),(t()(),Ai(2,0,null,null,1,"span",[["class","ng-value-label"]],null,null,null,null,null)),(t()(),Wo(3,null,["",""]))],null,function(t,e){t(e,3,0,e.parent.context.$implicit.label)})}function ny(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function ry(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-value"]],[[2,"ng-value-disabled",null]],null,null,null,null)),(t()(),Pi(0,[["defaultLabelTemplate",2]],null,0,null,ey)),(t()(),Pi(16777216,null,null,2,null,ny)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{item:0,clear:1,label:2})],function(t,e){var n=e.component,r=t(e,4,0,e.context.$implicit.value,n.clearItem,e.context.$implicit.label);t(e,3,0,r,n.labelTemplate||so(e,1))},function(t,e){t(e,0,0,e.context.$implicit.disabled)})}function iy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,null,null,null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,ry)),wo(2,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Pi(0,null,null,0))],function(t,e){t(e,2,0,e.component.selectedItems)},null)}function oy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function sy(t){return Jo(0,[(t()(),Pi(16777216,null,null,2,null,oy)),wo(1,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(2,{items:0,clear:1}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,2,0,n.selectedValues,n.clearItem);t(e,1,0,r,n.multiLabelTemplate)},null)}function ay(t){return Jo(0,[(t()(),Ai(0,0,null,null,0,"div",[["class","ng-spinner-loader"]],null,null,null,null,null))],null,null)}function uy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"span",[["class","ng-clear-wrapper"]],[[8,"title",0]],null,null,null,null)),(t()(),Ai(1,0,null,null,1,"span",[["aria-hidden","true"],["class","ng-clear"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\xd7"]))],null,function(t,e){var n;t(e,0,0,""+(null!=(n=e.component.clearAllText)?n.toString():""))})}function ly(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","ng-option-label"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.parent.context.$implicit.label)})}function cy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function hy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-option"]],[[1,"role",0],[2,"ng-option-disabled",null],[2,"ng-option-selected",null],[2,"ng-optgroup",null],[2,"ng-option",null],[2,"ng-option-child",null],[2,"ng-option-marked",null],[1,"id",0]],[[null,"click"],[null,"mouseover"]],function(t,e,n){var r=!0,i=t.component;return"click"===e&&(r=!1!==i.toggleItem(t.context.$implicit)&&r),"mouseover"===e&&(r=!1!==i.onItemHover(t.context.$implicit)&&r),r},null,null)),(t()(),Pi(0,[["defaultOptionTemplate",2]],null,0,null,ly)),(t()(),Pi(16777216,null,null,2,null,cy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{item:0,item$:1,index:2,searchTerm:3})],function(t,e){var n=e.component,r=t(e,4,0,e.context.$implicit.value,e.context.$implicit,e.context.$implicit.index,n.filterValue);t(e,3,0,r,e.context.$implicit.children?n.optgroupTemplate||so(e,1):n.optionTemplate||so(e,1))},function(t,e){t(e,0,0,e.context.$implicit.children?"group":"option",e.context.$implicit.disabled,e.context.$implicit.selected,e.context.$implicit.children,!e.context.$implicit.children,!!e.context.$implicit.parent,e.context.$implicit===e.component.itemsList.markedItem,null==e.context.$implicit?null:e.context.$implicit.htmlId)})}function fy(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"span",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"span",[["class","ng-tag-label"]],null,null,null,null,null)),(t()(),Wo(2,null,["",""])),(t()(),Wo(3,null,['"','"']))],null,function(t,e){var n=e.component;t(e,2,0,n.addTagText),t(e,3,0,n.filterValue)})}function py(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function dy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-option"],["role","option"]],[[2,"ng-option-marked",null]],[[null,"mouseover"],[null,"click"]],function(t,e,n){var r=!0,i=t.component;return"mouseover"===e&&(r=!1!==i.itemsList.unmarkItem()&&r),"click"===e&&(r=!1!==i.selectTag()&&r),r},null,null)),(t()(),Pi(0,[["defaultTagTemplate",2]],null,0,null,fy)),(t()(),Pi(16777216,null,null,2,null,py)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0})],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.tagTemplate||so(e,1))},function(t,e){t(e,0,0,!e.component.itemsList.markedItem)})}function gy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.notFoundText)})}function yy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function my(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultNotFoundTemplate",2]],null,0,null,gy)),(t()(),Pi(16777216,null,null,2,null,yy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.notFoundTemplate||so(e,1))},null)}function vy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.typeToSearchText)})}function by(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function wy(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultTypeToSearchTemplate",2]],null,0,null,vy)),(t()(),Pi(16777216,null,null,1,null,by)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(t()(),Pi(0,null,null,0))],function(t,e){t(e,3,0,e.component.typeToSearchTemplate||so(e,1))},null)}function _y(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.loadingText)})}function xy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function Sy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultLoadingTextTemplate",2]],null,0,null,_y)),(t()(),Pi(16777216,null,null,2,null,xy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.loadingTextTemplate||so(e,1))},null)}function Cy(t){return Jo(0,[(t()(),Ai(0,0,null,null,13,"ng-dropdown-panel",[["class","ng-dropdown-panel"]],[[2,"ng-select-multiple",null],[8,"id",0]],[[null,"update"],[null,"scroll"],[null,"scrollToEnd"],[null,"outsideClick"],[null,"mousedown"]],function(t,e,n){var r=!0,i=t.component;return"mousedown"===e&&(r=!1!==so(t,2).handleMousedown(n)&&r),"update"===e&&(r=!1!==(i.viewPortItems=n)&&r),"scroll"===e&&(r=!1!==i.scroll.emit(n)&&r),"scrollToEnd"===e&&(r=!1!==i.scrollToEnd.emit(n)&&r),"outsideClick"===e&&(r=!1!==i.close()&&r),r},Iy,ky)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wo(2,1818624,[[1,4]],0,$g,[Tn,en,Gg,Wg,On,[2,Aa]],{items:[0,"items"],markedItem:[1,"markedItem"],position:[2,"position"],appendTo:[3,"appendTo"],bufferAmount:[4,"bufferAmount"],virtualScroll:[5,"virtualScroll"],headerTemplate:[6,"headerTemplate"],footerTemplate:[7,"footerTemplate"]},{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"}),(t()(),Ai(3,0,null,0,4,null,null,null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,hy)),wo(5,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Pi(16777216,null,null,1,null,dy)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,my)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,wy)),wo(11,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,Sy)),wo(13,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"ng-dropdown-panel",n.classes),t(e,2,0,n.itemsList.filteredItems,n.itemsList.markedItem,n.dropdownPosition,n.appendTo,n.bufferAmount,n.virtualScroll,n.headerTemplate,n.footerTemplate),t(e,5,0,n.viewPortItems),t(e,7,0,n.showAddTag),t(e,9,0,n.showNoItemsFound()),t(e,11,0,n.showTypeToSearch()),t(e,13,0,n.loading&&0===n.itemsList.filteredItems.length)},function(t,e){var n=e.component;t(e,0,0,n.multiple,n.dropdownId)})}function Ey(t){return Jo(2,[Lo(671088640,1,{dropdownPanel:0}),Lo(402653184,2,{filterInput:0}),(t()(),Ai(2,0,null,null,15,"div",[["class","ng-select-container"]],[[2,"ng-has-value",null]],[[null,"mousedown"]],function(t,e,n){var r=!0;return"mousedown"===e&&(r=!1!==t.component.handleMousedown(n)&&r),r},null,null)),(t()(),Ai(3,0,null,null,8,"div",[["class","ng-value-container"]],null,null,null,null,null)),(t()(),Ai(4,0,null,null,1,"div",[["class","ng-placeholder"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Pi(16777216,null,null,1,null,iy)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,sy)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(10,0,null,null,1,"div",[["class","ng-input"]],null,null,null,null,null)),(t()(),Ai(11,0,[[2,0],["filterInput",1]],null,0,"input",[["role","combobox"],["type","text"]],[[1,"autocomplete",0],[1,"id",0],[1,"tabindex",0],[8,"readOnly",0],[8,"disabled",0],[8,"value",0],[1,"aria-expanded",0],[1,"aria-owns",0],[1,"aria-activedescendant",0]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"change"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==i.filter(so(t,11).value)&&r),"focus"===e&&(r=!1!==i.onInputFocus(n)&&r),"blur"===e&&(r=!1!==i.onInputBlur(n)&&r),"change"===e&&(r=!1!==n.stopPropagation()&&r),r},null,null)),(t()(),Pi(16777216,null,null,1,null,ay)),wo(13,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,uy)),wo(15,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(16,0,null,null,1,"span",[["class","ng-arrow-wrapper"]],null,null,null,null,null)),(t()(),Ai(17,0,null,null,0,"span",[["class","ng-arrow"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,Cy)),wo(19,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,7,0,!n.multiLabelTemplate&&n.selectedItems.length>0),t(e,9,0,n.multiLabelTemplate&&n.selectedValues.length>0),t(e,13,0,n.loading),t(e,15,0,n.showClear()),t(e,19,0,n.isOpen)},function(t,e){var n=e.component;t(e,2,0,n.hasValue),t(e,5,0,n.placeholder),t(e,11,0,n.labelForId?"off":n.dropdownId,n.labelForId,n.tabIndex,!n.searchable,n.disabled,n.filterValue?n.filterValue:"",n.isOpen,n.isOpen?n.dropdownId:null,n.isOpen?null==n.itemsList?null:null==n.itemsList.markedItem?null:n.itemsList.markedItem.htmlId:null)})}var ky=ri({encapsulation:2,styles:[".ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}"],data:{}});function Ty(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","ng-dropdown-header"]],null,null,null,null,null)),(t()(),Ai(1,16777216,null,null,1,null,null,null,null,null,null,null)),wo(2,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null)],function(t,e){t(e,2,0,e.component.headerTemplate)},null)}function Oy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","ng-dropdown-footer"]],null,null,null,null,null)),(t()(),Ai(1,16777216,null,null,1,null,null,null,null,null,null,null)),wo(2,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null)],function(t,e){t(e,2,0,e.component.footerTemplate)},null)}function Iy(t){return Jo(2,[Lo(402653184,1,{contentElementRef:0}),Lo(402653184,2,{scrollElementRef:0}),Lo(402653184,3,{paddingElementRef:0}),(t()(),Pi(16777216,null,null,1,null,Ty)),wo(4,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(5,0,[[2,0],["scroll",1]],null,3,"div",[["class","ng-dropdown-panel-items scroll-host"]],null,null,null,null,null)),(t()(),Ai(6,0,[[3,0],["padding",1]],null,0,"div",[],[[2,"total-padding",null]],null,null,null,null)),(t()(),Ai(7,0,[[1,0],["content",1]],null,1,"div",[],[[2,"scrollable-content",null]],null,null,null,null)),(null,0,{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:null,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:0}}),(t()(),Pi(16777216,null,null,1,null,Oy)),wo(10,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,n.headerTemplate),t(e,10,0,n.footerTemplate)},function(t,e){var n=e.component;t(e,6,0,n.virtualScroll),t(e,7,0,n.virtualScroll&&n.items.length>0)})}var Py=ri({encapsulation:0,styles:[[".login-page[_ngcontent-%COMP%]{text-align:center;font-family:Roboto,sans-serif;color:#666}.login-page[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:38px;text-transform:uppercase;font-weight:700;line-height:50px;letter-spacing:1.9px;padding-top:12px;margin-top:0}.login-page[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#666;font-size:16px;font-weight:500;letter-spacing:1px;line-height:21px;margin-top:48px}.login-page[_ngcontent-%COMP%] .small-link[_ngcontent-%COMP%]{font-size:12px;color:#666;letter-spacing:.75px;line-height:16px}.login-page[_ngcontent-%COMP%] .registration-link[_ngcontent-%COMP%]{margin-top:38px}.login-page[_ngcontent-%COMP%] .registration-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px;color:#666;letter-spacing:1px}.login-page[_ngcontent-%COMP%] .item-divider[_ngcontent-%COMP%]{box-sizing:border-box;height:1px;width:354px;border-bottom:1px solid #e0e0e0;position:absolute;bottom:-8px;left:-9px}"]],data:{}});function Ay(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"div",[["style","height:40px; padding-top:10px; position: relative;"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"img",[["style","float: left; height: 32px; width: 32px; margin-top:-5px;"]],[[8,"src",4]],null,null,null,null)),(t()(),Ai(2,0,null,null,1,"span",[["style","float: left; margin-left: 10px;"]],null,null,null,null,null)),(t()(),Wo(3,null,["",""])),(t()(),Ai(4,0,null,null,0,"div",[["style","clear: both;"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,0,"div",[["class","item-divider"]],null,null,null,null,null))],null,function(t,e){t(e,1,0,e.context.item.image),t(e,3,0,e.context.item.name)})}function Ry(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"input",[["class","wide-text"],["placeholder","Enter WebID"],["style","margin-top:10px; padding: 12px 10px; width: 340px; height: 16px; display: block; margin-left: auto; margin-right: auto;"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,1)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,1).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,1)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,1)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.customProviderUrl=n)&&r),r},null,null)),wo(1,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(3,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(5,16384,null,0,dg,[[4,tg]],null,null)],function(t,e){t(e,3,0,e.component.customProviderUrl)},function(t,e){t(e,0,0,so(e,5).ngClassUntouched,so(e,5).ngClassTouched,so(e,5).ngClassPristine,so(e,5).ngClassDirty,so(e,5).ngClassValid,so(e,5).ngClassInvalid,so(e,5).ngClassPending)})}function Ny(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"button",[["class","wide-button"],["style","margin-top:10px;"]],[[8,"disabled",0]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onLogin()&&r),r},null,null)),(t()(),Wo(-1,null,["Go"]))],null,function(t,e){var n=e.component;t(e,0,0,null===n.selectedProviderUrl&&!n.customProviderUrl)})}function jy(t){return Jo(0,[(t()(),Ai(0,0,null,null,39,"div",[["class","login-page"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"div",[["style","margin-top:60px;"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"i",[["class","fas fa-user-circle"],["style","font-size: 64px;"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Profile Demo App "])),(t()(),Ai(5,0,null,null,1,"h2",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Login with Solid Identity "])),(t()(),Ai(7,0,null,null,23,"div",[["style","margin-top: 10px;"]],null,null,null,null,null)),(t()(),Ai(8,0,null,null,18,"ng-select",[["bindLabel","name"],["bindValue","loginUrl"],["class","login-select ng-select"],["dropdownPosition","bottom"],["placeholder","Select ID Provider"],["role","listbox"],["style","width: 360px; height: 48px; margin-left: auto; margin-right: auto;"]],[[2,"ng-select-single",null],[2,"ng-select-typeahead",null],[2,"ng-select-multiple",null],[2,"ng-select-taggable",null],[2,"ng-select-searchable",null],[2,"ng-select-opened",null],[2,"ng-select-disabled",null],[2,"ng-select-filtered",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keydown"]],function(t,e,n){var r=!0,i=t.component;return"keydown"===e&&(r=!1!==so(t,9).handleKeyDown(n)&&r),"ngModelChange"===e&&(r=!1!==(i.selectedProviderUrl=n)&&r),r},Ey,ty)),wo(9,4964352,null,11,Yg,[[8,"login-select"],[8,null],Jg,Kg,On,Ln,Mg],{items:[0,"items"],bindLabel:[1,"bindLabel"],bindValue:[2,"bindValue"],placeholder:[3,"placeholder"],dropdownPosition:[4,"dropdownPosition"]},null),Lo(335544320,1,{optionTemplate:0}),Lo(335544320,2,{optgroupTemplate:0}),Lo(335544320,3,{labelTemplate:0}),Lo(335544320,4,{multiLabelTemplate:0}),Lo(335544320,5,{headerTemplate:0}),Lo(335544320,6,{footerTemplate:0}),Lo(335544320,7,{notFoundTemplate:0}),Lo(335544320,8,{typeToSearchTemplate:0}),Lo(335544320,9,{loadingTextTemplate:0}),Lo(335544320,10,{tagTemplate:0}),Lo(603979776,11,{ngOptions:1}),xo(1024,null,Gd,function(t){return[t]},[Yg]),wo(22,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(24,16384,null,0,dg,[[4,tg]],null,null),(t()(),Pi(0,[[1,2]],null,1,null,Ay)),wo(26,16384,null,0,Dg,[Dn],null,null),(t()(),Pi(16777216,null,null,1,null,Ry)),wo(28,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Ny)),wo(30,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(31,0,null,null,4,"div",[["class","registration-link"]],null,null,null,null,null)),(t()(),Ai(32,0,null,null,1,"p",[["style","margin: 12px;"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Don't have a Solid Identity?"])),(t()(),Ai(34,0,null,null,1,"button",[["class","wide-button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.goToRegistration()&&r),r},null,null)),(t()(),Wo(-1,null,["Register"])),(t()(),Ai(36,0,null,null,3,"div",[["style","margin-top: 48px;"]],null,null,null,null,null)),(t()(),Ai(37,0,null,null,2,"a",[["class","small-link"],["href","https://solid.mit.edu"],["target","_blank"]],null,null,null,null,null)),(t()(),Ai(38,0,null,null,0,"i",[["class","fas fa-info-circle"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" What is a Solid Identity? "]))],function(t,e){var n=e.component;t(e,9,0,n.identityProviders,"name","loginUrl","Select ID Provider","bottom"),t(e,22,0,n.selectedProviderUrl),t(e,28,0,null===n.selectedProviderUrl),t(e,30,0,void 0!==n.selectedProviderUrl||void 0!==n.customProviderUrl)},function(t,e){t(e,8,1,[!so(e,9).multiple,so(e,9).typeahead,so(e,9).multiple,so(e,9).addTag,so(e,9).searchable,so(e,9).isOpen,so(e,9).disabled,so(e,9).filtered,so(e,24).ngClassUntouched,so(e,24).ngClassTouched,so(e,24).ngClassPristine,so(e,24).ngClassDirty,so(e,24).ngClassValid,so(e,24).ngClassInvalid,so(e,24).ngClassPending])})}function Dy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-login",[],null,null,null,jy,Py)),wo(1,114688,null,0,Rf,[Tf,Qh],null,null)],function(t,e){t(e,1,0)},null)}var My=Ki("app-login",Rf,Dy,{},{},[]),Ly=ri({encapsulation:0,styles:[[""]],data:{}});function Uy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["id","app-container"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Loading..."]))],null,null)}function Fy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-login-popup",[],null,null,null,Uy,Ly)),wo(1,114688,null,0,Af,[On],null,null)],function(t,e){t(e,1,0)},null)}var Vy=Ki("app-login-popup",Af,Fy,{},{},[]),By=ri({encapsulation:0,styles:[[""]],data:{}});function zy(t){return Jo(0,[(t()(),Ai(0,0,null,null,11,"div",[["class","dashboard"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"p",[],null,null,null,null,null)),(t()(),Wo(2,null,["Your webId is ",""])),(t()(),Ai(3,0,null,null,8,"ul",[],null,null,null,null,null)),(t()(),Ai(4,0,null,null,4,"li",[],null,null,null,null,null)),(t()(),Ai(5,0,null,null,3,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,6).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),wo(6,671744,null,0,tf,[Qh,ch,oa],{routerLink:[0,"routerLink"]},null),qo(32,7,new Array(1)),(t()(),Wo(-1,null,["Profile"])),(t()(),Ai(9,0,null,null,2,"li",[],null,null,null,null,null)),(t()(),Ai(10,0,null,null,1,"a",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onSignOut()&&r),r},null,null)),(t()(),Wo(-1,null,["Signout"]))],function(t,e){var n=t(e,7,0,"/card");t(e,6,0,n)},function(t,e){t(e,2,0,e.component.session.webId),t(e,5,0,so(e,6).target,so(e,6).href)})}function Hy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-dashboard",[],null,null,null,zy,By)),wo(1,114688,null,0,Pf,[Tf,ch],null,null)],function(t,e){t(e,1,0)},null)}var qy=Ki("app-dashboard",Pf,Hy,{},{},[]),Wy=ri({encapsulation:0,styles:[[".profile-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.profile-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:24px;color:#7c55fb;font-weight:700;line-height:32px;letter-spacing:1.2px;text-align:center;margin-top:82px;text-transform:uppercase}.profile-fields-container[_ngcontent-%COMP%]{max-width:740px;min-height:500px;margin:0 auto;border:1px solid #ccc;box-shadow:#ccc 1px 1px 4px;position:relative}.profile-fields-container[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{height:200px;width:100%;background-size:cover!important;background:url(/dechat_en1a/assets/images/Solid_Pattern.png)}.profile-fields-container[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:128px;border-radius:50%;margin-left:auto;margin-right:auto;position:relative;top:40px;display:block}.profile-fields-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#89969f;padding-left:26px;padding-right:10px;margin-top:24px}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]{height:12px;width:280px;border:1px solid #89969f;border-radius:4px;padding:10px}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::-webkit-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]:-ms-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::-ms-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::placeholder{color:rgba(102,102,102,.2)}.profile-save-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:auto;height:100px;flex-direction:column;justify-content:flex-end}.profile-save-button[_ngcontent-%COMP%]{background-color:#7c55fb;margin-left:auto;margin-right:auto;width:280px}.profile-save-button[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb;cursor:not-allowed}.topnav[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;background-color:#7c4dff;height:50px;color:#fff}.topnav[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{display:inline-block;font-family:'Roboto Slab',serif;font-size:24px;font-weight:700;text-transform:uppercase;line-height:32px;padding-right:80px;position:relative;top:-8px;left:28px}.topnav[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{display:inline-block;font-size:10px;line-height:13px;width:100px;height:100%;text-align:center}.topnav[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px;margin-top:8px;margin-bottom:2px}.topnav[_ngcontent-%COMP%] .profile-menu[_ngcontent-%COMP%]{float:right;display:inline-block;width:50px;height:50px;background-color:rgba(0,0,0,.25)}.topnav[_ngcontent-%COMP%] .profile-menu[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;height:30px;width:30px;border-radius:50%;margin:10px auto 0;cursor:pointer}.loading-image[_ngcontent-%COMP%]{text-align:center;margin-top:50px}"]],data:{}});function Gy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","loading-image"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"i",[["class","fas fa-circle-notch fa-4x fa-spin"]],null,null,null,null,null))],null,null)}function $y(t){return Jo(0,[(t()(),Ai(0,0,null,null,61,"div",[["class","profile-fields-container"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"div",[["class","profile-image-container"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),Ai(3,0,null,null,58,"form",[["novalidate",""],["style","padding-top: 26px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var r=!0,i=t.component;return"submit"===e&&(r=!1!==so(t,5).onSubmit(n)&&r),"reset"===e&&(r=!1!==so(t,5).onReset()&&r),"submit"===e&&(r=!1!==i.onSubmit()&&r),r},null,null)),wo(4,16384,null,0,Ag,[],null,null),wo(5,4210688,[[1,4],["f",4]],0,Cg,[[8,null],[8,null]],null,null),xo(2048,null,Fd,null,[Cg]),wo(7,16384,null,0,gg,[[4,Fd]],null,null),(t()(),Ai(8,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(9,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,0,"i",[["class","fas fa-user"]],null,null,null,null,null)),(t()(),Ai(11,0,null,null,5,"input",[["class","field-text form-control"],["name","fn"],["placeholder","NAME"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,12)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,12).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,12)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,12)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.fn=n)&&r),r},null,null)),wo(12,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(14,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(16,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(17,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(18,0,null,null,0,"i",[["class","fas fa-phone"]],null,null,null,null,null)),(t()(),Ai(19,0,null,null,5,"input",[["class","field-text form-control"],["name","phone"],["placeholder","PHONE"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,20)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,20).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,20)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,20)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.phone=n)&&r),r},null,null)),wo(20,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(22,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(24,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(25,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(26,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(27,0,null,null,0,"i",[["class","fas fa-user-astronaut"]],null,null,null,null,null)),(t()(),Ai(28,0,null,null,5,"input",[["class","field-text form-control"],["name","role"],["placeholder","ROLE"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,29)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,29).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,29)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,29)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.role=n)&&r),r},null,null)),wo(29,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(31,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(33,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(34,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(35,0,null,null,0,"i",[["class","fas fa-envelope"]],null,null,null,null,null)),(t()(),Ai(36,0,null,null,5,"input",[["class","field-text form-control"],["name","email"],["placeholder","EMAIL"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,37)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,37).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,37)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,37)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.email=n)&&r),r},null,null)),wo(37,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(39,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(41,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(42,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(43,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(44,0,null,null,0,"i",[["class","fas fa-building"]],null,null,null,null,null)),(t()(),Ai(45,0,null,null,5,"input",[["class","field-text form-control"],["name","company"],["placeholder","ORGANIZATION"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,46)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,46).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,46)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,46)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.company=n)&&r),r},null,null)),wo(46,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(48,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(50,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(51,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(52,0,null,null,0,"i",[["class","fas fa-map-marker-alt"],["style","width: 12px; margin-left: 2px;"]],null,null,null,null,null)),(t()(),Ai(53,0,null,null,5,"input",[["class","field-text form-control"],["name","address"],["placeholder","ADDRESS"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,54)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,54).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,54)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,54)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.address.street=n)&&r),r},null,null)),wo(54,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(56,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(58,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(59,0,null,null,2,"div",[["class","profile-save-button-container"]],null,null,null,null,null)),(t()(),Ai(60,0,null,null,1,"button",[["class","wide-button profile-save-button"],["type","submit"]],[[8,"disabled",0]],null,null,null,null)),(t()(),Wo(-1,null,["Save"]))],function(t,e){var n=e.component;t(e,14,0,"fn",n.profile.fn),t(e,22,0,"phone",n.profile.phone),t(e,31,0,"role",n.profile.role),t(e,39,0,"email",n.profile.email),t(e,48,0,"company",n.profile.company),t(e,56,0,"address",n.profile.address.street)},function(t,e){var n=e.component;t(e,2,0,n.profileImage),t(e,3,0,so(e,7).ngClassUntouched,so(e,7).ngClassTouched,so(e,7).ngClassPristine,so(e,7).ngClassDirty,so(e,7).ngClassValid,so(e,7).ngClassInvalid,so(e,7).ngClassPending),t(e,11,0,so(e,16).ngClassUntouched,so(e,16).ngClassTouched,so(e,16).ngClassPristine,so(e,16).ngClassDirty,so(e,16).ngClassValid,so(e,16).ngClassInvalid,so(e,16).ngClassPending),t(e,19,0,so(e,24).ngClassUntouched,so(e,24).ngClassTouched,so(e,24).ngClassPristine,so(e,24).ngClassDirty,so(e,24).ngClassValid,so(e,24).ngClassInvalid,so(e,24).ngClassPending),t(e,28,0,so(e,33).ngClassUntouched,so(e,33).ngClassTouched,so(e,33).ngClassPristine,so(e,33).ngClassDirty,so(e,33).ngClassValid,so(e,33).ngClassInvalid,so(e,33).ngClassPending),t(e,36,0,so(e,41).ngClassUntouched,so(e,41).ngClassTouched,so(e,41).ngClassPristine,so(e,41).ngClassDirty,so(e,41).ngClassValid,so(e,41).ngClassInvalid,so(e,41).ngClassPending),t(e,45,0,so(e,50).ngClassUntouched,so(e,50).ngClassTouched,so(e,50).ngClassPristine,so(e,50).ngClassDirty,so(e,50).ngClassValid,so(e,50).ngClassInvalid,so(e,50).ngClassPending),t(e,53,0,so(e,58).ngClassUntouched,so(e,58).ngClassTouched,so(e,58).ngClassPristine,so(e,58).ngClassDirty,so(e,58).ngClassValid,so(e,58).ngClassInvalid,so(e,58).ngClassPending),t(e,60,0,!n.cardForm||n.cardForm.pristine)})}function Jy(t){return Jo(0,[Lo(671088640,1,{cardForm:0}),(t()(),Ai(1,0,null,null,23,"div",[["class","profile-container"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,16,"div",[["class","topnav"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"div",[["class","logo"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Solid"])),(t()(),Ai(5,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(6,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(7,0,null,null,0,"i",[["class","far fa-compass"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 1 "])),(t()(),Ai(9,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(11,0,null,null,0,"i",[["class","far fa-comment"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 2 "])),(t()(),Ai(13,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(14,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(15,0,null,null,0,"i",[["class","fas fa-sliders-h"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 3 "])),(t()(),Ai(17,0,null,null,1,"div",[["class","profile-menu"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.logout()&&r),r},null,null)),(t()(),Ai(18,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),Ai(19,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["Profile"])),(t()(),Pi(16777216,null,null,1,null,Gy)),wo(22,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,$y)),wo(24,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,22,0,n.loadingProfile),t(e,24,0,!n.loadingProfile)},function(t,e){t(e,18,0,e.component.profileImage)})}function Ky(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-card",[],null,null,null,Jy,Wy)),wo(1,114688,null,0,Of,[al,ch,Tf],null,null)],function(t,e){t(e,1,0)},null)}var Yy=Ki("app-card",Of,Ky,{},{},[]),Qy=function(){return function(t){this.chatId=t,this.users=[],this.administrators=[]}}(),Xy=function(){return function(t){this.url=t,this.nickname=t.replace("https://","").split(".")[0],this.profileImage="/assets/images/profile.png"}}(),Zy=function(){function t(t,e){this.rdf=t,this.auth=e,console.log("User service constructor"),this.user=null,this.loadingProfile=!0,this.profileLoaded=!1,this.contacts=[],this.loadProfile(),localStorage.removeItem("oldProfileData")}return t.prototype.loadProfile=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:if(this.profileLoaded)return[2];if(!this.loadingProfile)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),this.loadingProfile=!0,[4,this.rdf.getProfile()];case 2:return(t=n.sent())&&(this.profile=t,this.auth.saveOldUserData(t)),this.loadingProfile=!1,this.profileLoaded=!0,this.profile?this.setupFromProfile():this.setupDefault(),[3,4];case 3:return e=n.sent(),console.log("Error: "+e),[3,4];case 4:return[2]}})})},t.prototype.setupFromProfile=function(){this.user=new Xy(this.rdf.getWebID()),this.user.url=this.rdf.getWebID(),this.user.userName=this.profile.fn,this.user.status="online",this.user.profileImage=this.profile.image?this.profile.image:"/assets/images/profile.png",this.loadContacts()},t.prototype.setupDefault=function(){console.log("UserService failed fetching user data. Loading default user."),this.user=new Xy("")},t.prototype.loadContacts=function(){return u(this,void 0,void 0,function(){var t,e=this;return l(this,function(n){switch(n.label){case 0:return console.log("Fetching contacts..."),[4,this.rdf.getContacts()];case 1:return t=n.sent(),console.log("Contact count = "+t.length),t.forEach(function(t){var n=new Xy(t.value);console.log("Contact: "+n.nickname),e.contacts.map(function(t){return t.url}).includes(n.url)||e.contacts.push(n)}),[2]}})})},t.prototype.getUser=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user]}})})},t.prototype.getUserName=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user.userName]}})})},t.prototype.getProfileImage=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user.profileImage]}})})},t.prototype.getContacts=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.contacts]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(al),fe(Tf))},token:t,providedIn:"root"}),t}(),tm=n("Q45J"),em=function(){function t(t){this.rdf=t}return t.prototype.getRoot=function(t){return t.url.replace("/profile/card#me","/private/dechat_en1a/")},t.prototype.checkUserFiles=function(t){return u(this,void 0,void 0,function(){var e,n,r=this;return l(this,function(i){switch(i.label){case 0:return[4,this.rdf.getSession()];case 1:return i.sent(),e=t.url.replace("/profile/card#me","/private/"),n=t.url.replace("/profile/card#me","/inbox/"),this.checkFolderExistence(n),this.checkFolderExistence(e).then(function(t){return r.checkFolderExistence(e+"dechat_en1a/").then(function(t){return r.checkFolderExistence(e+"dechat_en1a/chats/")})}),[2]}})})},t.prototype.checkFolderExistence=function(t,e){return void 0===e&&(e=function(t){}),u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,this.rdf.getSession()];case 1:r.sent();try{tm.readFolder(t).then(function(t){console.log("Existent folder!")},function(r){console.log("Non existent folder. Creating new one..."),n.createFolder(t).then(e)})}catch(i){console.log("Error creating folder: "+i)}return[2]}})})},t.prototype.checkChatFolder=function(t,e){return u(this,void 0,void 0,function(){var n,r=this;return l(this,function(i){switch(i.label){case 0:return[4,this.rdf.getSession()];case 1:return i.sent(),n=this.getChatUrl(t,e),[4,this.checkFolderExistence(n,function(i){r.checkChatDataFile(n,e),r.givePermissions(n,t)})];case 2:return i.sent(),[2]}})})},t.prototype.checkChatDataFile=function(t,e){var n=t+"data.txt",r=JSON.stringify(e);this.updateFile(n,r)},t.prototype.getChatsRootUrl=function(t){return this.getRoot(t)+"chats/"},t.prototype.getChatUrl=function(t,e){var n=this.getRoot(t)+"chats/"+e.chatId+"/";return console.log("Chat url = "+n),n},t.prototype.getInboxUrl=function(t){return t.url.replace("/profile/card#me","/inbox/")},t.prototype.createFolder=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,tm.createFolder(t).then(function(e){console.log("Created folder "+t+".")},function(t){console.log("Could not create folder: "+t)})];case 1:return e.sent(),[2]}})})},t.prototype.createFile=function(t,e){return void 0===e&&(e=null),u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,tm.createFile(t).then(function(r){console.log("Created file "+t+"."),null!=e&&n.updateFile(t,e)},function(t){console.log("Could not create file: "+t)})];case 1:return r.sent(),[2]}})})},t.prototype.updateFile=function(t,e){return u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,tm.updateFile(t,e).then(function(t){console.log("File edited!")},function(r){n.createFile(t,e)})];case 1:return r.sent(),[2]}})})},t.prototype.readFile=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e="",[4,tm.readFile(t).then(function(t){console.log("File content is : "+t+"."),e=t},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.deleteFile=function(t){tm.deleteFile(t).then(function(e){console.log("Deleted "+t+".")},function(t){return console.log(t)})},t.prototype.readFolder=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=[],[4,tm.readFolder(t).then(function(t){e=t.files.map(function(t){return t.url})},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.deleteFolder=function(t){tm.deleteFolder(t).then(function(e){console.log("Deleted "+t+".")},function(t){return console.log(t)})},t.prototype.readFolderSubfolders=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=[],[4,tm.readFolder(t).then(function(t){e=t.folders.map(function(t){return t.url})},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.givePermissions=function(t,e){return u(this,void 0,void 0,function(){var n;return l(this,function(r){return n="# ACL resource for the profile folder\n @prefix acl: .\n @prefix foaf: .\n \n # The owner has all permissions\n <#owner>\n a acl:Authorization;\n acl:agent <"+e.url+">;\n acl:accessTo <./>;\n acl:defaultForNew <./>;\n acl:mode acl:Read, acl:Write, acl:Control.\n \n # The public has read permissions\n <#public>\n a acl:Authorization;\n acl:agentClass foaf:Agent;\n acl:accessTo <./>;\n acl:defaultForNew <./>;\n acl:mode acl:Read.",this.readFile(t+=".acl"),tm.updateFile(t,n).then(function(t){console.log("Folder permisions added")},function(t){return console.log("Could not set folder permisions"+t)}),[2]})})},t.prototype.addUserToAclFile=function(t,e){for(var n=e.url,r=t.split("\n"),i=0,o=r.filter(function(t,e,n){return!!t.startsWith("@prefix")&&(i=e,!0)}),s=!1,a="http://www.w3.org/ns/auth/acl#",u=0;u.\n"),i++);var l=!1;for(u=0;u.\n");var c=r.findIndex(function(t,e,n){return t.startsWith(":Read")});-1==c&&(c=r.length,r.push(":Read\n"),r.push("a n0:Authorization;\n"),r.push("n0:accessTo <./>:;\n"),r.push("n0:defaultForNew <./>:;\n"),r.push("n0:mode n0:Read.`;\n"),r.push("n0:agent c0:me;\n"))},t.ngInjectableDef=wt({factory:function(){return new t(fe(al))},token:t,providedIn:"root"}),t}(),nm=n("EcEN"),rm=function(){function t(t){void 0===t&&(t=""),this.id=Object(nm.v4)(),this.message=t,this.date=new Date}return t.prototype.isMessageFrom=function(t){return null!=this.userUrl&&this.userUrl==t.url},t}(),im=function(){function t(t,e){this.MAX_MSG_COUNT=100,this.chatId=t,this.bundleId=e,this.messages=[],this.creationDate=new Date}return t.prototype.addMessage=function(t){return!(this.messages.length>=this.MAX_MSG_COUNT||(this.messages.push(t),0))},t}(),om=function(t){return t[t.CHAT_REQUEST=0]="CHAT_REQUEST",t[t.NEW_MESSAGE=1]="NEW_MESSAGE",t}({}),sm=function(){return function(){}}(),am=function(){function t(t,e){this.files=t,this.users=e,this.newElements=[],this.onElementFoundCallbacks=[],this.setUp()}return t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,4];case 1:return e.sent(),console.log("Inbox setting up..."),t=this,[4,this.users.getUser()];case 2:return t.user=e.sent(),setInterval(this.checkInbox.bind(this),500),[2]}})})},t.prototype.addOnElementFoundCallback=function(t){this.onElementFoundCallbacks.push(t)},t.prototype.checkInbox=function(){return u(this,void 0,void 0,function(){var t,e,n,r=this;return l(this,function(i){switch(i.label){case 0:return null!=this.user?[3,2]:(t=this,[4,this.users.getUser()]);case 1:return t.user=i.sent(),[2];case 2:return e=this.files.getInboxUrl(this.user),n=[],[4,this.files.readFolder(e).then(function(t){n=t.filter(function(t,e,n){return t.includes("DeChatEn1a")}),r.addInboxFiles(n)})];case 3:return i.sent(),this.processNewElements(),[2]}})})},t.prototype.processNewElements=function(){var t=this;this.newElements.forEach(function(e){t.onElementFoundCallbacks.forEach(function(t){t(e)})}),this.newElements=[]},t.prototype.addInboxFiles=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:e=0,i.label=1;case 1:return e0&&(r=JSON.parse(n),this.newElements.push(r),console.log("Inbox element pushed: "+r)),this.files.deleteFile(t[e]),i.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},t.prototype.sendChatRequest=function(t,e){var n;(n=new sm).chat=e,n.type=om.CHAT_REQUEST;var r=this.files.getInboxUrl(t);this.sendRequest(n,r+"DeChatEn1a_chatreq_"+e.chatId+".txt")},t.prototype.sendNewMessage=function(t,e,n){var r;(r=new sm).chat=e,r.message=n,r.type=om.NEW_MESSAGE;var i=this.files.getInboxUrl(t);this.sendRequest(r,i+"DeChatEn1a_newmsg_"+n.id+".txt")},t.prototype.sendRequest=function(t,e){console.log("Sending request...");var n=JSON.stringify(t);this.files.createFile(e,n)},t.ngInjectableDef=wt({factory:function(){return new t(fe(em),fe(Zy))},token:t,providedIn:"root"}),t}(),um=function(){function t(t){this.chatInfo=t,this.bundles=new Map}return t.prototype.addBundle=function(t){return this.bundles.has(t.bundleId)?(console.log("Failed to add bundle: already existent."),!1):(this.bundles.set(t.bundleId,t),console.log("Bundle added to the Chat."),!0)},t.prototype.getBundles=function(){var t=[];return this.bundles.forEach(function(e,n,r){return t.push(e)}),t},t.prototype.getBundle=function(t){if(!this.bundles.has(t))return this.bundles.get(t)},t}(),lm=function(){function t(t,e){var n=this;this.files=t,this.inbox=e,this.currentMessages=[],this.chatMap=new Map,this.inbox.addOnElementFoundCallback(function(t){t.type==om.NEW_MESSAGE&&n.createMessageFromRequest(t)})}return t.prototype.setCurrentUser=function(t){this.user=t},t.prototype.fetchChat=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return console.log("Message Service Fetching chat: "+t.chatId),this.chatMap.has(t.chatId)||this.chatMap.set(t.chatId,new um(t)),e=this.chatMap.get(t.chatId),n=this.files.getChatUrl(this.user,t),[4,this.loadAllMessageBundles(n,e)];case 1:return r.sent(),[2]}})})},t.prototype.setCurrentChat=function(t){return u(this,void 0,void 0,function(){var e,n,r=this;return l(this,function(i){switch(i.label){case 0:for(console.log("Message service setting current chat");this.currentMessages.length>0;)this.currentMessages.pop();return this.chatMap.has(t.chatId)||this.chatMap.set(t.chatId,new um(t)),this.currentChat=this.chatMap.get(t.chatId),this.currentChatUrl=this.files.getChatUrl(this.user,t),[4,this.loadAllMessageBundles(this.currentChatUrl,this.currentChat)];case 1:return e=i.sent(),console.log("New bundles added: "+e),0==(n=this.currentChat.getBundles()).length&&console.log("... man, the chat has no bundles"),[4,n.forEach(function(t){console.log("Bundle "+t.bundleId+" has "+t.messages.length+" messages"),t.messages=t.messages.sort(function(t,e){return t.date.getTime()-e.date.getTime()}),t.messages.forEach(function(t){return r.currentMessages.push(t)}),r.currentBundle=t})];case 2:return i.sent(),[2]}})})},t.prototype.getFullTimeStamp=function(){var t=new Date;return t.getUTCFullYear()+"_"+(t.getUTCMonth()+1)+"_"+t.getUTCDate()+" "+t.getUTCHours()+"_"+t.getUTCMinutes()+"_"+t.getSeconds()+"_"+t.getMilliseconds()},t.prototype.getMessages=function(){return hl(this.currentMessages)},t.prototype.sendMultimedia=function(t){this.currentMultimedia.push(t)},t.prototype.sendMessage=function(t){return u(this,void 0,void 0,function(){var e,n,r,i=this;return l(this,function(o){switch(o.label){case 0:return null!=this.currentBundle?[3,2]:(e=this,[4,this.createBundle(this.currentChat,this.getFullTimeStamp())]);case 1:e.currentBundle=o.sent(),o.label=2;case 2:return n=this.createMessage(t),this.currentBundle.addMessage(n)?[3,4]:(r=this,[4,this.createBundle(this.currentChat,this.getFullTimeStamp())]);case 3:r.currentBundle=o.sent(),this.currentBundle.addMessage(n),o.label=4;case 4:return this.currentMessages.push(n),this.currentChat.chatInfo.users.forEach(function(t){return u(i,void 0,void 0,function(){return l(this,function(e){return this.inbox.sendNewMessage(t,this.currentChat.chatInfo,n),[2]})})}),console.log("[Message sent] : "+t),[2]}})})},t.prototype.createMessage=function(t){var e=new rm;return e.message=t,e.userName=this.user.userName,e.chatId=this.currentChat.chatInfo.chatId,e.bundleId=this.currentBundle.bundleId,e},t.prototype.createMessageFromRequest=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,o,s;return l(this,function(a){switch(a.label){case 0:return e=t.message,n=t.chat,null==this.currentChat?console.log("Undefined current chat!!!!"):this.currentChat.chatInfo.chatId==n.chatId?null==this.currentMessages.find(function(t,n,r){return t.id==e.id})&&this.currentMessages.push(e):this.currentChat.unreadMessageCount++,this.chatMap.has(e.chatId)?[4,(r=this.chatMap.get(e.chatId)).getBundle(e.bundleId)]:(console.log("[ERROR] We have received a message and we don't have the chat in the map!!!!!!"),[2]);case 1:return null!=(i=a.sent())?[3,3]:(console.log("Undefined bundle. Creating it."),o=this,[4,this.createBundle(r,e.bundleId)]);case 2:o.currentBundle=a.sent(),i=this.currentBundle,a.label=3;case 3:return i.addMessage(e),[4,this.files.getChatUrl(this.user,this.currentChat.chatInfo)];case 4:return s=a.sent(),[4,this.files.createFile(s=(s=s+i.bundleId+"/")+e.id+".txt",JSON.stringify(e))];case 5:return a.sent(),[2]}})})},t.prototype.getMessageFromFile=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.files.readFile(t).then(function(t){return e=JSON.parse(t)})];case 1:return n.sent(),[2,new rm(e.message)]}})})},t.prototype.loadAllMessageBundles=function(t,e){return u(this,void 0,void 0,function(){var n,r,i=this;return l(this,function(o){switch(o.label){case 0:return console.log("Loading all message bundles in the POD chat folder "+t),[4,this.files.readFolderSubfolders(t)];case 1:return 0==(n=o.sent()).length?(console.log("The chat has no bundles"),[2,0]):(console.log("Number of bundles in the POD: "+n.length),console.log("Number of bundles locally: "+e.getBundles().length),r=0,[4,n.forEach(function(n){return u(i,void 0,void 0,function(){var i;return l(this,function(o){switch(o.label){case 0:return[4,this.loadMessageBundle(e,t,n)];case 1:return i=o.sent(),console.log("Trying to add bundle"),[4,e.addBundle(i)];case 2:return o.sent()&&(r++,console.log("Bundle added :D")),console.log("Count = "+r),[2]}})})})]);case 2:return o.sent(),[2,r]}})})},t.prototype.loadMessageBundle=function(t,e,n){return u(this,void 0,void 0,function(){var r,i,o=this;return l(this,function(s){switch(s.label){case 0:return console.log("Fetching message bundle."),r=n.replace(e,"").replace("/",""),console.log("URL: "+n),console.log("ID: "+r),console.log("Getting the bundle."),[4,this.getBundle(t,r)];case 1:return i=s.sent(),console.log("Reading all messages inside the bundle folder"),[4,this.files.readFolder(n)];case 2:return[4,s.sent().forEach(function(t){return u(o,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.getMessageFromFile(t)];case 1:return e=n.sent(),[4,i.addMessage(e)];case 2:return n.sent(),[2]}})})})];case 3:return s.sent(),[2,i]}})})},t.prototype.getBundle=function(t,e){return u(this,void 0,void 0,function(){var n;return l(this,function(r){switch(r.label){case 0:return null!=(n=t.getBundle(e))?[2,n]:[4,this.createBundle(t,e)];case 1:return[2,r.sent()]}})})},t.prototype.createBundle=function(t,e){return u(this,void 0,void 0,function(){var n,r;return l(this,function(i){switch(i.label){case 0:return n=new im(t.chatInfo.chatId,e),[4,this.files.getChatUrl(this.user,t.chatInfo)];case 1:return r=i.sent(),[4,this.files.checkFolderExistence(r+n.bundleId+"/")];case 2:return i.sent(),[2,n]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(em),fe(am))},token:t,providedIn:"root"}),t}(),cm=function(){function t(t,e,n,r){var i=this;this.userService=t,this.files=e,this.messages=n,this.inbox=r,this.allChats=[],this.setUp(),this.inbox.addOnElementFoundCallback(function(t){t.type==om.CHAT_REQUEST&&i.createChatFromRequest(t)})}return t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t,e,n=this;return l(this,function(r){switch(r.label){case 0:return[4,1];case 1:return r.sent(),t=this,[4,this.userService.getUser()];case 2:return t.user=r.sent(),this.messages.setCurrentUser(this.user),[4,this.userService.getContacts()];case 3:return r.sent(),[4,this.files.checkUserFiles(this.user)];case 4:return r.sent(),console.log("Checking existent chats..."),[4,this.files.getChatsRootUrl(this.user)];case 5:return e=r.sent(),[4,this.files.readFolderSubfolders(e)];case 6:return[4,r.sent().forEach(function(t){return u(n,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.fetchChat(t)];case 1:return null!=(e=n.sent())&&this.allChats.push(e),[2]}})})})];case 7:return r.sent(),[2]}})})},t.prototype.openChat=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return this.messages.setCurrentChat(t),this.currentChat=t,this.files.checkChatFolder(this.user,t),[2]})})},t.prototype.getAllChats=function(){return hl(this.allChats)},t.prototype.isAdmin=function(t){return t.administrators.includes(this.user)},t.prototype.createChat=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return(e=[]).push(t),[2,this.createGroupChat(t.nickname,e)]})})},t.prototype.createChatFromRequest=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return this.allChats.push(e=t.chat),[4,this.files.checkChatFolder(this.user,e)];case 1:return n.sent(),[2,e]}})})},t.prototype.createGroupChat=function(t,e){return u(this,void 0,void 0,function(){var n,r,i=this;return l(this,function(o){switch(o.label){case 0:return console.log("Chat service creating new chat: "+t),r=(r=Object(nm.v4)()).replace(/-/g,""),console.log("New chat id: "+r),(n=new Qy(r)).chatName=t,n.users=e,n.administrators=[],n.administrators.push(this.user),n.users.push(this.user),n.users.forEach(function(t){return u(i,void 0,void 0,function(){return l(this,function(e){return t!==this.user&&this.inbox.sendChatRequest(t,n),[2]})})}),[4,this.files.checkChatFolder(this.user,n)];case 1:return o.sent(),[2,n]}})})},t.prototype.addUserToChat=function(t,e){return!!this.isAdmin(t)&&(t.users.push(e),this.files.checkChatFolder(e,t),!0)},t.prototype.fetchChat=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return console.log("Fetching chat: "+t),[4,this.files.readFile(t+"data.txt")];case 1:return 0==(e=r.sent()).length||null==e?(console.log("Something bad happened."),this.files.deleteFolder(t),[2,null]):null==(n=JSON.parse(e))?(console.log("Something bad happened."),this.files.deleteFolder(t),[2,null]):[4,this.messages.fetchChat(n)];case 2:return r.sent(),[2,n]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(Zy),fe(em),fe(lm),fe(am))},token:t,providedIn:"root"}),t}(),hm=function(){function t(t){this.chatService=t}return t.prototype.ngOnInit=function(){},t.prototype.isActive=function(){return this.chatService.currentChat==this.chatInfo?"activeChatItem":"chatItem"},t.prototype.openChat=function(){console.log("Oppening chat with "+this.chatInfo.chatName),this.chatService.openChat(this.chatInfo)},t}(),fm=ri({encapsulation:0,styles:[[".chatItem[_ngcontent-%COMP%]{height:auto;padding:10px;width:90%;margin-top:10px;border-radius:8px;align-items:flex-start;background-color:var(--background-light-dark);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);color:var(--foreground-dark-light);transition:ease-in .2s}.chatItem[_ngcontent-%COMP%]:hover{background-color:var(--background-light);color:var(--foreground-purple);transition:ease-in .1s}.activeChatItem[_ngcontent-%COMP%], .activeChatItem[_ngcontent-%COMP%]:hover{background-color:var(--background-purple-light);color:var(--foreground-light)}.userName[_ngcontent-%COMP%]{display:inline-block}"]],data:{}});function pm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","userName"]],null,null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){t(e,1,0,e.component.chatInfo.chatName)})}function dm(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[["class","chatItem"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.openChat()&&r),r},null,null)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),Pi(16777216,null,null,1,null,pm)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"chatItem",n.isActive()),t(e,3,0,null!=n.chatInfo)},null)}var gm=function(){function t(t,e,n){this.dialogRef=t,this.userService=e,this.chatService=n,this.users=[],this.contacts=[],this.setUp()}return t.prototype.ngOnInit=function(){},t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,this.userService.getContacts()];case 1:return e.sent().forEach(function(e){return t.contacts.push(e)}),[2]}})})},t.prototype.onContactClick=function(t){console.log("You clicked on "+t.nickname);for(var e=0;e0)},null)}var _m=function(t,e,n){this.url=t,this.type=e,this.extension=n},xm=function(){function t(t){this.dialogRef=t}return t.prototype.ngOnInit=function(){},t.prototype.cancel=function(){this.closeDialog()},t.prototype.closeDialog=function(){this.dialogRef.close("Dialog closed!")},t.prototype.addMultimedia=function(){this.multimedia=new _m(this.url,this.type,"")},t}(),Sm=function(){function t(t,e){this.messageService=t,this.dialog=e,this.message=""}return t.prototype.ngOnInit=function(){},t.prototype.send=function(){this.message=this.message.trim(),this.message.length<=0||(this.messageService.sendMessage(this.message),this.message="")},t.prototype.handleSubmit=function(t){13===t.keyCode&&this.send()},t.prototype.multimedia=function(){var t=new hd;t.disableClose=!0,t.autoFocus=!0,this.dialog.open(xm,t)},t}(),Cm=ri({encapsulation:0,styles:[[".chatButton[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 24px;font-size:1em;background-color:#2a2845;color:#fff;transition:.2s ease-out;min-width:50px;text-align:center}.chatButton[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb}.chatButton[_ngcontent-%COMP%]:hover{background-color:#444}.chatMultimediaButton[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 24px;font-size:1em;background-color:#2a2845;color:#fff;transition:.2s ease-out;min-width:50px;text-align:center}.chatMultimediaButton[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb}.chatMultimediaButton[_ngcontent-%COMP%]:hover{background-color:#444}.inputWrapper[_ngcontent-%COMP%]{flex:5;padding-left:80px;padding-right:16px;display:flex}.chatInput[_ngcontent-%COMP%]{flex:1;border-radius:8px;font-size:1.3em;color:#000;background-color:#fff;transition:.1s ease-out;padding-left:16px;width:100%;box-sizing:border-box}.chatInput[_ngcontent-%COMP%]:focus{background-color:#eef2f7;color:#222;transition:.1s ease-in}"]],data:{}});function Em(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"button",[["class","chatMultimediaButton"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.multimedia()&&r),r},null,null)),(t()(),Wo(-1,null,["Multimedia"])),(t()(),Ai(2,0,null,null,6,"div",[["class","inputWrapper"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,5,"textarea",[["class","chatInput"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keydown"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,4)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,4).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,4)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,4)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.message=n)&&r),"keydown"===e&&(r=!1!==i.handleSubmit(n)&&r),r},null,null)),wo(4,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(6,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(8,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(9,0,null,null,1,"button",[["class","chatButton"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.send()&&r),r},null,null)),(t()(),Wo(-1,null,["Send"]))],function(t,e){t(e,6,0,e.component.message)},function(t,e){t(e,3,0,so(e,8).ngClassUntouched,so(e,8).ngClassTouched,so(e,8).ngClassPristine,so(e,8).ngClassDirty,so(e,8).ngClassValid,so(e,8).ngClassInvalid,so(e,8).ngClassPending)})}var km=function(){function t(){this.ready=!0}return t.prototype.ngOnInit=function(t){void 0===t&&(t=this.multimedia),this.multimediaURL="https://audio-video.gnu.org/video/short--undated--rms--what-is-gnu-plus-linux--480p.webm",this.multimediaType="video",this.multimediaExten="webm"},t}(),Tm=ri({encapsulation:0,styles:[[""]],data:{}});function Om(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"video",[["controls",""],["height","360"],["width","480"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"source",[],[[8,"src",4]],null,null,null,null)),(t()(),Wo(-1,null,[" Your browser does not support the video HTML tag. "]))],null,function(t,e){t(e,2,0,e.component.multimediaURL)})}function Im(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"audio",[["controls",""]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"source",[],[[8,"src",4]],null,null,null,null)),(t()(),Wo(-1,null,[" Your browser does not support the audio HTML tag. "]))],null,function(t,e){t(e,2,0,e.component.multimediaURL)})}function Pm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.multimediaURL)})}function Am(t){return Jo(0,[(t()(),Pi(16777216,null,null,1,null,Om)),wo(1,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Im)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Pm)),wo(5,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"video"===n.multimediaType),t(e,3,0,"audio"===n.multimediaType),t(e,5,0,"image"===n.multimediaType)},null)}var Rm=function(){function t(t){this.users=t,this.ready=!0,this.isOwnMessage=!1}return t.prototype.ngOnInit=function(t,e){return void 0===t&&(t=this.chatMessage),void 0===e&&(e=this.multimedia),u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:return null==t&&((t=new rm("")).userName="dummy"),this.messageContent=t.message,this.userName=t.userName,this.timeSent=this.getTimeStamp(t.date),e=this,r=(n=t).isMessageFrom,[4,this.users.getUser()];case 1:return e.isOwnMessage=r.apply(n,[i.sent()]),[2]}})})},t.prototype.getTimeStamp=function(t){return t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate()+" "+t.getUTCHours()+":"+t.getUTCMinutes()},t}(),Nm=ri({encapsulation:0,styles:[[".messageContainer[_ngcontent-%COMP%]{display:flex;height:auto;width:70%;min-width:400px;border-radius:5px;align-items:stretch;background-color:#dadada;box-shadow:0 3px 6px rgba(0,0,0,.26),0 3px 6px rgba(0,0,0,.23)}.isOwnMessageContainer[_ngcontent-%COMP%]{background-color:#4cd362}.messageData[_ngcontent-%COMP%]{flex:1;padding:10px;font-size:.7em}.sender[_ngcontent-%COMP%]{display:block;color:#222;font-weight:700}.isOwnSender[_ngcontent-%COMP%]{color:#d3d3d3}.timeSent[_ngcontent-%COMP%]{color:#555;font-style:italic}.isOwnTimeSent[_ngcontent-%COMP%]{color:green}.messageContent[_ngcontent-%COMP%]{height:auto;flex:9;background-color:#fff;padding:10px;border-top-right-radius:5px;border-bottom-right-radius:5px}.isOwnMessageContent[_ngcontent-%COMP%]{background-color:#e3f2fd;color:#20b2aa}"]],data:{}});function jm(t){return Jo(0,[(t()(),Ai(0,0,null,null,14,"div",[["class","messageContainer"]],null,null,null,null,null)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Ho(2,{isOwnMessageContainer:0}),(t()(),Ai(3,0,null,null,4,"div",[["class","messageData"]],null,null,null,null,null)),(t()(),Ai(4,0,null,null,1,"span",[["class","sender"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Ai(6,0,null,null,1,"span",[["class","timeSent"]],null,null,null,null,null)),(t()(),Wo(7,null,["",""])),(t()(),Ai(8,0,null,null,3,"div",[["class","messageContent"]],null,null,null,null,null)),wo(9,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Ho(10,{isOwnMessageContent:0}),(t()(),Wo(11,null,[" "," "])),(t()(),Ai(12,0,null,null,2,"div",[["class","multimediaWrapper"]],null,null,null,null,null)),(t()(),Ai(13,0,null,null,1,"app-multimedia-display",[],null,null,null,Am,Tm)),wo(14,114688,null,0,km,[],null,null)],function(t,e){var n=e.component,r=t(e,2,0,n.isOwnMessage);t(e,1,0,"messageContainer",r);var i=t(e,10,0,n.isOwnMessage);t(e,9,0,"messageContent",i),t(e,14,0)},function(t,e){var n=e.component;t(e,5,0,n.userName),t(e,7,0,n.timeSent),t(e,11,0,n.messageContent)})}var Dm=function(){function t(t){this.messageService=t,this.ready=!0}return t.prototype.ngOnInit=function(){this.update()},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.feed=this.messageService.getMessages()},t}(),Mm=ri({encapsulation:0,styles:[[".feed[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:fixed;bottom:0}.message[_ngcontent-%COMP%]{flex-direction:column;margin:10px 0}"]],data:{}});function Lm(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","message"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-message",[],null,null,null,jm,Nm)),wo(2,114688,null,0,Rm,[Zy],{chatMessage:[0,"chatMessage"]},null)],function(t,e){t(e,2,0,e.context.$implicit)},null)}function Um(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[["class","feed"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,2,null,Lm)),wo(2,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),_o(131072,Ia,[Ln])],function(t,e){var n=e.component;t(e,2,0,ti(e,2,0,so(e,3).transform(n.feed)))},null)}var Fm=function(){function t(t){this.chatService=t}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewChecked=function(){this.scrollToBottom()},t.prototype.scrollToBottom=function(){this.feedContainer.nativeElement.scrollTop=this.feedContainer.nativeElement.scrollHeight},t}(),Vm=ri({encapsulation:0,styles:[[".chatroom[_ngcontent-%COMP%]{display:grid;grid-template-rows:80% 20%;height:100%;overflow:hidden}.chatHeaderWrapper[_ngcontent-%COMP%]{display:flex;height:50px;width:100%;background-color:#fff;z-index:1}.feedWrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;overflow-y:scroll;padding:20px 0 0 24px}.chatFormWrapper[_ngcontent-%COMP%]{display:flex;height:80px;background-color:rgba(0,0,0,0);z-index:3;padding:8px}"]],data:{}});function Bm(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","chatFormWrapper"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-chat-form",[],null,null,null,Em,Cm)),wo(2,114688,null,0,Sm,[lm,wd],null,null)],function(t,e){t(e,2,0)},null)}function zm(t){return Jo(0,[Lo(402653184,1,{feedContainer:0}),(t()(),Ai(1,0,null,null,5,"div",[["class","chatroom"]],null,null,null,null,null)),(t()(),Ai(2,0,[[1,0],["scroller",1]],null,2,"div",[["class","feedWrapper"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"app-feed",[],null,null,null,Um,Mm)),wo(4,638976,null,0,Dm,[lm],null,null),(t()(),Pi(16777216,null,null,1,null,Bm)),wo(6,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0),t(e,6,0,null!=n.chatService.currentChat)},null)}var Hm=ri({encapsulation:0,styles:[[".mainContent[_ngcontent-%COMP%]{height:100%;width:100%;display:grid;grid-template-columns:minmax(256px,20%) auto;overflow:hidden}.userListWrapper[_ngcontent-%COMP%]{display:flex;flex:1;background-color:var(--background-purple);color:#fff;padding:20px 0 40px 30px;border-right:1px solid #222;overflow-y:scroll}.chatroomWrapper[_ngcontent-%COMP%]{background:linear-gradient(180deg,rgba(196,228,238,.5),rgba(0,0,0,.7)),url(chat-bg-1.937abfca71e6cf87f520.jpg) center center no-repeat}app-chatroom[_ngcontent-%COMP%]{height:100%}"]],data:{}});function qm(t){return Jo(0,[(t()(),Ai(0,0,null,null,6,"div",[["class","mainContent"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","userListWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"app-chat-list",[],null,null,null,wm,mm)),wo(3,638976,null,0,ym,[cm,wd],null,null),(t()(),Ai(4,0,null,null,2,"div",[["class","chatroomWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,1,"app-chatroom",[],null,null,null,zm,Vm)),wo(6,8503296,null,0,Fm,[cm],null,null)],function(t,e){t(e,3,0),t(e,6,0)},null)}function Wm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-main-content",[],null,null,null,qm,Hm)),wo(1,114688,null,0,Nf,[],null,null)],function(t,e){t(e,1,0)},null)}var Gm=Ki("app-main-content",Nf,Wm,{},{},[]),$m=function(){function t(){}return t.prototype.ngOnInit=function(t){void 0===t&&(t=this.user),null==t&&(t=new Xy("dummy")),this.userName=t.nickname},t}(),Jm=ri({encapsulation:0,styles:[[".userDisplaySlot[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}"]],data:{}});function Km(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"span",[["class","userDisplaySlot"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"p",[],null,null,null,null,null)),(t()(),Wo(2,null,["User: ",""]))],null,function(t,e){t(e,2,0,e.component.userName)})}var Ym=ri({encapsulation:0,styles:[[".newChatDialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;z-index:10}"]],data:{}});function Qm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","contactCheck"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\u2714\ufe0f"]))],null,null)}function Xm(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","contactWrapper"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onContactClick(t.context.$implicit)&&r),r},null,null)),(t()(),Ai(1,0,null,null,1,"app-user-display-slot",[],null,null,null,Km,Jm)),wo(2,114688,null,0,$m,[],{user:[0,"user"]},null),(t()(),Pi(16777216,null,null,1,null,Qm)),wo(4,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,e.context.$implicit),t(e,4,0,n.isContactIn(e.context.$implicit))},null)}function Zm(t){return Jo(0,[(t()(),Ai(0,0,null,null,18,"div",[["class","newChatDialog"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","titleWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["New chat"])),(t()(),Ai(4,0,null,null,6,"div",[["class","nameWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,5,"input",[["placeholder","New chat name"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,6)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,6).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,6)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,6)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.chatName=n)&&r),r},null,null)),wo(6,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(8,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(10,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(11,0,null,null,2,"div",[["class","contactListWrapper"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,Xm)),wo(13,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Ai(14,0,null,null,4,"div",[["class","actionsWrapper"]],null,null,null,null,null)),(t()(),Ai(15,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.cancel()&&r),r},null,null)),(t()(),Wo(-1,null,["Back"])),(t()(),Ai(17,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.create()&&r),r},null,null)),(t()(),Wo(-1,null,["Let's chat!"]))],function(t,e){var n=e.component;t(e,8,0,n.chatName),t(e,13,0,n.contacts)},function(t,e){t(e,5,0,so(e,10).ngClassUntouched,so(e,10).ngClassTouched,so(e,10).ngClassPristine,so(e,10).ngClassDirty,so(e,10).ngClassValid,so(e,10).ngClassInvalid,so(e,10).ngClassPending)})}function tv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-new-chat-dialog",[],null,null,null,Zm,Ym)),wo(1,114688,null,0,gm,[gd,Zy,cm],null,null)],function(t,e){t(e,1,0)},null)}var ev=Ki("app-new-chat-dialog",gm,tv,{},{},[]),nv=ri({encapsulation:0,styles:[[".newMultimediaDialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;z-index:10}"]],data:{}});function rv(t){return Jo(0,[(t()(),Ai(0,0,null,null,22,"div",[["class","newMultimediaDialog"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","titleWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["Multimedia selector"])),(t()(),Ai(4,0,null,null,6,"div",[["class","urlWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,5,"input",[["placeholder","URL of the multimedia element"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,6)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,6).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,6)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,6)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.url=n)&&r),r},null,null)),wo(6,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(8,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(10,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(11,0,null,null,6,"div",[["class","typeWrapper"]],null,null,null,null,null)),(t()(),Ai(12,0,null,null,5,"input",[["placeholder","Type of the multimedia element"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,13)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,13).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,13)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,13)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.type=n)&&r),r},null,null)),wo(13,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(15,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(17,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(18,0,null,null,4,"div",[["class","actionsWrapper"]],null,null,null,null,null)),(t()(),Ai(19,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.cancel()&&r),r},null,null)),(t()(),Wo(-1,null,["Back"])),(t()(),Ai(21,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.addMultimedia()&&r),r},null,null)),(t()(),Wo(-1,null,["Add multimedia"]))],function(t,e){var n=e.component;t(e,8,0,n.url),t(e,15,0,n.type)},function(t,e){t(e,5,0,so(e,10).ngClassUntouched,so(e,10).ngClassTouched,so(e,10).ngClassPristine,so(e,10).ngClassDirty,so(e,10).ngClassValid,so(e,10).ngClassInvalid,so(e,10).ngClassPending),t(e,12,0,so(e,17).ngClassUntouched,so(e,17).ngClassTouched,so(e,17).ngClassPristine,so(e,17).ngClassDirty,so(e,17).ngClassValid,so(e,17).ngClassInvalid,so(e,17).ngClassPending)})}function iv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-new-multimedia-dialog",[],null,null,null,rv,nv)),wo(1,114688,null,0,xm,[gd],null,null)],function(t,e){t(e,1,0)},null)}var ov=Ki("app-new-multimedia-dialog",xm,iv,{},{},[]),sv=function(){function t(t){this.user=t,this.profileImage="/assets/images/profile.png"}return t.prototype.ngOnInit=function(){this.loadProfile()},t.prototype.loadProfile=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:return t=this,[4,this.user.getUserName()];case 1:return t.userName=n.sent(),e=this,[4,this.user.getProfileImage()];case 2:return e.profileImage=n.sent(),[2]}})})},t}(),av=ri({encapsulation:0,styles:[[".profileIcon[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 64px}.imgWrapper[_ngcontent-%COMP%]{display:inline-block;width:64px;height:64px;min-width:64px;padding-left:12px}.imgWrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;border-radius:50%;border:2px solid #5a5a5a}.textWrapper[_ngcontent-%COMP%]{display:grid;grid-template-rows:50% 50%;grid-row-gap:8px;width:100%;align-self:center;align-content:right;text-align:right}.username[_ngcontent-%COMP%]{color:var(--foreground-purple)}.logout[_ngcontent-%COMP%]{color:var(--foreground-dark-light);text-decoration:none;transition:ease-in .2s;margin-top:8px;overflow:hidden}.logout[_ngcontent-%COMP%]:hover{color:var(--foreground-purple-light);transition:ease-in .2s}"]],data:{}});function uv(t){return Jo(0,[(t()(),Ai(0,0,null,null,10,"div",[["class","profileIcon"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,7,"span",[["class","textWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,3,"span",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Hello, "])),(t()(),Ai(4,0,null,null,1,"span",[["class","username"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Ai(6,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ai(7,0,null,null,1,"a",[["class","logout"],["href","/logout"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Logout"])),(t()(),Ai(9,0,null,null,1,"div",[["class","imgWrapper"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,5,0,n.userName),t(e,10,0,n.profileImage)})}var lv=function(){function t(t){this.router=t}return t.prototype.ngOnInit=function(){},t.prototype.showProfileIcon=function(){return"/chat"===this.router.url},t}(),cv=ri({encapsulation:0,styles:[['.navBar[_ngcontent-%COMP%]{width:100%;height:100%;display:grid;grid-template-columns:96px auto minmax(auto,30%);background-color:var(--background-light)}#logo[_ngcontent-%COMP%]{display:inline-block;background:url(logo.b197b1b2cd028be0e8f4.png) 0 0/cover no-repeat;margin:0 10px 12px 12px;width:96px;height:96px;min-width:96px}#heading[_ngcontent-%COMP%]{flex:4;padding-left:16px;align-self:center;height:60px;font-size:2em;font-weight:700}#heading[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;color:var(--foreground-dark);text-shadow:-1px 2px rgba(0,0,0,.3);font-family:"Trebuchet MS",Helvetica,sans-serif}.profileIconWrapper[_ngcontent-%COMP%]{padding:16px 16px 0 0;font-weight:700}']],data:{}});function hv(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-profile-icon",[],null,null,null,uv,av)),wo(2,114688,null,0,sv,[Zy],null,null)],function(t,e){t(e,2,0)},null)}function fv(t){return Jo(0,[(t()(),Ai(0,0,null,null,8,"div",[["class","navBar"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"div",[["id","logo"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,3,"div",[["id","heading"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,2,"a",[["routerLink","/"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,4).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),wo(4,671744,null,0,tf,[Qh,ch,oa],{routerLink:[0,"routerLink"]},null),(t()(),Wo(-1,null,["DeChat"])),(t()(),Ai(6,0,null,null,2,"div",[["class","profileIconWrapper"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,hv)),wo(8,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,"/"),t(e,8,0,n.showProfileIcon())},function(t,e){t(e,3,0,so(e,4).target,so(e,4).href)})}var pv=ri({encapsulation:0,styles:[["[_nghost-%COMP%]{position:absolute;left:0;right:0;bottom:0;top:0}.navWrapper[_ngcontent-%COMP%]{width:100%;height:auto;color:#222;box-shadow:0 2px 3px rgba(0,0,0,.37),1px 2px 3px rgba(0,0,0,.54);z-index:2}.application[_ngcontent-%COMP%]{height:100%;display:grid;grid-template-rows:minmax(10%,15%) 0 minmax(85%,90%)}router-outlet[_ngcontent-%COMP%]{height:0}"]],data:{}});function dv(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"div",[["class","application"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","navWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"app-navbar",[],null,null,null,fv,cv)),wo(3,114688,null,0,lv,[Qh],null,null),(t()(),Ai(4,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),wo(5,212992,null,0,of,[rf,Mn,qe,[8,null],Ln],null,null)],function(t,e){t(e,3,0),t(e,5,0)},null)}function gv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-root",[],null,null,null,dv,pv)),wo(1,49152,null,0,Mf,[],null,null)],null,null)}var yv=Ki("app-root",Mf,gv,{},{},[]);function mv(){return"undefined"!=typeof process}function vv(t){switch(t.length){case 0:return new np;case 1:return t[0];default:return new rp(t)}}function bv(t,e,n,r,i,o){void 0===i&&(i={}),void 0===o&&(o={});var s=[],a=[],u=-1,l=null;if(r.forEach(function(t){var n=t.offset,r=n==u,c=r&&l||{};Object.keys(t).forEach(function(n){var r=n,a=t[n];if("offset"!==n)switch(r=e.normalizePropertyName(r,s),a){case ip:a=i[n];break;case Xf:a=o[n];break;default:a=e.normalizeStyleValue(n,r,a,s)}c[r]=a}),r||a.push(c),l=c,u=n}),s.length)throw new Error("Unable to animate due to the following errors:\n - "+s.join("\n - "));return a}function wv(t,e,n,r){switch(e){case"start":t.onStart(function(){return r(n&&_v(n,"start",t))});break;case"done":t.onDone(function(){return r(n&&_v(n,"done",t))});break;case"destroy":t.onDestroy(function(){return r(n&&_v(n,"destroy",t))})}}function _v(t,e,n){var r=n.totalTime,i=xv(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==r?t.totalTime:r,!!n.disabled),o=t._data;return null!=o&&(i._data=o),i}function xv(t,e,n,r,i,o,s){return void 0===i&&(i=""),void 0===o&&(o=0),{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function Sv(t,e,n){var r;return t instanceof Map?(r=t.get(e))||t.set(e,r=n):(r=t[e])||(r=t[e]=n),r}function Cv(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Ev=function(t,e){return!1},kv=function(t,e){return!1},Tv=function(t,e,n){return[]},Ov=mv();if(Ov||"undefined"!=typeof Element){if(Ev=function(t,e){return t.contains(e)},Ov||Element.prototype.matches)kv=function(t,e){return t.matches(e)};else{var Iv=Element.prototype,Pv=Iv.matchesSelector||Iv.mozMatchesSelector||Iv.msMatchesSelector||Iv.oMatchesSelector||Iv.webkitMatchesSelector;Pv&&(kv=function(t,e){return Pv.apply(t,[e])})}Tv=function(t,e,n){var r=[];if(n)r.push.apply(r,f(t.querySelectorAll(e)));else{var i=t.querySelector(e);i&&r.push(i)}return r}}var Av=null,Rv=!1;function Nv(t){Av||(Av=("undefined"!=typeof document?document.body:null)||{},Rv=!!Av.style&&"WebkitAppearance"in Av.style);var e=!0;return Av.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in Av.style)&&Rv&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in Av.style),e}var jv=kv,Dv=Ev,Mv=Tv;function Lv(t){var e={};return Object.keys(t).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}var Uv=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return n||""},t.prototype.animate=function(t,e,n,r,i,o,s){return void 0===o&&(o=[]),new np(n,r)},t}(),Fv=function(){function t(){}return t.NOOP=new Uv,t}(),Vv=1e3;function Bv(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:zv(parseFloat(e[1]),e[2])}function zv(t,e){switch(e){case"s":return t*Vv;default:return t}}function Hv(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var r,i=0,o="";if("string"==typeof t){var s=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return e.push('The provided timing value "'+t+'" is invalid.'),{duration:0,delay:0,easing:""};r=zv(parseFloat(s[1]),s[2]);var a=s[3];null!=a&&(i=zv(Math.floor(parseFloat(a)),s[4]));var u=s[5];u&&(o=u)}else r=t;if(!n){var l=!1,c=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&e.splice(c,0,'The provided timing value "'+t+'" is invalid.')}return{duration:r,delay:i,easing:o}}(t,e,n)}function qv(t,e){return void 0===e&&(e={}),Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function Wv(t,e,n){if(void 0===n&&(n={}),e)for(var r in t)n[r]=t[r];else qv(t,n);return n}function Gv(t,e,n){return n?e+":"+n+";":""}function $v(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}var i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var o=i[1],s=i[2],a=i[3];e.push(cb(o,a)),"<"!=s[0]||o==ab&&a==ab||e.push(cb(a,o))}(t,i,r)}):i.push(n),i),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:yb(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return ob(n,t,e)}),options:yb(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,r=e.currentTime,i=0,o=t.steps.map(function(t){e.currentTime=r;var o=ob(n,t,e);return i=Math.max(i,e.currentTime),o});return e.currentTime=i,{type:3,steps:o,options:yb(t.options)}},t.prototype.visitAnimate=function(t,e){var n,r=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return mb(Hv(t,e).duration,0,"");var r=t;if(r.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var i=mb(0,0,"");return i.dynamic=!0,i.strValue=r,i}return mb((n=n||Hv(r,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=r;var i=t.styles?t.styles:tp({});if(5==i.type)n=this.visitKeyframes(i,e);else{var o=t.styles,s=!1;if(!o){s=!0;var a={};r.easing&&(a.easing=r.easing),o=tp(a)}e.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,e);u.isEmptyStep=s,n=u}return e.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==Xf?n.push(t):e.errors.push("The provided style string value "+t+" is not allowed."):n.push(t)}):n.push(t.styles);var r=!1,i=null;return n.forEach(function(t){if(gb(t)){var e=t,n=e.easing;if(n&&(i=n,delete e.easing),!r)for(var o in e)if(e[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:t.offset,containsDynamicStyles:r,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,r=e.currentAnimateTimings,i=e.currentTime,o=e.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(r){if(n._driver.validateStyleProperty(r)){var s,a,u,l=e.collectedStyles[e.currentQuerySelector],c=l[r],h=!0;c&&(o!=i&&o>=c.startTime&&i<=c.endTime&&(e.errors.push('The CSS property "'+r+'" that exists between the times of "'+c.startTime+'ms" and "'+c.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),h=!1),o=c.startTime),h&&(l[r]={startTime:o,endTime:i}),e.options&&(s=e.errors,a=e.options.params||{},(u=Xv(t[r])).length&&u.forEach(function(t){a.hasOwnProperty(t)||s.push("Unable to resolve the local animation param "+t+" in the given list of values")}))}else e.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],s=!1,a=!1,u=0,l=t.steps.map(function(t){var r=n._makeStyleAst(t,e),l=null!=r.offset?r.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(gb(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(gb(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),a=a||c<0||c>1,s=s||c0&&i0?i==f?1:h*i:o[i],a=s*g;e.currentTime=p+d.delay+a,d.duration=a,n._validateStyleAst(t,e),t.offset=s,r.styles.push(t)}),r},t.prototype.visitReference=function(t,e){return{type:8,animation:ob(this,Yv(t.animation),e),options:yb(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:yb(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:yb(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;var i=h(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return":self"==t});return e&&(t=t.replace(hb,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),o=i[0],s=i[1];e.currentQuerySelector=n.length?n+" "+o:o,Sv(e.collectedStyles,e.currentQuerySelector,{});var a=ob(this,Yv(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:yb(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Hv(t.timings,e.errors,!0);return{type:12,animation:ob(this,Yv(t.animation),e),timings:n,options:null}},t}(),db=function(){return function(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}();function gb(t){return!Array.isArray(t)&&"object"==typeof t}function yb(t){var e;return t?(t=qv(t)).params&&(t.params=(e=t.params)?qv(e):null):t={},t}function mb(t,e,n){return{duration:t,delay:e,easing:n}}function vb(t,e,n,r,i,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var bb=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,f(e))},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),wb=new RegExp(":enter","g"),_b=new RegExp(":leave","g");function xb(t,e,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new Sb).buildKeyframes(t,e,n,r,i,o,s,a,u,l)}var Sb=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,r,i,o,s,a,u,l){void 0===l&&(l=[]),u=u||new bb;var c=new Eb(t,e,u,r,i,l,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),ob(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(s).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([s],null,c.errors,a)}return h.length?h.map(function(t){return t.buildKeyframes()}):[vb(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var r=e.createSubContext(t.options),i=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var r=e.currentTimeline.currentTime,i=null!=n.duration?Bv(n.duration):null,o=null!=n.delay?Bv(n.delay):null;return 0!==i&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,i,o);r=Math.max(r,n.duration+n.delay)}),r},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),ob(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,r=e.subContextCount,i=e,o=t.options;if(o&&(o.params||o.delay)&&((i=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Cb);var s=Bv(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(function(t){return ob(n,t,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,r=[],i=e.currentTimeline.currentTime,o=t.options&&t.options.delay?Bv(t.options.delay):0;t.steps.forEach(function(s){var a=e.createSubContext(t.options);o&&a.delayNextStep(o),ob(n,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(i),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return Hv(e.params?Zv(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());var i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,r=e.currentTimeline.duration,i=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*i),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(r+i),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,r=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?Bv(i.delay):0;o&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Cb);var s=r,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=a.length;var u=null;a.forEach(function(r,i){e.currentQueryIndex=i;var a=e.createSubContext(t.options,r);o&&a.delayNextStep(o),r===e.element&&(u=a.currentTimeline),ob(n,t.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),u&&(e.currentTimeline.mergeTimelineCollectedStyles(u),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,r=e.currentTimeline,i=t.timings,o=Math.abs(i.duration),s=o*(e.currentQueryTotal-1),a=o*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var u=e.currentTimeline;a&&u.delayNextStep(a);var l=u.currentTime;ob(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},t}(),Cb={},Eb=function(){function t(t,e,n,r,i,o,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Cb,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new kb(this._driver,e,0),s.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var r=t,i=this.options;null!=r.duration&&(i.duration=Bv(r.duration)),null!=r.delay&&(i.delay=Bv(r.delay));var o=r.params;if(o){var s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(t){e&&s.hasOwnProperty(t)||(s[t]=Zv(o[t],s,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,r){void 0===e&&(e=null);var i=n||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=Cb,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new Tb(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(i),r},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,r,i,o){var s=[];if(r&&s.push(this.element),t.length>0){t=(t=t.replace(wb,"."+this._enterClassName)).replace(_b,"."+this._leaveClassName);var a=this._driver.query(this.element,t,1!=n);0!==n&&(a=n<0?a.slice(a.length+n,a.length):a.slice(0,n)),s.push.apply(s,f(a))}return i||0!=s.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),s},t}(),kb=function(){function t(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||Xf,e._currentKeyframe[t]=Xf}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,e,n,r){var i=this;e&&(this._previousKeyframe.easing=e);var o=r&&r.params||{},s=function(t,e){var n,r={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){r[t]=Xf}):Wv(t,!1,r)}),r}(t,this._globalTimelineStyles);Object.keys(s).forEach(function(t){var e=Zv(s[t],o,n);i._pendingStyles[t]=e,i._localTimelineStyles.hasOwnProperty(t)||(i._backFill[t]=i._globalTimelineStyles.hasOwnProperty(t)?i._globalTimelineStyles[t]:Xf),i._updateStyle(t,e)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var r=e._styleSummary[n],i=t._styleSummary[n];(!r||i.time>r.time)&&e._updateStyle(n,i.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,s){var a=Wv(o,!0);Object.keys(a).forEach(function(t){var r=a[t];r==ip?e.add(t):r==Xf&&n.add(t)}),r||(a.offset=s/t.duration),i.push(a)});var o=e.size?tb(e.values()):[],s=n.size?tb(n.values()):[];if(r){var a=i[0],u=qv(a);a.offset=0,u.offset=1,i=[a,u]}return vb(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)},t}(),Tb=function(t){function e(e,n,r,i,o,s,a){void 0===a&&(a=!1);var u=t.call(this,e,n,s.delay)||this;return u.element=n,u.keyframes=r,u.preStyleProps=i,u.postStyleProps=o,u._stretchStartingKeyframe=a,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return i(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,r=e.duration,i=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=r+n,a=n/s,u=Wv(t[0],!1);u.offset=0,o.push(u);var l=Wv(t[0],!1);l.offset=Ob(a),o.push(l);for(var c=t.length-1,h=1;h<=c;h++){var f=Wv(t[h],!1);f.offset=Ob((n+f.offset*r)/s),o.push(f)}r=s,n=0,i="",t=o}return vb(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)},e}(kb);function Ob(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var Ib=function(){return function(){}}(),Pb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.normalizePropertyName=function(t,e){return nb(t)},e.prototype.normalizeStyleValue=function(t,e,n,r){var i="",o=n.toString().trim();if(Ab[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push("Please provide a CSS unit value for "+t+":"+n)}return o+i},e}(Ib),Ab=Rb("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function Rb(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}function Nb(t,e,n,r,i,o,s,a,u,l,c,h,f){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:f}}var jb={},Db=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e,n,r){return function(t,e,n,r,i){return t.some(function(t){return t(e,n,r,i)})}(this.ast.matchers,t,e,n,r)},t.prototype.buildStyles=function(t,e,n){var r=this._stateStyles["*"],i=this._stateStyles[t],o=r?r.buildStyles(e,n):{};return i?i.buildStyles(e,n):o},t.prototype.build=function(t,e,n,r,i,s,a,u,l,c){var h=[],f=this.ast.options&&this.ast.options.params||jb,p=this.buildStyles(n,a&&a.params||jb,h),d=u&&u.params||jb,g=this.buildStyles(r,d,h),y=new Set,m=new Map,v=new Map,b="void"===r,w={params:o({},f,d)},_=c?[]:xb(t,e,this.ast.animation,i,s,p,g,w,l,h),x=0;if(_.forEach(function(t){x=Math.max(t.duration+t.delay,x)}),h.length)return Nb(e,this._triggerName,n,r,b,p,g,[],[],m,v,x,h);_.forEach(function(t){var n=t.element,r=Sv(m,n,{});t.preStyleProps.forEach(function(t){return r[t]=!0});var i=Sv(v,n,{});t.postStyleProps.forEach(function(t){return i[t]=!0}),n!==e&&y.add(n)});var S=tb(y.values());return Nb(e,this._triggerName,n,r,b,p,g,_,S,m,v,x)},t}(),Mb=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},r=qv(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var i=t;Object.keys(i).forEach(function(t){var o=i[t];o.length>1&&(o=Zv(o,r,e)),n[t]=o})}}),n},t}(),Lb=function(){function t(t,e){var n=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){n.states[t.name]=new Mb(t.style,t.options&&t.options.params||{})}),Ub(this.states,"true","1"),Ub(this.states,"false","0"),e.transitions.forEach(function(e){n.transitionFactories.push(new Db(t,e,n.states))}),this.fallbackTransition=new Db(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e,n,r){return this.transitionFactories.find(function(i){return i.match(t,e,n,r)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function Ub(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Fb=new bb,Vb=function(){function t(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],r=fb(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r},t.prototype._buildPlayer=function(t,e,n){var r=t.element,i=bv(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,i,t.duration,t.delay,t.easing,[],!0)},t.prototype.create=function(t,e,n){var r=this;void 0===n&&(n={});var i,o=[],s=this._animations[t],a=new Map;if(s?(i=xb(this._driver,e,s,"ng-enter","ng-leave",{},{},n,Fb,o)).forEach(function(t){var e=Sv(a,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),i=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));a.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=r._driver.computeStyle(e,n,Xf)})});var u=vv(i.map(function(t){var e=a.get(t.element);return r._buildPlayer(t,{},e)}));return this._playersById[t]=u,u.onDestroy(function(){return r.destroy(t)}),this.players.push(u),u},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,r){var i=xv(e,"","","");return wv(this._getPlayer(t),n,i,r),function(){}},t.prototype.command=function(t,e,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,r[0]||{});else this.register(t,r[0])},t}(),Bb=[],zb={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hb={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},qb="__ng_removed",Wb=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){var r=qv(t);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),Gb=new Wb("void"),$b=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,ew(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var s=Sv(this._elementListeners,t,[]),a={name:e,phase:n,callback:r};s.push(a);var u=Sv(this._engine.statesByElement,t,{});return u.hasOwnProperty(e)||(ew(t,"ng-trigger"),ew(t,"ng-trigger-"+e),u[e]=Gb),function(){o._engine.afterFlush(function(){var t=s.indexOf(a);t>=0&&s.splice(t,1),o._triggers[e]||delete u[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(e),s=new Kb(this.id,e,t),a=this._engine.statesByElement.get(t);a||(ew(t,"ng-trigger"),ew(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,a={}));var u=a[e],l=new Wb(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[e]=l,u||(u=Gb),"void"===l.value||u.value!==l.value){var c=Sv(this._engine.playersByElement,t,[]);c.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var h=o.matchTransition(u.value,l.value,t,l.params),f=!1;if(!h){if(!r)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:u,toState:l,player:s,isFallbackTransition:f}),f||(ew(t,"ng-animate-queued"),s.onStart(function(){nw(t,"ng-animate-queued")})),s.onDone(function(){var e=i.players.indexOf(s);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(s);r>=0&&n.splice(r,1)}}),this.players.push(s),c.push(s),s}if(!function(t,e){var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0;i=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,e)){this._namespaceList.splice(i+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var r=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(r);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(t){var s=this._fetchNamespace(t);s&&s.insertNode(e,n)}r&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),ew(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),nw(t,"ng-animate-disabled"))},t.prototype.removeNode=function(t,e,n){if(Yb(e)){var r=t?this._fetchNamespace(t):null;r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,r){this.collectedLeaveElements.push(e),e[qb]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,r,i){return Yb(e)?this._fetchNamespace(t).listen(e,n,r,i):function(){}},t.prototype._buildInstruction=function(t,e,n,r,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,i)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return vv(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[qb];if(n&&n.setForRemoval){if(t[qb]=zb,n.namespaceId){this.destroyInnerAnimations(t);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(function(n){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r=0;k--)this._namespaceList[k].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(C.push(e),n.collectedEnterElements.length){var s=o[qb];if(s&&s.setForMove)return void e.destroy()}var h=!p||!n.driver.containsElement(p,o),f=x.get(o),d=y.get(o),g=n._buildInstruction(t,r,d,f,h);if(g.errors&&g.errors.length)E.push(g);else{if(h)return e.onStart(function(){return Kv(o,g.fromStyles)}),e.onDestroy(function(){return Jv(o,g.toStyles)}),void i.push(e);if(t.isFallbackTransition)return e.onStart(function(){return Kv(o,g.fromStyles)}),e.onDestroy(function(){return Jv(o,g.toStyles)}),void i.push(e);g.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),r.append(o,g.timelines),a.push({instruction:g,player:e,element:o}),g.queriedElements.forEach(function(t){return Sv(u,t,[]).push(e)}),g.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var r=l.get(e);r||l.set(e,r=new Set),n.forEach(function(t){return r.add(t)})}}),g.postStyleProps.forEach(function(t,e){var n=Object.keys(t),r=c.get(e);r||c.set(e,r=new Set),n.forEach(function(t){return r.add(t)})})}});if(E.length){var T=[];E.forEach(function(t){T.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return T.push("- "+t+"\n")})}),C.forEach(function(t){return t.destroy()}),this.reportError(T)}var O=new Map,I=new Map;a.forEach(function(t){var e=t.element;r.has(e)&&(I.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,O))}),i.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Sv(O,e,[]).push(t),t.destroy()})});var P=v.filter(function(t){return iw(t,l,c)}),A=new Map;Xb(A,this.driver,w,c,Xf).forEach(function(t){iw(t,l,c)&&P.push(t)});var R=new Map;g.forEach(function(t,e){Xb(R,n.driver,new Set(t),l,ip)}),P.forEach(function(t){var e=A.get(t),n=R.get(t);A.set(t,o({},e,n))});var N=[],j=[],D={};a.forEach(function(t){var e=t.element,o=t.player,a=t.instruction;if(r.has(e)){if(h.has(e))return o.onDestroy(function(){return Jv(e,a.toStyles)}),o.disabled=!0,o.overrideTotalTime(a.totalTime),void i.push(o);var u=D;if(I.size>1){for(var l=e,c=[];l=l.parentNode;){var f=I.get(l);if(f){u=f;break}c.push(l)}c.forEach(function(t){return I.set(t,u)})}var p=n._buildAnimation(o.namespaceId,a,O,s,R,A);if(o.setRealPlayer(p),u===D)N.push(o);else{var d=n.playersByElement.get(u);d&&d.length&&(o.parentPlayer=vv(d)),i.push(o)}}else Kv(e,a.fromStyles),o.onDestroy(function(){return Jv(e,a.toStyles)}),j.push(o),h.has(e)&&i.push(o)}),j.forEach(function(t){var e=s.get(t.element);if(e&&e.length){var n=vv(e);t.setRealPlayer(n)}}),i.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var M=0;M0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new np(t.duration,t.delay)},t}(),Kb=function(){function t(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new np,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return wv(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.overrideTotalTime=function(t){this.totalTime=t},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){Sv(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function Yb(t){return t&&1===t.nodeType}function Qb(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Xb(t,e,n,r,i){var o=[];n.forEach(function(t){return o.push(Qb(t))});var s=[];r.forEach(function(n,r){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(r,t,i);n&&0!=n.length||(r[qb]=Hb,s.push(r))}),t.set(r,o)});var a=0;return n.forEach(function(t){return Qb(t,o[a++])}),s}function Zb(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var r=new Set(e),i=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return 1;var o=i.get(e);if(o)return o;var s=e.parentNode;return o=n.has(s)?s:r.has(s)?1:t(s),i.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}var tw="$$classes";function ew(t,e){if(t.classList)t.classList.add(e);else{var n=t[tw];n||(n=t[tw]={}),n[e]=!0}}function nw(t,e){if(t.classList)t.classList.remove(e);else{var n=t[tw];n&&delete n[e]}}function rw(t,e,n){vv(n).onDone(function(){return t.processLeaveNode(e)})}function iw(t,e,n){var r=n.get(t);if(!r)return!1;var i=e.get(t);return i?r.forEach(function(t){return i.add(t)}):e.set(t,r),n.delete(t),!0}var ow=function(){function t(t,e,n){var r=this;this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new Jb(t,e,n),this._timelineEngine=new Vb(t,e,n),this._transitionEngine.onRemovalComplete=function(t,e){return r.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,r,i){var o=t+"-"+r,s=this._triggerCache[o];if(!s){var a=[],u=fb(this._driver,i,a);if(a.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function(t,e){return new Lb(t,e)}(r,u),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(e,r,s)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,r){if("@"==n.charAt(0)){var i=h(Cv(n),2);this._timelineEngine.command(i[0],e,i[1],r)}else this._transitionEngine.trigger(t,e,n,r)},t.prototype.listen=function(t,e,n,r,i){if("@"==n.charAt(0)){var o=h(Cv(n),2);return this._timelineEngine.listen(o[0],e,o[1],i)}return this._transitionEngine.listen(t,e,n,r,i)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}(),sw="animation",aw="animationend",uw=function(){function t(t,e,n,r,i,o,s){var a=this;this._element=t,this._name=e,this._duration=n,this._delay=r,this._easing=i,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return a._handleCallback(t)}}return t.prototype.apply=function(){var t,e,n;e=this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name,(n=dw(t=this._element,"").trim()).length&&(function(t,e){for(var n=0;n=this._delay&&n>=this._duration&&this.finish()},t.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),fw(this._element,this._eventFn,!0))},t.prototype.destroy=function(){var t,e,n,r;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(r=hw(n=dw(t=this._element,"").split(","),e))>=0&&(n.splice(r,1),pw(t,"",n.join(","))))},t}();function lw(t,e,n){pw(t,"PlayState",n,cw(t,e))}function cw(t,e){var n=dw(t,"");return n.indexOf(",")>0?hw(n.split(","),e):hw([n],e)}function hw(t,e){for(var n=0;n=0)return n;return-1}function fw(t,e,n){n?t.removeEventListener(aw,e):t.addEventListener(aw,e)}function pw(t,e,n,r){var i=sw+e;if(null!=r){var o=t.style[i];if(o.length){var s=o.split(",");s[r]=n,n=s.join(",")}}t.style[i]=n}function dw(t,e){return t.style[sw+e]}var gw="linear",yw=function(){function t(t,e,n,r,i,o,s){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||gw,this.totalTime=r+i,this._buildStyler()}return t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]},t.prototype._flushStartFns=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},t.prototype.setPosition=function(t){this._styler.setPosition(t)},t.prototype.getPosition=function(){return this._styler.getPosition()},t.prototype.hasStarted=function(){return this._state>=2},t.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},t.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2),this._styler.resume()},t.prototype.pause=function(){this.init(),this._styler.pause()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},t.prototype._buildStyler=function(){var t=this;this._styler=new uw(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t.prototype.beforeDestroy=function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(e[r]=n?t._finalStyles[r]:sb(t.element,r))})}this.currentSnapshot=e},t}(),mw=function(t){function e(e,n){var r=t.call(this)||this;return r.element=e,r._startingStyles={},r.__initialized=!1,r._styles=Lv(n),r}return i(e,t),e.prototype.init=function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),t.prototype.init.call(this))},e.prototype.play=function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),t.prototype.play.call(this))},e.prototype.destroy=function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,t.prototype.destroy.call(this))},e}(np),vw=function(){function t(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.buildKeyframeElement=function(t,e,n){n=n.map(function(t){return Lv(t)});var r="@keyframes "+e+" {\n",i="";n.forEach(function(t){i=" ";var e=parseFloat(t.offset);r+=""+i+100*e+"% {\n",i+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=i+"animation-timing-function: "+n+";\n"));default:return void(r+=""+i+e+": "+n+";\n")}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.innerHTML=r,o},t.prototype.animate=function(t,e,n,r,i,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(t){return t instanceof yw}),u={};rb(n,r)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})});var l=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=ib(t,e,u));if(0==n)return new mw(t,l);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(h);var f=new yw(t,e,c,n,r,i,l);return f.onDestroy(function(){var t;(t=h).parentNode.removeChild(t)}),f},t.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},t}(),bw=function(){function t(t,e,n){this.element=t,this.keyframes=e,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:sb(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),ww=function(){function t(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(_w().toString()),this._cssKeyframesDriver=new vw}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.overrideWebAnimationsSupport=function(t){this._isNativeImpl=t},t.prototype.animate=function(t,e,n,r,i,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,i,o);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var u={},l=o.filter(function(t){return t instanceof bw});return rb(n,r)&&l.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})}),e=ib(t,e=e.map(function(t){return Wv(t,!1)}),u),new bw(t,e,a)},t}();function _w(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var xw=function(t){function e(e,n){var r=t.call(this)||this;return r._nextAnimationId=0,r._renderer=e.createRenderer(n.body,{id:"0",encapsulation:pe.None,styles:[],data:{animation:[]}}),r}return i(e,t),e.prototype.build=function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?Zf(t):t;return Ew(this._renderer,null,e,"register",[n]),new Sw(e,this._renderer)},e}(Yf),Sw=function(t){function e(e,n){var r=t.call(this)||this;return r._id=e,r._renderer=n,r}return i(e,t),e.prototype.create=function(t,e){return new Cw(this._id,t,e||{},this._renderer)},e}(Qf),Cw=function(){function t(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return t.prototype._listen=function(t,e){return this._renderer.listen(this.element,"@@"+this.id+":"+t,e)},t.prototype._command=function(t){for(var e=[],n=1;n=0&&t>>((3&e)<<3)&255;return i}}},EcEN:function(t,e,n){var r=n("xDdU"),i=n("xk4V"),o=i;o.v1=r,o.v4=i,t.exports=o},I2ZF:function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")}},Q45J:function(t,e,n){window,t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=91)}([function(t,e,n){t.exports=n(63)},function(t,e){function n(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,u,"next",t)}function u(t){n(s,i,o,a,u,"throw",t)}a(void 0)})}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n=0&&n"}},{key:"uri",get:function(){return this.value},set:function(t){this.value=t}}])&&i(n.prototype,r),u&&i(n,u),e}();c.termType="NamedNode",c.prototype.classOrder=u.NamedNode,c.prototype.isVar=0,t.exports=c},function(t,e,n){"use strict";var r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e;return(e=[{key:"substitute",value:function(t){return console.log("@@@ node substitute"+this),this}},{key:"compareTerm",value:function(t){return this.classOrdert.classOrder?1:this.valuet.value?1:0}},{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toCanonical()}},{key:"sameTerm",value:function(t){return this.equals(t)}},{key:"toCanonical",value:function(){return this.toNT()}},{key:"toNT",value:function(){return this.toString()}},{key:"toString",value:function(){throw new Error("Node.toString() is abstract - see the subclasses instead")}}])&&function(t,e){for(var n=0;n0&&(e=e.slice(0,u)),0===t.length)return e;if(0===t.indexOf("#"))return e+t;if(t.indexOf(":")>=0)return t;if(n=e.indexOf(":"),0===e.length)return t;if(n<0)return r("Invalid base: "+e+" in join with given: "+t),t;if(i=e.slice(0,+n+1||9e9),0===t.indexOf("//"))return i+t;if(e.indexOf("//",n)===n+1){if((o=e.indexOf("/",n+3))<0)return e.length-n-3>0?e+"/"+t:i+t}else if((o=e.indexOf("/",n+1))<0)return e.length-n-1>0?e+"/"+t:i+t;if(0===t.indexOf("/"))return e.slice(0,o)+t;if((s=(a=e.slice(o)).lastIndexOf("/"))<0)return i+t;for(s>=0&&s0&&"/"!==e[n-1];)n--;if(n<3)return e;if(t.indexOf("//",n-2)>0||e.indexOf("//",n-2)>0)return e;if(t.indexOf(":",n)>0)return e;for(a=0,l=0,s=(h=t.slice(n)).length;l0)for(c=1,f=a;f>=1?c<=f:c>=f;f>=1?++c:--c)p+="../";return p+e.slice(n)};var i=n(2);function o(t){var e;return(e=t.indexOf("#"))<0?t:t.slice(0,e)}},function(t,e,n){"use strict";var r={BlankNode:n(9),Collection:n(20),convert:n(42),DataFactory:n(23),Empty:n(86),Fetcher:n(36),Formula:n(59),Store:n(18),jsonParser:n(87),Literal:n(15),log:n(13),N3Parser:n(27),NamedNode:n(2),Namespace:n(19),Node:n(3),parse:n(60),Query:n(26).Query,queryToSPARQL:n(88),RDFaProcessor:n(39),RDFParser:n(40),serialize:n(37),Serializer:n(38),SPARQLToQuery:n(89),sparqlUpdateParser:n(61),Statement:n(24),term:n(3).fromValue,UpdateManager:n(90),UpdatesSocket:n(62).UpdatesSocket,UpdatesVia:n(62).UpdatesVia,uri:n(4),Util:n(7),Variable:n(25)};r.IndexedFormula=r.Store,r.NextId=r.BlankNode.nextId,r.fromNT=r.Formula.prototype.fromNT,r.fetcher=r.DataFactory.fetcher,r.graph=r.DataFactory.graph,r.lit=r.DataFactory.lit,r.st=r.DataFactory.st,r.sym=r.DataFactory.namedNode,r.variable=r.DataFactory.variable,r.blankNode=r.DataFactory.blankNode,r.defaultGraph=r.DataFactory.defaultGraph,r.literal=r.DataFactory.literal,r.namedNode=r.DataFactory.namedNode,r.quad=r.DataFactory.quad,r.triple=r.DataFactory.triple,t.exports=r},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(t){var e=n(4).docpart,r=n(13),i=n(2);function o(t,e,n,r){var i,s="",a=[!1];if(void 0===t.nodeType)return s;if(1===t.nodeType){if(t.hasAttribute("class")&&"classWithChildText"in e&&t.matches(e.classWithChildText.class))s+=t.querySelector(e.classWithChildText.element).textContent;else if(!("skipNodeWithClass"in e&&t.matches("."+e.skipNodeWithClass))){var u=t.nodeName.toLowerCase();s+="<"+u;var l=[];for(i=t.attributes.length-1;i>=0;i--){var c=t.attributes[i];if(!(r.length>0&&r[c.name]||/^\d+$/.test(c.name))){if("class"===c.name&&"replaceClassItemWith"in e&&c.value.split(" ").indexOf(e.replaceClassItemWith.source)>-1){var h=new RegExp(e.replaceClassItemWith.source,"g");c.value=c.value.replace(h,e.replaceClassItemWith.target).trim()}"class"===c.name&&"skipClassWithValue"in e&&e.skipClassWithValue===c.value||l.push(c.name+"='"+c.value.replace(/&/g,"&").replace(//g,">").replace(/'/g,""")+"'")}}if(l.length>0&&("sortAttributes"in e&&e.sortAttributes&&l.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),s+=" "+l.join(" ")),n[u])s+=" />";else{for(s+=">",s+="html"===u?"\n ":"",a.push("style"===u||"script"===u),i=0;i\n":""}}}else if(8===t.nodeType)s+="\x3c!--"+t.nodeValue+"--\x3e";else if(3===t.nodeType||4===t.nodeType){var f=t.nodeValue.replace(/\n+$/,"");s+=a[a.length-1]?f:f.replace(/&/g,"&").replace(//g,">")}else console.log("Warning; Cannot handle serialising nodes of type: "+t.nodeType),console.log(t);return s}function s(t,e,n,r){var i=function(t){return"BlankNode"===t.termType?null:t},o=function(t){var e=n.statementsMatching(t).map(function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)}).concat(n.statementsMatching(void 0,void 0,t).map(function(t){return i(t.subject)+" "+i(t.predicate)+" "+i(t.object)}));return e.sort(),e.join("\n")};return"BlankNode"===t.termType&&"BlankNode"===e.termType?0===t.compareTerm(e)?0:o(t)>o(e)?1:o(t) to <"+u+">"),o.fetch(u,{referringTerm:i})}},t.exports.ArrayIndexOf=function(t,e,n){n||(n=0);var r=t.length;for(n<0&&(n=r+n);n=0;n--)t.callbacks[e[n]]=[];t.addHook=function(e){t.callbacks[e]||(t.callbacks[e]=[])},t.addCallback=function(e,n){t.callbacks[e].push(n)},t.removeCallback=function(e,n){for(var r=0;r=0;r--)(i=t.callbacks[e][r])&&i.apply(t,n)&&o.push(i);for(r=o.length-1;r>=0;r--)s.push(o[r]);for(r=a;r-1)break;"("==o.charAt(0)&&(o="function"+o);var s=o.split("@");r.push(s)}for(i=0;i1)for(var n=1;nt.classOrder?1:this.idt.id?1:0}},{key:"copy",value:function(t){var n=new e;return t.copyTo(this,n),n}},{key:"toCanonical",value:function(){return"_:"+this.value}},{key:"toString",value:function(){return e.NTAnonymousNodePrefix+this.id}}])&&function(t,e){for(var n=0;n=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(66),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(6))},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(52).Buffer)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var n=0;n1?r("Patch ambiguous. No patch done."):(a=c[0],void u(r))})}else u(r)}},{key:"declareExistential",value:function(t){return this._existentialVariables||(this._existentialVariables=[]),this._existentialVariables.push(t),t}},{key:"initPropertyActions",value:function(t){this.propertyActions[""]=[y],u(t,"sameAs")>=0&&(this.propertyActions[""]=[function(t,e,n,r,i){return t.equate(e,r),!0}]),u(t,"InverseFunctionalProperty")>=0&&(this.classActions[""]=[function(t,e,n,r,i){return t.newPropertyAction(e,g)}]),u(t,"FunctionalProperty")>=0&&(this.classActions[""]=[function(t,e,n,r,i){return t.newPropertyAction(e,d)}])}},{key:"add",value:function(t,n,r,i){var o,s,a;if(1===arguments.length){if(t instanceof Array)for(o=0;o";return!!this.subjectIndex[e]||!!this.objectIndex[e]||!!this.predicateIndex[e]}},{key:"newExistential",value:function(t){if(!t)return this.bnode();var e=this.sym(t);return this.declareExistential(e)}},{key:"newPropertyAction",value:function(t,e){var n=t.hashString();this.propertyActions[n]||(this.propertyActions[n]=[]),this.propertyActions[n].push(e);for(var r=this.statementsMatching(void 0,t,void 0),i=!1,o=0;o1&&(s=s.slice(0,1)),s||[];var p,d,g=1e10;for(d=0;d0&&t.forEach(function(t){n.elements.push(l.fromValue(t))}),n}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,l),(n=[{key:"append",value:function(t){return this.elements.push(t)}},{key:"close",value:function(){return this.closed=!0,this.closed}},{key:"shift",value:function(){return this.elements.shift()}},{key:"substitute",value:function(t){return new e(this.elements.map(function(e){e.substitute(t)}))}},{key:"toNT",value:function(){return a.NTAnonymousNodePrefix+this.id}},{key:"toString",value:function(){return"("+this.elements.join(" ")+")"}},{key:"unshift",value:function(t){return this.elements.unshift(t)}}])&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType=e.termType,t.value=n,t.base="varid:",t.uri=l.join(n,t.base),t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,u),(n=[{key:"equals",value:function(t){return!!t&&this.termType===t.termType&&this.value===t.value}},{key:"hashString",value:function(){return this.toString()}},{key:"substitute",value:function(t){var e;return null!=(e=t[this.toNT()])?e:this}},{key:"toString",value:function(){return this.uri.slice(0,this.base.length)===this.base?"?"+this.uri.slice(this.base.length):"?"+this.uri}}])&&function(t,e){for(var n=0;n "+t[e]);return n},u=function(t){var e,n="Bindings: ",r=t.length;for(e=0;ei.length)&&(e.index=i)}}return null===e.index&&(e.index=t.statements),!0};function y(t,e){return t.nvars!==e.nvars?t.nvars-e.nvars:t.index.length-e.index.length}var m=function t(n,r,s,u,l,c,h){i.debug("Match begins, Branch count now: "+h.count+" for "+h.pattern_debug);var p,g,y=n.fetcher?n.fetcher:null,m=r.statements;if(0===m.length){if(i.debug("FOUND MATCH WITH BINDINGS:"+a(s)),0===r.optional.length)h.reportMatch(s);else{i.debug("OPTIONAL: "+r.optional);var v,w=new f(e,s),_=[];for(v=0;v in query: "+o),t(n,r,s,u,l,c,h)})};for(g=0;g0)throw"missing.js: oops nnonempty dict not imp";return[]},a=function(t){return t.length},u=function(t,e,n){if(void 0===t.slice)throw"@@ mising.js: No .slice function for "+t+" of type "+r(t);return void 0===n||null==n?t.slice(e):t.slice(e,n)},l=Error("dummy error stop iteration"),c=function(t){return this.last=0,this.li=t,this.next=function(){if(this.last==this.li.length)throw l;return this.li[this.last++]},this},h=function(t,e){return t.indexOf(e)},f=function(t,e){if(!t){if(e)throw"python Assertion failed: "+e;throw"(python) Assertion failed."}};String.prototype.encode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(this)},String.prototype.decode=function(t){if("utf-8"!=t)throw"UTF8_converter: can only do utf-8";return this};var p=function(t,e){return i.join(e,t)},d=0,g="\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~:",y=(new RegExp("^[ \\t]*(#[^\\n]*)?\\r?\\n","g"),new RegExp("^[ \\t]*(#[^\\n]*)?$","g"),new RegExp("^[ \\t]*","g"),new RegExp("^[-+]?[0-9]+","g"),new RegExp("^([-+]?[0-9]+)(\\.[0-9]+)?(e[-+]?[0-9]+)?","g")),m=new RegExp("^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](T[0-9][0-9]:[0-9][0-9](:[0-9][0-9](\\.[0-9]*)?)?)?Z?"),v=(new RegExp("^[0-9]+","g"),new RegExp('[\\\\\\r\\n\\"]',"g")),b=new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*","g");function w(t,e,r,i,o,a,u,l){void 0===e&&(e=null),void 0===r&&(r=""),void 0===i&&(i=null),void 0===o&&(o=""),void 0===a&&(a=null),void 0===u&&(u=""),void 0===l&&(l=null),this._bindings=new s([]),this._flags=u,""!=r&&(f(r.indexOf(":")>=0,"Document URI not absolute: "+r),this._bindings[""]=r+"#"),this._store=t,o&&t.setGenPrefix(o),this._thisDoc=r,this.source=t.sym(r),this.lines=0,this.statementCount=0,this.startOfLine=0,this.previousLine=0,this._genPrefix=o,this.keywords=new n(["a","this","bind","has","is","of","true","false"]),this.keywordsSet=0,this._anonymousNodes=new s([]),this._variables=new s([]),this._parentVariables=new s([]),this._reason=l,this._reason2=null,d&&(this._reason2=why_BecauseOfData(t.sym(r),this._reason)),this._baseURI=i||r||null,f(!this._baseURI||this._baseURI.indexOf(":")>=0),this._genPrefix||(this._genPrefix=this._thisDoc?this._thisDoc+"#_g":RDFSink_uniqueURI()),this._formula=null==e?this._thisDoc?t.formula(r+"#_formula"):t.formula():e,this._context=this._formula,this._parentContext=null}function _(t,e,n,r,i){var o="Line "+(e+1)+" of <"+t+">: Bad syntax: "+i+'\nat: "'+n.slice(r,r+30)+'"',s=new Error(o);return s.lineNumber=e+1,s.characterInFile=r,s.syntaxProblem=i,s}return w.prototype.here=function(t){return this._genPrefix+"_L"+this.lines+"C"+(t-this.startOfLine+1)},w.prototype.formula=function(){return this._formula},w.prototype.loadStream=function(t){return this.loadBuf(t.read())},w.prototype.loadBuf=function(t){return this.startDoc(),this.feed(t),this.endDoc()},w.prototype.feed=function(t){for(var e=t.decode("utf-8"),n=0;n>=0;){var r=this.skipSpace(e,n);if(r<0)return;if((n=this.directiveOrStatement(e,r))<0)throw _(this._thisDoc,this.lines,e,r,"expected directive or statement")}},w.prototype.directiveOrStatement=function(t,e){var n,r=this.skipSpace(t,e);return r<0?r:(n=this.directive(t,r))>=0?this.checkDot(t,n):(n=this.statement(t,r))>=0?this.checkDot(t,n):n},w.prototype.tok=function(t,e,n){if("@"==e.slice(n,n+1))n+=1;else if(o(this.keywords,t)<0)return-1;var r=n+a(t);return e.slice(n,r)==t&&"\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~".indexOf(e.charAt(r))>=0?r:-1},w.prototype.directive=function(t,e){if((a=this.skipSpace(t,e))<0)return a;var r=new n([]);if((a=this.tok("bind",t,e))>0)throw _(this._thisDoc,this.lines,t,e,"keyword bind is obsolete: use @prefix");if((a=this.tok("keywords",t,e))>0){if((e=this.commaSeparatedList(t,a,r,!1))<0)throw _(this._thisDoc,this.lines,t,e,"'@keywords' needs comma separated list of words");return this.setKeywords(u(r,null,null)),e}if((a=this.tok("forAll",t,e))>0){if((e=this.commaSeparatedList(t,a,r,!0))<0)throw _(this._thisDoc,this.lines,t,e,"Bad variable list after @forAll");var i=new c(r);try{for(;;){var s=i.next();(o(this._variables,s)<0||o(this._parentVariables,s)>=0)&&(this._variables[s]=this._context.newUniversal(s))}}catch(t){if(t!=l)throw t}return e}if((a=this.tok("forSome",t,e))>0){if((e=this.commaSeparatedList(t,a,r,this.uri_ref2))<0)throw _(this._thisDoc,this.lines,t,e,"Bad variable list after @forSome");i=new c(r);try{for(;;)s=i.next(),this._context.declareExistential(s)}catch(t){if(t!=l)throw t}return e}if((a=this.tok("prefix",t,e))>=0){var a,h=new n([]);if((e=this.qname(t,a,h))<0)throw _(this._thisDoc,this.lines,t,a,"expected qname after @prefix");if((a=this.uri_ref2(t,e,h))<0)throw _(this._thisDoc,this.lines,t,e,"expected after @prefix _qname_");var d=h[1].uri;return this._baseURI?d=p(this._baseURI,d):f(d.indexOf(":")>=0,"With no base URI, cannot handle relative URI for NS"),f(d.indexOf(":")>=0),this._bindings[h[0][0]]=d,this.bind(h[0][0],encodeURI(d)),a}if((a=this.tok("base",t,e))>=0){if(h=new n([]),(e=this.uri_ref2(t,a,h))<0)throw _(this._thisDoc,this.lines,t,a,"expected after @base ");if(d=h[0].uri,!this._baseURI)throw _(this._thisDoc,this.lines,t,a,"With no previous base URI, cannot use relative URI in @base <"+d+">");return d=p(this._baseURI,d),f(d.indexOf(":")>=0),this._baseURI=d,e}return-1},w.prototype.bind=function(t,e){""==t||this._store.setPrefixForURI(t,e)},w.prototype.setKeywords=function(t){null==t?this.keywordsSet=0:(this.keywords=t,this.keywordsSet=1)},w.prototype.startDoc=function(){},w.prototype.endDoc=function(){return this._formula},w.prototype.makeStatement=function(t){t[0].add(t[2],t[1],t[3],this.source),this.statementCount+=1},w.prototype.statement=function(t,e){var r=new n([]);if((e=this.object(t,e,r))<0)return e;var i=this.property_list(t,e,r[0]);if(i<0)throw _(this._thisDoc,this.lines,t,e,"expected propertylist");return i},w.prototype.subject=function(t,e,n){return this.item(t,e,n)},w.prototype.verb=function(r,i,o){if((a=this.skipSpace(r,i))<0)return a;var s=new n([]);if((a=this.tok("has",r,i))>=0){if((i=this.prop(r,a,s))<0)throw _(this._thisDoc,this.lines,r,a,"expected property after 'has'");return o.push(new e(["->",s[0]])),i}if((a=this.tok("is",r,i))>=0){if((i=this.prop(r,a,s))<0)throw _(this._thisDoc,this.lines,r,a,"expected after 'is'");if((a=this.skipSpace(r,i))<0)throw _(this._thisDoc,this.lines,r,i,"End of file found, expected property after 'is'");var a;if((a=this.tok("of",r,i=a))<0)throw _(this._thisDoc,this.lines,r,i,"expected 'of' after 'is' ");return o.push(new e(["<-",s[0]])),a}if((a=this.tok("a",r,i))>=0)return o.push(new e(["->",this._store.sym("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")])),a;if("<="==r.slice(i,i+2))return o.push(new e(["<-",this._store.sym(t+"implies")])),i+2;if("="==r.slice(i,i+1))return">"==r.slice(i+1,i+2)?(o.push(new e(["->",this._store.sym(t+"implies")])),i+2):(o.push(new e(["->",this._store.sym("http://www.w3.org/2002/07/owl#sameAs")])),i+1);if(":="==r.slice(i,i+2))return o.push(new e(["->",t+"becomes"])),i+2;if((a=this.prop(r,i,s))>=0)return o.push(new e(["->",s[0]])),a;if(">-"==r.slice(i,i+2)||"<-"==r.slice(i,i+2))throw _(this._thisDoc,this.lines,r,a,">- ... -> syntax is obsolete.");return-1},w.prototype.prop=function(t,e,n){return this.item(t,e,n)},w.prototype.item=function(t,e,n){return this.path(t,e,n)},w.prototype.blankNode=function(t){return this._context.bnode(t,this._reason2)},w.prototype.path=function(t,n,r){if((s=this.nodeOrLiteral(t,n,r))<0)return s;for(;"!^.".indexOf(t.slice(s,s+1))>=0;){var i=t.slice(s,s+1);if("."==i){var o=t.slice(s+1,s+2);if(!o||g.indexOf(o)>=0&&":?<[{(".indexOf(o)<0)break}var s,a=r.pop(),u=this.blankNode(this.here(s));if((s=this.node(t,s+1,r))<0)throw _(this._thisDoc,this.lines,t,s,"EOF found in middle of path syntax");var l=r.pop();this.makeStatement(new e("^"==i?[this._context,l,u,a]:[this._context,l,a,u])),r.push(u)}return s},w.prototype.anonymousNode=function(t){if(e=this._anonymousNodes[t])return e;var e=this._store.bnode(t);return this._anonymousNodes[t]=e,e},w.prototype.node=function(t,r,i,o){void 0===o&&(o=null);var u=o;if((y=this.skipSpace(t,r))<0)return y;var h=t.slice(r=y,r+1);if("["==h){var f=this.here(r);if((y=this.skipSpace(t,r+1))<0)throw _(this._thisDoc,this.lines,t,r,"EOF after '['");if("="==t.slice(y,y+1)){r=y+1;var p=new n([]);if(!((y=this.objectList(t,r,p))>=0))throw _(this._thisDoc,this.lines,t,r,"objectList expected after [= ");if(u=p[0],a(p)>1){var d=new c(p);try{for(;;){var g=d.next();this.makeStatement(new e([this._context,this._store.sym("http://www.w3.org/2002/07/owl#sameAs"),u,g]))}}catch(t){if(t!=l)throw t}}if((y=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"EOF when objectList expected after [ = ");if(";"==t.slice(y,y+1))var y=y+1}if(null==u&&(u=this.blankNode(f)),(r=this.property_list(t,y,u))<0)throw _(this._thisDoc,this.lines,t,y,"property_list expected");if((y=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"EOF when ']' expected after [ ");if("]"!=t.slice(y,y+1))throw _(this._thisDoc,this.lines,t,y,"']' expected");return i.push(u),y+1}if("{"==h){if("$"==t.slice(r+1,r+2)){y=(r+=1)+1;for(var m=new n([]),v=!0;;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed '$}', found end.");if("$}"==t.slice(r,r+2)){y=r+2;break}if(v)v=!1;else{if(","!=t.slice(r,r+1))throw _(this._thisDoc,this.lines,t,r,"expected: ','");r+=1}var b=new n([]);if((y=this.item(t,r,b))<0)throw _(this._thisDoc,this.lines,t,r,"expected item in set or '$}'");m.push(b[0])}return i.push(this._store.newSet(m,this._context)),y}y=r+1;var w=this._parentContext;this._parentContext=this._context;var x=this._anonymousNodes,S=this._parentVariables;this._parentVariables=this._variables,this._anonymousNodes=new s([]),this._variables=this._variables.slice();var C=this._reason2;for(this._reason2=null,null==u&&(u=this._store.formula()),this._context=u;;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed '}', found end.");if("}"==t.slice(r,r+1)){y=r+1;break}if((y=this.directiveOrStatement(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"expected statement or '}'")}return this._anonymousNodes=x,this._variables=this._parentVariables,this._parentVariables=S,this._context=this._parentContext,this._reason2=C,this._parentContext=w,i.push(u.close()),y}if("("==h){var E=this._store.list;for("$"==t.slice(r+1,r+2)&&(E=this._store.newSet,r+=1),y=r+1,m=new n([]);;){if((r=this.skipSpace(t,y))<0)throw _(this._thisDoc,this.lines,t,r,"needed ')', found end.");if(")"==t.slice(r,r+1)){y=r+1;break}if(b=new n([]),(y=this.item(t,r,b))<0)throw _(this._thisDoc,this.lines,t,r,"expected item in list or ')'");m.push(b[0])}return i.push(E(m,this._context)),y}if((y=this.tok("this",t,r))>=0)throw _(this._thisDoc,this.lines,t,r,"Keyword 'this' was ancient N3. Now use @forSome and @forAll keywords.");return(y=this.tok("true",t,r))>=0?(i.push(!0),y):(y=this.tok("false",t,r))>=0?(i.push(!1),y):null==u&&(y=this.uri_ref2(t,r,i))>=0?y:-1},w.prototype.property_list=function(t,r,i){for(;;){if((p=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,r,"EOF found when expected verb in property list");if(":-"!=t.slice(p,p+2)){r=p;var o=new n([]);if((p=this.verb(t,r,o))<=0)return r;var s=new n([]);if((r=this.objectList(t,p,s))<0)throw _(this._thisDoc,this.lines,t,p,"objectList expected");var a=new c(s);try{for(;;){var u=a.next(),h=o[0],f=h[1];this.makeStatement(new e("->"==h[0]?[this._context,f,i,u]:[this._context,f,u,i]))}}catch(t){if(t!=l)throw t}if((p=this.skipSpace(t,r))<0)throw _(this._thisDoc,this.lines,t,p,"EOF found in list of objects");if(";"!=t.slice(r,r+1))return r;r+=1}else{r=p+2;var p,d=new n([]);if((p=this.node(t,r,d,i))<0)throw _(this._thisDoc,this.lines,t,r,"bad {} or () or [] node after :- ");r=p}}},w.prototype.commaSeparatedList=function(t,e,n,r){if((i=this.skipSpace(t,e))<0)throw _(this._thisDoc,this.lines,t,i,"EOF found expecting comma sep list");if("."==t.charAt(i))return e;if(r)var i=this.uri_ref2(t,i,n);else i=this.bareWord(t,i,n);if(i<0)return-1;for(;;){if((e=this.skipSpace(t,i))<0)return e;var o=t.slice(e,e+1);if(","!=o)return"."!=o?-1:e;if((i=r?this.uri_ref2(t,e+1,n):this.bareWord(t,e+1,n))<0)throw _(this._thisDoc,this.lines,t,i,"bad list content")}},w.prototype.objectList=function(t,e,n){if((e=this.object(t,e,n))<0)return-1;for(;;){var r=this.skipSpace(t,e);if(r<0)throw _(this._thisDoc,this.lines,t,r,"EOF found after object");if(","!=t.slice(r,r+1))return r;if((e=this.object(t,r+1,n))<0)return e}},w.prototype.checkDot=function(t,e){var n=this.skipSpace(t,e);if(n<0)return n;if("."==t.slice(n,n+1))return n+1;if("}"==t.slice(n,n+1))return n;if("]"==t.slice(n,n+1))return n;throw _(this._thisDoc,this.lines,t,n,"expected '.' or '}' or ']' at end of statement")},w.prototype.uri_ref2=function(t,e,r){var i=new n([]);if((v=this.qname(t,e,i))>=0){var s=i[0],l=s[0],c=s[1];if(null==l){f(0,"not used?");var h=this._baseURI+"#"}else if(!(h=this._bindings[l])){if("_"==l)return r.push(this.anonymousNode(c)),v;throw _(this._thisDoc,this.lines,t,e,"Prefix "+l+" not bound.")}var d=this._store.sym(h+c);return o(this._variables,d)>=0?r.push(this._variables[d]):r.push(d),v}if((e=this.skipSpace(t,e))<0)return-1;if("?"==t.charAt(e)){var g=new n([]);return(v=this.variable(t,e,g))>0?(r.push(g[0]),v):-1}if("<"==t.charAt(e)){for(var y=e+=1;e"==t.charAt(e)){var m=t.slice(y,e);return this._baseURI?m=p(this._baseURI,m):f(m.indexOf(":")>=0,"With no base URI, cannot deal with relative URIs"),"#"==t.slice(e-1,e)&&"#"!=u(m,-1,null)&&(m+="#"),d=this._store.sym(m),o(this._variables,d)>=0?r.push(this._variables[d]):r.push(d),e+1}e+=1}throw _(this._thisDoc,this.lines,t,v,"unterminated URI reference")}if(this.keywordsSet){var v;if(g=new n([]),(v=this.bareWord(t,e,g))<0)return-1;if(o(this.keywords,g[0])>=0)throw _(this._thisDoc,this.lines,t,e,'Keyword "'+g[0]+'" not allowed here.');return r.push(this._store.sym(this._bindings[""]+g[0])),v}return-1},w.prototype.skipSpace=function(t,e){for(var n=e||0;n=0)throw _(this._thisDoc,this.lines,t,r,"Varible name can't start with '"+t.charAt(r)+"s'");for(;e=0)return-1;if(g.indexOf(i)>=0)return-1;for(e=r;e=0)return-1;if(g.indexOf(i)<0){var s=i;for(n+=1;n=0)return s;if((s=this.skipSpace(t,e))<0)return-1;var r=null,i=t.charAt(e=s);if('"'==i||"'"==i){r=t.slice(e,e+3==i+i)?i+i+i:i,e+=a(r);var o=this.strconst(t,e,r),s=o[0];return n.push(this._store.literal(o[1])),s}return-1},w.prototype.nodeOrLiteral=function(t,e,r){if((c=this.node(t,e,r))>=0)return c;if((c=this.skipSpace(t,e))<0)return-1;var i=t.charAt(e=c);if("-+0987654321".indexOf(i)>=0){if(m.lastIndex=0,null!=(p=m.exec(t.slice(e))))c=e+(o=p[0]).length,o.indexOf("T")>=0?r.push(this._store.literal(o,void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#dateTime"))):r.push(this._store.literal(o,void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#date")));else{var o;if(y.lastIndex=0,null==(p=y.exec(t.slice(e))))throw _(this._thisDoc,this.lines,t,e,"Bad number or date syntax");(o=t.slice(e,c=e+y.lastIndex)).indexOf("e")>=0?r.push(this._store.literal(parseFloat(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#double"))):t.slice(e,c).indexOf(".")>=0?r.push(this._store.literal(parseFloat(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#decimal"))):r.push(this._store.literal(parseInt(o),void 0,this._store.sym("http://www.w3.org/2001/XMLSchema#integer")))}return c}if('"'==t.charAt(e)){if('"""'==t.slice(e,e+3))var s='"""';else s='"';e+=a(s);var u=null,l=this.strconst(t,e,s),c=l[0],h=l[1],f=null;if("@"==t.slice(c,c+1)){var p;if(b.lastIndex=0,null==(p=b.exec(t.slice(c+1))))throw _(this._thisDoc,startline,t,e,"Bad language code syntax on string literal, after @");f=t.slice(c+1,e=b.lastIndex+c+1),c=e}if("^^"==t.slice(c,c+2)){var d=new n([]);c=this.uri_ref2(t,c+2,d),u=d[0]}return r.push(this._store.literal(h,f,u)),c}return-1},w.prototype.strconst=function(t,n,r){for(var i=n,o="",s=this.lines;i=0)o+='a\b\f\r\t\v\n\\"'.charAt(u),i+=1;else if("u"==c)i=(l=this.uEscape(t,i+1,s))[0],o+=c=l[1];else{if("U"!=c)throw _(this._thisDoc,this.lines,t,n,"bad escape");var l,c;i=(l=this.UEscape(t,i+1,s))[0],o+=c=l[1]}}}else i=n+1;else i=n}else o+='"',i+=1}throw _(this._thisDoc,this.lines,t,n,"unterminated string literal")},w.prototype.uEscape=function(t,n,r){for(var i=n,o=0,s=0;o<4;){var a=t.slice(i,i+1).toLowerCase();if(i+=1,""==a)throw _(this._thisDoc,r,t,n,"unterminated string literal(3)");var u=h("0123456789abcdef",a);if(u<0)throw _(this._thisDoc,r,t,n,"bad string literal hex escape");s=16*s+u,o+=1}var l=String.fromCharCode(s);return new e([i,l])},w.prototype.UEscape=function(t,n,r){for(var i=n,o=0,s="\\U";o<8;){var a=t.slice(i,i+1).toLowerCase();if(i+=1,""==a)throw _(this._thisDoc,r,t,n,"unterminated string literal(3)");if(h("0123456789abcdef",a)<0)throw _(this._thisDoc,r,t,n,"bad string literal hex escape");s+=a,o+=1}var l,c=(l="0x"+u(s,2,10)-0,String.fromCharCode(l));return new e([i,c])},function(t,e,n,r,i,o,s,a){return new w(t,e,n,r,i,o,s,a)}}();t.exports=s},function(t,e){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,(function(e){return t[e]}).bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=n(1);const i=new r.default;if(e.default=i,Object.getOwnPropertyNames(r.default.prototype).forEach(t=>{const e=i[t];"function"==typeof e&&(i[t]=e.bind(i))}),"undefined"!=typeof window)if("SolidAuthClient"in window)console.warn("Caution: multiple versions of solid-auth-client active.");else{let t=!1;Object.defineProperty(window,"SolidAuthClient",{enumerable:!0,get:()=>(t||(t=!0,console.warn("window.SolidAuthClient has been deprecated."),console.warn("Please use window.solid.auth instead.")),i)})}},function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return y});var r=n(2),i=n.n(r),o=n(3),s=n.n(o),a=n(4),u=n.n(a),l=n(5),c=n(81),h=n(9),f=n(10),p=n(7),d=n(12);const g=fetch;class y extends u.a{constructor(...t){super(...t),s()(this,"_pendingSession",void 0)}fetch(t,e){return Object(l.authnFetch)(Object(f.defaultStorage)(),g,t,e)}login(t,e){return e=i()({},m(Object(p.currentUrlNoParams)()),e),d.login(t,e)}async popupLogin(t){t=i()({},m(),t),/https?:/.test(t.popupUri)||(t.popupUri=new URL(t.popupUri||"/.well-known/solid/login",window.location).toString()),t.callbackUri||(t.callbackUri=t.popupUri);const e=Object(c.openIdpPopup)(t.popupUri),n=await Object(c.obtainSession)(t.storage,e,t);return this.emit("login",n),this.emit("session",n),n}async currentSession(t=Object(f.defaultStorage)()){let e=await Object(h.getSession)(t);if(!e){if(this._pendingSession)return this._pendingSession;try{this._pendingSession=d.currentSession(t),e=await this._pendingSession}catch(t){console.error(t)}delete this._pendingSession,e&&(await Object(h.saveSession)(t)(e),this.emit("login",e),this.emit("session",e))}return e}async trackSession(t){t(await this.currentSession()),this.on("session",t)}async logout(t=Object(f.defaultStorage)()){if(await Object(h.getSession)(t)){try{await d.logout(t,g),this.emit("logout"),this.emit("session",null)}catch(t){console.warn("Error logging out:"),console.error(t)}await Object(h.clearSession)(t)}}}function m(t){return{callbackUri:t?t.split("#")[0]:"",popupUri:"",storage:Object(f.defaultStorage)()}}},function(t,e,n){var r=n(3);t.exports=function(t){for(var e=1;e0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";n.r(e),n.d(e,"authnFetch",function(){return a}),n(6);var r=n(7),i=n(8),o=n(9),s=n(12);async function a(t,e,n,r){const a=await Object(o.getSession)(t);if(!a)return e(n,r);if(await u(t,n))return Object(s.fetchWithCredentials)(a,e,n,r);let l=await e(n,r);return 401===l.status&&(await Object(i.updateHostFromResponse)(t)(l),await u(t,n)&&(l=Object(s.fetchWithCredentials)(a,e,n,r))),l}async function u(t,e){const n=await Object(i.getHost)(t)(Object(r.toUrlString)(e));return null!=n&&n.requiresAuth}},function(t,e){t.exports=window.fetch},function(t,e,n){"use strict";n.r(e),n.d(e,"currentUrl",function(){return r}),n.d(e,"currentUrlNoParams",function(){return i}),n.d(e,"navigateTo",function(){return o}),n.d(e,"originOf",function(){return s}),n.d(e,"toUrlString",function(){return a});const r=()=>window.location.href,i=()=>window.location.origin+window.location.pathname,o=t=>{window.location.href=t},s=t=>new URL(t).origin,a=t=>("string"!=typeof t&&(t="url"in t?t.url:t.toString()),new URL(t,r()).toString())},function(t,e,n){"use strict";n.r(e),n.d(e,"getHost",function(){return u}),n.d(e,"saveHost",function(){return l}),n.d(e,"updateHostFromResponse",function(){return c});var r=n(2),i=n.n(r),o=n(9),s=n(10),a=n(12);function u(t){return async e=>{const n=new URL(e).host,r=await Object(o.getSession)(t);if(r&&n===new URL(r.idp).host)return{url:n,requiresAuth:!0};const i=(await Object(s.getData)(t)).hosts;return i&&i[n]}}function l(t){return async({url:e,requiresAuth:n})=>{await Object(s.updateStorage)(t,t=>i()({},t,{hosts:i()({},t.hosts,{[e]:{requiresAuth:n}})}))}}function c(t){return async e=>{if(a.requiresAuth(e)){const n=new URL(e.url).host;await l(t)({url:n,requiresAuth:!0})}}}},function(t,e,n){"use strict";n.r(e),n.d(e,"getSession",function(){return s}),n.d(e,"saveSession",function(){return a}),n.d(e,"clearSession",function(){return u});var r=n(2),i=n.n(r),o=n(10);async function s(t){return(await Object(o.getData)(t)).session||null}function a(t){return async e=>(await Object(o.updateStorage)(t,t=>i()({},t,{session:e}))).session}async function u(t){await Object(o.updateStorage)(t,t=>i()({},t,{session:null}))}},function(t,e,n){"use strict";n.r(e),n.d(e,"NAMESPACE",function(){return r}),n.d(e,"defaultStorage",function(){return i}),n.d(e,"getData",function(){return o}),n.d(e,"updateStorage",function(){return s}),n.d(e,"asyncStorage",function(){return a}),n.d(e,"memStorage",function(){return u}),n.d(e,"ipcStorage",function(){return l}),n(11);const r="solid-auth-client",i=()=>{try{if(window&&window.localStorage)return a(window.localStorage)}catch(t){if(!(t instanceof ReferenceError))throw t}return console.warn("'window.localStorage' unavailable. Creating a (not very useful) in-memory storage object as the default storage interface."),a(u())};async function o(t){let e,n;try{e=await t.getItem(r),n=JSON.parse(e||"{}")}catch(t){console.warn("Could not deserialize data:",e),console.error(t),n={}}return n}async function s(t,e){const n=e(await o(t));return await t.setItem(r,JSON.stringify(n)),n}function a(t){return{getItem:e=>Promise.resolve(t.getItem(e)),setItem:(e,n)=>Promise.resolve(t.setItem(e,n)),removeItem:e=>Promise.resolve(t.removeItem(e))}}const u=()=>{const t={};return{getItem:e=>void 0===t[e]?null:t[e],setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}};function l(t){return{getItem:e=>t.request("storage/getItem",e),setItem:(e,n)=>t.request("storage/setItem",e,n),removeItem:e=>t.request("storage/removeItem",e)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"Server",function(){return s}),n.d(e,"Client",function(){return a});var r=n(3),i=n.n(r);const o="solid-auth-client";class s{constructor(t,e,n){i()(this,"_clientWindow",void 0),i()(this,"_clientOrigin",void 0),i()(this,"_handler",void 0),i()(this,"_messageListener",void 0),this._clientWindow=t,this._clientOrigin=e,this._handler=n,this._messageListener=(t=>this._handleMessage(t))}async _handleMessage({data:t,origin:e}){if(e!==this._clientOrigin)return void console.warn(`solid-auth-client is listening to ${this._clientOrigin} `+`so ignored a message received from ${e}.`);const n=t&&t[o];if(n&&n.method){const t=n.id,e=n.method,r=n.args,i=await this._handler(e,...r);this._clientWindow.postMessage({[o]:{id:t,ret:i}},this._clientOrigin)}}start(){window.addEventListener("message",this._messageListener)}stop(){window.removeEventListener("message",this._messageListener)}}class a{constructor(t,e){i()(this,"_serverWindow",void 0),i()(this,"_serverOrigin",void 0),this._serverWindow=t,this._serverOrigin=e}request(t,...e){const n=Math.random();return this._serverWindow.postMessage({[o]:{id:n,method:t,args:e}},this._serverOrigin),new Promise((t,e)=>{window.addEventListener("message",i);const r=setTimeout(()=>{e(new Error("Could not connect to main window.")),window.removeEventListener("message",i)},2e3);function i({data:e}){const s=e&&e[o];s&&s.id===n&&s.hasOwnProperty("ret")&&(t(s.ret),clearTimeout(r),window.removeEventListener("message",i))}})}}},function(t,e,n){"use strict";n.r(e),n.d(e,"login",function(){return d}),n.d(e,"currentSession",function(){return g}),n.d(e,"logout",function(){return y}),n.d(e,"getRegisteredRp",function(){return m}),n.d(e,"requiresAuth",function(){return b}),n.d(e,"fetchWithCredentials",function(){return w});var r=n(13),i=n.n(r),o=n(2),s=n.n(o),a=n(15),u=n(19),l=n.n(u),c=n(80),h=n.n(c),f=n(7),p=n(10);async function d(t,e){try{const n=await m(t,e);return await async function(t){await Object(p.updateStorage)(t,t=>s()({},t,{appHashFragment:window.location.hash}))}(e.storage),async function(t,{callbackUri:e,storage:n}){const r=await Object(p.getData)(n),i=await t.createRequest({redirect_uri:e},r);return await Object(p.updateStorage)(n,()=>r),Object(f.navigateTo)(i)}(n,e)}catch(t){return console.warn("Error logging in with WebID-OIDC"),console.error(t),null}}async function g(t=Object(p.defaultStorage)()){try{const e=await v(t);if(!e)return null;const n=Object(f.currentUrl)();if(!/#(.*&)?access_token=/.test(n))return null;window.location.hash="",await async function(t){await Object(p.updateStorage)(t,t=>{let e=t.appHashFragment,n=void 0===e?"":e,r=i()(t,["appHashFragment"]);return window.location.hash=n,r})}(t);const r=await Object(p.getData)(t),o=await e.validateResponse(n,r);return o?s()({},o,{webId:o.idClaims.sub,idp:o.issuer}):null}catch(t){return console.warn("Error finding a WebID-OIDC session"),console.error(t),null}}async function y(t,e){const n=await v(t);if(n)try{await n.logout();try{await e("/.well-known/solid/logout",{credentials:"include"})}catch(t){}}catch(t){console.warn("Error logging out of the WebID-OIDC session"),console.error(t)}}async function m(t,e){let n=await v(e.storage);return n&&n.provider.url===t&&n.registration.redirect_uris.includes(e.callbackUri)||(n=await function(t,{storage:e,callbackUri:n}){return l.a.register(t,{issuer:t,grant_types:["implicit"],redirect_uris:[n],response_types:["id_token token"],scope:"openid profile"},{defaults:{authenticate:{redirect_uri:n,response_type:"id_token token"}},store:e})}(t,e),await async function(t,e,n){return await Object(p.updateStorage)(t,t=>s()({},t,{rpConfig:n})),n}(e.storage,0,n)),n}async function v(t){const e=(await Object(p.getData)(t)).rpConfig;return e?(e.store=t,l.a.from(e)):null}function b(t){if(401!==t.status)return!1;const e=t.headers.get("www-authenticate");if(!e)return!1;const n=a.parse(e);return"Bearer"===n.scheme&&n.params&&"openid webid"===n.params.scope}async function w(t,e,n,r){const i=await h.a.issueFor(Object(f.toUrlString)(n),t);return e(n,s()({},r,{credentials:"include",headers:s()({},r&&r.headers?r.headers:{},{authorization:`Bearer ${i}`})}))}},function(t,e,n){var r=n(14);t.exports=function(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"format",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.default}});var r=o(n(16)),i=o(n(18));function o(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(17);function i(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e@,;:\\"\/?={}\[\]\u0020\u0009]+$/,i=function(t){return"string"==typeof t&&r.test(t)};e.isToken=i,e.isScheme=i,e.quote=function(t){return`"${t.replace(/"/g,'\\"')}"`},e.unquote=function(t){return t.substr(1,t.length-2).replace(/\\"/g,'"')}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(17),i=/((?:[a-zA-Z0-9._~+\/-]+=*(?:\s+|$))|[^\u0000-\u001F\u007F()<>@,;:\\"\/?={}\[\]\u0020\u0009]+)(?:=([^\\"=\s,]+|"(?:[^"\\]|\\.)*"))?/g,o=function(t,e){var n='"'===e.charAt(0)?(0,r.unquote)(e):e.trim();return Array.isArray(t)?t.concat(n):"string"==typeof t?[t,n]:n};e.default=function(t){if("string"!=typeof t)throw new TypeError("Header value must be a string.");var e=t.indexOf(" "),n=t.substr(0,e);if(!(0,r.isScheme)(n))throw new TypeError(`Invalid scheme ${n}`);return function(t,e){for(var n=null,r={};;){var s=i.exec(e);if(null===s)break;s[2]?r[s[1]]=o(r[s[1]],s[2]):n=o(n,s[1])}return{scheme:t,params:r,token:n}}(n,t.substr(e))}},function(t,e,n){"use strict";t.exports=n(20)},function(t,e,n){(function(e){const r=n(22),i=n(6),{URL:o}=n(27),s=i.Headers?i.Headers:e.Headers,{JSONDocument:a}=n(28),{JWKSet:u}=n(37),l=n(68),c=n(70),h=n(79),f=n(74),p=n(69);class d extends a{static get schema(){return h}static from(t){let e=new d(t),n=e.validate();if(!n.valid)return Promise.reject(new Error(JSON.stringify(n)));let r=e.provider.jwks;return r?u.importKeys(r).then(t=>(e.provider.jwks=t,e)):e.jwks().then(()=>e)}static register(t,e,n){let r=new d({provider:{url:t},defaults:Object.assign({},n.defaults),store:n.store});return Promise.resolve().then(()=>r.discover()).then(()=>r.jwks()).then(()=>r.register(e)).then(()=>r)}discover(){try{let e=this.provider.url;r(e,'RelyingParty provider must define "url"');let n=new o(e);return n.pathname=".well-known/openid-configuration",i(n.toString()).then(f("Error fetching openid configuration")).then(t=>t.json().then(t=>this.provider.configuration=t))}catch(t){return Promise.reject(t)}}register(t){try{let e=this.provider.configuration;r(e,"OpenID Configuration is not initialized."),r(e.registration_endpoint,"OpenID Configuration is missing registration_endpoint.");let n=e.registration_endpoint,o="post",a=new s({"Content-Type":"application/json"}),u=JSON.stringify(Object.assign({},this.defaults.register,t));return i(n,{method:o,headers:a,body:u}).then(f("Error registering client")).then(t=>t.json().then(t=>this.registration=t))}catch(t){return Promise.reject(t)}}serialize(){return JSON.stringify(this)}jwks(){try{let e=this.provider.configuration;return r(e,"OpenID Configuration is not initialized."),r(e.jwks_uri,"OpenID Configuration is missing jwks_uri."),i(e.jwks_uri).then(f("Error resolving provider keys")).then(t=>t.json().then(t=>u.importKeys(t)).then(t=>this.provider.jwks=t))}catch(t){return Promise.reject(t)}}createRequest(t,e){return l.create(this,t,e||this.store)}validateResponse(t,e=this.store){let n;n=t.match(/^http(s?):\/\//)?{rp:this,redirect:t,session:e}:{rp:this,body:t,session:e};const r=new c(n);return c.validateResponse(r)}userinfo(){try{let e=this.provider.configuration;r(e,"OpenID Configuration is not initialized."),r(e.userinfo_endpoint,"OpenID Configuration is missing userinfo_endpoint.");let n=e.userinfo_endpoint,o=this.store.access_token;r(o,"Missing access token.");let a=new s({"Content-Type":"application/json",Authorization:`Bearer ${o}`});return i(n,{headers:a}).then(f("Error fetching userinfo")).then(t=>t.json())}catch(t){return Promise.reject(t)}}logoutRequest(t={}){const{id_token_hint:e,post_logout_redirect_uri:n,state:i}=t;let s;if(r(this.provider,"OpenID Configuration is not initialized"),r(s=this.provider.configuration,"OpenID Configuration is not initialized"),!s.end_session_endpoint)return console.log("OpenId Configuration for "+`${s.issuer} is missing end_session_endpoint`),null;if(n&&!e)throw new Error("id_token_hint is required when using post_logout_redirect_uri");const a={};e&&(a.id_token_hint=e),n&&(a.post_logout_redirect_uri=n),i&&(a.state=i);const u=new o(s.end_session_endpoint);return u.search=p.encode(a),u.href}logout(){let t;try{r(this.provider,"OpenID Configuration is not initialized."),r(t=this.provider.configuration,"OpenID Configuration is not initialized."),r(t.end_session_endpoint,"OpenID Configuration is missing end_session_endpoint.")}catch(t){return Promise.reject(t)}return t.end_session_endpoint?i(t.end_session_endpoint,{method:"get",credentials:"include"}).then(f("Error logging out")).then(()=>this.clearSession()):(this.clearSession(),Promise.resolve(void 0))}clearSession(){let t=this.store;t&&delete t[g]}popTokenFor(t,e){return PoPToken.issueFor(t,e)}}const g="oidc.session.privateKey";d.SESSION_PRIVATE_KEY=g,t.exports=d}).call(this,n(21))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";(function(e){function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i=0;l--)if(c[l]!==h[l])return!1;for(l=c.length-1;l>=0;l--)if(!v(t[u=c[l]],e[u],n,r))return!1;return!0}(t,e,n,s))}return n?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&y(i,n,"Missing expected exception"+r);var s="string"==typeof r,a=!t&&i&&!n;if((!t&&o.isError(i)&&s&&w(i,n)||a)&&y(i,n,"Got unwanted exception"+r),t&&i&&n&&!w(i,n)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g(this.actual),128)+" "+this.operator+" "+d(g(this.expected),128),this.generatedMessage=!0);var e=t.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=p(e),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},o.inherits(h.AssertionError,Error),h.fail=y,h.ok=m,h.equal=function(t,e,n){t!=e&&y(t,e,n,"==",h.equal)},h.notEqual=function(t,e,n){t==e&&y(t,e,n,"!=",h.notEqual)},h.deepEqual=function(t,e,n){v(t,e,!1)||y(t,e,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,n){v(t,e,!0)||y(t,e,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,n){v(t,e,!1)&&y(t,e,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,n,r){v(e,n,!0)&&y(e,n,r,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,n){t!==e&&y(t,e,n,"===",h.strictEqual)},h.notStrictEqual=function(t,e,n){t===e&&y(t,e,n,"!==",h.notStrictEqual)},h.throws=function(t,e,n){_(!0,t,e,n)},h.doesNotThrow=function(t,e,n){_(!1,t,e,n)},h.ifError=function(t){if(t)throw t};var x=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}}).call(this,n(21))},function(t,e,n){(function(t,r){var i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"\x1b["+a.colors[n][0]+"m"+t+"\x1b["+a.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return s.forEach(function(t,n){e[t]=!0}),e}();if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),x(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(S(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return h(n)}var u,l="",w=!1,C=["{","}"];return p(n)&&(w=!0,C=["[","]"]),S(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(l=" "+RegExp.prototype.toString.call(n)),_(n)&&(l=" "+Date.prototype.toUTCString.call(n)),x(n)&&(l=" "+h(n)),0!==s.length||w&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=w?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(u,l,C)):C[0]+l+C[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=t.stylize(u.set?"[Getter/Setter]":"[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===C(t)}function x(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function S(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(o)&&(o=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=w,e.isDate=_,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(25);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(n=[E((t=new Date).getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),k[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(26),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,n(21),n(24))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,l=[],c=!1,h=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):h=-1,l.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=l.length;e;){for(u=l,l=[];++h1)for(var n=1;nthis.root.depth&&(this.root.depth=this.level),this.level=this.level||0,this.schema=e}return i(t,[{key:"compile",value:function(){var t=this.root,e="",n="";if(n+=this.default(),n+=this.properties(),n+=this.items(),n+=this.member(),n+=this.item(),t===this){for(var r=1;r<=this.root.depth;r++)e+=this.declaration(r);return"\n options = options || {}\n\n if (options.filter === false) {\n Object.assign(target, JSON.parse(JSON.stringify(source)))\n }\n\n "+e+"\n "+n+"\n "}return n}},{key:"declaration",value:function(t){return"\n var target"+t+"\n var source"+t+"\n var count"+t+"\n "}},{key:"default",value:function(){var t=this.schema,e=this.level,n=this.key,r=this.index,i=t.default,o="";return t.hasOwnProperty("default")&&(n&&(o+="\n target"+e+"['"+n+"'] = "+JSON.stringify(i)+"\n "),r&&(o+="\n target"+e+"["+r+"] = "+JSON.stringify(i)+"\n "),e>1&&(o+="\n count"+e+"++\n "),o="\n if (options.defaults !== false) {\n "+o+"\n }\n "),o}},{key:"member",value:function(){var t=this.schema,e=this.level,n=this.key,r="";return!n||t.properties||t.additionalProperties||t.items||t.additionalItems||(r+="\n target"+e+"['"+n+"'] = source"+e+"['"+n+"']\n ",e>1&&(r+="\n count"+e+"++\n "),r="\n if (source"+e+".hasOwnProperty('"+n+"')) {\n "+r+"\n }\n "),r}},{key:"item",value:function(){var t=this.schema,e=this.level,n=this.index,r="";return!n||t.properties||t.additionalProperties||t.items||t.additionalItems||(r+="\n target"+e+"["+n+"] = source"+e+"["+n+"]\n ",e>1&&(r+="\n count"+e+"++\n "),r="\n if ("+n+" < len) {\n "+r+"\n }\n "),r}},{key:"properties",value:function(){var e=this.root,n=this.level,r=this.key,i=this.index,o=this.schema.properties,s="";return o&&(Object.keys(o).forEach(function(r){var i=new t(o[r],{key:r,root:e,level:n+1});s+=i.compile()}),e===this?s="\n if (typeof source === 'object' && source !== null && !Array.isArray(source)) {\n if (typeof target !== 'object') {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n count1 = 0\n\n "+s+"\n }\n ":(i&&(s="\n if ("+i+" < source"+n+".length || typeof source"+n+"["+i+"] === 'object') {\n\n source"+(n+1)+" = source"+n+"["+i+"] || {}\n count"+(n+1)+" = 0\n\n if ("+i+" < target"+n+".length || typeof target"+n+"["+i+"] !== 'object') {\n target"+(n+1)+" = {}\n if ("+i+" < source"+n+".length) {\n count"+(n+1)+"++\n }\n } else {\n target"+(n+1)+" = target"+n+"["+i+"]\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"["+i+"] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"["+i+"] = source"+n+"["+i+"]\n count"+n+"++\n }\n "),r&&(s="\n if ((typeof source"+n+"['"+r+"'] === 'object'\n && source"+n+"['"+r+"'] !== null\n && !Array.isArray(source"+n+"['"+r+"']))\n || !source"+n+".hasOwnProperty('"+r+"')) {\n\n source"+(n+1)+" = source"+n+"['"+r+"'] || {}\n count"+(n+1)+" = 0\n\n if (!target"+n+".hasOwnProperty('"+r+"')\n || typeof target"+n+"['"+r+"'] !== 'object'\n || target"+n+"['"+r+"'] === null\n || Array.isArray(target"+n+"['"+r+"'])) {\n target"+(n+1)+" = {}\n if (source"+n+".hasOwnProperty('"+r+"')) {\n count"+(n+1)+"++\n }\n } else {\n target"+(n+1)+" = target"+n+"['"+r+"']\n count"+(n+1)+"++\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"['"+r+"'] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"['"+r+"'] = source"+n+"['"+r+"']\n count"+n+"++\n }\n "))),s}},{key:"additionalProperties",value:function(){}},{key:"items",value:function(){var e=this.root,n=this.level,i=this.key,o=this.schema.items,s="";if(o){if(Array.isArray(o));else if("object"===(void 0===o?"undefined":r(o))&&null!==o){var a="i"+(n+1);s+="\n var sLen = source"+(n+1)+".length || 0\n var tLen = target"+(n+1)+".length || 0\n var len = 0\n\n if (sLen > len) { len = sLen }\n // THIS IS WRONG, CAUSED SIMPLE ARRAY INIT TO FAIL (OVERWRITE\n // EXISTING TARGET VALUES WITH UNDEFINED WHEN SOURCE IS SHORTER THAN\n // TARGET). LEAVING HERE UNTIL WE FINISH TESTING AND SEE WHY IT MIGHT\n // HAVE BEEN HERE IN THE FIRST PLACE.\n //\n // if (tLen > len) { len = tLen }\n\n for (var "+a+" = 0; "+a+" < len; "+a+"++) {\n "+new t(o,{index:a,root:e,level:n+1}).compile()+"\n }\n "}s=e===this?"\n if (Array.isArray(source)) {\n if (!Array.isArray(target)) {\n throw new Error('?')\n }\n\n source1 = source\n target1 = target\n\n "+s+"\n }\n ":"\n if (Array.isArray(source"+n+"['"+i+"']) || !source"+n+".hasOwnProperty('"+i+"')) {\n\n source"+(n+1)+" = source"+n+"['"+i+"'] || []\n count"+(n+1)+" = 0\n\n if (!target"+n+".hasOwnProperty('"+i+"') || !Array.isArray(target"+n+"['"+i+"'])) {\n target"+(n+1)+" = []\n if (source"+n+".hasOwnProperty('"+i+"')) {\n count"+(n+1)+"++\n }\n\n } else {\n target"+(n+1)+" = target"+n+"['"+i+"']\n count"+(n+1)+"++\n }\n\n "+s+"\n\n if (count"+(n+1)+" > 0) {\n target"+n+"['"+i+"'] = target"+(n+1)+"\n count"+n+"++\n }\n\n } else {\n target"+n+"['"+i+"'] = source"+n+"['"+i+"']\n count"+n+"++\n }\n "}return s}},{key:"additionalItems",value:function(){}}],[{key:"compile",value:function(e){var n=new t(e).compile();try{return new Function("target","source","options",n)}catch(t){console.log(t,t.stack)}}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initialize(e,n)}return r(t,null,[{key:"schema",get:function(){throw new Error("Schema must be defined by classes extending JSONDocument")}}]),r(t,[{key:"initialize",value:function(){this.constructor.schema.initialize(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"validate",value:function(t){return(t||this.constructor.schema).validate(this)}},{key:"patch",value:function(t){new i(t).apply(this)}},{key:"select",value:function(){}},{key:"project",value:function(t){return t.project(this)}}],[{key:"serialize",value:function(t){return JSON.stringify(t)}},{key:"deserialize",value:function(t){try{return JSON.parse(t)}catch(t){throw new Error("Failed to parse JSON")}}}]),t}();t.exports=o},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.schema=e,Object.assign(this,n),this.address||(this.address=""),!0!==this.require&&(this.require=!1)}return i(t,null,[{key:"compile",value:function(e){var n='\n // "cursor"\n let value = data\n let container\n let stack = []\n let top = -1\n\n // error state\n let valid = true\n let errors = []\n\n // complex schema state\n let initialValidity\n let anyValid\n let notValid\n let countOfValid\n let initialErrorCount\n let accumulatedErrorCount\n\n // validation code\n '+new t(e).compile()+"\n\n // validation result\n return {\n valid,\n errors\n }\n ";return new Function("data",n)}},{key:"counter",get:function(){return s++}}]),i(t,[{key:"compile",value:function(){var t="";return this.require&&(t+=this.required()),t+=this.type(),t+=this.array(),t+=this.number(),t+=this.object(),t+=this.string(),t+=this.enum(),t+=this.anyOf(),t+=this.allOf(),(t+=this.not())+this.oneOf()}},{key:"push",value:function(){return"\n stack.push(value)\n container = value\n top++\n "}},{key:"pop",value:function(){return"\n if (stack.length > 1) {\n top--\n stack.pop()\n }\n\n value = container = stack[top]\n "}},{key:"type",value:function(){var t=this.schema.type,e="";return t&&(e+="\n // "+this.address+" type checking\n if (value !== undefined && "+(Array.isArray(t)?t:[t]).map(function(t){return"array"===t?"!Array.isArray(value)":"boolean"===t?"typeof value !== 'boolean'":"integer"===t?"!Number.isInteger(value)":"null"===t?"value !== null":"number"===t?"typeof value !== 'number'":"object"===t?"(typeof value !== 'object' || Array.isArray(value) || value === null)":"string"===t?"typeof value !== 'string'":void 0}).join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'type',\n message: 'invalid type'\n })\n }\n "),e}},{key:"array",value:function(){var t=this.validations(["additionalItems","items","minItems","maxItems","uniqueItems"]),e="";return t.length>0&&(e+="\n /**\n * Array validations\n */\n if (Array.isArray(value)) {\n "+t+"\n }\n "),e}},{key:"number",value:function(){var t=this.validations(["minimum","maximum","multipleOf"]),e="";return t.length>0&&(e+="\n /**\n * Number validations\n */\n if (typeof value === 'number') {\n "+t+"\n }\n "),e}},{key:"object",value:function(){var t=this.validations(["maxProperties","minProperties","additionalProperties","properties","patternProperties","dependencies","schemaDependencies","propertyDependencies"]),e="";return t.length>0&&(e+="\n /**\n * Object validations\n */\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n "+t+"\n }\n "),e}},{key:"string",value:function(){var t=this.validations(["maxLength","minLength","pattern","format"]),e="";return t.length>0&&(e+="\n /**\n * String validations\n */\n if (typeof value === 'string') {\n "+t+"\n }\n "),e}},{key:"validations",value:function(t){var e=this,n="";return Object.keys(this.schema).filter(function(e){return-1!==t.indexOf(e)}).forEach(function(t){n+=e[t]()}),n}},{key:"enum",value:function(){var t=this.schema.enum,e=this.address,n=["value !== undefined"],i="";return t&&(t.forEach(function(t){switch(void 0===t?"undefined":r(t)){case"boolean":case"number":n.push("value !== "+t);break;case"string":n.push('value !== "'+t+'"');break;case"object":n.push(null===t?"value !== null":"'"+JSON.stringify(t)+"' !== JSON.stringify(value)");break;default:throw new Error("Things are not well in the land of enum")}}),i+='\n /**\n * Validate "'+e+'" enum\n */\n if ('+n.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'enum',\n message: JSON.stringify(value) + ' is not an enumerated value'\n })\n }\n "),i}},{key:"anyOf",value:function(){var e=this.schema.anyOf,n=this.address,r="";return Array.isArray(e)&&(r+="\n initialValidity = valid\n initialErrorCount = errors.length\n anyValid = false\n ",e.forEach(function(e){var i=new t(e,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+i.compile()+"\n if (accumulatedErrorCount === errors.length) {\n anyValid = true\n }\n "}),r+="\n if (anyValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n }\n "),r}},{key:"allOf",value:function(){var e=this.schema.allOf,n=this.address,r="";return Array.isArray(e)&&e.forEach(function(e){var i=new t(e,{address:n});r+="\n "+i.compile()+"\n "}),r}},{key:"oneOf",value:function(){var e=this.schema.oneOf,n=this.address,r="";return Array.isArray(e)&&(r+="\n /**\n * Validate "+n+" oneOf\n */\n initialValidity = valid\n initialErrorCount = errors.length\n countOfValid = 0\n ",e.forEach(function(e){var i=new t(e,{address:n});r+="\n accumulatedErrorCount = errors.length\n "+i.compile()+"\n if (accumulatedErrorCount === errors.length) {\n countOfValid += 1\n }\n "}),r+="\n if (countOfValid === 1) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors.push({\n keyword: 'oneOf',\n message: 'what is a reasonable error message for this case?'\n })\n }\n "),r}},{key:"not",value:function(){var e=this.schema.not,n=this.address,i="";return"object"!==(void 0===e?"undefined":r(e))||null===e||Array.isArray(e)||(i+="\n /**\n * NOT\n */\n if (value !== undefined) {\n initialValidity = valid\n initialErrorCount = errors.length\n notValid = true\n\n accumulatedErrorCount = errors.length\n\n "+new t(e,{address:n}).compile()+"\n\n if (accumulatedErrorCount === errors.length) {\n notValid = false\n }\n\n if (notValid === true) {\n valid = initialValidity\n errors = errors.slice(0, initialErrorCount)\n } else {\n valid = false\n errors = errors.slice(0, initialErrorCount)\n errors.push({\n keyword: 'not',\n message: 'hmm...'\n })\n }\n }\n "),i}},{key:"properties",value:function(){var e=this.schema,n=this.address,i=e.properties,o=e.required,s=this.push();return o=Array.isArray(o)?o:[],"object"===(void 0===i?"undefined":r(i))&&Object.keys(i).forEach(function(e){var r=i[e],a=-1!==o.indexOf(e),u=new t(r,{address:[n,e].filter(function(t){return!!t}).join("."),require:a});s+="\n value = container['"+e+"']\n ",s+=u.compile()}),s+=this.pop()}},{key:"otherProperties",value:function(){return"\n /**\n * Validate Other Properties\n */\n "+this.push()+"\n\n for (let key in container) {\n value = container[key]\n matched = false\n\n "+this.patternValidations()+"\n "+this.additionalValidations()+"\n }\n\n "+this.pop()+"\n "}},{key:"patternValidations",value:function(){var e=this.schema.patternProperties,n="";return"object"===(void 0===e?"undefined":r(e))&&Object.keys(e).forEach(function(r){var i=new t(e[r]);n+="\n if (key.match('"+r+"')) {\n matched = true\n "+i.compile()+"\n }\n "}),n}},{key:"additionalValidations",value:function(){var e=this.schema,n=e.additionalProperties,i=this.address,o="",s=["matched !== true"];if(Object.keys(e.properties||{}).forEach(function(t){s.push("key !== '"+t+"'")}),"object"===(void 0===n?"undefined":r(n))){var a=new t(n,{address:i+"[APKey]"});o+="\n // validate additional properties\n if ("+s.join(" && ")+") {\n "+a.compile()+"\n }\n "}return!1===n&&(o+="\n // validate non-presence of additional properties\n if ("+s.join(" && ")+") {\n valid = false\n errors.push({\n keyword: 'additionalProperties',\n message: key + ' is not a defined property'\n })\n }\n "),o}},{key:"patternProperties",value:function(){var t="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,t+=this.otherProperties()),t}},{key:"additionalProperties",value:function(){var t="";return this.otherPropertiesCalled||(this.otherPropertiesCalled=!0,t+=this.otherProperties()),t}},{key:"minProperties",value:function(){return"\n // "+this.address+" min properties\n if (Object.keys(value).length < "+this.schema.minProperties+") {\n valid = false\n errors.push({\n keyword: 'minProperties',\n message: 'too few properties'\n })\n }\n "}},{key:"maxProperties",value:function(){return"\n // "+this.address+" max properties\n if (Object.keys(value).length > "+this.schema.maxProperties+") {\n valid = false\n errors.push({\n keyword: 'maxProperties',\n message: 'too many properties'\n })\n }\n "}},{key:"dependencies",value:function(){var e=this.schema.dependencies,n=this.address,i=this.push();return"object"===(void 0===e?"undefined":r(e))&&Object.keys(e).forEach(function(o){var s=e[o],a=[];if(Array.isArray(s))s.forEach(function(t){a.push("container['"+t+"'] === undefined")}),i+="\n if (container['"+o+"'] !== undefined && ("+a.join(" || ")+")) {\n valid = false\n errors.push({\n keyword: 'dependencies',\n message: 'unmet dependencies'\n })\n }\n ";else if("object"===(void 0===s?"undefined":r(s))){var u=new t(s,{address:n});i+="\n if (container['"+o+"'] !== undefined) {\n "+u.compile()+"\n }\n "}}),i+=this.pop()}},{key:"required",value:function(){return"\n // validate "+this.address+" presence\n if (value === undefined) {\n valid = false\n errors.push({\n keyword: 'required',\n message: 'is required'\n })\n }\n "}},{key:"additionalItems",value:function(){var e=this.schema,n=e.items,i=e.additionalItems,o="";if(!1===i&&Array.isArray(n)&&(o+="\n // don't allow additional items\n if (value.length > "+n.length+") {\n valid = false\n errors.push({\n keyword: 'additionalItems',\n message: 'additional items not allowed'\n })\n }\n "),"object"===(void 0===i?"undefined":r(i))&&null!==i&&Array.isArray(n)){var s=new t(i),a=t.counter;o+="\n // additional items\n "+this.push()+"\n\n for (var i"+a+" = "+n.length+"; i"+a+" <= container.length; i"+a+"++) {\n value = container[i"+a+"]\n "+s.compile()+"\n }\n\n "+this.pop()+"\n "}return o}},{key:"items",value:function(){var e=this.schema.items,n=this.address,i="";if(Array.isArray(e))i+=this.push(),e.forEach(function(e,r){var o=new t(e,{address:n+"["+r+"]"});i+="\n // item #"+r+"\n value = container["+r+"]\n "+o.compile()+"\n "}),i+=this.pop();else if("object"===(void 0===e?"undefined":r(e))&&null!==e){var o=new t(e),s=t.counter;i+="\n // items\n "+this.push()+"\n\n for (var i"+s+" = 0; i"+s+" < container.length; i"+s+"++) {\n // read array element\n value = container[i"+s+"]\n "+o.compile()+"\n }\n\n "+this.pop()+"\n "}return i}},{key:"minItems",value:function(){return"\n // "+this.address+" min items\n if (value.length < "+this.schema.minItems+") {\n valid = false\n errors.push({\n keyword: 'minItems',\n message: 'too few properties'\n })\n }\n "}},{key:"maxItems",value:function(){return"\n // "+this.address+" max items\n if (value.length > "+this.schema.maxItems+") {\n valid = false\n errors.push({\n keyword: 'maxItems',\n message: 'too many properties'\n })\n }\n "}},{key:"uniqueItems",value:function(){var t="";return!0===this.schema.uniqueItems&&(t+="\n // validate "+this.address+" unique items\n let values = value.map(v => JSON.stringify(v)) // TODO: optimize\n let set = new Set(values)\n if (values.length !== set.size) {\n valid = false\n errors.push({\n keyword: 'uniqueItems',\n message: 'items must be unique'\n })\n }\n "),t}},{key:"minLength",value:function(){return"\n // "+this.address+" validate minLength\n if (Array.from(value).length < "+this.schema.minLength+") {\n valid = false\n errors.push({\n keyword: 'minLength',\n message: 'too short'\n })\n }\n "}},{key:"maxLength",value:function(){return"\n // "+this.address+" validate maxLength\n if (Array.from(value).length > "+this.schema.maxLength+") {\n valid = false\n errors.push({\n keyword: 'maxLength',\n message: 'too long'\n })\n }\n "}},{key:"pattern",value:function(){var t=this.schema.pattern;if(t)return"\n // "+this.address+" validate pattern\n if (!value.match(new RegExp('"+t+"'))) {\n valid = false\n errors.push({\n keyword: 'pattern',\n message: 'does not match the required pattern'\n })\n }\n "}},{key:"format",value:function(){var t=this.schema.format,e=this.address,n=o.resolve(t);if(n)return"\n // "+e+" validate format\n if (!value.match("+n+")) {\n valid = false\n errors.push({\n keyword: 'format',\n message: 'is not \""+t+"\" format'\n })\n }\n "}},{key:"minimum",value:function(){var t=this.schema;return"\n // "+this.address+" validate minimum\n if (value "+(!0===t.exclusiveMinimum?"<=":"<")+" "+t.minimum+") {\n valid = false\n errors.push({\n keyword: 'minimum',\n message: 'too small'\n })\n }\n "}},{key:"maximum",value:function(){var t=this.schema;return"\n // "+this.address+" validate maximum\n if (value "+(!0===t.exclusiveMaximum?">=":">")+" "+t.maximum+") {\n valid = false\n errors.push({\n keyword: 'maximum',\n message: 'too large'\n })\n }\n "}},{key:"multipleOf",value:function(){var t=this.schema.multipleOf,e="";if("number"==typeof t){var n=t.toString().length-t.toFixed(0).length-1,r=n>0?Math.pow(10,n):1;e+="\n if ("+(n>0?"(value * "+r+") % "+t*r+" !== 0":"value % "+t+" !== 0")+") {\n valid = false\n errors.push({\n keyword: 'multipleOf',\n message: 'must be a multiple of "+t+"'\n })\n }\n "}return e}}]),t}();t.exports=a},function(t,e,n){"use strict";var r=n(38),i=n(57),o=n(60),s=n(62),a=n(67),u=n(64),l=n(66),c=n(58),h=n(61),f=n(65),p=n(63);t.exports={JWA:r,JWK:i,JWKSet:o,JWT:s,JWS:a,Base64URLSchema:u,JOSEHeaderSchema:l,JWKSchema:c,JWKSetSchema:h,JWTClaimsSetSchema:f,JWTSchema:p}},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(e,t.length-n),t,n,r)}function C(t,e,n){return r.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=t[i+2],128==(192&(o=t[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=t[i+2],a=t[i+3],128==(192&(o=t[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var n="",r=0;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}).apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(r,i),c=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function j(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(21))},function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[1];return 3*(e[0]+n)/4-n},e.toByteArray=function(t){for(var e,n=l(t),r=n[0],s=n[1],a=new o(NaN),u=0,c=s>0?r-4:r,h=0;h>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,l-=8);t[n+p-d]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){let n=e.length,r=n%4;if(!r)return e;let i=n,o=4-r,s=t.alloc(n+o);for(s.write(e);o--;)s.write("=",i++);return s.toString()}}).call(this,n(41).Buffer)},function(t,e,n){"use strict";var r=n(47),i=n(48),o=n(52),s=new(n(53));s.define("HS256","sign",new i({name:"HMAC",hash:{name:"SHA-256"}})),s.define("HS384","sign",new i({name:"HMAC",hash:{name:"SHA-384"}})),s.define("HS512","sign",new i({name:"HMAC",hash:{name:"SHA-512"}})),s.define("RS256","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","sign",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),s.define("none","sign",new r({})),s.define("HS256","verify",new i({name:"HMAC",hash:{name:"SHA-256"}})),s.define("HS384","verify",new i({name:"HMAC",hash:{name:"SHA-384"}})),s.define("HS512","verify",new i({name:"HMAC",hash:{name:"SHA-512"}})),s.define("RS256","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","verify",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),s.define("none","verify",new r({})),s.define("RS256","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}})),s.define("RS384","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}})),s.define("RS512","importKey",new o({name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}})),t.exports=s},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n(r(c.configuration,"RelyingParty provider OpenID Configuration is missing"),r(h.authenticate,"RelyingParty default authentication parameters are missing"),r(f,"RelyingParty client registration is missing"),p=c.configuration.issuer,d=c.configuration.authorization_endpoint,g={client_id:f.client_id},y=Object.assign(h.authenticate,g,n),r(p,"Missing issuer in provider OpenID Configuration"),r(d,"Missing authorization_endpoint in provider OpenID Configuration"),r(y.scope,"Missing scope parameter in authentication request"),r(y.response_type,"Missing response_type parameter in authentication request"),r(y.client_id,"Missing client_id parameter in authentication request"),r(y.redirect_uri,"Missing redirect_uri parameter in authentication request"),y.state=Array.from(o.getRandomValues(new Uint8Array(16))),y.nonce=Array.from(o.getRandomValues(new Uint8Array(16))),Promise.all([o.subtle.digest({name:"SHA-256"},new Uint8Array(y.state)),o.subtle.digest({name:"SHA-256"},new Uint8Array(y.nonce))]))).then(t=>{let n=i(e.from(t[0])),r=i(e.from(t[1]));s[`${p}/requestHistory/${n}`]=JSON.stringify(y),y.state=n,y.nonce=r}).then(()=>l.generateSessionKeys()).then(t=>{l.storeSessionKeys(t,y,s)}).then(()=>{if(c.configuration.request_parameter_supported)return l.encodeRequestParams(y).then(t=>{y=t})}).then(()=>{let t=new u(d);return t.search=a.encode(y),t.href})}static generateSessionKeys(){return o.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(t=>Promise.all([o.subtle.exportKey("jwk",t.publicKey),o.subtle.exportKey("jwk",t.privateKey)])).then(t=>{let[e,n]=t;return{public:e,private:n}})}static storeSessionKeys(t,e,n){n["oidc.session.privateKey"]=JSON.stringify(t.private),e.key=t.public}static encodeRequestParams(t){const e=["scope","client_id","response_type","state"],n=Object.keys(t).filter(t=>!e.includes(t));let r={};return n.forEach(e=>{r[e]=t[e]}),new s({header:{alg:"none"},payload:r},{filter:!1}).encode().then(e=>({scope:t.scope,client_id:t.client_id,response_type:t.response_type,request:e,state:t.state}))}}t.exports=l}).call(this,n(41).Buffer)},function(t,e){t.exports=class{static encode(t){let e=[];return Object.keys(t).forEach(function(n){e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]))}),e.join("&")}static decode(t){let e={};return t.split("&").forEach(function(t){let n=t.split("="),r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]);e[r]=i}),e}}},function(t,e,n){(function(e,r){const{URL:i}=n(27),o=n(22),s=n(49),a=n(39),u=n(6),l=u.Headers?u.Headers:e.Headers,c=n(69),h=n(71),f=n(73),p=n(74),d=n(76);class g{constructor({rp:t,redirect:e,body:n,session:r,mode:i,params:o={}}){this.rp=t,this.redirect=e,this.body=n,this.session=r,this.mode=i,this.params=o}static validateResponse(t){return Promise.resolve(t).then(this.parseResponse).then(this.errorResponse).then(this.matchRequest).then(this.validateStateParam).then(this.validateResponseMode).then(this.validateResponseParams).then(this.exchangeAuthorizationCode).then(this.validateIDToken).then(f.fromAuthResponse)}static parseResponse(t){let{redirect:e,body:n}=t;if(e&&n||!e&&!n)throw new d(400,"Invalid response mode");if(e){let n=new i(e),{search:r,hash:o}=n;if(r&&o||!r&&!o)throw new d(400,"Invalid response mode");r&&(t.params=c.decode(r.substring(1)),t.mode="query"),o&&(t.params=c.decode(o.substring(1)),t.mode="fragment")}return n&&(t.params=c.decode(n),t.mode="form_post"),t}static errorResponse(t){const e=t.params.error;if(e){const n={};n.error=e,n.error_description=t.params.error_description,n.error_uri=t.params.error_uri,n.state=t.params.state;const r=new Error(`AuthenticationResponse error: ${e}`);throw r.info=n,r}return t}static matchRequest(t){let{rp:e,params:n,session:r}=t,i=n.state,o=e.provider.configuration.issuer;if(!i)throw new Error("Missing state parameter in authentication response");let s=r[`${o}/requestHistory/${i}`];if(!s)throw new Error("Mismatching state parameter in authentication response");return t.request=JSON.parse(s),t}static validateStateParam(t){let e=new Uint8Array(t.request.state),n=t.params.state;return s.subtle.digest({name:"SHA-256"},e).then(e=>{if(n!==a(r.from(e)))throw new Error("Mismatching state parameter in authentication response");return t})}static validateResponseMode(t){if("code"!==t.request.response_type&&"query"===t.mode)throw new Error("Invalid response mode");return t}static validateResponseParams(t){let{request:e,params:n}=t,r=e.response_type.split(" ");return r.includes("code")&&o(n.code,"Missing authorization code in authentication response"),r.includes("id_token")&&o(n.id_token,"Missing id_token in authentication response"),r.includes("token")&&(o(n.access_token,"Missing access_token in authentication response"),o(n.token_type,"Missing token_type in authentication response")),t}static exchangeAuthorizationCode(t){let{rp:e,params:n,request:i}=t,s=n.code;if(!s||"code"!==i.response_type)return Promise.resolve(t);let{provider:a,registration:h}=e,f=h.client_id,d=h.client_secret;if(!d)return Promise.reject(new Error("Client cannot exchange authorization code because it is not a confidential client"));let g=a.configuration.token_endpoint,y=new l({"Content-Type":"application/x-www-form-urlencoded"}),m={grant_type:"authorization_code",code:s,redirect_uri:i.redirect_uri},v=h.token_endpoint_auth_method||"client_secret_basic";if("client_secret_basic"===v){let t=new r(`${f}:${d}`).toString("base64");y.set("Authorization",`Basic ${t}`)}"client_secret_post"===v&&(m.client_id=f,m.client_secret=d);let b=c.encode(m);return u(g,{method:"POST",headers:y,body:b}).then(p("Error exchanging authorization code")).then(t=>t.json()).then(e=>(o(e.access_token,"Missing access_token in token response"),o(e.token_type,"Missing token_type in token response"),o(e.id_token,"Missing id_token in token response"),t.params=Object.assign(t.params,e),t))}static validateIDToken(t){return t.params.id_token?Promise.resolve(t).then(g.decryptIDToken).then(g.decodeIDToken).then(g.validateIssuer).then(g.validateAudience).then(g.resolveKeys).then(g.verifySignature).then(g.validateExpires).then(g.verifyNonce).then(g.validateAcr).then(g.validateAuthTime).then(g.validateAccessTokenHash).then(g.validateAuthorizationCodeHash):Promise.resolve(t)}static decryptIDToken(t){return Promise.resolve(t)}static decodeIDToken(t){let e=t.params.id_token;try{t.decoded=h.decode(e)}catch(t){const n=new d(400,"Error decoding ID Token");throw n.cause=t,n.info={id_token:e},n}return t}static validateIssuer(t){if(t.decoded.payload.iss!==t.rp.provider.configuration.issuer)throw new Error("Mismatching issuer in ID Token");return t}static validateAudience(t){let e=t.rp.registration,{aud:n,azp:r}=t.decoded.payload;if("string"==typeof n&&n!==e.client_id)throw new Error("Mismatching audience in id_token");if(Array.isArray(n)&&!n.includes(e.client_id))throw new Error("Mismatching audience in id_token");if(Array.isArray(n)&&!r)throw new Error("Missing azp claim in id_token");if(r&&r!==e.client_id)throw new Error("Mismatching azp claim in id_token");return t}static resolveKeys(t){let e=t.rp,n=t.decoded;return Promise.resolve(e.provider.jwks).then(t=>t||e.jwks()).then(e=>{if(n.resolveKeys(e))return Promise.resolve(t);throw new Error("Cannot resolve signing key for ID Token")})}static verifySignature(t){let e=t.rp.registration.id_token_signed_response_alg||"RS256";if(t.decoded.header.alg!==e)throw new Error(`Expected ID Token to be signed with ${e}`);return t.decoded.verify().then(e=>{if(!e)throw new Error("Invalid ID Token signature");return t})}static validateExpires(t){if(t.decoded.payload.exp<=Math.floor(Date.now()/1e3))throw new Error("Expired ID Token");return t}static verifyNonce(t){let e=new Uint8Array(t.request.nonce),n=t.decoded.payload.nonce;if(!n)throw new Error("Missing nonce in ID Token");return s.subtle.digest({name:"SHA-256"},e).then(e=>{if(n!==a(r.from(e)))throw new Error("Mismatching nonce in ID Token");return t})}static validateAcr(t){return t}static validateAuthTime(t){return t}static validateAccessTokenHash(t){return t}static validateAuthorizationCodeHash(t){return t}}t.exports=g}).call(this,n(21),n(41).Buffer)},function(t,e,n){const{JWT:r}=n(37),i=n(72);t.exports=class extends r{static get schema(){return i}}},function(t,e,n){const{JWTSchema:r}=n(37),i=r.extend({properties:{header:{},payload:{properties:{iss:{type:"string",format:"url"},sub:{type:"string",maxLength:255},auth_time:{type:"integer",format:"NumericDate"},nonce:{type:"string"},acr:{type:"string"},amr:{type:"array",items:{type:"string"}},azp:{type:"string",format:"StringOrURI"}},required:["iss","sub","aud","exp","iat"]}}});t.exports=i},function(t,e,n){"use strict";const r=n(6),i=n(74),o=n(75);class s{constructor(t){this.credentialType=t.credentialType||"access_token",this.issuer=t.issuer,this.authorization=t.authorization||{},this.sessionKey=t.sessionKey,this.idClaims=t.idClaims,this.accessClaims=t.accessClaims}static from(t){return new s(t)}static fromAuthResponse(t){const e=n(20);let r=t.decoded&&t.decoded.payload||{},{rp:i}=t;return s.from({credentialType:(i.defaults.authenticate||{}).credential_type||i.defaults.popToken?"pop_token":"access_token",sessionKey:t.session[e.SESSION_PRIVATE_KEY],issuer:r.iss,idClaims:r,authorization:{client_id:i.registration.client_id,access_token:t.params.access_token,id_token:t.params.id_token,refresh_token:t.params.refresh_token}})}get fetch(){return(t,e)=>Promise.resolve().then(()=>this.hasCredentials()?this.fetchWithCredentials(t,e):r(t,e)).then(i("Error while fetching resource"))}bearerTokenFor(t){switch(this.credentialType){case"pop_token":return o.issueFor(t,this);default:return Promise.resolve(this.authorization[this.credentialType])}}hasCredentials(){switch(this.credentialType){case"pop_token":return!!this.authorization.id_token;default:return!!this.authorization[this.credentialType]}}fetchWithCredentials(t,e={}){return e.headers=e.headers||{},this.bearerTokenFor(t).then(n=>(e.headers.authorization=`Bearer ${n}`,r(t,e)))}}t.exports=s},function(t,e,n){"use strict";t.exports=function(t="fetch error"){return e=>{if(e.status>=200&&e.status<300)return e;let n=new Error(`${t}: ${e.status} ${e.statusText}`);throw n.response=e,n.statusCode=e.status,n}}},function(t,e,n){"use strict";const{URL:r}=n(27),{JWT:i,JWK:o}=n(37),s=3600;class a extends i{static issueFor(t,e){if(!t)throw new Error("Cannot issue PoPToken - missing resource server URI");if(!e.sessionKey)throw new Error("Cannot issue PoPToken - missing session key");if(!e.authorization.id_token)throw new Error("Cannot issue PoPToken - missing id token");let n=JSON.parse(e.sessionKey);return o.importKey(n).then(n=>{let i={aud:new r(t).origin,key:n,iss:e.authorization.client_id,id_token:e.authorization.id_token};return a.issue(i)}).then(t=>t.encode())}static issue(t){let{aud:e,iss:n,key:r}=t,i=r.alg,o=t.iat||Math.floor(Date.now()/1e3);return new a({header:{alg:i},payload:{iss:n,aud:e,exp:o+(t.max||s),iat:o,id_token:t.id_token,token_type:"pop"},key:r.cryptoKey},{filter:!1})}}t.exports=a},function(t,e,n){e=t.exports=s;var r=n(77),i=n(78),o=e;function s(t,e,n){if("string"==typeof t&&(t=o[t]),"number"!=typeof t)throw new TypeError("Non-numeric HTTP code");"object"==typeof e&&null!=e&&(n=e,e=null),r.call(this,e||i[t],n),this.code=t}for(var a in(s.prototype=Object.create(r.prototype,{constructor:{value:s,configurable:!0,writable:!0}})).name="HttpError",Object.defineProperties(s.prototype,{statusCode:u("code"),statusMessage:u("message"),status:{configurable:!0,get:function(){return this.code},set:function(t){Object.defineProperty(this,"status",{value:t,configurable:!0,enumerable:!0,writable:!0})}}}),s.prototype.toString=function(){return this.name+": "+this.code+" "+this.message},i)e[i[a].replace("'","").replace(/[- ]/g,"_").toUpperCase()]=+a;function u(t){return{configurable:!0,get:function(){return this[t]},set:function(e){return this[t]=e}}}},function(t,e){var n=Object.hasOwnProperty,r=Object.getPrototypeOf,i=Error.captureStackTrace;function o(t,e){if(t&&"object"==typeof t?(e=t,t=void 0):this.message=t,e)for(var o in e)this[o]=e[o];n.call(this,"name")||(this.name=n.call(r(this),"name")?this.name:this.constructor.name),!i||"stack"in this||i(this,this.constructor)}t.exports=o,(o.prototype=Object.create(Error.prototype,{constructor:{value:o,configurable:!0,writable:!0}})).name="StandardError"},function(t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,n){const{JSONSchema:r}=n(28),i=new r({type:"object",properties:{provider:{type:"object",properties:{name:{type:"string"},url:{type:"string",format:"uri"},configuration:{},jwks:{}},required:["url"]},defaults:{type:"object",properties:{popToken:{type:"boolean",default:!1},authenticate:{type:"object",properties:{redirect_uri:{type:"string",format:"uri"},response_type:{type:"string",default:"id_token token",enum:["code","token","id_token token","id_token token code"]},display:{type:"string",default:"page",enum:["page","popup"]},scope:{type:["string","array"],default:["openid"]}}},register:{}}},registration:{},store:{type:"object",default:{}}}});t.exports=i},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n{const u=new r.Server(e,Object(i.originOf)(n.popupUri||""),a(t,n,t=>{u.stop(),o(t)}));u.start()})}function a(t,{popupUri:e,callbackUri:n},r){return async(i,...o)=>{switch(i){case"getAppOrigin":return window.location.origin;case"storage/getItem":return t.getItem(...o);case"storage/setItem":return t.setItem(...o);case"storage/removeItem":return t.removeItem(...o);case"getLoginOptions":return{popupUri:e,callbackUri:n};case"foundSession":r(...o)}}}}]).default},function(t,e,n){(function(e){var n=String.fromCharCode,r="function"==typeof e?e:function(t){setTimeout(t,0)},i=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\[uU]|\\(.)/g,o={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},s=/[\x00-\x20<>\\"\{\}\|\^\`]/;function a(t){if(!(this instanceof a))return new a(t);if(t&&t.lineMode){this._tripleQuotedString=this._number=this._boolean=/$0^/;var e=this;this._tokenize=this.tokenize,this.tokenize=function(t,n){this._tokenize(t,function(t,r){!t&&/^(?:IRI|prefixed|literal|langcode|type|\.|eof)$/.test(r.type)?n&&n(t,r):n&&n(t||e._syntaxError(r.type,n=null))})}}}a.prototype={_iri:/^<((?:[^>\\]|\\[uU])+)>/,_unescapedIri:/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>/,_unescapedString:/^"[^"\\]+"(?=[^"\\])/,_singleQuotedString:/^"[^"\\]*(?:\\.[^"\\]*)*"(?=[^"\\])|^'[^'\\]*(?:\\.[^'\\]*)*'(?=[^'\\])/,_tripleQuotedString:/^""("[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*")""|^''('[^'\\]*(?:(?:\\.|'(?!''))[^'\\]*)*')''/,_langcode:/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,_prefix:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,_prefixed:/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?=\.?[,;\s#()\[\]\{\}"'<])/,_blank:/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=\.?[,;:\s#()\[\]\{\}"'<])/,_number:/^[\-+]?(?:\d+\.?\d*([eE](?:[\-\+])?\d+)|\d*\.?\d+)(?=[.,;:\s#()\[\]\{\}"'<])/,_boolean:/^(?:true|false)(?=[.,;:\s#()\[\]\{\}"'<])/,_keyword:/^@[a-z]+(?=[\s#<:])/,_sparqlKeyword:/^(?:PREFIX|BASE|GRAPH)(?=[\s#<:])/i,_shortPredicates:/^a(?=\s+|<)/,_newline:/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,_whitespace:/^[ \t]+/,_endOfFile:/^(?:#[^\n\r]*)?$/,_tokenizeToEnd:function(t,e){for(var n=this._input;;){for(var r;r=this._newline.exec(n);)n=n.substr(r[0].length,n.length),this._line++;if((r=this._whitespace.exec(n))&&(n=n.substr(r[0].length,n.length)),this._endOfFile.test(n))return e&&t(n=null,{line:this._line,type:"eof",value:"",prefix:""}),this._input=n;var i,o=this._line,a="",u="",l="",c=n[0],h=null,f=0,p=!1;switch(c){case"^":if(1===n.length)break;if("^"!==n[1])return d(this);if(this._prevTokenType="^","<"!==(n=n.substr(2))[0]){p=!0;break}case"<":if(h=this._unescapedIri.exec(n))a="IRI",u=h[1];else if(h=this._iri.exec(n)){if(null===(i=this._unescape(h[1]))||s.test(i))return d(this);a="IRI",u=i}break;case"_":((h=this._blank.exec(n))||e&&(h=this._blank.exec(n+" ")))&&(a="prefixed",l="_",u=h[1]);break;case'"':case"'":if(h=this._unescapedString.exec(n))a="literal",u=h[0];else if(h=this._singleQuotedString.exec(n)){if(null===(i=this._unescape(h[0])))return d(this);a="literal",u=i.replace(/^'|'$/g,'"')}else if(h=this._tripleQuotedString.exec(n)){if(this._line+=(i=h[1]||h[2]).split(/\r\n|\r|\n/).length-1,null===(i=this._unescape(i)))return d(this);a="literal",u=i.replace(/^'|'$/g,'"')}break;case"@":"literal"===this._prevTokenType&&(h=this._langcode.exec(n))?(a="langcode",u=h[1]):(h=this._keyword.exec(n))&&(a=h[0]);break;case".":if(1===n.length?e:n[1]<"0"||n[1]>"9"){a=".",f=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(h=this._number.exec(n))&&(a="literal",u='"'+h[0]+'"^^http://www.w3.org/2001/XMLSchema#'+(h[1]?"double":/^[+\-]?\d+$/.test(h[0])?"integer":"decimal"));break;case"B":case"b":case"p":case"P":case"G":case"g":(h=this._sparqlKeyword.exec(n))?a=h[0].toUpperCase():p=!0;break;case"f":case"t":(h=this._boolean.exec(n))?(a="literal",u='"'+h[0]+'"^^http://www.w3.org/2001/XMLSchema#boolean'):p=!0;break;case"a":(h=this._shortPredicates.exec(n))?(a="abbreviation",u="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"):p=!0;break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":f=1,a=c;break;default:p=!0}if(p&&("@prefix"!==this._prevTokenType&&"PREFIX"!==this._prevTokenType||!(h=this._prefix.exec(n))?((h=this._prefixed.exec(n))||e&&(h=this._prefixed.exec(n+" ")))&&(a="prefixed",l=h[1]||"",u=this._unescape(h[2])):(a="prefix",u=h[1]||"")),"^"===this._prevTokenType&&(a="IRI"===a||"prefixed"===a?"type":""),!a)return e||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?d(this):this._input=n;t(null,{line:o,type:a,value:u,prefix:l}),this._prevTokenType=a,n=n.substr(f||h[0].length,n.length)}function d(e){t(e._syntaxError(/^\S*/.exec(n)[0]))}},_unescape:function(t){try{return t.replace(i,function(t,e,r,i){var s;if(e){if(s=parseInt(e,16),isNaN(s))throw new Error;return n(s)}if(r){if(s=parseInt(r,16),isNaN(s))throw new Error;return s<=65535?n(s):n(55296+(s-=65536)/1024,56320+(1023&s))}var a=o[i];if(!a)throw new Error;return a})}catch(t){return null}},_syntaxError:function(t){return this._input=null,new Error('Syntax error: unexpected "'+t+'" on line '+this._line+".")},tokenize:function(t,e){var n=this;function i(t){null!==n._input&&(n._input+=t,n._tokenizeToEnd(e,!1))}function o(){null!==n._input&&n._tokenizeToEnd(e,!0)}this._line=1,"string"==typeof t?(this._input=t,r(function(){n._tokenizeToEnd(e,!0)})):(this._input="",t&&"function"!=typeof t?("function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",i),t.on("end",o)):(this.addChunk=i,this.end=o,e||(e=t)))}},t.exports=a}).call(this,n(16).setImmediate)},function(t,e,n){var r=n(29),i="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o=i+"nil",s=i+"first",a=/^[a-z][a-z0-9+.-]*:/i,u=/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i,l=/(?:^|\/)\.\.?(?:$|[\/#?])/,c=0,h=0;function f(t){if(!(this instanceof f))return new f(t);this._tripleStack=[],this._graph=null,this._setBase((t=t||{}).documentIRI);var e="string"==typeof t.format&&t.format.match(/\w*$/)[0].toLowerCase(),n="turtle"===e,i="trig"===e,o=/triple/.test(e),s=/quad/.test(e),a=o||s;(this._supportsNamedGraphs=!n)||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||i||o),a&&(this._base="",this._resolveIRI=function(t){return this._error("Disallowed relative IRI",t),this._callback=p,this._subject=null}),this._blankNodePrefix="string"!=typeof t.blankNodePrefix?"":"_:"+t.blankNodePrefix.replace(/^_:/,""),this._lexer=t.lexer||new r({lineMode:a})}function p(){}f._resetBlankNodeIds=function(){c=h=0},f.prototype={_setBase:function(t){if(t){if(t.indexOf("#")>=0)throw new Error("Invalid base IRI "+t)}else t=null;(this._base=t)&&(this._basePath=t.replace(/[^\/?]*(?:\?.*)?$/,""),t=t.match(u),this._baseRoot=t[0],this._baseScheme=t[1])},_readInTopContext:function(t){switch(t.type){case"eof":return null!==this._graph?this._error("Unclosed graph",t):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"@prefix":return this._sparqlStyle=!1,this._readPrefix;case"PREFIX":return this._sparqlStyle=!0,this._readPrefix;case"@base":return this._sparqlStyle=!1,this._readBaseIRI;case"BASE":return this._sparqlStyle=!0,this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(t)}},_readSubject:function(t){switch(this._predicate=null,t.type){case"IRI":this._subject=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var e=this._prefixes[t.prefix];if(void 0===e)return this._error('Undefined prefix "'+t.prefix+':"',t);this._subject=e+t.value;break;case"[":return this._subject="_:b"+h++,this._tripleStack.push({subject:this._subject,predicate:null,object:null,type:"blank"}),this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:o,predicate:null,object:null,type:"list"}),this._subject=null,this._readListItem;case"}":return this._readPunctuation(t);default:return this._error("Expected subject but got "+t.type,t)}return this._readPredicateOrNamedGraph},_readPredicate:function(t){var e=t.type;switch(e){case"IRI":case"abbreviation":this._predicate=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":if("_"===t.prefix)return this._error("Disallowed blank node as predicate",t);var n=this._prefixes[t.prefix];if(void 0===n)return this._error('Undefined prefix "'+t.prefix+':"',t);this._predicate=n+t.value;break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+e,t):(this._subject=null,"]"===e?this._readBlankNodeTail(t):this._readPunctuation(t));case";":return this._readPredicate;default:return this._error('Expected predicate to follow "'+this._subject+'"',t)}return this._readObject},_readObject:function(t){switch(t.type){case"IRI":this._object=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var e=this._prefixes[t.prefix];if(void 0===e)return this._error('Undefined prefix "'+t.prefix+':"',t);this._object=e+t.value;break;case"literal":return this._object=t.value,this._readDataTypeOrLang;case"[":var n="_:b"+h++;return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:n,type:"blank"}),this._subject=n,this._readBlankNodeHead;case"(":return this._tripleStack.push({subject:this._subject,predicate:this._predicate,object:o,type:"list"}),this._subject=null,this._readListItem;default:return this._error('Expected object to follow "'+this._predicate+'"',t)}return this._getTripleEndReader()},_readPredicateOrNamedGraph:function(t){return"{"===t.type?this._readGraph(t):this._readPredicate(t)},_readGraph:function(t){return"{"!==t.type?this._error("Expected graph but got "+t.type,t):(this._graph=this._subject,this._subject=null,this._readSubject)},_readBlankNodeHead:function(t){return"]"===t.type?(this._subject=null,this._readBlankNodeTail(t)):(this._predicate=null,this._readPredicate(t))},_readBlankNodeTail:function(t){if("]"!==t.type)return this._readBlankNodePunctuation(t);null!==this._subject&&this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""});var e=this._tripleStack.pop();return this._subject=e.subject,null!==e.object?(this._predicate=e.predicate,this._object=e.object,this._getTripleEndReader()):null!==this._predicate?this._readPredicate:this._readPredicateOrNamedGraph},_readDataTypeOrLang:function(t){switch(t.type){case"type":var e;if(""===t.prefix)e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);else{var n=this._prefixes[t.prefix];if(void 0===n)return this._error('Undefined prefix "'+t.prefix+':"',t);e=n+t.value}return this._object+="^^"+e,this._getTripleEndReader();case"langcode":return this._object+="@"+t.value.toLowerCase(),this._getTripleEndReader();default:return this._getTripleEndReader().call(this,t)}},_readListItem:function(t){var e=null,n=null,r=this._subject,i=this._tripleStack,u=i[i.length-1],l=this._readListItem;switch(t.type){case"IRI":e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t);break;case"prefixed":var c=this._prefixes[t.prefix];if(void 0===c)return this._error('Undefined prefix "'+t.prefix+':"',t);e=c+t.value;break;case"literal":e=t.value,l=this._readDataTypeOrLang;break;case"[":n="_:b"+h++,e="_:b"+h++,i.push({subject:n,predicate:s,object:e,type:"blank"}),this._subject=e,l=this._readBlankNodeHead;break;case"(":n="_:b"+h++,i.push({subject:n,predicate:s,object:o,type:"list"}),this._subject=null,l=this._readListItem;break;case")":if(i.pop(),0!==i.length&&"list"===i[i.length-1].type&&this._callback(null,{subject:u.subject,predicate:u.predicate,object:u.object,graph:this._graph||""}),this._subject=u.subject,null===u.predicate){if(l=this._readPredicate,u.subject===o)return l}else if(this._predicate=u.predicate,this._object=u.object,l=this._getTripleEndReader(),u.object===o)return l;n=o;break;default:return this._error('Expected list item instead of "'+t.type+'"',t)}return null===n&&(this._subject=n="_:b"+h++),null===r?u.object===o?u.object=n:u.subject=n:this._callback(null,{subject:r,predicate:"http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",object:n,graph:this._graph||""}),null!==e&&this._callback(null,{subject:n,predicate:s,object:e,graph:this._graph||""}),l},_readPunctuation:function(t){var e,n=this._subject,r=this._graph;switch(t.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",t);this._graph=null;case".":this._subject=null,e=this._readInTopContext;break;case";":e=this._readPredicate;break;case",":e=this._readObject;break;case"IRI":if(this._supportsQuads&&null===this._graph){r=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t),n=this._subject,e=this._readQuadPunctuation;break}case"prefixed":if(this._supportsQuads&&null===this._graph){var i=this._prefixes[t.prefix];if(void 0===i)return this._error('Undefined prefix "'+t.prefix+':"',t);r=i+t.value,e=this._readQuadPunctuation;break}default:return this._error('Expected punctuation to follow "'+this._object+'"',t)}return null!==n&&this._callback(null,{subject:n,predicate:this._predicate,object:this._object,graph:r||""}),e},_readBlankNodePunctuation:function(t){var e;switch(t.type){case";":e=this._readPredicate;break;case",":e=this._readObject;break;default:return this._error('Expected punctuation to follow "'+this._object+'"',t)}return this._callback(null,{subject:this._subject,predicate:this._predicate,object:this._object,graph:this._graph||""}),e},_readQuadPunctuation:function(t){return"."!==t.type?this._error("Expected dot to follow quad",t):this._readInTopContext},_readPrefix:function(t){return"prefix"!==t.type?this._error("Expected prefix to follow @prefix",t):(this._prefix=t.value,this._readPrefixIRI)},_readPrefixIRI:function(t){return"IRI"!==t.type?this._error('Expected IRI to follow prefix "'+this._prefix+':"',t):(e=null===this._base||a.test(t.value)?t.value:this._resolveIRI(t),this._prefixes[this._prefix]=e,this._prefixCallback(this._prefix,e),this._readDeclarationPunctuation);var e},_readBaseIRI:function(t){if("IRI"!==t.type)return this._error("Expected IRI to follow base declaration",t);try{this._setBase(null===this._base||a.test(t.value)?t.value:this._resolveIRI(t))}catch(e){this._error(e.message,t)}return this._readDeclarationPunctuation},_readNamedGraphLabel:function(t){switch(t.type){case"IRI":case"prefixed":return this._readSubject(t),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",t)}},_readNamedGraphBlankLabel:function(t){return"]"!==t.type?this._error("Invalid graph label",t):(this._subject="_:b"+h++,this._readGraph)},_readDeclarationPunctuation:function(t){return this._sparqlStyle?this._readInTopContext(t):"."!==t.type?this._error("Expected declaration to end with a dot",t):this._readInTopContext},_getTripleEndReader:function(){var t=this._tripleStack;if(0===t.length)return this._readPunctuation;switch(t[t.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem}},_error:function(t,e){this._callback(new Error(t+" at line "+e.line+"."))},_resolveIRI:function(t){var e=t.value;switch(e[0]){case void 0:return this._base;case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return this._removeDotSegments(this._basePath+e)}},_removeDotSegments:function(t){if(!l.test(t))return t;for(var e="",n=t.length,r=-1,i=-1,o=0,s="/";r=i&&(e=e.substr(0,o)),"/"!==s)return e+"/"+t.substr(r+1);o=r+1}}}s=t[++r]}return e+t.substring(o)},parse:function(t,e,n){this._readCallback=this._readInTopContext,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix||"_:b"+c+++"_","function"==typeof t&&(n=e,e=t,t=null),this._callback=e||p,this._prefixCallback=n||p;var r=this;this._lexer.tokenize(t,function(t,e){null!==t?(r._callback(t),r._callback=p):void 0!==r._readCallback&&(r._readCallback=r._readCallback(e))}),t||(this.addChunk=this._lexer.addChunk,this.end=this._lexer.end)}},t.exports=f},function(t,e){var n={isIRI:function(t){if(!t)return t;var e=t[0];return'"'!==e&&"_"!==e},isLiteral:function(t){return t&&'"'===t[0]},isBlank:function(t){return t&&"_:"===t.substr(0,2)},getLiteralValue:function(t){var e=/^"([^]*)"/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]},getLiteralType:function(t){var e=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")},getLiteralLanguage:function(t){var e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]?e[1].toLowerCase():""},isPrefixedName:function(t){return t&&/^[^:\/"']*:[^:\/"']+$/.test(t)},expandPrefixedName:function(t,e){var n,r,i,o=/(?:^|"\^\^)([^:\/#"'\^_]*):[^\/]*$/.exec(t);return o&&(r=e[n=o[1]],i=o.index),void 0===r?t:0===i?r+t.substr(n.length+1):t.substr(0,i+3)+r+t.substr(i+n.length+4)},createIRI:function(t){return t&&'"'===t[0]?n.getLiteralValue(t):t},createLiteral:function(t,e){if(!e)switch(typeof t){case"boolean":e="http://www.w3.org/2001/XMLSchema#boolean";break;case"number":if(isFinite(t)){e=t%1==0?"http://www.w3.org/2001/XMLSchema#integer":"http://www.w3.org/2001/XMLSchema#decimal";break}default:return'"'+t+'"'}return'"'+t+(/^[a-z]+(-[a-z0-9]+)*$/i.test(e)?'"@'+e.toLowerCase():'"^^'+e)}};function r(t,e){for(var r in n)e?t.prototype[r]=i(n[r]):t[r]=n[r];return t}function i(t){return function(e){return t(this,e)}}t.exports=r(r)},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,s,a,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(n=this._events[t]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),s=(l=n.slice()).length,u=0;u0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},n.prototype.removeListener=function(t,e){var n,o,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){(e=t.exports=n(49)).Stream=e,e.Readable=e,e.Writable=n(34),e.Duplex=n(12),e.Transform=n(55),e.PassThrough=n(76)},function(t,e,n){"use strict";(function(e,r,i){var o=n(21);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(void 0),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;v.WritableState=m;var l=n(17);l.inherits=n(11);var c,h={deprecate:n(75)},f=n(51),p=n(22).Buffer,d=i.Uint8Array||function(){},g=n(53);function y(){}function m(t,e){a=a||n(12);var r=e instanceof a;this.objectMode=!!(t=t||{}).objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,l=t.writableHighWaterMark;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===t.decodeStrings),this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(C,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),C(t,e))}(t,n,r,e,i);else{var s=x(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,s,i):w(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||n(12),!(c.call(v,this)||this instanceof a))return new v(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function b(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),C(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=new Array(e.bufferedRequestCount),i=e.corkedRequestsFree;i.entry=n;for(var o=0,a=!0;n;)r[o]=n,n.isBuf||(a=!1),n=n.next,o+=1;r.allBuffers=a,b(t,e,!0,e.length,r,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk;if(b(t,e,!1,e.objectMode?1:u.length,u,n.encoding,n.callback),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),C(t,e)})}function C(t,e){var n=x(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(v,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===v&&t&&t._writableState instanceof m}})):c=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,s=!1,a=!i.objectMode&&(p.isBuffer(r=t)||r instanceof d);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}(this,i,t,n))&&(i.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,i)),e}(e,r);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,C(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(8),n(16).setImmediate,n(6))},function(t,e){var n=/^"([^]*)"(?:\^\^(.+)|@([\-a-z]+))?$/i,r=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,i=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,o={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};function s(t,e){if(!(this instanceof s))return new s(t,e);if(t&&"function"!=typeof t.write&&(e=t,t=null),e=e||{},t)this._outputStream=t,this._endStream=void 0===e.end||!!e.end;else{var n="";this._outputStream={write:function(t,e,r){n+=t,r&&r()},end:function(t){t&&t(null,n)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(e.format)?this._writeTriple=this._writeTripleLine:(this._graph="",this._prefixIRIs=Object.create(null),e.prefixes&&this.addPrefixes(e.prefixes))}function a(t){var e=o[t];return void 0===e&&(1===t.length?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}s.prototype={_write:function(t,e){this._outputStream.write(t,"utf8",e)},_writeTriple:function(t,e,n,r,i){try{this._graph!==r&&(this._write((null===this._subject?"":this._graph?"\n}\n":".\n")+(r?this._encodeIriOrBlankNode(r)+" {\n":"")),this._subject=null,this._graph="["!==r[0]?r:"]"),this._write(this._subject===t?this._predicate===e?", "+this._encodeObject(n):";\n "+this._encodePredicate(this._predicate=e)+" "+this._encodeObject(n):(null===this._subject?"":".\n")+this._encodeSubject(this._subject=t)+" "+this._encodePredicate(this._predicate=e)+" "+this._encodeObject(n),i)}catch(t){i&&i(t)}},_writeTripleLine:function(t,e,n,r,i){delete this._prefixMatch;try{this._write(this._encodeIriOrBlankNode(t)+" "+this._encodeIriOrBlankNode(e)+" "+this._encodeObject(n)+(r?" "+this._encodeIriOrBlankNode(r)+".\n":".\n"),i)}catch(t){i&&i(t)}},_encodeIriOrBlankNode:function(t){var e=t[0];if("["===e||"("===e||"_"===e&&":"===t[1])return t;r.test(t)&&(t=t.replace(i,a));var n=this._prefixRegex.exec(t);return n?n[1]?this._prefixIRIs[n[1]]+n[2]:t:"<"+t+">"},_encodeLiteral:function(t,e,n){return r.test(t)&&(t=t.replace(i,a)),n?'"'+t+'"@'+n:e?'"'+t+'"^^'+this._encodeIriOrBlankNode(e):'"'+t+'"'},_encodeSubject:function(t){if('"'===t[0])throw new Error("A literal as subject is not allowed: "+t);return"["===t[0]&&(this._subject="]"),this._encodeIriOrBlankNode(t)},_encodePredicate:function(t){if('"'===t[0])throw new Error("A literal as predicate is not allowed: "+t);return"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===t?"a":this._encodeIriOrBlankNode(t)},_encodeObject:function(t){if('"'!==t[0])return this._encodeIriOrBlankNode(t);var e=n.exec(t);if(!e)throw new Error("Invalid literal: "+t);return this._encodeLiteral(e[1],e[2],e[3])},_blockedWrite:function(){throw new Error("Cannot write because the writer has been closed.")},addTriple:function(t,e,n,r,i){void 0===n?this._writeTriple(t.subject,t.predicate,t.object,t.graph||"",e):"string"!=typeof r?this._writeTriple(t,e,n,"",r):this._writeTriple(t,e,n,r,i)},addTriples:function(t){for(var e=0;e.\n"))}if(r){var s="",a="";for(var u in n)s+=s?"|"+u:u,a+=(a?"|":"")+n[u];s=s.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&"),this._prefixRegex=new RegExp("^(?:"+a+")[^/]*$|^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$")}this._write(r?"\n":"",e)},blank:function(t,e){var n,r,i=t;switch(void 0===t?i=[]:"string"==typeof t?i=[{predicate:t,object:e}]:"length"in t||(i=[t]),r=i.length){case 0:return"[]";case 1:if("["!==(n=i[0]).object[0])return"[ "+this._encodePredicate(n.predicate)+" "+this._encodeObject(n.object)+" ]";default:for(var o="[",s=0;s0&&s.add(n.resource,E.dc("title"),s.literal(a[0].textContent),n.resource);for(var u=this.dom.getElementsByTagName("link"),l=u.length-1;l>=0;l--)o=!1,(i=u[l].getAttribute("rel"))||(i=u[l].getAttribute("rev"),o=!0),i&&t.linkData(n.original,i,u[l].getAttribute("href"),n.resource,o);for(var c=this.dom.getElementsByTagName("script"),h=0;h]+\?>/))return t.addStatus(n.req,"Has an XML declaration. We'll assume it's XHTML as the content-type was text/html.\n"),new O(this.response).parse(t,e,n,r);if(e.match(/.*/))return t.addStatus(n.req,"Has XHTML DOCTYPE. Switching to XHTMLHandler.\n"),new O(this.response).parse(t,e,n,r);if(e.match(/[^(/))return t.addStatus(n.req,"Has default namespace for XHTML, so switching to XHTMLHandler.\n"),new O(this.response).parse(t,e,n,r);var o=new RegExp("([\\s\\S]+?)","im").exec(e);return o&&i.add(n.resource,E.dc("title"),i.literal(o[1]),n.resource),i.add(n.resource,E.rdf("type"),E.link("WebPage"),t.appNode),t.addStatus(n.req,"non-XML HTML document, not parsed for data."),t.doneFetch(n,this.response)}}],[{key:"toString",value:function(){return"HTMLHandler"}},{key:"register",value:function(t){t.mediatypes["text/html"]={q:.9}}}]),e}();P.pattern=new RegExp("text/html");var A=function(t){function e(){return l(this,e),s(this,a(e).apply(this,arguments))}return u(e,k),o(e,[{key:"parse",value:function(t,e,n,r){return e.match(/\s*<\?xml\s+version\s*=[^<>]+\?>/)?(t.addStatus(n.req,"Warning: "+n.resource+" has an XML declaration. We'll assume it's XML but its content-type wasn't XML.\n"),new I(this.response).parse(t,e,n,r)):e.slice(0,500).match(/xmlns:/)?(t.addStatus(n.req,"May have an XML namespace. We'll assume it's XML but its content-type wasn't XML.\n"),new I(this.response).parse(t,e,n,r)):(t.addStatus(n.req,"Plain text document, no known RDF semantics."),t.doneFetch(n,this.response))}}],[{key:"toString",value:function(){return"TextHandler"}},{key:"register",value:function(t){t.mediatypes["text/plain"]={q:.5}}}]),e}();A.pattern=new RegExp("text/plain");var R=function(t){function e(){return l(this,e),s(this,a(e).apply(this,arguments))}return u(e,k),o(e,[{key:"parse",value:function(t,e,n,r){var i=t.store,o=f(i,i,n.original.uri,n.original.uri,null,null,"",null);try{o.loadBuf(e)}catch(e){return t.failFetch(n,"Error trying to parse "+n.resource+" as Notation3:\n"+e,"parse_error",r)}return t.addStatus(n.req,"N3 parsed: "+o.statementCount+" triples in "+o.lines+" lines."),t.store.add(n.original,E.rdf("type"),E.link("RDFDocument"),t.appNode),t.doneFetch(n,this.response)}}],[{key:"toString",value:function(){return"N3Handler"}},{key:"register",value:function(t){t.mediatypes["text/n3"]={q:"1.0"},t.mediatypes["text/turtle"]={q:1}}}]),e}();R.pattern=new RegExp("(application|text)/(x-)?(rdf\\+)?(n3|turtle)");var N={RDFXMLHandler:T,XHTMLHandler:O,XMLHandler:I,HTMLHandler:P,TextHandler:A,N3Handler:R},j=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(l(this,t),this.store=e||new c,this.timeout=r.timeout||3e4,this._fetch=r.fetch||x,!this._fetch)throw new Error("No _fetch function availble for Fetcher");this.appNode=this.store.bnode(),this.store.fetcher=this,this.requested={},this.timeouts={},this.redirectedTo={},this.fetchQueue={},this.fetchCallbacks={},this.nonexistent={},this.lookedUp={},this.handlers=[],this.mediatypes={"image/*":{q:.9},"*/*":{q:.1}},b.callbackify(this,["request","fail","refresh","retract","done"]),Object.keys(N).map(function(t){return n.addHandler(N[t])})}return o(t,[{key:"load",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t instanceof Array)return Promise.all(t.map(function(t){return e.load(t,Object.assign({},n))}));var r=t.uri||t;return r=r.split("#")[0],n=this.initFetchOptions(r,n),this.pendingFetchPromise(r,n.baseURI,n)}},{key:"pendingFetchPromise",value:function(t,e,n){var r,i=this;return!n.force&&this.fetchQueue[e]?r=this.fetchQueue[e]:(r=Promise.race([this.setRequestTimeout(t,n),this.fetchUri(t,n)]),this.fetchQueue[e]=r,this.cleanupFetchRequest(e,n,this.timeout)),r.then(function(e){return t in i.timeouts&&(i.timeouts[t].forEach(clearTimeout),delete i.timeouts[t]),e})}},{key:"cleanupFetchRequest",value:function(t,e,n){var r=this;this.timeouts[t]=(this.timeouts[t]||[]).concat(setTimeout(function(){r.isPending(t)||delete r.fetchQueue[t]},n))}},{key:"initFetchOptions",value:function(e,n){var r=this.store;!n.method||"GET"===n.method.toUpperCase()||(n.force=!0),n.resource=r.sym(e),n.baseURI=n.baseURI||e,n.original=r.sym(n.baseURI),n.req=r.bnode(),n.headers=n.headers||{},n.contentType&&(n.headers["content-type"]=n.contentType),n.force&&(n.cache="no-cache");var i=this.acceptString();n.headers.accept=i;var o=t.offlineOverride(e);n.requestedURI=o,t.withCredentials(o,n)&&(n.credentials="include");var s=t.proxyIfNecessary(o);return o!==s&&(n.proxyUsed=!0),n.actualProxyURI=s,n}},{key:"fetchUri",value:function(e,n){var r=this;if(!e)return Promise.reject(new Error("Cannot fetch an empty uri"));if(t.unsupportedProtocol(e))return this.failFetch(n,"fetcher: Unsupported protocol","unsupported_protocol");var i=this.getState(e);if(n.force)delete this.nonexistent[e];else{if("fetched"===i)return Promise.resolve(this.doneFetch(n,{status:200,ok:!0,statusText:"Already loaded into quadstore."}));if("failed"===i&&404===this.requested[e]){var o="Previously failed: "+this.requested[e];return this.failFetch(n,o,this.requested[e],{url:e,status:this.requested[e],statusText:o,responseText:o,headers:{},ok:!1,body:null,bodyUsed:!1,size:0,timeout:0})}}this.fireCallbacks("request",[e]),this.requested[e]=!0,n.noMeta||this.saveRequestMetadata(e,n);var s=n.actualProxyURI;return this._fetch(s,n).then(function(t){return r.handleResponse(t,e,n)},function(t){var e={url:s,status:999,statusText:(t.name||"network failure")+": "+(t.errno||t.code||t.type),responseText:t.message,headers:{},ok:!1,body:null,bodyUsed:!1,size:0,timeout:0};return console.log("Fetcher: <"+s+"> Non-HTTP fetch error: "+t),r.failFetch(n,"fetch failed: "+t,999,e)})}},{key:"nowOrWhenFetched",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=t.uri||t,"function"==typeof e?n=e:void 0===e||(e instanceof p?r.referringTerm=e:r=e),this.load(t,r).then(function(e){if(n)if(e)if(e.ok)n(!0,"OK",e);else{console.log("@@@ fetcher.js Should not take this path !!!!!!!!!!!!");var r="HTTP error: Status "+e.status+" ("+e.statusText+")";e.responseText&&(r+=" "+e.responseText),console.log(r+" fetching "+t),n(!1,r,e)}else{var i="@@ nowOrWhenFetched: no response object!";console.log(i),n(!1,i)}},function(e){var r=e.message||e.statusText;r="Failed to load <"+t+"> "+r,console.log(r),e.response&&e.response.status&&(r+=" status: "+e.response.status),n(!1,r,e.response)})}},{key:"addStatus",value:function(t,e){var n=new Date;e="["+n.getHours()+":"+n.getMinutes()+":"+n.getSeconds()+"."+n.getMilliseconds()+"] "+e;var r=this.store,i=r.the(t,E.link("status"));i&&i.append?i.append(r.literal(e)):h.warn("web.js: No list to add to: "+i+","+e)}},{key:"failFetch",value:function(t,e,n,r){this.addStatus(t.req,e),t.noMeta||this.store.add(t.original,E.link("error"),e);var i=(t.method||"GET").toUpperCase();("GET"===i||"HEAD"===i)&&(t.resource.sameTerm(t.original)?console.log("@@ Recording "+i+" failure for "+t.original+": "+n):console.log("@@ Recording failure "+i+" original "+t.original+"( as "+t.resource+") : "+n),this.requested[v.docpart(t.original.uri)]=n,this.fireCallbacks("fail",[t.original.uri,e]));var o=new Error("Fetcher: "+e);return o.status=n,o.statusText=e,o.response=r,Promise.reject(o)}},{key:"linkData",value:function(t,e,n,r,i){if(n){var o,s=this.store,a=s.sym(v.join(n,t.uri));if("alternate"===e||"seeAlso"===e||"meta"===e||"describedby"===e){if(a.uri===t.uri)return;o=E.rdfs("seeAlso")}else o=s.sym("type"===e?"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":v.join(encodeURIComponent(e),"http://www.iana.org/assignments/link-relations/"));i?s.add(a,o,t,r):s.add(t,o,a,r)}}},{key:"parseLinkHeader",value:function(t,e,n){if(t)for(var r=/[^\(\)<>@,;:"\/\[\]\?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*"))/g,i=t.match(/<[^>]*>\s*(\s*;\s*[^()<>@,;:"\/[\]?={} \t]+=(([^\(\)<>@,;:"\/\[\]\?={} \t]+)|("[^"]*")))*(,|$)/g),o=0;o"),a=s[0].substring(1),u=s[1].match(r),l=0;l1&&void 0!==arguments[1]?arguments[1]:{},n=new p(t=t.uri||t).doc();return e.contentType=e.contentType||"text/turtle",e.data=w(n,this.store,n.uri,e.contentType),this.webOperation("PUT",t,e)}},{key:"webCopy",value:function(t,e,n){var r=this;return this.webOperation("GET",t).then(function(t){return r.webOperation("PUT",e,{data:t.responseText,contentType:n})})}},{key:"delete",value:function(t,e){var n=this;return this.webOperation("DELETE",t,e).then(function(e){return n.requested[t]=404,n.nonexistent[t]=!0,n.unload(n.store.sym(t)),e})}},{key:"createContainer",value:function(t,e,n){var r={"content-type":"text/turtle",link:E.ldp("BasicContainer")+'; rel="type"'};e&&(r.slug=e);var i={headers:r};return n&&(i.body=n),this.webOperation("POST",t,i)}},{key:"webOperation",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=n.uri||n,r.method=e,r.body=r.data||r.body,r.force=!0;var i=this;if(r.body&&!r.contentType)throw new Error("Web operation sending data must have a defined contentType.");return r.contentType&&(r.headers=r.headers||{},r.headers["content-type"]=r.contentType),t.withCredentials(n,r)&&(r.credentials="include"),new Promise(function(t,o){i._fetch(n,r).then(function(r){if(r.ok)r.body?r.text().then(function(e){r.responseText=e,t(r)}):t(r);else{var i="Web error: "+r.status;r.statusText&&(i+=" ("+r.statusText+")"),i+=" on "+e+" of <"+n+">",r.responseText&&(i+=": "+r.responseText);var s=new Error(i);s.response=r,o(s)}},function(t){o(new Error("Fetch error for "+e+" of <"+n+">:"+t))})})}},{key:"lookUpThing",value:function(t,e){var n=this,r=this.store.uris(t);return(r=r.map(function(t){return v.docpart(t)})).forEach(function(t){n.lookedUp[t]=!0}),this.load(r,{referringTerm:e})}},{key:"getHeader",value:function(t,e){for(var n=this.store,r=n.each(void 0,E.link("requestedURI"),t.uri),i=0;i=400)return 404===t.status&&(this.nonexistent[n.original.uri]=!0,this.nonexistent[e]=!0),this.saveErrorResponse(t,a).then(function(){return r.failFetch(n,n.resource+" "+t.statusText,t.status,t)});var c=null,h=null;if(l&&(h=v.join(l,e))!==e&&(c=h),200===t.status){this.addType(E.link("Document"),s,i,e),c&&this.addType(E.link("Document"),s,i,c),n.clearPreviousData&&i.removeDocument(n.resource);var f=u.includes("image/")||u.includes("application/pdf");u&&f&&(this.addType(i.sym("http://purl.org/dc/terms/Image"),s,i,e),c&&this.addType(i.sym("http://purl.org/dc/terms/Image"),s,i,c))}if(l){if(!n.force&&c&&"done"===this.requested[h])return this.doneFetch(n,t);this.requested[h]=!0}this.parseLinkHeader(o.get("link"),n.original,s);var p=this.handlerForContentType(u,t);return p?t.text().then(function(e){return t.responseText=e,p.parse(r,e,n,t)}):(this.addStatus(s,"Fetch over. No data handled."),this.doneFetch(n,t))}},{key:"saveErrorResponse",value:function(t,e){var n=this.store;return t.text().then(function(t){t.length>10&&n.add(e,E.http("content"),n.literal(t),e)})}},{key:"handlerForContentType",value:function(t,e){if(!t)return null;var n=this.handlers.find(function(e){return t.match(e.pattern)});return n?new n(e):null}},{key:"guessContentType",value:function(t){return C[t.split(".").pop()]}},{key:"normalizedContentType",value:function(t,e){if(t.forceContentType)return t.forceContentType;var n=e.get("content-type");if(!n||n.includes("application/octet-stream")){var r=this.guessContentType(t.resource.uri);if(r)return r}var i=v.protocol(t.resource.uri);return!n&&["file","chrome"].includes(i)?"text/xml":n}},{key:"redirectToProxy",value:function(t,e){var n=this;this.addStatus(e.req,"BLOCKED -> Cross-site Proxy to <"+t+">"),e.proxyUsed=!0;var r=this.store,i=e.req;e.noMeta||(r.add(i,E.link("redirectedTo"),r.sym(t),i),this.addStatus(i,"redirected to new request")),this.requested[e.resource.uri]="redirected",this.redirectedTo[e.resource.uri]=t;var o=Object.assign({},e);return o.baseURI=e.resource.uri,this.fetchUri(t,o).then(function(t){return o.noMeta||r.add(i,E.link("redirectedRequest"),o.req,n.appNode),t})}},{key:"setRequestTimeout",value:function(t,e){var n=this;return new Promise(function(r){n.timeouts[t]=(n.timeouts[t]||[]).concat(setTimeout(function(){!n.isPending(t)||e.retriedWithNoCredentials||e.proxyUsed||r(n.failFetch(e,"Request to ".concat(t," timed out"),"timeout"))},n.timeout))})}},{key:"addFetchCallback",value:function(t,e){this.fetchCallbacks[t]?this.fetchCallbacks[t].push(e):this.fetchCallbacks[t]=[e]}},{key:"acceptString",value:function(){var t="";for(var e in this.mediatypes)for(var n in""!==t&&(t+=", "),t+=e,this.mediatypes[e])t+=";"+n+"="+this.mediatypes[e][n];return t}}],[{key:"crossSiteProxy",value:function(e){return t.crossSiteProxyTemplate?t.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):void 0}},{key:"offlineOverride",value:function(t){var e,n=t;return"undefined"!=typeof window&&window.panes&&(e=window.panes.UI)&&e.preferences&&e.preferences.get("offlineModeUsingLocalhost")&&"http://"===n.slice(0,7)&&"localhost/"!==n.slice(7,17)&&(n="http://localhost/"+n.slice(7),h.warn("Localhost kludge for offline use: actually getting <"+n+">")),n}},{key:"proxyIfNecessary",value:function(e){var n;if("undefined"!=typeof window&&window.panes&&(n=window.panes.UI)&&n.isExtension)return e;if("undefined"!=typeof $SolidTestEnvironment&&$SolidTestEnvironment.localSiteMap){var r=function t(e,n){var r=n[e.shift()];return r?"string"==typeof r?r+e.join("/"):e?t(e,r):null:null}(e.split("/").slice(2),$SolidTestEnvironment.localSiteMap);if(r)return r}return t.crossSiteProxyTemplate&&"undefined"!=typeof document&&document.location&&"https:"===(""+document.location).slice(0,6)&&"http:"===e.slice(0,5)?t.crossSiteProxyTemplate.replace("{uri}",encodeURIComponent(e)):e}},{key:"unsupportedProtocol",value:function(t){var e=v.protocol(t);return"tel"===e||"mailto"===e||"urn"===e}},{key:"withCredentials",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.startsWith("https:");return void 0!==e.withCredentials&&(n=e.withCredentials),n}}]),t}();t.exports=j,t.exports.HANDLERS=N,t.exports.CONTENT_TYPE_BY_EXT=C},function(t,e,n){"use strict";t.exports=function(t,e,n,o,s,a){n=n||t.uri,a=a||{},o=o||"text/turtle";try{var u=i(e);a.flags&&u.setFlags(a.flags);var l,c=e.statementsMatching(void 0,void 0,void 0,t);switch(u.suggestNamespaces(e.namespaces),u.setBase(n),o){case"application/rdf+xml":return h(null,u.statementsToXML(c));case"text/n3":case"application/n3":return h(null,u.statementsToN3(c));case"text/turtle":case"application/x-turtle":return u.setFlags("si"),h(null,u.statementsToN3(c));case"application/n-triples":return u.setFlags("deinprstux"),h(null,u.statementsToNTriples(c));case"application/ld+json":u.setFlags("deinprstux"),l=u.statementsToNTriples(c),r.convertToJson(l,s);break;case"application/n-quads":case"application/nquads":return u.setFlags("deinprstux q"),h(null,u.statementsToNTriples(c));default:throw new Error("Serialize: Content-type "+o+" not supported for data write.")}}catch(t){if(s)return s(t);throw t}function h(t,e){return s?void s(t,e):e}};var r=n(42),i=n(38)},function(t,e,n){"use strict";var r=n(2),i=n(9),o=n(4),s=n(7),a=n(41),u=function(){var t=function(t){this.flags="",this.base=null,this.prefixes=[],this.namespaces=[],this.suggestPrefix("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.suggestPrefix("xml","reserved:reservedForFutureUse"),this.namespacesUsed=[],this.keywords=["a"],this.prefixchars="abcdefghijklmnopqustuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",this.incoming=null,this.formulas=[],this.store=t};return t.prototype.setBase=function(t){return this.base=t,this},t.prototype.setFlags=function(t){return this.flags=t||"",this},t.prototype.toStr=function(t){var e=t.toNT();return"Graph"===t.termType&&(this.formulas[e]=t),e},t.prototype.fromStr=function(t){if("{"===t[0]){var e=this.formulas[t];return e||console.log("No formula object for "+t),e}return this.store.fromNT(t)},t.prototype.suggestPrefix=function(t,e){"default"!==t.slice(0,7)&&"ns"!==t.slice(0,2)&&t&&e&&(t in this.namespaces||e in this.prefixes||(this.prefixes[e]=t,this.namespaces[t]=e))},t.prototype.suggestNamespaces=function(t){for(var e in t)return this.suggestPrefix(e,t[e]),this},t.prototype.checkIntegrity=function(){var t,e;for(t in this.namespaces)if(this.prefixes[this.namespaces[t]]!==t)throw new Error("Serializer integity error 1: "+t+", "+this.namespaces[t]+", "+this.prefixes[this.namespaces[t]]+"!");for(e in this.prefixes)if(this.namespaces[this.prefixes[e]]!==e)throw new Error("Serializer integity error 2: "+e+", "+this.prefixs[e]+", "+this.namespaces[this.prefixes[e]]+"!")},t.prototype.makeUpPrefix=function(e){var n=e,r=(function(n){return!!t.prototype.validPrefix.test(n)&&"ns"!==n&&!(n in this.namespaces)&&(this.prefixes[e]=n,this.namespaces[n]=e,n)}).bind(this);"#/".indexOf(n[n.length-1])>=0&&(n=n.slice(0,-1));var i=n.lastIndexOf("/");i>=0&&(n=n.slice(i+1));for(var o=0;o?@[\\]^`{|}~")+":",t.prototype.explicitURI=function(t){return"<"+(t=this.flags.indexOf("r")<0&&this.base?o.refTo(this.base,t):this.flags.indexOf("u")>=0?function(t){for(var e,n="",r=0;r65535?"\\U"+("00000000"+e.toString(16)).slice(-8):e>126?"\\u"+("0000"+e.toString(16)).slice(-4):t[r];return n}(t):encodeURI(t))+">"},t.prototype.statementsToNTriples=function(t){var e=t.slice();e.sort();for(var n="",r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o=this,s=this.store,a=function t(e){if("Collection"!==e.termType)return o.atomicTermToN3(e);for(var a=e.elements,u=s.sym(r+"nill"),l=a.length-1;l>=0;l--){var c=new i;n+=t(c)+" "+t(s.sym(r+"first"))+" "+t(a[l])+".\n",n+=t(c)+" "+t(s.sym(r+"rest"))+" "+t(u)+".\n",u=c}return o.atomicTermToN3(u)},u=0;u=0&&(c+=a(l.why)+" "),n+=c+=".\n"}return n},t.prototype.statementsToN3=function(e){var n=this.store,r={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":"aaa:00"};e.sort(function(t,e){return s.heavyCompareSPO(t,e,n,r)}),this.base&&!this.defaultNamespace&&(this.defaultNamespace=this.base+"#");var i={};this.flags.indexOf("s")<0&&(i["http://www.w3.org/2002/07/owl#sameAs"]="="),this.flags.indexOf("t")<0&&(i["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]="a"),this.flags.indexOf("i")<0&&(i["http://www.w3.org/2000/10/swap/log#implies"]="=>");var o=function(t){for(var e="",n=0;n=0){r=r.slice(0,-1)+u+"\n",i+=1;continue}if(i<4*n+4||i+u.length+1<80&&";.".indexOf(r[r.length-2])<0)r=r.slice(0,-1)+" "+u+"\n",i+=u.length+1;else{var h=o(4*n)+u;r+=h+"\n",i=h.length,n<0&&(r+="\n",i=1e5)}}}return r}(d)},t.prototype.atomicTermToN3=function(t,e){switch(t.termType){case"BlankNode":case"Variable":return t.toNT();case"Literal":var n=t.value;if("string"!=typeof n)throw new TypeError("Value of RDF literal node must be a string");if(t.datatype&&this.flags.indexOf("x")<0)switch(t.datatype.uri){case"http://www.w3.org/2001/XMLSchema#integer":return n;case"http://www.w3.org/2001/XMLSchema#decimal":return n.indexOf(".")<0&&(n+=".0"),n;case"http://www.w3.org/2001/XMLSchema#double":return n.indexOf(".")<0&&(n+=".0"),n.indexOf("e")<0&&(n+="e0"),n;case"http://www.w3.org/2001/XMLSchema#boolean":return"1"===t.value?"true":"false"}var r=this.stringToN3(t.value);return t.language?r+="@"+t.language:t.datatype.equals(a.string)||(r+="^^"+this.atomicTermToN3(t.datatype,e)),r;case"NamedNode":return this.symbolToN3(t);default:throw new Error("Internal: atomicTermToN3 cannot handle "+t+" of termType: "+t.termType)}},t.prototype.validPrefix=new RegExp(/^[a-zA-Z][a-zA-Z0-9]*$/),t.prototype.forbidden1=new RegExp(/[\\"\b\f\r\v\t\n\u0080-\uffff]/gm),t.prototype.forbidden3=new RegExp(/[\\"\b\f\r\v\u0080-\uffff]/gm),t.prototype.stringToN3=function(e,n){n||(n="e");var r,i,o,s,a,u="";for(e.length>20&&'"'!==e.slice(-1)&&n.indexOf("n")<0&&(e.indexOf("\n")>0||e.indexOf('"')>0)?(s='"""',a=t.prototype.forbidden3):(s='"',a=t.prototype.forbidden1),r=0;r=0?u+="\\"+'bfrtvn\\"'[o]:n.indexOf("e")>=0?u+="\\u"+("000"+l.charCodeAt(0).toString(16).toLowerCase()).slice(-4):u+=l,r=i+1}return s+u+e.slice(r)+s},t.prototype.symbolToN3=function(e){var n=e.uri,r=n.indexOf("#");if(r<0&&this.flags.indexOf("/")<0&&(r=n.lastIndexOf("/")),r>=0&&this.flags.indexOf("p")<0&&(0===n.indexOf("http")||0===n.indexOf("ws")||0===n.indexOf("file"))){for(var i=!0,o=r+1;o=0){i=!1;break}if(i){var s=n.slice(r+1),a=n.slice(0,r+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return this.flags.indexOf("k")>=0&&this.keyords.indexOf(s)<0?s:":"+s;var u=this.prefixes[a];if(u||(u=this.makeUpPrefix(a)),u)return this.namespacesUsed[a]=!0,u+":"+s}}return this.explicitURI(n)},t.prototype.writeStore=function(t){var e=this.store,n=e.fetcher,r=n&&n.appNode,i=this.store.index[3];for(var o in i){var s=e.fromNT(o);r&&s.sameTerm(r)||t("\n"+this.atomicTermToN3(s)+" "+this.atomicTermToN3(e.sym("http://www.w3.org/2000/10/swap/log#semantics"))+" { "+this.statementsToN3(e.statementsMatching(void 0,void 0,void 0,s))+" }.\n")}e.statementsMatching(void 0,e.sym("http://www.w3.org/2007/ont/link#requestedURI")).map(function(n){t("\n<"+n.object.value+"> log:metadata {\n");var r=e.statementsMatching(void 0,void 0,void 0,n.subject);t(this.statementsToN3(this.statementsToN3(r))),t("}.\n")});var a=[];r&&a.push(r);var u=[];a.map(function(t){u=u.concat(e.statementsMatching(void 0,void 0,void 0,t))}),t(this.statementsToN3(u))},t.prototype.statementsToXML=function(e){var n=[];n["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]=!0;var i="http://www.w3.org/1999/02/22-rdf-syntax-ns#_",o=function(t){for(var e="",n=0;n',f(s.object,e),""]:["<"+o+' rdf:nodeID="'+s.object.toNT().slice(2)+'"/>']);break;case"NamedNode":l=l.concat(["<"+o+' rdf:resource="'+h(s.object)+'"/>']);break;case"Literal":l=l.concat(["<"+o+(s.object.datatype.equals(a.string)?"":' rdf:datatype="'+c(s.object.datatype.uri)+'"')+(s.object.language?' xml:lang="'+s.object.language+'"':"")+">"+c(s.object.value)+""]);break;case"Collection":l=l.concat(["<"+o+' rdf:parseType="Collection">',p(s.object,e),""]);break;default:throw new Error("Can't serialize object of type "+s.object.termType+" into XML")}}else n=s.object;var b=n?g(n):"rdf:Description",w="";return"BlankNode"===t.termType?e.incoming[t]&&1===e.incoming[t].length||(w=' rdf:nodeID="'+t.toNT().slice(2)+'"'):w=' rdf:about="'+h(t)+'"',["<"+b+w+">"].concat([l]).concat([""])}).bind(this);function p(t,e){for(var n=[],r=0;r',""]):n.concat(["<"+g(o.predicate)+' rdf:parseType="Resource">',d(o.object,e),""]);break;case"NamedNode":n=n.concat(["<"+g(o.predicate)+' rdf:resource="'+h(o.object)+'"/>']);break;case"Literal":n=n.concat(["<"+g(o.predicate)+(o.object.datatype.equals(a.string)?"":' rdf:datatype="'+c(o.object.datatype.value)+'"')+(o.object.language?' xml:lang="'+o.object.language+'"':"")+">"+c(o.object.value)+""]);break;case"Collection":n=n.concat(["<"+g(o.predicate)+' rdf:parseType="Collection">',p(o.object,e),""]);break;default:throw new Error("Can't serialize object of type "+o.object.termType+" into XML")}}return n}).bind(this),g=(function(e){var r=e.uri,i=r.indexOf("#");if(i<0&&this.flags.indexOf("/")<0&&(i=r.lastIndexOf("/")),i<0)throw new Error("Cannot make qname out of <"+r+">");for(var o=i+1;o=0)throw new Error('Invalid character "'+r[o]+'" cannot be in XML qname for URI: '+r);var s=r.slice(i+1),a=r.slice(0,i+1);if(this.defaultNamespace&&this.defaultNamespace===a&&this.flags.indexOf("d")<0)return s;var u=this.prefixes[a];return u||(u=this.makeUpPrefix(a)),n[a]=!0,u+":"+s}).bind(this),y=l(e),m=""],-1)},function(e){return new t(e)}}();t.exports=u},function(t,e,n){"use strict";function r(t,e){for(var n=0;n=0){var s=e.substring(0,o);if(""===s)return(i=n[""])?i+e.substring(o+1):null;if("_"===s)return"_:"+e.substring(o+1);if(t.NCNAME.test(s)&&(i=n[s]))return i+e.substring(o+1)}return null}},{key:"parseCURIEOrURI",value:function(t,e,n){return this.parseCURIE(t,e,n)||this.resolveAndNormalize(n,t)}},{key:"parsePredicate",value:function(t,e,n,r,i,o){if(""===t)return null;var s=this.parseTermOrCURIEOrAbsURI(t,e,o?null:n,r,i);return s&&0===s.indexOf("_:")?null:s}},{key:"parsePrefixMappings",value:function(t,e){for(var n=this.tokenize(t),r=null,i=0;i=0&&(t=t.substring(0,e)),n&&n.baseURIMap&&(t=n.baseURIMap(t)),t};for(i.push({current:e,context:this.push(null,o(e.baseURI))});i.length>0;){var s=i.shift();if(s.parent){if(s.context.parent&&s.context.parent.listMapping===s.listMapping)continue;for(var a in s.listMapping){var l=s.listMapping[a];if(0!==l.length){for(var h=[],f=0;f0?this.addTriple(d,r.spec,"http://www.w3.org/ns/rdfa#usesVocabulary",{type:t.objectURI,value:k=O}):k=this.vocabulary}for(var I=0;I0?M:null}var L,U,F=d.getAttributeNode("rel"),V=d.getAttributeNode("rev"),B=d.getAttributeNode("typeof"),z=d.getAttributeNode("property"),H=d.getAttributeNode("datatype"),q=this.inHTMLMode?d.getAttributeNode("datetime"):null,W=d.getAttributeNode("content"),G=d.getAttributeNode("about"),$=d.getAttributeNode("src"),J=d.getAttributeNode("resource"),K=d.getAttributeNode("href"),Y=d.getAttributeNode("inlist"),Q=[];if(F){U=this.tokenize(F.value);for(var X=0;X=0?e+=t.nodeName.split(":")[1]:e+=t.nodeName),e}).bind(this),u=!0;t.parent;){var l=t.element,c=l.attributes;if(l.nodeType===i||l.nodeType===o)t.parent.nodeType===t.NODE&&(t.addArc(e+"value"),t=this.buildFrame(t)),t.addLiteral(l.nodeValue);else if(a(l)!==e+"RDF")if(t.parent&&t.parent.collection&&(t.addCollectionArc(),(t=this.buildFrame(t,t.element)).parent.element=null),t.parent&&t.parent.nodeType&&t.parent.nodeType!==t.ARC){t.addArc(a(l)),this.reify&&(s=this.getAttributeNodeNS(l,e,"ID"))&&(t.rdfid=s.nodeValue,l.removeAttributeNode(s));var h=this.getAttributeNodeNS(l,e,"parseType"),f=this.getAttributeNodeNS(l,e,"datatype");if(f&&(t.datatype=f.nodeValue,l.removeAttributeNode(f)),h){var p=h.nodeValue;"Literal"===p?(t.datatype=e+"XMLLiteral",(t=this.buildFrame(t)).addLiteral(l.childNodes),u=!1):"Resource"===p?((t=this.buildFrame(t,t.element)).parent.element=null,t.addBNode()):"Collection"===p&&((t=this.buildFrame(t,t.element)).parent.element=null,t.addCollection()),l.removeAttributeNode(h)}if(0!==c.length){var d=this.getAttributeNodeNS(l,e,"resource"),g=this.getAttributeNodeNS(l,e,"nodeID");t=this.buildFrame(t),d?(t.addNode(d.nodeValue),l.removeAttributeNode(d)):g?(t.addBNode(g.nodeValue),l.removeAttributeNode(g)):t.addBNode();for(var y=c.length-1;y>=0;y--){var m=this.buildFrame(t);m.addArc(a(c[y])),a(c[y])===e+"type"?this.buildFrame(m).addNode(c[y].nodeValue):this.buildFrame(m).addLiteral(c[y].nodeValue)}}else 0===l.childNodes.length&&this.buildFrame(t).addLiteral("")}else{var v=this.getAttributeNodeNS(l,e,"about");if(s=this.getAttributeNodeNS(l,e,"ID"),v&&s)throw new Error("RDFParser: "+l.nodeName+" has both rdf:id and rdf:about. Halting. Only one of these properties may be specified on a node.");if(!v&&s)t.addNode("#"+s.nodeValue),l.removeAttributeNode(s);else if(null==v&&null==s){var b=this.getAttributeNodeNS(l,e,"nodeID");b?(t.addBNode(b.nodeValue),l.removeAttributeNode(b)):t.addBNode()}else t.addNode(v.nodeValue),l.removeAttributeNode(v);var w=this.getAttributeNodeNS(l,e,"type");e+"Description"!==a(l)&&(w={nodeValue:a(l)}),null!=w&&(this.store.add(t.node,this.store.sym(e+"type"),this.store.sym(r.join(w.nodeValue,t.base)),this.why),w.nodeName&&l.removeAttributeNode(w));for(var _=c.length-1;_>=0;_--)this.store.add(t.node,this.store.sym(a(c[_])),this.store.literal(c[_].nodeValue,t.lang),this.why)}for(l=t.element;t.parent;){for(var x=t;null==l;)l=(t=t.parent).element;var S=l.childNodes&&l.childNodes[t.lastChild];if(S&&u){if((S.nodeType===n||S.nodeType===i||S.nodeType===o)&&(S.nodeType!==i&&S.nodeType!==o||1===l.childNodes.length)){t.lastChild++,t=this.buildFrame(x,l.childNodes[t.lastChild-1]);break}t.lastChild++}else{if(t.terminateFrame(),!(t=t.parent))break;l=t.element,u=!0}}}},this.cleanParser=function(){this.bnodes={},this.why=null},this.buildFrame=function(t,e){var n=this.frameFactory(this,t,e);if(t&&(n.base=t.base,n.lang=t.lang),!e||e.nodeType===i||e.nodeType===o)return n;var s=e.attributes,a=e.getAttributeNode("xml:base");null!=a&&(n.base=a.nodeValue,e.removeAttribute("xml:base"));var u=e.getAttributeNode("xml:lang");null!=u&&(n.lang=u.nodeValue,e.removeAttribute("xml:lang"));for(var l=s.length-1;l>=0;l--)if("xml"===s[l].nodeName.substr(0,3)){if("xmlns:"===s[l].name.slice(0,6)){var c=s[l].nodeValue;this.base&&(c=r.join(c,this.base)),this.store.setPrefixForURI(s[l].name.slice(6),c)}e.removeAttributeNode(s[l])}return n}}},function(t,e,n){"use strict";var r=n(2),i=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};i.boolean=new r("http://www.w3.org/2001/XMLSchema#boolean"),i.dateTime=new r("http://www.w3.org/2001/XMLSchema#dateTime"),i.decimal=new r("http://www.w3.org/2001/XMLSchema#decimal"),i.double=new r("http://www.w3.org/2001/XMLSchema#double"),i.integer=new r("http://www.w3.org/2001/XMLSchema#integer"),i.langString=new r("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.string=new r("http://www.w3.org/2001/XMLSchema#string"),t.exports=i},function(t,e,n){"use strict";t.exports.convertToJson=function(t,e){var n,s=o.Parser(),a=o.Writer({format:"N-Quads"});r.waterfall([function(e){s.parse(t,e)},function(t,e,n){null!==t&&a.addTriple(t),"function"==typeof n&&a.end(n)},function(t,e){try{i.fromRDF(t,{format:"application/nquads"},e)}catch(t){e(t)}},function(t,r){n=JSON.stringify(t),e(null,n)}],function(t,r){e(t,n)})},t.exports.convertToNQuads=function(t,e){var n,i=o.Parser(),s=o.Writer({format:"N-Quads"});r.waterfall([function(e){i.parse(t,e)},function(t,e,n){null!==t&&s.addTriple(t),"function"==typeof n&&s.end(n)},function(t,r){e(null,n=t)}],function(t,r){e(t,n)})};var r=n(65),i=n(43),o=n(45)},function(t,e,n){(function(r,i,o,s){var a;!function(){var u=void 0!==r&&r.versions&&r.versions.node,l=!u&&("undefined"!=typeof window||"undefined"!=typeof self);l&&void 0===i&&("undefined"!=typeof window?i=window:"undefined"!=typeof self?i=self:"undefined"!=typeof $&&(i=$));var c=function(t){function e(){}t.compact=function(e,n,r,i){return arguments.length<2?t.nextTick(function(){i(new TypeError("Could not compact, too few arguments."))}):("function"==typeof r&&(i=r,r={}),r=r||{},null===n?t.nextTick(function(){i(new T("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"}))}):null===e?t.nextTick(function(){i(null,null)}):("base"in r||(r.base="string"==typeof e?e:""),"compactArrays"in r||(r.compactArrays=!0),"graph"in r||(r.graph=!1),"skipExpansion"in r||(r.skipExpansion=!1),"documentLoader"in r||(r.documentLoader=t.loadDocument),"link"in r||(r.link=!1),r.link&&(r.skipExpansion=!0),void function(e,n,r){if(n.skipExpansion)return t.nextTick(function(){r(null,e)});t.expand(e,n,r)}(e,r,function(e,o){if(e)return i(new T("Could not expand input before compaction.","jsonld.CompactError",{cause:e}));var s=Q(r);t.processContext(s,n,r,function(t,e){if(t)return i(new T("Could not process context before compaction.","jsonld.CompactError",{cause:t}));var s;try{s=(new O).compact(e,null,o,r)}catch(t){return i(t)}!function(t,e,r,o){o.compactArrays&&!o.graph&&tt(e)?1===e.length?e=e[0]:0===e.length&&(e={}):o.graph&&Z(e)&&(e=[e]),Z(n)&&"@context"in n&&(n=n["@context"]),tt(n=ft(n))||(n=[n]);var s=n;n=[];for(var a=0;a0)&&n.push(s[a]);var u=n.length>0;if(1===n.length&&(n=n[0]),tt(e)){var l=J(r,"@graph"),c=e;e={},u&&(e["@context"]=n),e[l]=c}else if(Z(e)&&u)for(var h in c=e,e={"@context":n},c)e[h]=c[h];i(null,e,r)}(0,s,e,r)})})))},t.expand=function(e,n,r){if(arguments.length<1)return t.nextTick(function(){r(new TypeError("Could not expand, too few arguments."))});function i(t){"base"in n||(n.base=t.documentUrl||"");var e={document:ft(t.document),remoteContext:{"@context":t.contextUrl}};if("expandContext"in n){var i=ft(n.expandContext);e.expandContext="object"==typeof i&&"@context"in i?i:{"@context":i}}dt(e,n,function(t,e){if(t)return r(t);var i;try{var o=new O,s=Q(n),a=e.document,u=e.remoteContext["@context"];e.expandContext&&(s=o.processContext(s,e.expandContext["@context"],n)),u&&(s=o.processContext(s,u,n)),Z(i=o.expand(s,null,a,n,!1))&&"@graph"in i&&1===Object.keys(i).length?i=i["@graph"]:null===i&&(i=[]),tt(i)||(i=[i])}catch(t){return r(t)}r(null,i)})}"function"==typeof n&&(r=n,n={}),"documentLoader"in(n=n||{})||(n.documentLoader=t.loadDocument),"keepFreeFloatingNodes"in n||(n.keepFreeFloatingNodes=!1),t.nextTick(function(){if("string"!=typeof e)i({contextUrl:null,documentUrl:null,document:e});else{var t=function(t,e){if(t)return r(t);try{if(!e.document)throw new T("No remote document found at the given URL.","jsonld.NullRemoteDocument");"string"==typeof e.document&&(e.document=JSON.parse(e.document))}catch(t){return r(new T("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",cause:t,remoteDoc:e}))}i(e)},o=n.documentLoader(e,t);o&&"then"in o&&o.then(t.bind(null,null),t)}})},t.flatten=function(e,n,r,i){if(arguments.length<1)return t.nextTick(function(){i(new TypeError("Could not flatten, too few arguments."))});"function"==typeof r?(i=r,r={}):"function"==typeof n&&(i=n,n=null,r={}),"base"in(r=r||{})||(r.base="string"==typeof e?e:""),"documentLoader"in r||(r.documentLoader=t.loadDocument),t.expand(e,r,function(e,o){if(e)return i(new T("Could not expand input before flattening.","jsonld.FlattenError",{cause:e}));var s;try{s=(new O).flatten(o)}catch(t){return i(t)}if(null===n)return i(null,s);r.graph=!0,r.skipExpansion=!0,t.compact(s,n,r,function(t,e){if(t)return i(new T("Could not compact flattened output.","jsonld.FlattenError",{cause:t}));i(null,e)})})},t.frame=function(e,n,r,i){if(arguments.length<2)return t.nextTick(function(){i(new TypeError("Could not frame, too few arguments."))});function o(n){var o,s=n.document;s?(o=s["@context"],n.contextUrl?(o?tt(o)?o.push(n.contextUrl):o=[o,n.contextUrl]:o=n.contextUrl,s["@context"]=o):o=o||{}):o={},t.expand(e,r,function(e,n){if(e)return i(new T("Could not expand input before framing.","jsonld.FrameError",{cause:e}));var a=ft(r);a.isFrame=!0,a.keepFreeFloatingNodes=!0,t.expand(s,a,function(e,r){if(e)return i(new T("Could not expand frame before framing.","jsonld.FrameError",{cause:e}));var s;try{s=(new O).frame(n,r,a)}catch(t){return i(t)}a.graph=!0,a.skipExpansion=!0,a.link={},t.compact(s,o,a,function(e,n,r){if(e)return i(new T("Could not compact framed output.","jsonld.FrameError",{cause:e}));var o=J(r,"@graph");a.link={},n[o]=function e(n,r,i){if(tt(r)){for(var o=[],s=0;s0&&"/"!==o.substr(-1)&&(o+="/"),o+=r.path),i.path=o}i.query=r.query}i.path=_t(i.path,!!i.authority);var s=i.protocol;return null!==i.authority&&(s+="//"+i.authority),s+=i.path,null!==i.query&&(s+="?"+i.query),null!==r.fragment&&(s+="#"+r.fragment),""===s&&(s="./"),s}(e,n)},t.documentLoader=function(e,n){var r=new T("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed"});return u?n(r,{contextUrl:null,documentUrl:e,document:null}):t.promisify(function(t){t(r)})},t.loadDocument=function(e,n){var r=t.documentLoader(e,n);r&&"then"in r&&r.then(n.bind(null,null),n)},t.promises=function(e){e=e||{};var r=Array.prototype.slice,o=t.promisify,s=e.api||{},a=e.version||"jsonld.js";"string"==typeof e.api&&(e.version||(a=e.api),s={}),s.expand=function(e){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");return o.apply(null,[t.expand].concat(r.call(arguments)))},s.compact=function(e,n){if(arguments.length<2)throw new TypeError("Could not compact, too few arguments.");return o.apply(null,[function(e,n,r,i){"function"==typeof r&&(i=r,r={}),t.compact(e,n,r=r||{},function(t,e){i(t,e)})}].concat(r.call(arguments)))},s.flatten=function(e){if(arguments.length<1)throw new TypeError("Could not flatten, too few arguments.");return o.apply(null,[t.flatten].concat(r.call(arguments)))},s.frame=function(e,n){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");return o.apply(null,[t.frame].concat(r.call(arguments)))},s.fromRDF=function(e){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");return o.apply(null,[t.fromRDF].concat(r.call(arguments)))},s.toRDF=function(e){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");return o.apply(null,[t.toRDF].concat(r.call(arguments)))},s.normalize=function(e){if(arguments.length<1)throw new TypeError("Could not normalize, too few arguments.");return o.apply(null,[t.normalize].concat(r.call(arguments)))},"jsonld.js"===a&&(s.link=function(e,n){if(arguments.length<2)throw new TypeError("Could not link, too few arguments.");return o.apply(null,[t.link].concat(r.call(arguments)))},s.objectify=function(e){return o.apply(null,[t.objectify].concat(r.call(arguments)))},s.createNodeMap=function(e){return o.apply(null,[t.createNodeMap].concat(r.call(arguments)))},s.merge=function(e){return o.apply(null,[t.merge].concat(r.call(arguments)))});try{t.Promise=i.Promise||n(44).Promise}catch(t){var u=function(){throw new Error("Unable to find a Promise implementation.")};for(var l in s)s[l]=u}return s},t.promisify=function(e){if(!t.Promise)try{t.Promise=i.Promise||n(44).Promise}catch(t){throw new Error("Unable to find a Promise implementation.")}var r=Array.prototype.slice.call(arguments,1);return new t.Promise(function(t,n){e.apply(null,r.concat(function(e,r){e?n(e):t(r)}))})},t.promises({api:t.promises}),(e.prototype=t.promises({version:"json-ld-1.0"})).toString=function(){return this instanceof e?"[object JsonLdProcessor]":"[object JsonLdProcessorPrototype]"},t.JsonLdProcessor=e;var a=!!Object.defineProperty;if(a)try{Object.defineProperty({},"x",{})}catch(t){a=!1}a&&(Object.defineProperty(e,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(e.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:e})),l&&void 0===i.JsonLdProcessor&&(a?Object.defineProperty(i,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e}):i.JsonLdProcessor=e);var c="function"==typeof o&&o,h=c?function(t){c(t)}:function(t){setTimeout(t,0)};t.nextTick="object"==typeof r&&"function"==typeof r.nextTick?r.nextTick:h,t.setImmediate=c?h:t.nextTick,t.parseLinkHeader=function(t){for(var e={},n=t.match(/(?:<[^>]*?>|"[^"]*?"|[^,])+/g),r=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,i=0;i=+new Date)return e.ctx;delete this.cache[t],this.order.splice(this.order.indexOf(t),1)}return null},t.DocumentCache.prototype.set=function(t,e){this.order.length===this.size&&delete this.cache[this.order.shift()],this.order.push(t),this.cache[t]={ctx:e,expires:+new Date+this.expires}},t.ActiveContextCache=function(t){this.order=[],this.cache={},this.size=t||100},t.ActiveContextCache.prototype.get=function(t,e){var n=JSON.stringify(t),r=JSON.stringify(e),i=this.cache[n];return i&&r in i?i[r]:null},t.ActiveContextCache.prototype.set=function(t,e,n){if(this.order.length===this.size){var r=this.order.shift();delete this.cache[r.activeCtx][r.localCtx]}var i=JSON.stringify(t),o=JSON.stringify(e);this.order.push({activeCtx:i,localCtx:o}),i in this.cache||(this.cache[i]={}),this.cache[i][o]=ft(n)},t.cache={activeCtx:new t.ActiveContextCache},t.documentLoaders={},t.documentLoaders.jquery=function(e,n){n=n||{};var r=new t.RequestQueue;return("usePromise"in n?n.usePromise:"undefined"!=typeof Promise)?r.wrapLoader(function(e){return t.promisify(i,e)}):r.wrapLoader(i);function i(r,i){return 0!==r.indexOf("http:")&&0!==r.indexOf("https:")?i(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):n.secure&&0!==r.indexOf("https")?i(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null}):void e.ajax({url:r,accepts:{json:"application/ld+json, application/json"},headers:{Accept:"application/ld+json, application/json"},dataType:"json",crossDomain:!0,success:function(e,n,o){var s={contextUrl:null,documentUrl:r,document:e},a=o.getResponseHeader("Content-Type"),u=o.getResponseHeader("Link");if(u&&"application/ld+json"!==a){if(tt(u=t.parseLinkHeader(u)[E]))return i(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:r}),s);u&&(s.contextUrl=u.target)}i(null,s)},error:function(t,e,n){i(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:r,cause:n}),{contextUrl:null,documentUrl:r,document:null})}})}},t.documentLoaders.node=function(e){var r=!("strictSSL"in(e=e||{}))||e.strictSSL,i="maxRedirects"in e?e.maxRedirects:-1,o="request"in e?e.request:n(10),s="application/ld+json, application/json",a=n(10),u=new t.RequestQueue;if(e.usePromise)return u.wrapLoader(function(e){return t.promisify(c,e,[])});var l=e.headers||{};if("Accept"in l||"accept"in l)throw new RangeError('Accept header may not be specified as an option; only "'+s+'" is supported.');return u.wrapLoader(function(t,e){c(t,[],e)});function c(n,u,l){if(0!==n.indexOf("http:")&&0!==n.indexOf("https:"))return l(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});if(e.secure&&0!==n.indexOf("https"))return l(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:n}),{contextUrl:null,documentUrl:n,document:null});var h=null;if(null!==h)return l(null,h);var f={Accept:s};for(var p in e.headers)f[p]=e.headers[p];o({url:n,headers:f,strictSSL:r,followRedirect:!1},function(e,r,o){if(h={contextUrl:null,documentUrl:n,document:o||null},e)return l(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:n,cause:e}),h);if(r.statusCode>=400)return l(new T("URL could not be dereferenced: "+a.STATUS_CODES[r.statusCode],"jsonld.InvalidUrl",{code:"loading document failed",url:n,httpStatusCode:r.statusCode}),h);if(r.headers.link&&"application/ld+json"!==r.headers["content-type"]){var s=t.parseLinkHeader(r.headers.link)[E];if(tt(s))return l(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:n}),h);s&&(h.contextUrl=s.target)}if(r.statusCode>=300&&r.statusCode<400&&r.headers.location)return u.length===i?l(new T("URL could not be dereferenced; there were too many redirects.","jsonld.TooManyRedirects",{code:"loading document failed",url:n,httpStatusCode:r.statusCode,redirects:u}),h):-1!==u.indexOf(n)?l(new T("URL could not be dereferenced; infinite redirection was detected.","jsonld.InfiniteRedirectDetected",{code:"recursive context inclusion",url:n,httpStatusCode:r.statusCode,redirects:u}),h):(u.push(n),c(r.headers.location,u,l));u.push(n),l(e,h)})}},t.documentLoaders.xhr=function(e){e=e||{};var n=/(^|(\r\n))link:/i,r=new t.RequestQueue;return("usePromise"in e?e.usePromise:"undefined"!=typeof Promise)?r.wrapLoader(function(e){return t.promisify(i,e)}):r.wrapLoader(i);function i(r,i){if(0!==r.indexOf("http:")&&0!==r.indexOf("https:"))return i(new T('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null});if(e.secure&&0!==r.indexOf("https"))return i(new T('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null});var o=new(e.xhr||XMLHttpRequest);o.onload=function(){if(o.status>=400)return i(new T("URL could not be dereferenced: "+o.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:r,httpStatusCode:o.status}),{contextUrl:null,documentUrl:r,document:null});var e,s={contextUrl:null,documentUrl:r,document:o.response},a=o.getResponseHeader("Content-Type");if(n.test(o.getAllResponseHeaders())&&(e=o.getResponseHeader("Link")),e&&"application/ld+json"!==a){if(tt(e=t.parseLinkHeader(e)[E]))return i(new T("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:r}),s);e&&(s.contextUrl=e.target)}i(null,s)},o.onerror=function(){i(new T("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:r}),{contextUrl:null,documentUrl:r,document:null})},o.open("GET",r,!0),o.setRequestHeader("Accept","application/ld+json, application/json"),o.send()}},t.useDocumentLoader=function(e){if(!(e in t.documentLoaders))throw new T('Unknown document loader type: "'+e+'"',"jsonld.UnknownDocumentLoader",{type:e});t.documentLoader=t.documentLoaders[e].apply(t,Array.prototype.slice.call(arguments,1))},t.processContext=function(e,n){var r={},i=2;arguments.length>3&&(r=arguments[2]||{},i+=1);var o=arguments[i];if("base"in r||(r.base=""),"documentLoader"in r||(r.documentLoader=t.loadDocument),null===n)return o(null,Q(r));Z(n=ft(n))&&"@context"in n||(n={"@context":n}),dt(n,r,function(t,n){if(t)return o(t);try{n=(new O).processContext(e,n,r)}catch(t){return o(t)}o(null,n)})},t.hasProperty=function(t,e){var n=!1;if(e in t){var r=t[e];n=!tt(r)||r.length>0}return n},t.hasValue=function(e,n,r){var i=!1;if(t.hasProperty(e,n)){var o=e[n],s=lt(o);if(tt(o)||s){s&&(o=o["@list"]);for(var a=0;a0){var E=J(e,f);t.addValue(o,E,k)}}else{var k;if(nt(p))k=J(e,p,null,{vocab:"@type"===f});else{k=[];for(var O=0;O1&&!(2===k&&"@index"in a))throw new T('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:a});"@set"in a&&(a=a["@set"],k=(f=Object.keys(a)).length)}else 1===k&&"@language"in a&&(a=null);return!Z(a)||i.keepFreeFloatingNodes||o||null!==n&&"@graph"!==h||(0===k||"@value"in a||"@list"in a||1===k&&"@id"in a)&&(a=null),a},O.prototype.createNodeMap=function(t,e){var n={"@default":{}};return F(t,n,"@default",(e=e||{}).namer||e.issuer||new mt("_:b")),V(n)},O.prototype.flatten=function(t){for(var e=this.createNodeMap(t),n=[],r=Object.keys(e).sort(),i=0;i=r.MAX_TOTAL_DEPTH)return n(new Error("Maximum total call stack depth exceeded; normalization aborting."));!function i(){if(r.depth===r.MAX_DEPTH)return r.depth=0,r.running=!1,t.nextTick(i);var o=(new Date).getTime();if(r.running||(r.start=(new Date).getTime(),r.deadline=r.start+r.timeSlice),o1)return o();var a=s[0];r.canonicalIssuer.getId(a),delete i[a],delete r.hashToBlankNodes[t],e=!0,o()},t)}],t)},t)},function(t){var e=Object.keys(r.hashToBlankNodes).sort();r.forEach(e,function(t,e,n){var i=[],o=r.hashToBlankNodes[t];r.waterfall([function(t){r.forEach(o,function(t,e,n){if(r.canonicalIssuer.hasId(t))return n();var o=new mt("_:b");o.getId(t),r.hashNDegreeQuads(t,o,function(t,e){if(t)return n(t);i.push(e),n()})},t)},function(t){i.sort(function(t,e){return t.hashe.hash?1:0}),r.forEach(i,function(t,e,n){for(var i in t.issuer.existing)r.canonicalIssuer.getId(i);n()},t)}],n)},t)},function(t){var e=[];r.waterfall([function(t){r.forEach(r.quads,function(t,n,i){r.forEachComponent(t,function(t){"blank node"===t.type&&0!==t.value.indexOf(r.canonicalIssuer.prefix)&&(t.value=r.canonicalIssuer.getId(t.value))}),e.push(yt(t)),i()},t)},function(t){if(e.sort(),"application/nquads"===r.options.format)return n=e.join(""),t();n=gt(e.join("")),t()}],t)}],function(t){e(t,n)})},M.prototype.hashFirstDegreeQuads=function(t,e){var n=this,r=n.blankNodeInfo[t];if("hash"in r)return e(null,r.hash);var i=[];n.forEach(r.quads,function(e,r,o){var s={predicate:e.predicate};n.forEachComponent(e,function(e,r){s[r]=n.modifyFirstDegreeComponent(t,e,r)}),i.push(yt(s)),o()},function(t){if(t)return e(t);i.sort(),r.hash=bt.hashNQuads(n.name,i),e(null,r.hash)})},M.prototype.modifyFirstDegreeComponent=function(t,e){return"blank node"!==e.type?e:((e=ft(e)).value=e.value===t?"_:a":"_:z",e)},M.prototype.hashRelatedBlankNode=function(t,e,n,r,i){var o,s=this;s.waterfall([function(e){return s.canonicalIssuer.hasId(t)?(o=s.canonicalIssuer.getId(t),e()):n.hasId(t)?(o=n.getId(t),e()):void s.hashFirstDegreeQuads(t,function(t,n){if(t)return e(t);o=n,e()})}],function(t){if(t)return i(t);var n=new bt(s.name);return n.update(r),"g"!==r&&n.update(s.getRelatedPredicate(e)),n.update(o),i(null,n.digest())})},M.prototype.getRelatedPredicate=function(t){return"<"+t.predicate.value+">"},M.prototype.hashNDegreeQuads=function(t,e,n){var r,i=this,o=new bt(i.name);i.waterfall([function(n){i.createHashToRelated(t,e,function(t,e){if(t)return n(t);r=e,n()})},function(t){var n=Object.keys(r).sort();i.forEach(n,function(t,n,s){o.update(t);var a,u="",l=new vt(r[t]);i.whilst(function(){return l.hasNext()},function(t){var n=l.next(),r=e.clone(),o="",s=[];i.waterfall([function(e){i.forEach(n,function(e,n,a){if(i.canonicalIssuer.hasId(e)?o+=i.canonicalIssuer.getId(e):(r.hasId(e)||s.push(e),o+=r.getId(e)),0!==u.length&&o.length>=u.length&&o>u)return t();a()},e)},function(e){i.forEach(s,function(e,n,s){i.hashNDegreeQuads(e,r,function(n,i){return n?s(n):(o+=r.getId(e),o+="<"+i.hash+">",r=i.issuer,0!==u.length&&o.length>=u.length&&o>u?t():void s())})},e)},function(t){(0===u.length||o=0;--n)if(e[n]["@id"]===t["@id"])return!0;return!1}function H(t,e,n){var r="@"+n,i=r in t?t[r][0]:e[n];return"embed"===n&&(!0===i?i="@last":!1===i?i="@never":"@always"!==i&&"@never"!==i&&"@link"!==i&&(i="@last")),i}function q(e,n,r){if("@type"in n&&(1!==n["@type"].length||!Z(n["@type"][0]))){for(var i=n["@type"],o=0;o=0;--d)for(var k=S[d],T=k.terms,O=0;O0&&s.length>a&&o[0]===s[0];)o.shift(),s.shift();var u="";if(o.length>0){o.pop();for(var l=0;l=(i=s[u].iri).length?"":i[r])in a?a[o].push(s[u]):a[o]=[s[u]];for(var e in a)""!==e&&n(a,e,r+1)}function r(t,e,n,r){r in n||(n[r]=e)}}function X(t){if(!nt(t))return!1;switch(t){case"@base":case"@context":case"@container":case"@default":case"@embed":case"@explicit":case"@graph":case"@id":case"@index":case"@language":case"@list":case"@omitDefault":case"@preserve":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@vocab":return!0}return!1}function Z(t){return"[object Object]"===Object.prototype.toString.call(t)}function tt(t){return Array.isArray(t)}function et(t){if(!nt(t)&&!function(t){return Z(t)&&0===Object.keys(t).length}(t)){var e=!1;if(tt(t)){e=!0;for(var n=0;n1||!("@id"in t)),e}function at(t){return Z(t)&&1===Object.keys(t).length&&"@id"in t}function ut(t){return Z(t)&&"@value"in t}function lt(t){return Z(t)&&"@list"in t}function ct(t){var e=!1;return Z(t)&&(e="@id"in t?0===t["@id"].indexOf("_:"):0===Object.keys(t).length||!("@value"in t||"@set"in t||"@list"in t)),e}function ht(t){return nt(t)&&-1!==t.indexOf(":")}function ft(t){if(t&&"object"==typeof t){var e;if(tt(t)){e=[];for(var n=0;nk)return r=new T("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"loading remote context failed",max:k}),s(r);var a={},u=function(){pt(t,a,!0,o),s(null,t)};if(!pt(t,a,!1,o))return u();var l=[];for(var c in a)!1===a[c]&&l.push(c);for(var h=l.length,f=0;f]*)>)|(_:(?:[A-Za-z0-9]+)))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-z0-9]+))|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-z]+(?:-[a-z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-z0-9]+)))[ \\t]*\\.))[ \\t]*(?:#.*)?$'),r={},i=t.split(/(?:\r\n)|(?:\n)|(?:\r)/g),o=0,s=0;s":n.value,s+=" ",s+="IRI"===r.type?"<"+r.value+">":r.value,s+=" ","IRI"===i.type?s+="<"+i.value+">":"blank node"===i.type?s+=i.value:(s+='"'+i.value.replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\"/g,'\\"')+'"',i.datatype===C?i.language&&(s+="@"+i.language):i.datatype!==v&&(s+="^^<"+i.datatype+">")),null!=o&&(0!==o.indexOf("_:")?s+=" <"+o+">":s+=" "+o),s+" .\n"}function mt(t){this.prefix=t,this.counter=0,this.existing={}}Object.keys||(Object.keys=function(t){if(t!==Object(t))throw new TypeError("Object.keys called on non-object");var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),t.registerRDFParser("application/nquads",gt),t.registerRDFParser("rdfa-api",function(t){for(var e={"@default":[]},n=t.getSubjects(),r=0;re)&&(s&&i>0&&o>this.list[i-1]||!s&&ithis.list[i+1])&&(e=o,n=i)}if(null===e)this.done=!0;else{var a=this.left[e]?n-1:n+1;for(this.list[n]=this.list[a],this.list[a]=e,i=0;ie&&(this.left[this.list[i]]=!this.left[this.list[i]])}return t};var bt=function(t){if(!(this instanceof bt))return new bt(t);if(-1===["URDNA2015","URGNA2012"].indexOf(t))throw new Error("Invalid RDF Dataset Normalization algorithm: "+t);bt._init.call(this,t)};if(bt.hashNQuads=function(t,e){for(var n=new bt(t),r=0;r0;)1&r&&(e._padding+=n),(r>>>=1)>0&&(n+=n)}this.start()};e.prototype.start=function(){this.messageLength=0,this.fullMessageLength=[];for(var t=this._algorithm.messageLengthSize/4,n=0;n>>0,n>>>0];for(var r=this.fullMessageLength.length-1;r>=0;--r)this.fullMessageLength[r]+=n[1],n[1]=n[0]+(this.fullMessageLength[r]/4294967296>>>0),this.fullMessageLength[r]=this.fullMessageLength[r]>>>0,n[0]=n[1]/4294967296>>>0;for(this._input.putBytes(t.bytes());this._input.length()>=this._algorithm.blockSize;)this.state=this._algorithm.digest(this.state,this._input);return(this._input.read>2048||0===this._input.length())&&this._input.compact(),this},e.prototype.digest=function(){var t=new e.ByteBuffer;t.putBytes(this._input.bytes()),t.putBytes(e._padding.substr(0,this._algorithm.blockSize-(this.fullMessageLength[this.fullMessageLength.length-1]+this._algorithm.messageLengthSize&this._algorithm.blockSize-1)));for(var n=new e.ByteBuffer,r=0;r>>28);this._algorithm.writeMessageLength(t,n);var i=this._algorithm.digest(this.state.copy(),t),o=new e.ByteBuffer;return i.write(o),o},e.ByteBuffer=function(t){this.data="string"==typeof t?t:"",this.read=0},e.ByteBuffer.prototype.putInt32=function(t){this.data+=String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)},e.ByteBuffer.prototype.getInt32=function(){var t=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,t},e.ByteBuffer.prototype.putBytes=function(t){this.data+=t},e.ByteBuffer.prototype.bytes=function(){return this.data.slice(this.read)},e.ByteBuffer.prototype.length=function(){return this.data.length-this.read},e.ByteBuffer.prototype.compact=function(){this.data=this.data.slice(this.read),this.read=0},e.ByteBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=64;){for(i=t.h0,o=t.h1,s=t.h2,a=t.h3,u=t.h4,l=0;l<16;++l)r=e.getInt32(),h[l]=r,r=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<20;++l)r=(r=h[l-3]^h[l-8]^h[l-14]^h[l-16])<<1|r>>>31,h[l]=r,r=(i<<5|i>>>27)+(a^o&(s^a))+u+1518500249+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<32;++l)r=(r=h[l-3]^h[l-8]^h[l-14]^h[l-16])<<1|r>>>31,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+1859775393+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<40;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+1859775393+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<60;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o&s|a&(o^s))+u+2400959708+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;for(;l<80;++l)r=(r=h[l-6]^h[l-16]^h[l-28]^h[l-32])<<2|r>>>30,h[l]=r,r=(i<<5|i>>>27)+(o^s^a)+u+3395469782+r,u=a,a=s,s=o<<30|o>>>2,o=i,i=r;t.h0=t.h0+i|0,t.h1=t.h1+o|0,t.h2=t.h2+s|0,t.h3=t.h3+a|0,t.h4=t.h4+u|0,c-=64}return t},n._createState=function(){var t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520,copy:function(){var e=n._createState();return e.h0=t.h0,e.h1=t.h1,e.h2=t.h2,e.h3=t.h3,e.h4=t.h4,e},write:function(e){e.putInt32(t.h0),e.putInt32(t.h1),e.putInt32(t.h2),e.putInt32(t.h3),e.putInt32(t.h4)}};return t};var r={_k:null,_w:null,Algorithm:function(){this.name="sha256",this.blockSize=64,this.digestLength=32,this.messageLengthSize=8}};r.Algorithm.prototype.start=function(){return r._k||r._init(),r._createState()},r.Algorithm.prototype.writeMessageLength=function(t,e){t.putBytes(e.bytes())},r.Algorithm.prototype.digest=function(t,e){for(var n,i,o,s,a,u,l,c,h,f,p,d,g=e.length(),y=r._k,m=r._w;g>=64;){for(s=0;s<16;++s)m[s]=e.getInt32();for(;s<64;++s)n=((n=m[s-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=m[s-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,m[s]=n+m[s-7]+i+m[s-16]|0;for(a=t.h0,u=t.h1,l=t.h2,c=t.h3,h=t.h4,f=t.h5,p=t.h6,d=t.h7,s=0;s<64;++s)o=a&u|l&(a^u),n=d+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(p^h&(f^p))+y[s]+m[s],d=p,p=f,f=h,h=c+n|0,c=l,l=u,u=a,a=n+(i=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+o)|0;t.h0=t.h0+a|0,t.h1=t.h1+u|0,t.h2=t.h2+l|0,t.h3=t.h3+c|0,t.h4=t.h4+h|0,t.h5=t.h5+f|0,t.h6=t.h6+p|0,t.h7=t.h7+d|0,g-=64}return t},r._createState=function(){var t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225,copy:function(){var e=r._createState();return e.h0=t.h0,e.h1=t.h1,e.h2=t.h2,e.h3=t.h3,e.h4=t.h4,e.h5=t.h5,e.h6=t.h6,e.h7=t.h7,e},write:function(e){e.putInt32(t.h0),e.putInt32(t.h1),e.putInt32(t.h2),e.putInt32(t.h3),e.putInt32(t.h4),e.putInt32(t.h5),e.putInt32(t.h6),e.putInt32(t.h7)}};return t},r._init=function(){r._k=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r._w=new Array(64)}}(),!p)var wt=function(){p=n(10).XMLSerializer};function _t(t,e){var n="";0===t.indexOf("/")&&(n="/");for(var r=t.split("/"),i=[];r.length>0;)"."===r[0]||""===r[0]&&r.length>1?r.shift():".."!==r[0]?i.push(r.shift()):(r.shift(),e||i.length>0&&".."!==i[i.length-1]?i.pop():i.push(".."));return n+i.join("/")}if(t.url={},t.url.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},t.url.parse=function(e,n){for(var r={},i=t.url.parsers[n||"full"],o=i.regex.exec(e),s=i.keys.length;s--;)r[i.keys[s]]=void 0===o[s]?null:o[s];return r.normalizedPath=_t(r.path,!!r.authority),r},u?t.useDocumentLoader("node"):"undefined"!=typeof XMLHttpRequest&&t.useDocumentLoader("xhr"),u){t.use=function(e){switch(e){case"request":t.request=n(10);break;default:throw new T("Unknown extension.","jsonld.UnknownExtension",{extension:e})}};var xt={exports:{},filename:s};n(10)(xt,"version"),t.version=xt.exports.version}return t},h=function(){return c(function(){return h()})};!u&&n(68)?void 0===(a=(function(){return c(h),h}).apply(e,[]))||(t.exports=a):(c(h),t.exports&&(t.exports=h),l&&("undefined"==typeof jsonld?jsonld=jsonldjs=h:jsonldjs=h))}()}).call(this,n(8),n(6),n(16).setImmediate,"/")},function(t,e,n){(function(r,i,o){var s;(function(){"use strict";function a(t){return"function"==typeof t}var u,l,c=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},h=0,f=function(t,e){k[h]=t,k[h+1]=e,2===(h+=2)&&(l?l(T):b())},p="undefined"!=typeof window?window:void 0,d=p||{},g=d.MutationObserver||d.WebKitMutationObserver,y=void 0!==r&&"[object process]"==={}.toString.call(r),m="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){setTimeout(T,1)}}var b,w,_,x,S,C,E,k=new Array(1e3);function T(){for(var t=0;t<"]=0,this._entityCount=0,this._blankNodeIndex=0,e||!t||t[0]||(e=t,t=null),this._prefixes=Object.create(null),e&&e.prefixes&&this.addPrefixes(e.prefixes),t&&this.addTriples(t)}i.prototype={get size(){var t=this._size;if(null!==t)return t;var e,n,r=this._graphs;for(var i in r)for(var o in e=r[i].subjects)for(var s in n=e[o])t+=Object.keys(n[s]).length;return this._size=t},_addToIndex:function(t,e,n,r){var i=t[e]||(t[e]={});(i[n]||(i[n]={}))[r]=null},_removeFromIndex:function(t,e,n,r){var i,o=t[e],s=o[n];for(i in delete s[r],s)return;for(i in delete o[n],o)return;delete t[e]},_findInIndex:function(t,e,n,r,i,o,s,a){var u,l,c,h=[],f=Object.keys(this._entities);for(var p in e&&((u=t,t={})[e]=u[e]),t){var d=f[p];if(l=t[p])for(var g in n&&((u=l,l={})[n]=u[n]),l){var y=f[g];if(c=l[g])for(var m=(r?r in c?[r]:[]:Object.keys(c)),v=m.length-1;v>=0;v--){var b={subject:"",predicate:"",object:"",graph:a};b[i]=d,b[o]=y,b[s]=f[m[v]],h.push(b)}}}return h},_countInIndex:function(t,e,n,r){var i,o,s,a=0;for(var u in e&&((i=t,t={})[e]=i[e]),t)if(o=t[u])for(var l in n&&((i=o,o={})[n]=i[n]),o)(s=o[l])&&(r?r in s&&a++:a+=Object.keys(s).length);return a},addTriple:function(t,e,n,r){e||(r=t.graph,n=t.object,e=t.predicate,t=t.subject);var i=this._graphs[r=r||""];i||(i=this._graphs[r]={subjects:{},predicates:{},objects:{}},Object.freeze(i));var o=this._entities;t=o[t]||(o[t]=++this._entityCount),e=o[e]||(o[e]=++this._entityCount),n=o[n]||(o[n]=++this._entityCount),this._addToIndex(i.subjects,t,e,n),this._addToIndex(i.predicates,e,n,t),this._addToIndex(i.objects,n,t,e),this._size=null},addTriples:function(t){for(var e=t.length-1;e>=0;e--)this.addTriple(t[e])},addPrefix:function(t,e){this._prefixes[t]=e},addPrefixes:function(t){for(var e in t)this.addPrefix(e,t[e])},removeTriple:function(t,e,n,r){e||(r=t.graph,n=t.object,e=t.predicate,t=t.subject),r=r||"";var i,o,s,a=this._entities,u=this._graphs;if((t=a[t])&&(e=a[e])&&(n=a[n])&&(i=u[r])&&(o=i.subjects[t])&&(s=o[e])&&n in s){for(t in this._removeFromIndex(i.subjects,t,e,n),this._removeFromIndex(i.predicates,e,n,t),this._removeFromIndex(i.objects,n,t,e),null!==this._size&&this._size--,i.subjects)return;delete u[r]}},removeTriples:function(t){for(var e=t.length-1;e>=0;e--)this.removeTriple(t[e])},find:function(t,e,n,i){var o=this._prefixes;return this.findByIRI(r(t,o),r(e,o),r(n,o),r(i,o))},findByIRI:function(t,e,n,r){var i=this._graphs[r=r||""],o=this._entities;return i?t&&!(t=o[t])?[]:e&&!(e=o[e])?[]:n&&!(n=o[n])?[]:t?n?this._findInIndex(i.objects,n,t,e,"object","subject","predicate",r):this._findInIndex(i.subjects,t,e,null,"subject","predicate","object",r):e?this._findInIndex(i.predicates,e,n,null,"predicate","object","subject",r):n?this._findInIndex(i.objects,n,null,null,"object","subject","predicate",r):this._findInIndex(i.subjects,null,null,null,"subject","predicate","object",r):[]},count:function(t,e,n,i){var o=this._prefixes;return this.countByIRI(r(t,o),r(e,o),r(n,o),r(i,o))},countByIRI:function(t,e,n,r){var i=this._graphs[r=r||""],o=this._entities;return i?t&&!(t=o[t])?0:e&&!(e=o[e])?0:n&&!(n=o[n])?0:t?n?this._countInIndex(i.objects,n,t,e):this._countInIndex(i.subjects,t,e,n):e?this._countInIndex(i.predicates,e,n,t):this._countInIndex(i.objects,n,t,e):0},createBlankNode:function(t){var e,n;if(t)for(e=t="_:"+t,n=1;this._entities[e];)e=t+n++;else do{e="_:b"+this._blankNodeIndex++}while(this._entities[e]);return this._entities[e]=++this._entityCount,e}},t.exports=i},function(t,e,n){var r=n(48).Transform,i=n(56),o=n(30);function s(t){if(!(this instanceof s))return new s(t);r.call(this,{decodeStrings:!0}),this._readableState.objectMode=!0;var e=this,n=new o(t);n.parse(function(t,n){n&&e.push(n)||t&&e.emit("error",t)},this.emit.bind(this,"prefix")),this._transform=function(t,e,r){n.addChunk(t),r()},this._flush=function(t){n.end(),t()}}i.inherits(s,r),t.exports=s},function(t,e,n){t.exports=i;var r=n(32).EventEmitter;function i(){r.call(this)}n(11)(i,r),i.Readable=n(33),i.Writable=n(77),i.Duplex=n(78),i.Transform=n(79),i.PassThrough=n(80),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===r.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",l),t.on("error",l),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},function(t,e,n){"use strict";(function(e,r){var i=n(21);t.exports=b;var o,s=n(50);b.ReadableState=v,n(32);var a=function(t,e){return t.listeners(e).length},u=n(51),l=n(22).Buffer,c=e.Uint8Array||function(){},h=n(17);h.inherits=n(11);var f=n(72),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var d,g=n(73),y=n(53);h.inherits(b,u);var m=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(o=o||n(12));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:this.objectMode?16:16384,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(54).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(12),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,C(t)}}(t,s)):(i||(o=function(t,e){var n,r;return l.isBuffer(r=e)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=l.from(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):k(t,s)):_(t,s,e,!1))):r||(s.reading=!1)),!s.ended&&(s.needReadable||s.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){p("emit readable"),t.emit("readable"),P(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;return to.length?o.length:t;if(i+=s===o.length?o:o.slice(0,t),0==(t-=s)){s===o.length?(++r,e.head=n.next?n.next:e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=l.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0==(t-=s)){s===o.length?(++i,e.head=r.next?r.next:e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e),r}(t,e.buffer,e.decoder),n);var n}function R(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):C(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&R(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?A(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&R(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===r.stdout||t===r.stderr?v:l;function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",function e(r,i){p("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",m),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",e),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",d),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())});var c=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",c);var h=!1,f=!1;function d(e){p("ondata"),f=!1,!1!==t.write(e)||f||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==j(o.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,f=!0),n.pause())}function g(e){p("onerror",e),v(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",m),v()}function m(){p("onfinish"),t.removeListener("close",y),v()}function v(){p("unpipe"),n.unpipe(t)}return n.on("data",d),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",y),t.once("finish",m),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(e,t.length-n),t,n,r)}function C(t,e,n){return r.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=t[i+2],128==(192&(o=t[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=t[i+2],a=t[i+3],128==(192&(o=t[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var n="",r=0;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}).apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),l=this.slice(r,i),c=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return b(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function j(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(6))},function(t,e,n){"use strict";var r=n(21);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";var r=n(22).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";t.exports=s;var r=n(12),i=n(17);function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"\x1b["+a.colors[n][0]+"m"+t+"\x1b["+a.colors[n][1]+"m":t}function l(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return s.forEach(function(t,n){e[t]=!0}),e}();if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),x(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(S(n))return t.stylize("[Function"+(n.name?": "+n.name:"")+"]","special");if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return h(n)}var u,l="",w=!1,C=["{","}"];return p(n)&&(w=!0,C=["[","]"]),S(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(l=" "+RegExp.prototype.toString.call(n)),_(n)&&(l=" "+Date.prototype.toUTCString.call(n)),x(n)&&(l=" "+h(n)),0!==s.length||w&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=w?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(u,l,C)):C[0]+l+C[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=t.stylize(u.set?"[Getter/Setter]":"[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===C(t)}function x(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function S(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(o)&&(o=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=w,e.isDate=_,e.isError=x,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(81);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(n=[E((t=new Date).getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),k[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(11),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,n(6),n(8))},function(t,e,n){var r=n(48).Transform,i=n(56),o=n(35);function s(t){if(!(this instanceof s))return new s(t);r.call(this,{encoding:"utf8"}),this._writableState.objectMode=!0;var e=this,n=new o({write:function(t,n,r){e.push(t),r&&r()},end:function(t){e.push(null),t&&t()}},t);this._transform=function(t,e,r){n.addTriple(t,r)},this._flush=function(t){n.end(t)}}i.inherits(s,r),t.exports=s},function(t,e){function n(t,e){for(var n in t)e[n]=t[n]}function r(t,e){var r=t.prototype;if(Object.create){var i=Object.create(e.prototype);r.__proto__=i}if(!(r instanceof e)){function o(){}o.prototype=e.prototype,n(r,o=new o),t.prototype=r=o}r.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),r.constructor=t)}var i="http://www.w3.org/1999/xhtml",o={},s=o.ELEMENT_NODE=1,a=o.ATTRIBUTE_NODE=2,u=o.TEXT_NODE=3,l=o.CDATA_SECTION_NODE=4,c=o.ENTITY_REFERENCE_NODE=5,h=o.ENTITY_NODE=6,f=o.PROCESSING_INSTRUCTION_NODE=7,p=o.COMMENT_NODE=8,d=o.DOCUMENT_NODE=9,g=o.DOCUMENT_TYPE_NODE=10,y=o.DOCUMENT_FRAGMENT_NODE=11,m=o.NOTATION_NODE=12,v={},b={},w=(v.INDEX_SIZE_ERR=(b[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(b[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(b[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(b[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(b[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(b[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(b[7]="No modification allowed",7),v.NOT_FOUND_ERR=(b[8]="Not found",8)),x=(v.NOT_SUPPORTED_ERR=(b[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(b[10]="Attribute in use",10));function S(t,e){if(e instanceof Error)var n=e;else n=this,Error.call(this,b[t]),this.message=b[t],Error.captureStackTrace&&Error.captureStackTrace(this,S);return n.code=t,e&&(this.message=this.message+": "+e),n}function C(){}function E(t,e){this._node=t,this._refresh=e,k(this)}function k(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);nt(t,"length",r.length),n(r,t),t._inc=e}}function T(){}function O(t,e){for(var n=t.length;n--;)if(t[n]===e)return n}function I(t,e,n,r){if(r?e[O(e,r)]=n:e[e.length++]=n,t){n.ownerElement=t;var i=t.ownerDocument;i&&(r&&M(i,t,r),function(t,e,n){i&&i._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(e._nsMap[n.prefix?n.localName:""]=n.value)}(0,t,n))}}function P(t,e,n){var r=O(e,n);if(!(r>=0))throw S(_,new Error(t.tagName+"@"+n));for(var i=e.length-1;r"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function j(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(j(t,e))return!0}while(t=t.nextSibling)}function D(){}function M(t,e,n,r){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete e._nsMap[n.prefix?n.localName:""]}function L(t,e,n){if(t&&t._inc){t._inc++;var r=e.childNodes;if(n)r[r.length++]=n;else{for(var i=e.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function U(t,e){var n=e.previousSibling,r=e.nextSibling;return n?n.nextSibling=r:t.firstChild=r,r?r.previousSibling=n:t.lastChild=n,L(t.ownerDocument,t),e}function F(t,e,n){var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===y){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var s=n?n.previousSibling:t.lastChild;i.previousSibling=s,o.nextSibling=n,s?s.nextSibling=i:t.firstChild=i,null==n?t.lastChild=o:n.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return L(t.ownerDocument||t,t),e.nodeType==y&&(e.firstChild=e.lastChild=null),e}function V(){this._nsMap={}}function B(){}function z(){}function H(){}function q(){}function W(){}function G(){}function $(){}function J(){}function K(){}function Y(){}function Q(){}function X(){}function Z(t,e){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var s=[{namespace:o,prefix:null}];return et(this,n,t,e,s),n.join("")}function tt(t,e,n){var r=t.prefix||"",i=t.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix==r)return s.namespace!=i}return!0}function et(t,e,n,r,o){if(r){if(!(t=r(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case s:o||(o=[]);var h=t.attributes,m=h.length,v=t.firstChild,b=t.tagName;n=i===t.namespaceURI||n,e.push("<",b);for(var w=0;w"),n&&/^script$/i.test(b))for(;v;)v.data?e.push(v.data):et(v,e,n,r,o),v=v.nextSibling;else for(;v;)et(v,e,n,r,o),v=v.nextSibling;e.push("")}else e.push("/>");return;case d:case y:for(v=t.firstChild;v;)et(v,e,n,r,o),v=v.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,N),'"');case u:return e.push(t.data.replace(/[<&]/g,N));case l:return e.push("");case p:return e.push("\x3c!--",t.data,"--\x3e");case g:var E=t.publicId,k=t.systemId;if(e.push("');else if(k&&"."!=k)e.push(' SYSTEM "',k,'">');else{var T=t.internalSubset;T&&e.push(" [",T,"]"),e.push(">")}return;case f:return e.push("");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function nt(t,e,n){t[e]=n}v.INVALID_STATE_ERR=(b[11]="Invalid state",11),v.SYNTAX_ERR=(b[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(b[13]="Invalid modification",13),v.NAMESPACE_ERR=(b[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(b[15]="Invalid access",15),S.prototype=Error.prototype,n(v,S),C.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var n=[],r=0;r0},lookupPrefix:function(t){for(var e=this;e;){var n=e._nsMap;if(n)for(var r in n)if(n[r]==t)return r;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var n=e._nsMap;if(n&&t in n)return n[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},n(o,R),n(o,R.prototype),D.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==y){for(var n=t.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,e),n=r}return t}return null==this.documentElement&&t.nodeType==s&&(this.documentElement=t),F(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),U(this,t)},importNode:function(t,e){return function t(e,n,r){var i;switch(n.nodeType){case s:(i=n.cloneNode(!1)).ownerDocument=e;case y:break;case a:r=!0}if(i||(i=n.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,r)for(var o=n.firstChild;o;)i.appendChild(t(e,o,r)),o=o.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return j(this.documentElement,function(n){if(n.nodeType==s&&n.getAttribute("id")==t)return e=n,!0}),e},createElement:function(t){var e=new V;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new C,(e.attributes=new T)._ownerElement=e,e},createDocumentFragment:function(){var t=new Y;return t.ownerDocument=this,t.childNodes=new C,t},createTextNode:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new q;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=t,n.nodeValue=n.data=e,n},createAttribute:function(t){var e=new B;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new K;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var n=new V,r=e.split(":"),i=n.attributes=new T;return n.childNodes=new C,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,i._ownerElement=n,n},createAttributeNS:function(t,e){var n=new B,r=e.split(":");return n.ownerDocument=this,n.nodeName=e,n.name=e,n.namespaceURI=t,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=e,n}},r(D,R),D.prototype.getElementsByTagName=(V.prototype={nodeType:s,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var n=this.ownerDocument.createAttribute(t);n.value=n.nodeValue=""+e,this.setAttributeNode(n)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===y?this.insertBefore(t,null):function(t,e){var n=e.parentNode;if(n){var r=t.lastChild;n.removeChild(e),r=t.lastChild}return r=t.lastChild,e.parentNode=t,e.previousSibling=r,e.nextSibling=null,r?r.nextSibling=e:t.firstChild=e,t.lastChild=e,L(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);n&&this.removeAttributeNode(n)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var n=this.getAttributeNodeNS(t,e);return n&&n.value||""},setAttributeNS:function(t,e,n){var r=this.ownerDocument.createAttributeNS(t,e);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new E(this,function(e){var n=[];return j(e,function(r){r===e||r.nodeType!=s||"*"!==t&&r.tagName!=t||n.push(r)}),n})},getElementsByTagNameNS:function(t,e){return new E(this,function(n){var r=[];return j(n,function(i){i===n||i.nodeType!==s||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||r.push(i)}),r})}}).getElementsByTagName,D.prototype.getElementsByTagNameNS=V.prototype.getElementsByTagNameNS,r(V,R),B.prototype.nodeType=a,r(B,R),z.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){this.nodeValue=this.data=t=this.data+t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(b[w])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,n){n=this.data.substring(0,t)+n+this.data.substring(t+e),this.nodeValue=this.data=n,this.length=n.length}},r(z,R),H.prototype={nodeName:"#text",nodeType:u,splitText:function(t){var e=this.data,n=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,z),q.prototype={nodeName:"#comment",nodeType:p},r(q,z),W.prototype={nodeName:"#cdata-section",nodeType:l},r(W,z),G.prototype.nodeType=g,r(G,R),$.prototype.nodeType=m,r($,R),J.prototype.nodeType=h,r(J,R),K.prototype.nodeType=c,r(K,R),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=y,r(Y,R),Q.prototype.nodeType=f,r(Q,R),X.prototype.serializeToString=function(t,e,n){return Z.call(t,e,n)},R.prototype.toString=Z;try{Object.defineProperty&&(Object.defineProperty(E.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case s:case y:var n=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&n.push(t(e)),e=e.nextSibling;return n.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case s:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),nt=function(t,e,n){t["$$"+e]=n})}catch(t){}e.DOMImplementation=A,e.XMLSerializer=X},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(9),u=n(14),l=n(20),c=n(15),h=n(13),f=n(2),p=n(3),d=n(37),g=n(24),y=n(25),m=function(t){function e(t,n,r,s){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=i(this,o(e).call(this))).termType=e.termType,a.statements=t||[],a.constraints=n||[],a.initBindings=r||[],a.optional=s||[],a}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,p),(n=[{key:"add",value:function(t,e,n,r){return this.statements.push(new g(t,e,n,r))}},{key:"addStatement",value:function(t){return this.statements.push(t)}},{key:"bnode",value:function(t){return new a(t)}},{key:"addAll",value:function(t){var e=this;t.forEach(function(t){e.add(t.subject,t.predicate,t.object,t.graph)})}},{key:"any",value:function(t,e,n,r){var i=this.anyStatementMatching(t,e,n,r);if(null!=i)return null==t?i.subject:null==e?i.predicate:null==n?i.object:void 0}},{key:"anyValue",value:function(t,e,n,r){var i=this.any(t,e,n,r);return i?i.value:void 0}},{key:"anyStatementMatching",value:function(t,e,n,r){var i=this.statementsMatching(t,e,n,r,!0);if(i&&0!==i.length)return i[0]}},{key:"statementsMatching",value:function(t,e,n,r,i){return this.statements.filter(function(i){return(!t||t.sameTerm(i.subject))&&(!e||e.sameTerm(i.predicate))&&(!n||t.sameTerm(i.object))&&(!r||r.sameTerm(i.subject))})}},{key:"bottomTypeURIs",value:function(t){var e,n,r,i,o,s,a;for(i in e=[],t)if(t.hasOwnProperty(i)){for(a=t[i],n=!0,r=0,o=(s=this.each(void 0,this.sym("http://www.w3.org/2000/01/rdf-schema#subClassOf"),this.sym(i))).length;r as "+d+":\n"+t+":\n"+t.stack);g(t,n)}}(t)}function b(){g&&g(null,n)}function w(t,e){t&&g(t,n);try{y.parse(e,_)}catch(t){g(t,n)}}function _(t,e,r){if(t&&g(t,n),e)m.push(e);else{for(var i=0;i: Bad syntax:\n "+i+'\n at: "'+n.slice(r,r+30)+'"'};o=0;var p=e.sym(n+"#query");for(h.query=p;;){if((s=c.skipSpace(t,o))<0)return h;if(";"===t[s]){if((o=c.skipSpace(t,s+1))<0)return h;s=o}var d=!1;for(a=0;a=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(64),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",l="object"==typeof t,c=e.regeneratorRuntime;if(c)l&&(t.exports=c);else{(c=e.regeneratorRuntime=l?t.exports:{}).wrap=w;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",g={},y={};y[s]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(A([])));v&&v!==r&&i.call(v,s)&&(y=v);var b=C.prototype=x.prototype=Object.create(y);S.prototype=b.constructor=C,C.constructor=S,C[u]=S.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(b),t},c.awrap=function(t){return{__await:t}},E(k.prototype),k.prototype[a]=function(){return this},c.AsyncIterator=k,c.async=function(t,e,n,r){var i=new k(w(t,e,n,r));return c.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(b),b[u]="Generator",b[s]=function(){return this},b.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return a.type="throw",a.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(u&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}}}function w(t,e,n,r){var i=Object.create((e&&e.prototype instanceof x?e:x).prototype),o=new P(r||[]);return i._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=_(t,e,n);if("normal"===u.type){if(r=n.done?d:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,o),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function C(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,s){var a=_(t[n],t,r);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,s)})}s(a.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function T(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,T(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=_(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=t.length&&n()}h(t,function(t){e(t,u(i))})},a.forEach=a.each,a.eachSeries=function(t,e,n){if(n=n||function(){},!t.length)return n();var r=0,i=function(){e(t[r],function(e){e?(n(e),n=function(){}):(r+=1)>=t.length?n():i()})};i()},a.forEachSeries=a.eachSeries,a.eachLimit=function(t,e,n,r){d(e).apply(null,[t,n,r])},a.forEachLimit=a.eachLimit;var d=function(t){return function(e,n,r){if(r=r||function(){},!e.length||t<=0)return r();var i=0,o=0,s=0;!function a(){if(i>=e.length)return r();for(;s=e.length?r():a())})}()}},g=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[a.each].concat(e))}},y=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[a.eachSeries].concat(e))}},m=function(t,e,n,r){if(e=f(e,function(t,e){return{index:e,value:t}}),r){var i=[];t(e,function(t,e){n(t.value,function(n,r){i[t.index]=r,e(n)})},function(t){r(t,i)})}else t(e,function(t,e){n(t.value,function(t){e(t)})})};a.map=g(m),a.mapSeries=y(m),a.mapLimit=function(t,e,n,r){return v(e)(t,n,r)};var v=function(t){return function(t,e){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[d(t)].concat(n))}}(t,m)};a.reduce=function(t,e,n,r){a.eachSeries(t,function(t,r){n(e,t,function(t,n){e=n,r(t)})},function(t){r(t,e)})},a.inject=a.reduce,a.foldl=a.reduce,a.reduceRight=function(t,e,n,r){var i=f(t,function(t){return t}).reverse();a.reduce(i,e,n,r)},a.foldr=a.reduceRight;var b=function(t,e,n,r){var i=[];t(e=f(e,function(t,e){return{index:e,value:t}}),function(t,e){n(t.value,function(n){n&&i.push(t),e()})},function(t){r(f(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};a.filter=g(b),a.filterSeries=y(b),a.select=a.filter,a.selectSeries=a.filterSeries;var w=function(t,e,n,r){var i=[];t(e=f(e,function(t,e){return{index:e,value:t}}),function(t,e){n(t.value,function(n){n||i.push(t),e()})},function(t){r(f(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};a.reject=g(w),a.rejectSeries=y(w);var _=function(t,e,n,r){t(e,function(t,e){n(t,function(n){n?(r(t),r=function(){}):e()})},function(t){r()})};a.detect=g(_),a.detectSeries=y(_),a.some=function(t,e,n){a.each(t,function(t,r){e(t,function(t){t&&(n(!0),n=function(){}),r()})},function(t){n(!1)})},a.any=a.some,a.every=function(t,e,n){a.each(t,function(t,r){e(t,function(t){t||(n(!1),n=function(){}),r()})},function(t){n(!0)})},a.all=a.every,a.sortBy=function(t,e,n){a.map(t,function(t,n){e(t,function(e,r){e?n(e):n(null,{value:t,criteria:r})})},function(t,e){if(t)return n(t);n(null,f(e.sort(function(t,e){var n=t.criteria,r=e.criteria;return nr?1:0}),function(t){return t.value}))})},a.auto=function(t,e){e=e||function(){};var n=p(t),r=n.length;if(!r)return e();var i={},o=[],s=function(t){o.unshift(t)},u=function(){r--,h(o.slice(0),function(t){t()})};s(function(){if(!r){var t=e;e=function(){},t(null,i)}}),h(n,function(n){var r=c(t[n])?t[n]:[t[n]],l=function(t){var r=Array.prototype.slice.call(arguments,1);if(r.length<=1&&(r=r[0]),t){var o={};h(p(i),function(t){o[t]=i[t]}),o[n]=r,e(t,o),e=function(){}}else i[n]=r,a.setImmediate(u)},f=r.slice(0,Math.abs(r.length-1))||[],d=function(){return e=function(t,e){return t&&i.hasOwnProperty(e)},r=!0,((t=f).reduce?t.reduce(e,r):(h(t,function(t,n,i){r=e(r,t)}),r))&&!i.hasOwnProperty(n);var t,e,r};if(d())r[r.length-1](l,i);else{var g=function(){d()&&(function(t){for(var e=0;e>>1);n(e,t[o])>=0?r=o:i=o-1}return r}(t.tasks,o,n)+1,0,o),t.saturated&&t.tasks.length===t.concurrency&&t.saturated(),a.setImmediate(t.process)})}(r,t,e,i)},delete r.unshift,r},a.cargo=function(t,e){var n=!1,r=[],i={tasks:r,payload:e,saturated:null,empty:null,drain:null,drained:!0,push:function(t,n){c(t)||(t=[t]),h(t,function(t){r.push({data:t,callback:"function"==typeof n?n:null}),i.drained=!1,i.saturated&&r.length===e&&i.saturated()}),a.setImmediate(i.process)},process:function o(){if(!n){if(0===r.length)return i.drain&&!i.drained&&i.drain(),void(i.drained=!0);var s=r.splice(0,"number"==typeof e?e:r.length),a=f(s,function(t){return t.data});i.empty&&i.empty(),n=!0,t(a,function(){n=!1;var t=arguments;h(s,function(e){e.callback&&e.callback.apply(null,t)}),o()})}},length:function(){return r.length},running:function(){return n}};return i};var C=function(t){return function(e){var n=Array.prototype.slice.call(arguments,1);e.apply(null,n.concat([function(e){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(e?console.error&&console.error(e):console[t]&&h(n,function(e){console[t](e)}))}]))}};a.log=C("log"),a.dir=C("dir"),a.memoize=function(t,e){var n={},r={};e=e||function(t){return t};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),s=e.apply(null,i);s in n?a.nextTick(function(){o.apply(null,n[s])}):s in r?r[s].push(o):(r[s]=[o],t.apply(null,i.concat([function(){n[s]=arguments;var t=r[s];delete r[s];for(var e=0,i=t.length;e2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};a.applyEach=g(E),a.applyEachSeries=y(E),a.forever=function(t,e){!function n(r){if(r){if(e)return e(r);throw r}t(n)}()},t.exports?t.exports=a:void 0===(i=(function(){return a}).apply(e,[]))||(t.exports=i)}()}).call(this,n(8),n(16).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,u=1,l={},c=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick(function(){d(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}):t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)},f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0?r-4:r,h=0;h>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(h)]<<2|i[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(h)]<<10|i[t.charCodeAt(h+1)]<<4|i[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=f,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=l}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,l-=8);t[n+p-d]|=128*g}},function(t,e){},function(t,e,n){"use strict";var r=n(22).Buffer,i=n(74);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e=r.allocUnsafe(t>>>0),n=this.head,i=0;n;)n.data.copy(e,i),i+=n.data.length,n=n.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(6))},function(t,e,n){"use strict";t.exports=o;var r=n(55),i=n(17);function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(11),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(34)},function(t,e,n){t.exports=n(12)},function(t,e,n){t.exports=n(33).Transform},function(t,e,n){t.exports=n(33).PassThrough},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(3),u=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType="DefaultGraph",t.value="",t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,a),(n=[{key:"toCanonical",value:function(){return this.value}}])&&function(t,e){for(var n=0;n=e+n||e?new java.lang.String(t,e,n)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}r.prototype.parseFromString=function(t,e){var n=this.options,r=new l,o=n.domBuilder||new i,a=n.errorHandler,u=n.locator,c=n.xmlns||{},h={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(t,e,n){if(!t){if(e instanceof i)return e;t=e}var r={},o=t instanceof Function;function a(e){var i=t[e];!i&&o&&(i=2==t.length?function(n){t(e,n)}:t),r[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+s(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(a,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(e)&&(h.nbsp="\xa0",h.copy="\xa9",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",t?r.parse(t,c,h):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,n,r){var i=this.doc,s=i.createElementNS(t,n||e),a=r.length;u(this,s),this.currentElement=s,this.locator&&o(this.locator,s);for(var l=0;l":switch(y){case o:n.setTagName(t.slice(e,g));case c:case h:case f:break;case l:case s:"/"===(v=t.slice(e,g)).slice(-1)&&(n.closed=!0,v=v.slice(0,-1));case a:y===a&&(v=d),y==l?(p.warning('attribute "'+v+'" missed quot(")!!'),n.add(d,v.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===r[""]&&v.match(/^(?:disabled|checked|selected)$/i)||p.warning('attribute "'+v+'" missed value!! "'+v+'" instead!!'),n.add(v,v,e));break;case u:throw new Error("attribute value missed!!")}return g;case"\x80":m=" ";default:if(m<=" ")switch(y){case o:n.setTagName(t.slice(e,g)),y=h;break;case s:d=t.slice(e,g),y=a;break;case l:var v=t.slice(e,g).replace(/&#?\w+;/g,i);p.warning('attribute "'+v+'" missed quot(")!!'),n.add(d,v,e);case c:y=h}else switch(y){case a:"http://www.w3.org/1999/xhtml"===r[""]&&d.match(/^(?:disabled|checked|selected)$/i)||p.warning('attribute "'+d+'" missed value!! "'+d+'" instead2!!'),n.add(d,d,e),e=g,y=s;break;case c:p.warning('attribute space is required"'+d+'"!!');case h:y=s,e=g;break;case u:y=l,e=g;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function y(t,e,n){for(var r=t.tagName,i=null,o=t.length;o--;){var s=t[o],a=s.qName,u=s.value;if((f=a.indexOf(":"))>0)var l=s.prefix=a.slice(0,f),c=a.slice(f+1),h="xmlns"===l&&c;else c=a,l=null,h="xmlns"===a&&"";s.localName=c,!1!==h&&(null==i&&(i={},b(n,n={})),n[h]=i[h]=u,s.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(h,u))}for(o=t.length;o--;)(l=(s=t[o]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]));var f;(f=r.indexOf(":"))>0?(l=t.prefix=r.slice(0,f),c=t.localName=r.slice(f+1)):(l=null,c=t.localName=r);var p=t.uri=n[l||""];if(e.startElement(p,c,r,t),!t.closed)return t.currentNSMap=n,t.localNSMap=i,!0;if(e.endElement(p,c,r),i)for(l in i)e.endPrefixMapping(l)}function m(t,e,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=t.indexOf("",e),s=t.substring(e+1,o);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),o):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),o)}return e+1}function v(t,e,n,r){var i=r[n];return null==i&&((i=t.lastIndexOf(""))e?(n.comment(t,e+4,i-e-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return n.startCDATA(),n.characters(t,e+9,i-e-9),n.endCDATA(),i+3}var o=function(t,e){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=e,i.exec(t);n=i.exec(t);)if(r.push(n),n[1])return r}(t,e),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var a=o[1][0],u=s>3&&/^public$/i.test(o[2][0])&&o[3][0],l=s>4&&o[4][0],c=o[s-1];return n.startDTD(a,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function _(t,e,n){var r=t.indexOf("?>",e);if(r){var i=t.substring(e,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function x(t){}function S(t,e){return t.__proto__=e,t}p.prototype={parse:function(t,e,n){var r=this.domBuilder;r.startDocument(),b(e,e={}),function(t,e,n,r,i){function o(t){var e=t.slice(1,-1);return e in n?n[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10);return String.fromCharCode(e,56320+(1023&t))}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function s(e){if(e>b){var n=t.substring(b,e).replace(/&#?\w+;/g,o);h&&a(b),r.characters(n,0,e-b),b=e}}function a(e,n){for(;e>=l&&(n=c.exec(t));)l=(u=n.index)+n[0].length,h.lineNumber++;h.columnNumber=e-u+1}for(var u=0,l=0,c=/.*(?:\r\n?|\n)|.*$/g,h=r.locator,f=[{currentNSMap:e}],p={},b=0;;){try{var S=t.indexOf("<",b);if(S<0){if(!t.substr(b).match(/^\s*$/)){var C=r.doc,E=C.createTextNode(t.substr(b));C.appendChild(E),r.currentElement=E}return}switch(S>b&&s(S),t.charAt(S+1)){case"/":var k=t.indexOf(">",S+3),T=t.substring(S+2,k),O=f.pop();k<0?(T=t.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+T+" is not complete:"+O.tagName),k=S+1+T.length):T.match(/\sb?b=k:s(Math.max(S,b)+1)}}(t,e,n,r,this.errorHandler),r.endDocument()}},x.prototype={setTagName:function(t){if(!i.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,n){if(!i.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:n}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},S({},S.prototype)instanceof S||(S=function(t,e){function n(){}for(e in n.prototype=e,n=new n,t)n[e]=t[e];return n}),e.XMLReader=p},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var a=n(3),u=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=i(this,o(e).call(this))).termType=e.termType,t}var n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(e,a),(n=[{key:"toString",value:function(){return"()"}}])&&function(t,e){for(var n=0;n]*>$/)}function l(t){return"string"==typeof t&&(t.match(/^_:/)||t.match(/^$/))}function c(t){return"string"==typeof t&&t.match(/^:|^[^_][^:]*:/)}function h(t){return t.split(":")[0]}function f(t){return t.split(":")[1]}function p(t){return u(t)?t.slice(1,t.length-1):t}function d(t){t=t.replace(/\(/g," ( ").replace(/\)/g," ) ").replace(//g,"> ").replace(/{/g," { ").replace(/}/g," } ").replace(/[\t\n\r]/g," ").replace(/; /g," ; ").replace(/\. /g," . ").replace(/, /g," , "),r.info("New str into spaceDelimit: \n"+t);var e,n=[],i=t.split(" ");for(var o in i)"string"==typeof(e=i[o])&&e.match(/[^ \n\t]/)&&(n=n.concat(i[o]));return n}function g(t,e){for(var n=0;n"===t[1]?(r.debug("Constraint added: "+t),e.constraints[t[0]]=new v(t[2])):"<"===t[1]?(r.debug("Constraint added: "+t),e.constraints[t[0]]=new v(t[2])):r.warn("I don't know how to handle the constraint: "+t)}function _(t,e){r.debug("Optional query: "+t+" not yet implemented.");var i=n.formula();x(t,i),e.optional.push(i)}function x(t,e){var i,o,d=function(t){for(var e,i=[],o=0;o"):e,a(t[o])?i[o]=s(t[o].slice(1)):l(t[o])?(r.info(t[o]+" was identified as a bnode."),i[o]=n.bnode()):u(t[o])?(r.info(t[o]+" was identified as a symbol."),i[o]=n.sym(p(t[o]))):c(t[o])?(r.info(t[o]+" was identified as a prefixed symbol"),E[h(t[o])]?i[o]=n.sym(t[o]=E[h(t[o])]+f(t[o])):(r.error("SPARQL error: "+t[o]+" with prefix "+h(t[o])+" does not have a correct prefix entry."),i[o]=t[o])):i[o]=t[o]):i[o]=t[o];return i}(t);for(r.debug("WHERE: "+d);g("OPTIONAL",d);)o=g("OPTIONAL",d),r.debug("OPT: "+o+" "+d[o]+" in "+d),"{"!==d[o+1]&&r.warn("Bad optional opening bracket in word "+o),-1===(i=m(d.slice(o+2),"{","}"))?r.error("No matching bracket in word "+o):(_(d.slice(o+2,o+2+i),e),o=g("OPTIONAL",d),i=m(d.slice(o+2),"{","}"),d.splice(o,i+3));for(r.debug("WHERE after optionals: "+d);g("FILTER",d);){var v=g("FILTER",d);"("!==d[v+1]&&r.warn("Bad filter opening bracket in word "+v),-1===(i=m(d.slice(v+2),"(",")"))?r.error("No matching bracket in word "+v):(w(d.slice(v+2,v+2+i),e),v=g("FILTER",d),i=m(d.slice(v+2),"(",")"),d.splice(v,i+3))}r.debug("WHERE after filters and optionals: "+d),function(t,e){var n=new Array(1);n[0]=-1;for(var i=n.concat(y(".",t)),o=[],s=0;s"),"is"===e[n]&&"of"===e[n+2]){e.splice(n,1),e.splice(n+1,1);var r=e[n-1];e[n-1]=e[n+1],e[n+1]=r}return e}(),r.info("SPARQL Tokens: "+i),i}(t),E=function(t){var e,n=y("PREFIX",t),i=[];for(var o in n){var s=t[n[o]+1],a=t[n[o]+2];if("string"==typeof(e=s)&&e.match(/:$/))if(u(a)){r.info("Prefix found: "+s+" -> "+a);var l=h(s),c=p(a);i[l]=c}else r.error("Invalid SPARQL symbol: "+a);else r.error("Invalid SPARQL prefix: "+s)}return i}(C);E.rdf||(E.rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"),E.rdfs||(E.rdfs="http://www.w3.org/2000/01/rdf-schema#");var k=g("SELECT",C),T=g("WHERE",C);if(k<0||T<0||k>T)return r.error("Invalid or nonexistent SELECT and WHERE tags in SPARQL query"),!1;if(function(t,e){for(var n in r.info("SPARQL vars: "+t),t)if(a(t[n])){r.info("Added "+t[n]+" to query variables from SPARQL");var i=s(t[n].slice(1));e.vars.push(i),i.label=t[n].slice(1)}else r.warn("Incorrect SPARQL variable in SELECT: "+t[n])}(C.slice(k+1,T),S),x(C.slice(T+2,C.length-1),S.pat),e)return S;for(var O in S.pat.statements){var I=S.pat.statements[O];"NamedNode"===I.subject.termType&&n.fetcher&&n.fetcher.lookUpThing(I.subject,"sparql:"+I.subject),"NamedNode"===I.object.termType&&n.fetcher&&n.fetcher.lookUpThing(I.object,"sparql:"+I.object)}return S}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(18),o=n(4).docpart,s=n(36),a=n(23).namedNode,u=n(19),l=n(38),c=n(4).join,h=n(7),f=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||new i,this.store=e,e.updater)throw new Error("You can't have two UpdateManagers for the same store");e.fetcher||(e.fetcher=new s(e)),e.updater=this,this.ifps={},this.fps={},this.ns={},this.ns.link=u("http://www.w3.org/2007/ont/link#"),this.ns.http=u("http://www.w3.org/2007/ont/http#"),this.ns.httph=u("http://www.w3.org/2007/ont/httph#"),this.ns.ldp=u("http://www.w3.org/ns/ldp#"),this.ns.rdf=u("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.rdfs=u("http://www.w3.org/2000/01/rdf-schema#"),this.ns.rdf=u("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),this.ns.owl=u("http://www.w3.org/2002/07/owl#"),this.patchControl=[]}var e;return(e=[{key:"patchControlFor",value:function(t){return this.patchControl[t.uri]||(this.patchControl[t.uri]=[]),this.patchControl[t.uri]}},{key:"editable",value:function(t,e){if(!t)return!1;if(e||(e=this.store),"file:///"===t.slice(0,8)){if(e.holds(e.sym(t),a("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),a("http://www.w3.org/2007/ont/link#MachineEditableDocument")))return"LOCALFILE";var n=e.statementsMatching(e.sym(t));return console.log("UpdateManager.editable: Not MachineEditableDocument file "+t+"\n"),console.log(n.map(function(t){return t.toNT()}).join("\n")),!1}var r,i,s=!1,u=e.each(void 0,this.ns.link("requestedURI"),o(t));if(e.holds(a(t),this.ns.rdf("type"),this.ns.ldp("Resource")))return"SPARQL";for(var l=0;l=0)return"SPARQL";var p=e.each(c,this.ns.httph("ms-author-via"));if(p.length)for(var d=0;d=0)return"SPARQL";if(i.indexOf("DAV")>=0)return"DAV"}var g=e.each(c,this.ns.http("status"));if(g.length)for(var y=0;y"),r.store.fetcher.webOperation("PATCH",t,{noMeta:!0,contentType:"application/sparql-update",body:e})}).then(function(r){if(!r.ok){var i="UpdateManager: update failed for <"+t+"> status="+r.status+", "+r.statusText+"\n for query: "+e;throw console.log(i),new Error(i)}console.log("UpdateManager: update Ok for <"+t+">"),n(t,r.ok,r.responseText,r)}).catch(function(e){n(t,!1,e.message,e)})}},{key:"update_statement",value:function(t){if(!t||t.why){var e=this,n=this.statementContext(t);return{statement:t?[t.subject,t.predicate,t.object,t.why]:void 0,statementNT:t?this.anonymizeNT(t):void 0,where:e.contextWhere(n),set_object:function(t,n){var r=this.where;r+="DELETE DATA { "+this.statementNT+" } ;\n",r+="INSERT DATA { "+this.anonymize(this.statement[0])+" "+this.anonymize(this.statement[1])+" "+this.anonymize(t)+" . }\n",e.fire(this.statement[3].uri,r,n)}}}}},{key:"insert_statement",value:function(t,e){var n=t instanceof Array?t[0]:t,r=this.contextWhere(this.statementContext(n));if(t instanceof Array){for(var i="",o=0;o 1 different downstream actions")}else n.downstreamAction=e;else e(t)}},{key:"clearUpstreamCount",value:function(t){this.patchControlFor(t).upstreamCount=0}},{key:"getUpdatesVia",value:function(t){var e=this.store.fetcher.getHeader(t,"updates-via");return e&&e.length?e[0].trim():null}},{key:"addDownstreamChangeListener",value:function(t,e){var n=this,r=this.patchControlFor(t);r.downstreamChangeListeners||(r.downstreamChangeListeners=[]),r.downstreamChangeListeners.push(e),this.setRefreshHandler(t,function(t){n.reloadAndSync(t)})}},{key:"reloadAndSync",value:function(t){var e=this.patchControlFor(t),n=this;if(e.reloading)console.log(" Already reloading - stop");else{e.reloading=!0;var r=1e3;!function i(){console.log("try reload - timeout = "+r),n.reload(n.store,t,function(n,o,s){if(e.reloading=!1,n){if(e.downstreamChangeListeners)for(var a=0;a=0))return void console.log("just an echo: "+l.upstreamCount);console.log("Assume a real downstream change: "+l.upstreamCount+" -> 0"),l.upstreamCount=0,i.requestDownstreamAction(t,r)}}}(),!0):(console.log("Server doies not support live updates thoughUpdates-Via :-("),!1)}},{key:"update",value:function(t,e,n,o){var s=this;try{var a=this.store,u=t?t instanceof i?t.statements:t instanceof Array?t:[t]:[],l=e?e instanceof i?e.statements:e instanceof Array?e:[e]:[];if(!(u instanceof Array))throw new Error("Type Error "+r(u)+": "+u);if(!(l instanceof Array))throw new Error("Type Error "+r(l)+": "+l);if(0===u.length&&0===l.length)return n(null,!0);var c=u.length?u[0].why:l[0].why;if(!c){var f="Error patching: statement does not specify which document to patch:"+u[0]+", "+l[0];throw console.log(f),new Error(f)}var p=this.patchControlFor(c),d=Date.now(),g=["subject","predicate","object","why"],y={delete:u,insert:l};["insert","delete"].map(function(t){y[t].map(function(t){if(!c.sameTerm(t.why))throw new Error("update: destination "+c+" inconsistent with delete quad "+t.why);g.map(function(e){if(void 0===t[e])throw new Error("update: undefined "+e+" of statement.")})})});var m=this.editable(c.uri,a);if(!1===m)throw new Error("Update: Can't make changes in uneditable "+c);if(void 0===m){if(o)throw new Error("Update: Loaded "+c+"but stil can't figure out what editing protcol it supports.");return console.log("Update: have not loaded ".concat(c," before: loading now...")),void this.store.fetcher.load(c).then(function(r){s.update(t,e,n,!0)},function(t){throw new Error("Update: Can't read ".concat(c," before patching: ").concat(t))})}if(m.indexOf("SPARQL")>=0){var v=[];u.length&&(v=this.statementArrayBnodes(u)),l.length&&(v=v.concat(this.statementArrayBnodes(l)));var b=this.bnodeContext(v,c),w=this.contextWhere(b),_="";if(w.length){if(u.length){_+="DELETE { ";for(var x=0;x=0)this.updateDav(c,u,l,n);else{if(!(m.indexOf("LOCALFILE")>=0))throw new Error("Unhandled edit method: '"+m+"' for "+c);try{this.updateLocalFile(c,u,l,n)}catch(t){n(c.uri,!1,"Exception trying to write back file <"+c.uri+">\n")}}}catch(t){n(void 0,!1,"Exception in update: "+t+"\n"+h.stackString(t))}}},{key:"updateDav",value:function(t,e,n,r){var i=this.store,o=i.any(t,this.ns.link("request"));if(!o)throw new Error("No record of our HTTP GET request for document: "+t);var s=i.any(o,this.ns.link("response"));if(!s)return null;for(var a=i.the(s,this.ns.httph("content-type")).value,u=i.statementsMatching(void 0,void 0,void 0,t).slice(),l=0;l>>");var d=t.uri.slice(7),g=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);if(g.initWithPath(d),!g.exists())throw new Error("Rewriting file <"+t.uri+"> but it does not exist!");var y=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);y.init(g,42,parseInt("0666",8),0),y.write(p,p.length),y.close();for(var m=0;m3&&void 0!==arguments[3]?arguments[3]:"";return n=n||{},console.log("deepCopying "+t+"\n"+r+"-> "+e),t.match(/\/$/)||(t+="/"),e.match(/\/$/)||(e+="/"),new Promise(function(i,o){M(t).then(function(s){for(var a=[],u=s.folders.concat(s.files),l=function(){var i=u[c],o=function(t,e,n){if(!n.startsWith(t))throw new Error("source {".concat(n,"} is not in tree {").concat(t,"}"));return e+n.slice(t.length)}(t,e,i.url);"folder"===i.type?O(o).then(function(){a.push(m(i.url,o,n,r+" "))}):(console.log("copying "+o),a.push(_(i.url,o)))},c=0;c; rel="type"',s="text/turtle");var u={method:"POST",headers:{slug:n,link:a},body:i};void 0===s&&"undefined"==typeof window||(u.headers["Content-Type"]=s),r.auth.fetch(e,u).then(function(n){var r=n.headers.get("location"),i=r.substr(r.lastIndexOf("/")+1);t(e+i)},function(t){o(t)})}));case 1:case"end":return t.stop()}},t,this)}))).apply(this,arguments)}function O(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){D(e).then(function(e){t()},function(r){I(e,void 0,"folder").then(function(e){t(e)},function(t){n(t)})})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function I(t,e,n){return(function(){return a()(o.a.mark(function t(e,n,r){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){var o=e.replace(/\/$/,"").replace(/.*\//,"");k(e.substring(0,e.lastIndexOf(o)),o,n,r).then(function(e){t(e)},function(t){i(t)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function P(){return(function(){return a()(o.a.mark(function t(){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.auth.logout());case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function A(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",N(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function R(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",N(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function N(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){L(e,{method:"DELETE"}).then(function(e){t(e)},function(e){t(e)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function j(t,e,n){return(function(){return a()(o.a.mark(function t(e,n,r){var i;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N(e);case 2:if(!(i=t.sent).match||!i.match(/409/)){t.next=5;break}throw new Error("Coulnd't delete, conflict!");case 5:return t.next=7,I(e,n,r);case 7:return t.abrupt("return",i=t.sent);case 9:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function D(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){L(e).then(function(e){t(e)},function(t){return n("fetch error "+t)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function M(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return"/"!=e.substr(-1)&&(e+="/"),t.abrupt("return",new Promise(function(t,n){L(e).then(function(r){y(r,e,"text/turtle").then(function(n){t(d(n,e,r))},function(t){return n(t)})},function(t){return n(t)})}));case 2:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function L(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){r.auth.fetch(e,n).then(function(n){n.ok||i(n.status+" ("+n.statusText+") "+e);var r=n.headers._headers?n.headers._headers["content-type"]:"";(r=r.toString()).match(/(image|audio|video)/)?n.buffer().then(function(e){t(e)},function(t){return i("buffer error "+t)}):n.text?n.text().then(function(e){t(e)},function(t){return i("buffer error "+t)}):t(n)},function(t){i("fetch errror "+t+e)})}));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function U(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.auth.getCredentials(e));case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function F(t){return(function(){return a()(o.a.mark(function t(e){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!0);case 1:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function V(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof window){t.next=2;break}return t.abrupt("return",F(e));case 2:return t.abrupt("return",new Promise(function(t,r){L(e,{encoding:null}).then(function(i){n.match(/\/$/)||(n+="/");var o=n+e.replace(/.*\//,"");try{fs.writeFileSync(o,i),t(o)}catch(t){r("write error "+o+" "+t)}},function(t){r("fetch error "+t)})}));case 3:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}function B(t,e){return(function(){return a()(o.a.mark(function t(e,n){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"==typeof window){t.next=2;break}return t.abrupt("return",F(n));case 2:return t.abrupt("return",new Promise(function(t,r){var i=fs.readFileSync(e,"utf-8");n.match(/\/$/)||(n+="/"),A(n+=e.replace(/.*\//,"")).then(function(){I(n,i).then(function(){t(e)},function(t){r("create "+t)})},function(t){r("delete error "+t)})}));case 3:case"end":return t.stop()}},t,this)})).apply(this,arguments)}).apply(this,arguments)}n.d(e,"copyFolder",function(){return m}),n.d(e,"guessFileType",function(){return v}),n.d(e,"processFolder",function(){return b}),n.d(e,"text2graph",function(){return w}),n.d(e,"copyFile",function(){return _}),n.d(e,"fetchAndParse",function(){return x}),n.d(e,"popupLogin",function(){return S}),n.d(e,"checkSession",function(){return C}),n.d(e,"login",function(){return E}),n.d(e,"add",function(){return k}),n.d(e,"createFolder",function(){return O}),n.d(e,"createFile",function(){return I}),n.d(e,"logout",function(){return P}),n.d(e,"deleteFile",function(){return A}),n.d(e,"deleteFolder",function(){return R}),n.d(e,"remove",function(){return N}),n.d(e,"updateFile",function(){return j}),n.d(e,"readFile",function(){return D}),n.d(e,"readFolder",function(){return M}),n.d(e,"fetch",function(){return L}),n.d(e,"getCredentials",function(){return U}),n.d(e,"doWin",function(){return F}),n.d(e,"downloadFile",function(){return V}),n.d(e,"uploadFile",function(){return B}),void 0!==l.a&&(r={auth:l.a})}])},crnd:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="crnd"},xDdU:function(t,e,n){var r,i,o=n("4fRq"),s=n("I2ZF"),a=0,u=0;t.exports=function(t,e,n){var l=e&&n||0,c=e||[],h=(t=t||{}).node||r,f=void 0!==t.clockseq?t.clockseq:i;if(null==h||null==f){var p=o();null==h&&(h=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=i=16383&(p[6]<<8|p[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),g=void 0!==t.nsecs?t.nsecs:u+1,y=d-a+(g-u)/1e4;if(y<0&&void 0===t.clockseq&&(f=f+1&16383),(y<0||d>a)&&void 0===t.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=g,i=f;var m=(1e4*(268435455&(d+=122192928e5))+g)%4294967296;c[l++]=m>>>24&255,c[l++]=m>>>16&255,c[l++]=m>>>8&255,c[l++]=255&m;var v=d/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=f>>>8|128,c[l++]=255&f;for(var b=0;b<6;++b)c[l+b]=h[b];return e||s(c)}},xk4V:function(t,e,n){var r=n("4fRq"),i=n("I2ZF");t.exports=function(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var s=(t=t||{}).random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;++a)e[o+a]=s[a];return e||i(s)}},zUnb:function(t,e,n){"use strict";n.r(e);var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function u(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(e){o(e)}}function a(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})}function l(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function f(){for(var t=[],e=0;e0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(et);function ct(t){return t}function ht(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),at(ct,t)}function ft(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof D?t[0]:ht(n)(ot(t,r))}function pt(){return function(t){return t.lift(new dt(t))}}var dt=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new gt(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),gt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return i(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(I),yt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new x).add(this.source.subscribe(new vt(this.getSubject(),this))),t.closed?(this._connection=null,t=x.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return pt()(this)},e}(D).prototype,mt={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:yt._subscribe},_isComplete:{value:yt._isComplete,writable:!0},getSubject:{value:yt.getSubject},connect:{value:yt.connect},refCount:{value:yt.refCount}},vt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return i(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(V);function bt(){return new B}function wt(t){return{providedIn:t.providedIn||null,factory:t.factory,value:void 0}}var _t=function(){function t(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==e?wt({providedIn:e.providedIn||"root",factory:e.factory}):void 0}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),xt="__parameters__",St="__prop__metadata__";function Ct(t){return function(){for(var e=[],n=0;n ");else if("object"==typeof e){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):Ut(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+t.replace(re,"\n ")}function ue(t,e){return new Error(ae(t,e))}function le(t){for(var e in t)if(t[e]===te)return e;throw Error("!prop")}var ce=void 0;function he(t){var e=ce;return ce=t,e}function fe(t,e){if(void 0===e&&(e=0),void 0===ce)throw new Error("inject() must be called from an injection context");if(null===ce){var n=t.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;if(8&e)return null;throw new Error("Injector: NOT_FOUND ["+Ut(t)+"]")}return ce.get(t,8&e?null:void 0,e)}var pe=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),de=new(function(){return function(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}())("6.1.10"),ge="ngDebugContext",ye="ngOriginalError",me="ngErrorLogger";function ve(t){return t[ge]}function be(t){return t[ye]}function we(t){for(var e=[],n=1;n0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(t){return t.timeoutId!==i}),t(r._didWork,r.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})},t.prototype.whenStable=function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t}(),hn=function(){function t(){this._applications=new Map,fn.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),fn.findTestabilityInTree(this,t,e)},s([a("design:paramtypes",[])],t)}(),fn=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),pn=!0,dn=!1,gn=new _t("AllowMultipleToken");function yn(){return dn=!0,pn}var mn=function(){return function(t,e){this.name=t,this.token=e}}();function vn(t,e,n){void 0===n&&(n=[]);var r="Platform: "+e,i=new _t(r);return function(e){void 0===e&&(e=[]);var o=bn();if(!o||o.injector.get(gn,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{var s=n.concat(e).concat({provide:i,useValue:!0});!function(t){if(un&&!un.destroyed&&!un.injector.get(gn,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");un=t.get(wn);var e=t.get(Pe,null);e&&e.forEach(function(t){return t()})}(Kt.create({providers:s,name:r}))}return function(t){var e=bn();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function bn(){return un&&!un.destroyed?un:null}var wn=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n,r=this,i="noop"===(n=e?e.ngZone:void 0)?new ln:("zone.js"===n?void 0:n)||new en({enableLongStackTrace:yn()}),o=[{provide:en,useValue:i}];return i.run(function(){var e=Kt.create({providers:o,parent:r.injector,name:t.moduleType.name}),n=t.create(e),s=n.injector.get(_e,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Sn(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(t){s.handleError(t)}})}),function(t,e,i){try{var o=((s=n.injector.get(ke)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return Se(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(a){throw e.runOutsideAngular(function(){return t.handleError(a)}),a}var s}(s,i)})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var r=this.injector.get(Me),i=_n({},e);return r.createCompiler([i]).compileModuleAsync(t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(xn);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+Ut(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function _n(t,e){return Array.isArray(e)?e.reduce(_n,t):o({},t,e)}var xn=function(){function t(t,e,n,r,i,o){var s=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=yn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new D(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new D(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){en.assertNotInAngularZone(),Mt(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){en.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=ft(a,u.pipe(function(t){return pt()((e=bt,function(t){var n;n="function"==typeof e?e:function(){return e};var r=Object.create(t,mt);return r.source=t,r.subjectFactory=n,r})(t));var e}))}var e;return e=t,t.prototype.bootstrap=function(t,e){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof Ue?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var i=n instanceof Ge?null:this._injector.get($e),o=n.create(Kt.NULL,[],e||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(cn,null);return s&&o.injector.get(hn).registerApplication(o.location.nativeElement,s),this._loadComponent(o),yn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(r){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(r)})}finally{this._runningTick=!1,Ze(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;Sn(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Re,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),Sn(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Xe("ApplicationRef#tick()"),t}();function Sn(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Cn=function(){return function(){}}(),En=function(){return function(){}}(),kn=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({}),Tn=function(){return function(){}}(),On=function(){return function(t){this.nativeElement=t}}(),In=function(){return function(){}}(),Pn=function(){function t(){this.dirty=!0,this._results=[],this.changes=new tn,this.length=0}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[Dt()]=function(){return this._results[Dt()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var r=Array.isArray(n)?t(n):n;return e.concat(r)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),An=function(){return function(){}}(),Rn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Nn=function(){function t(t,e){this._compiler=t,this._config=e||Rn}return t.prototype.load=function(t){return this._compiler instanceof De?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,r=h(t.split("#"),2),i=r[0],o=r[1];return void 0===o&&(o="default"),n("crnd")(i).then(function(t){return t[o]}).then(function(t){return jn(t,i,o)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=h(t.split("#"),2),r=e[0],i=e[1],o="NgFactory";return void 0===i&&(i="default",o=""),n("crnd")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(t){return t[i+o]}).then(function(t){return jn(t,r,i)})},t}();function jn(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}var Dn=function(){return function(){}}(),Mn=function(){return function(){}}(),Ln=function(){return function(){}}(),Un=function(){return function(t,e){this.name=t,this.callback=e}}(),Fn=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof Vn?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),Vn=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=e,i}return i(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,i=this.childNodes.indexOf(t);-1!==i&&((n=this.childNodes).splice.apply(n,f([i+1,0],e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return function t(e,n,r){e.childNodes.forEach(function(e){e instanceof Vn&&(n(e)&&r.push(e),t(e,n,r))})}(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return function t(e,n,r){e instanceof Vn&&e.childNodes.forEach(function(e){n(e)&&r.push(e),e instanceof Vn&&t(e,n,r)})}(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(Fn),Bn=new Map;function zn(t){return Bn.get(t)||null}function Hn(t){Bn.set(t.nativeNode,t)}function qn(t,e){var n=$n(t),r=$n(e);return n&&r?function(t,e,n){for(var r=t[Dt()](),i=e[Dt()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(t,e,qn):!(n||!t||"object"!=typeof t&&"function"!=typeof t||r||!e||"object"!=typeof e&&"function"!=typeof e)||Lt(t,e)}var Wn=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),Gn=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function $n(t){return!!Jn(t)&&(Array.isArray(t)||!(t instanceof Map)&&Dt()in t)}function Jn(t){return null!==t&&("function"==typeof t||"object"==typeof t)}var Kn=function(){function t(){}return t.prototype.supports=function(t){return $n(t)},t.prototype.create=function(t){return new Qn(t)},t}(),Yn=function(t,e){return e},Qn=function(){function t(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Yn}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,i=null;e||n;){var o=!n||e&&e.currentIndex',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='

',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return t.prototype.getInertBodyElement_XHR=function(t){t=""+t+"";try{t=encodeURI(t)}catch(r){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(null);var n=e.response.body;return n.removeChild(n.firstChild),n},t.prototype.getInertBodyElement_DOMParser=function(t){t=""+t+"";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(n){return null}},t.prototype.getInertBodyElement_InertDocument=function(t){var e=this.inertDocument.createElement("template");return"content"in e?(e.innerHTML=t,e):(this.inertBodyElement.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},t.prototype.stripCustomNsAttrs=function(t){for(var e=t.attributes,n=e.length-1;0")}else this.sanitizedSomething=!0},t.prototype.endElement=function(t){var e=t.nodeName.toLowerCase();Tr.hasOwnProperty(e)&&!Sr.hasOwnProperty(e)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(jr(t))},t.prototype.checkClobberedElement=function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e},t}(),Rr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nr=/([^\#-~ |!])/g;function jr(t){return t.replace(/&/g,"&").replace(Rr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Nr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function Dr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Mr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Lr=/^url\(([^)]+)\)$/,Ur=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({}),Fr=function(){return function(){}}();function Vr(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.initIndex=-1,!0):i===n}function Br(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function zr(t,e){return t.nodes[e]}function Hr(t,e){return t.nodes[e]}function qr(t,e){return t.nodes[e]}function Wr(t,e){return t.nodes[e]}function Gr(t,e){return t.nodes[e]}var $r={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Jr(t,e,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){var n=new Error(t);return Kr(n,e),n}(i,t)}function Kr(t,e){t[ge]=e,t[me]=e.logError.bind(e)}function Yr(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}var Qr=function(){},Xr=new Map;function Zr(t){var e=Xr.get(t);return e||(e=Ut(t)+"_"+Xr.size,Xr.set(t,e)),e}function ti(t,e,n,r){if(Wn.isWrapped(r)){r=Wn.unwrap(r);var i=t.def.nodes[e].bindingIndex+n,o=Wn.unwrap(t.oldValues[i]);t.oldValues[i]=new Wn(o)}return r}var ei="$$undefined",ni="$$empty";function ri(t){return{id:ei,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}var ii=0;function oi(t,e,n,r){return!(!(2&t.state)&&Lt(t.oldValues[e.bindingIndex+n],r))}function si(t,e,n,r){return!!oi(t,e,n,r)&&(t.oldValues[e.bindingIndex+n]=r,!0)}function ai(t,e,n,r){var i=t.oldValues[e.bindingIndex+n];if(1&t.state||!qn(i,r)){var o=e.bindings[n].name;throw Jr($r.createDebugContext(t,e.nodeIndex),o+": "+i,o+": "+r,0!=(1&t.state))}}function ui(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function li(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function ci(t,e,n,r){try{return ui(33554432&t.def.nodes[e].flags?Hr(t,e).componentView:t),$r.handleEvent(t,e,n,r)}catch(i){t.root.errorHandler.handleError(i)}}function hi(t){return t.parent?Hr(t.parent,t.parentNodeDef.nodeIndex):null}function fi(t){return t.parent?t.parentNodeDef.parent:null}function pi(t,e){switch(201347067&e.flags){case 1:return Hr(t,e.nodeIndex).renderElement;case 2:return zr(t,e.nodeIndex).renderText}}function di(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function gi(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function yi(t){return 1<-1}(r)||"root"===i.providedIn&&r._def.isRoot))){var l=t._providers.length;return t._def.providersByKey[e.tokenKey]={flags:5120,value:e.token.ngInjectableDef.factory,deps:[],index:l,token:e.token},t._providers[l]=Mi,t._providers[l]=zi(t,t._def.providersByKey[e.tokenKey])}return 4&e.flags?n:t._parent.get(e.token,n)}finally{he(o)}}function zi(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(Bi(t,n[0]));case 2:return new e(Bi(t,n[0]),Bi(t,n[1]));case 3:return new e(Bi(t,n[0]),Bi(t,n[1]),Bi(t,n[2]));default:for(var i=new Array(r),o=0;o=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,$i(n,e),$r.dirtyParentQueries(r),Wi(r),r}function qi(t,e,n){var r=e?pi(e,e.def.lastRenderRootNode):t.renderElement,i=n.renderer.parentNode(r),o=n.renderer.nextSibling(r);xi(n,2,i,o,void 0)}function Wi(t){xi(t,3,null,null,void 0)}function Gi(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function $i(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var Ji=new Object;function Ki(t,e,n,r,i,o){return new Yi(t,e,n,r,i,o)}var Yi=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return i(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){if(!r)throw new Error("ngModule should be provided");var i=_i(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=$r.createRootView(t,e||[],n,i,r,Ji),a=qr(s,o).instance;return n&&s.renderer.setAttribute(Hr(s,0).renderElement,"ng-version",de.full),new Qi(s,new eo(s),a)},e}(Ue),Qi=function(t){function e(e,n,r){var i=t.call(this)||this;return i._view=e,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return i(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new On(Hr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new oo(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(Le);function Xi(t,e,n){return new Zi(t,e,n)}var Zi=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new On(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new oo(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=fi(t),t=t.parent;return t?new oo(t,e):new oo(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=Hi(this._data,t);$r.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new eo(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,i){var o=n||this.parentInjector;i||t instanceof Ge||(i=o.get($e));var s=t.create(o,r,void 0,i);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=t;return o=(n=this._data).viewContainer._embeddedViews,null==(r=e)&&(r=o.length),(i=s._view).viewContainerParent=this._view,Gi(o,r,i),function(t,e){var n=hi(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(e),function(t,n){if(!(4&n.flags)){e.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,e.parentNodeDef)}}(n,i),$r.dirtyParentQueries(i),qi(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(t._view);return i=e,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],$i(o,r),null==i&&(i=o.length),Gi(o,i,s),$r.dirtyParentQueries(s),Wi(s),qi(n,i>0?o[i-1]:null,s),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Hi(this._data,t);e&&$r.destroyView(e)},t.prototype.detach=function(t){var e=Hi(this._data,t);return e?new eo(e):null},t}();function to(t){return new eo(t)}var eo=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return xi(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){ui(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{$r.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){$r.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),$r.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,Wi(this._view),$r.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function no(t,e){return new ro(t,e)}var ro=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return i(e,t),e.prototype.createEmbeddedView=function(t){return new eo($r.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new On(Hr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(Dn);function io(t,e){return new oo(t,e)}var oo=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=Kt.THROW_IF_NOT_FOUND),$r.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:Zr(t)},e)},t}();function so(t,e){var n=t.def.nodes[e];if(1&n.flags){var r=Hr(t,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return zr(t,n.nodeIndex).renderText;if(20240&n.flags)return qr(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function ao(t){return new uo(t.renderer)}var uo=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=h(Oi(e),2),r=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,r),r},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var r=0;r0,r=e.provider;switch(201347067&e.flags){case 512:return Io(t,e.parent,n,r.value,r.deps);case 1024:return function(t,e,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(Ao(t,e,n,i[0]));case 2:return r(Ao(t,e,n,i[0]),Ao(t,e,n,i[1]));case 3:return r(Ao(t,e,n,i[0]),Ao(t,e,n,i[1]),Ao(t,e,n,i[2]));default:for(var s=Array(o),a=0;a0)l=g,Ko(g)||(c=g);else for(;l&&d===l.nodeIndex+l.childCount;){var v=l.parent;v&&(v.childFlags|=l.childFlags,v.childMatchedQueries|=l.childMatchedQueries),c=(l=v)&&Ko(l)?l.renderParent:l}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:t,nodes:e,updateDirectives:n||Qr,updateRenderer:r||Qr,handleEvent:function(t,n,r,i){return e[n].element.handleEvent(t,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:p}}function Ko(t){return 0!=(1&t.flags)&&null===t.element.name}function Yo(t,e,n){var r=e.element&&e.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function Qo(t,e,n,r){var i=ts(t.root,t.renderer,t,e,n);return es(i,t.component,r),ns(i),i}function Xo(t,e,n){var r=ts(t,t.renderer,null,null,e);return es(r,n,n),ns(r),r}function Zo(t,e,n,r){var i,o=e.element.componentRendererType;return i=o?t.root.rendererFactory.createRenderer(r,o):t.root.renderer,ts(t.root,i,t,e.element.componentProvider,n)}function ts(t,e,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function es(t,e,n){t.component=e,t.context=n}function ns(t){var e;di(t)&&(e=Hr(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,r=t.nodes,i=0;i0&&Di(t,e,0,n)&&(p=!0),f>1&&Di(t,e,1,r)&&(p=!0),f>2&&Di(t,e,2,i)&&(p=!0),f>3&&Di(t,e,3,o)&&(p=!0),f>4&&Di(t,e,4,s)&&(p=!0),f>5&&Di(t,e,5,a)&&(p=!0),f>6&&Di(t,e,6,u)&&(p=!0),f>7&&Di(t,e,7,l)&&(p=!0),f>8&&Di(t,e,8,c)&&(p=!0),f>9&&Di(t,e,9,h)&&(p=!0),p}(t,e,n,r,i,o,s,a,u,l,c,h);case 2:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=!1,p=e.bindings,d=p.length;if(d>0&&si(t,e,0,n)&&(f=!0),d>1&&si(t,e,1,r)&&(f=!0),d>2&&si(t,e,2,i)&&(f=!0),d>3&&si(t,e,3,o)&&(f=!0),d>4&&si(t,e,4,s)&&(f=!0),d>5&&si(t,e,5,a)&&(f=!0),d>6&&si(t,e,6,u)&&(f=!0),d>7&&si(t,e,7,l)&&(f=!0),d>8&&si(t,e,8,c)&&(f=!0),d>9&&si(t,e,9,h)&&(f=!0),f){var g=e.text.prefix;d>0&&(g+=$o(n,p[0])),d>1&&(g+=$o(r,p[1])),d>2&&(g+=$o(i,p[2])),d>3&&(g+=$o(o,p[3])),d>4&&(g+=$o(s,p[4])),d>5&&(g+=$o(a,p[5])),d>6&&(g+=$o(u,p[6])),d>7&&(g+=$o(l,p[7])),d>8&&(g+=$o(c,p[8])),d>9&&(g+=$o(h,p[9]));var y=zr(t,e.nodeIndex).renderText;t.renderer.setValue(y,g)}return f}(t,e,n,r,i,o,s,a,u,l,c,h);case 16384:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=qr(t,e.nodeIndex),p=f.instance,d=!1,g=void 0,y=e.bindings.length;return y>0&&oi(t,e,0,n)&&(d=!0,g=No(t,f,e,0,n,g)),y>1&&oi(t,e,1,r)&&(d=!0,g=No(t,f,e,1,r,g)),y>2&&oi(t,e,2,i)&&(d=!0,g=No(t,f,e,2,i,g)),y>3&&oi(t,e,3,o)&&(d=!0,g=No(t,f,e,3,o,g)),y>4&&oi(t,e,4,s)&&(d=!0,g=No(t,f,e,4,s,g)),y>5&&oi(t,e,5,a)&&(d=!0,g=No(t,f,e,5,a,g)),y>6&&oi(t,e,6,u)&&(d=!0,g=No(t,f,e,6,u,g)),y>7&&oi(t,e,7,l)&&(d=!0,g=No(t,f,e,7,l,g)),y>8&&oi(t,e,8,c)&&(d=!0,g=No(t,f,e,8,c,g)),y>9&&oi(t,e,9,h)&&(d=!0,g=No(t,f,e,9,h,g)),g&&p.ngOnChanges(g),65536&e.flags&&Br(t,256,e.nodeIndex)&&p.ngOnInit(),262144&e.flags&&p.ngDoCheck(),d}(t,e,n,r,i,o,s,a,u,l,c,h);case 32:case 64:case 128:return function(t,e,n,r,i,o,s,a,u,l,c,h){var f=e.bindings,p=!1,d=f.length;if(d>0&&si(t,e,0,n)&&(p=!0),d>1&&si(t,e,1,r)&&(p=!0),d>2&&si(t,e,2,i)&&(p=!0),d>3&&si(t,e,3,o)&&(p=!0),d>4&&si(t,e,4,s)&&(p=!0),d>5&&si(t,e,5,a)&&(p=!0),d>6&&si(t,e,6,u)&&(p=!0),d>7&&si(t,e,7,l)&&(p=!0),d>8&&si(t,e,8,c)&&(p=!0),d>9&&si(t,e,9,h)&&(p=!0),p){var g=Wr(t,e.nodeIndex),y=void 0;switch(201347067&e.flags){case 32:y=new Array(f.length),d>0&&(y[0]=n),d>1&&(y[1]=r),d>2&&(y[2]=i),d>3&&(y[3]=o),d>4&&(y[4]=s),d>5&&(y[5]=a),d>6&&(y[6]=u),d>7&&(y[7]=l),d>8&&(y[8]=c),d>9&&(y[9]=h);break;case 64:y={},d>0&&(y[f[0].name]=n),d>1&&(y[f[1].name]=r),d>2&&(y[f[2].name]=i),d>3&&(y[f[3].name]=o),d>4&&(y[f[4].name]=s),d>5&&(y[f[5].name]=a),d>6&&(y[f[6].name]=u),d>7&&(y[f[7].name]=l),d>8&&(y[f[8].name]=c),d>9&&(y[f[9].name]=h);break;case 128:var m=n;switch(d){case 1:y=m.transform(n);break;case 2:y=m.transform(r);break;case 3:y=m.transform(r,i);break;case 4:y=m.transform(r,i,o);break;case 5:y=m.transform(r,i,o,s);break;case 6:y=m.transform(r,i,o,s,a);break;case 7:y=m.transform(r,i,o,s,a,u);break;case 8:y=m.transform(r,i,o,s,a,u,l);break;case 9:y=m.transform(r,i,o,s,a,u,l,c);break;case 10:y=m.transform(r,i,o,s,a,u,l,c,h)}}g.value=y}return p}(t,e,n,r,i,o,s,a,u,l,c,h);default:throw"unreachable"}}(t,e,r,i,o,s,a,u,l,c,h,p):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var r=!1,i=0;i0&&ai(t,e,0,n),f>1&&ai(t,e,1,r),f>2&&ai(t,e,2,i),f>3&&ai(t,e,3,o),f>4&&ai(t,e,4,s),f>5&&ai(t,e,5,a),f>6&&ai(t,e,6,u),f>7&&ai(t,e,7,l),f>8&&ai(t,e,8,c),f>9&&ai(t,e,9,h)}(t,e,r,i,o,s,a,u,l,c,h,f):function(t,e,n){for(var r=0;r0){var o=new Set(t.modules);Cs.forEach(function(e,r){if(o.has(r.ngInjectableDef.providedIn)){var i={token:r,flags:e.flags|(n?4096:0),deps:vi(e.deps),value:e.value,index:t.providers.length};t.providers.push(i),t.providersByKey[Zr(r)]=i}})}}(t=t.factory(function(){return Qr})),t):t}(r))}var Ss=new Map,Cs=new Map,Es=new Map;function ks(t){Ss.set(t.token,t),"function"==typeof t.token&&t.token.ngInjectableDef&&"function"==typeof t.token.ngInjectableDef.providedIn&&Cs.set(t.token,t)}function Ts(t,e){var n=_i(e.viewDefFactory),r=_i(n.nodes[0].element.componentView);Es.set(t,r)}function Os(){Ss.clear(),Cs.clear(),Es.clear()}function Is(t){if(0===Ss.size)return t;var e=function(t){for(var e=[],n=null,r=0;r0?e.substring(1):e},e.prototype.prepareExternalUrl=function(t){var e=aa.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(oa),ca=function(t){function e(e,n){var r=t.call(this)||this;if(r._platformLocation=e,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return i(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return aa.joinWithSlash(this._baseHref,t)},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.pathname+aa.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?""+e+n:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+aa.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(oa),ha=void 0,fa=["en",[["a","p"],["AM","PM"],ha],[["AM","PM"],ha,ha],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ha,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ha,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ha,"{1} 'at' {0}",ha],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],pa={},da=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),ga=new _t("UseV4Plurals"),ya=function(){return function(){}}(),ma=function(t){function e(e,n){var r=t.call(this)||this;return r.locale=e,r.deprecatedPluralFn=n,r}return i(e,t),e.prototype.getPluralCategory=function(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return function(t){var e=t.toLowerCase().replace(/_/g,"-"),n=pa[e];if(n)return n;var r=e.split("-")[0];if(n=pa[r])return n;if("en"===r)return fa;throw new Error('Missing locale data for the locale "'+t+'".')}(t)[18]}(e||this.locale)(t)){case da.Zero:return"zero";case da.One:return"one";case da.Two:return"two";case da.Few:return"few";case da.Many:return"many";default:return"other"}},e}(ya),va=function(){function t(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&($n(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Ut(t.item));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})},t.prototype._applyClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))},t.prototype._removeClasses=function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})},t}(),ba=function(){function t(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),wa=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOfDirty=!0,this._differ=null}return Object.defineProperty(t.prototype,"ngForOf",{set:function(t){this._ngForOf=t,this._ngForOfDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){yn()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,r,i){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new ba(null,e._ngForOf,-1,-1),i),s=new _a(t,o);n.push(s)}else null==i?e._viewContainer.remove(r):(o=e._viewContainer.get(r),e._viewContainer.move(o,i),s=new _a(t,o),n.push(s))});for(var r=0;r0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r0;s||(s=t[o]=[]);var u=Su(e)?Zone.root:Zone.current;if(0===s.length)s.push({zone:u,handler:i});else{for(var l=!1,c=0;c-1},e}(nu),Au=["alt","control","meta","shift"],Ru={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},Nu=function(t){function e(e){return t.call(this,e)||this}var n;return i(e,t),n=e,e.prototype.supports=function(t){return null!=n.parseEventName(t)},e.prototype.addEventListener=function(t,e,r){var i=n.parseEventName(e),o=n.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return La().onAndCancel(t,i.domEventName,o)})},e.parseEventName=function(t){var e=t.toLowerCase().split("."),r=e.shift();if(0===e.length||"keydown"!==r&&"keyup"!==r)return null;var i=n._normalizeKey(e.pop()),o="";if(Au.forEach(function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),o+=t+".")}),o+=i,0!=e.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},e.getEventFullKey=function(t){var e="",n=La().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Au.forEach(function(r){r!=n&&(0,Ru[r])(t)&&(e+=r+".")}),e+=n},e.eventCallback=function(t,e,r){return function(i){n.getEventFullKey(i)===t&&r.runGuarded(function(){return e(i)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e}(nu),ju=function(){return function(){}}(),Du=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return i(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case Ur.NONE:return e;case Ur.HTML:return e instanceof Lu?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){var n=null;try{xr=xr||new yr(t);var r=e?String(e):"";n=xr.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=xr.getInertBodyElement(r)}while(r!==o);var s=new Ar,a=s.sanitizeChildren(Dr(n)||n);return yn()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var u=Dr(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}(this._doc,String(e)));case Ur.STYLE:return e instanceof Uu?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(Lr);return e&&br(e[1])===e[1]||t.match(Mr)&&function(t){for(var e=!0,n=!0,r=0;r=this.toastrConfig.maxOpened&&(s=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));var a=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;var u=e;e&&r.enableHtml&&(u=this.sanitizer.sanitize(Ur.HTML,e));var l=new Zu(a),c=new Wu(this.index,r,u,n,t,l),h=new tl(c,this._injector),f=new Ju(r.toastComponent,h),p=a.attach(f,this.toastrConfig.newestOnTop);l.componentInstance=p._component;var d={toastId:this.index,message:e||"",toastRef:l,onShown:l.afterActivate(),onHidden:l.afterClosed(),onTap:c.onTap(),onAction:c.onAction(),portal:p};return s||setTimeout(function(){d.toastRef.activate(),i.currentlyActive=i.currentlyActive+1}),this.toasts.push(d),d},t.ngInjectableDef=wt({factory:function(){return new t(fe($u),fe(Xu),fe($t),fe(ju),fe(en))},token:t,providedIn:"root"}),t}(),nl=function(){function t(t,e,n){var r=this;this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=e.toastType+" "+e.config.toastClass,this.sub=e.toastRef.afterActivate().subscribe(function(){r.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(function(){r.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(function(){r.resetTimeout()})}return t.prototype.ngOnDestroy=function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)},t.prototype.activateToast=function(){var t=this;this.state=o({},this.state,{value:"active"}),!this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(function(){return t.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.updateProgress=function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime();this.width=(this.hideTime-t)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}},t.prototype.resetTimeout=function(){var t=this;clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=o({},this.state,{value:"active"}),this.outsideTimeout(function(){return t.remove()},this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10)},t.prototype.remove=function(){var t=this;"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=o({},this.state,{value:"removed"}),this.outsideTimeout(function(){return t.toastrService.remove(t.toastPackage.toastId)},+this.toastPackage.config.easeTime))},t.prototype.tapToast=function(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())},t.prototype.stickAround=function(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)},t.prototype.delayedHideToast=function(){var t=this;this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(function(){return t.remove()},this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.outsideTimeout=function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return n.timeout=setTimeout(function(){return n.runInsideAngular(t)},e)}):this.timeout=setTimeout(function(){return t()},e)},t.prototype.outsideInterval=function(t,e){var n=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return n.intervalId=setInterval(function(){return n.runInsideAngular(t)},e)}):this.intervalId=setInterval(function(){return t()},e)},t.prototype.runInsideAngular=function(t){this.ngZone?this.ngZone.run(function(){return t()}):t()},t}(),rl=o({},Gu,{toastComponent:nl}),il=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:$u,useValue:{default:rl,config:e}}]}},t}(),ol=$rdf.Namespace("http://www.w3.org/2006/vcard/ns#"),sl=$rdf.Namespace("http://xmlns.com/foaf/0.1/"),al=function(){function t(t){var e=this;this.toastr=t,this.store=$rdf.graph(),this.fetcher=$rdf.Fetcher,this.updateManager=$rdf.UpdateManager,this.getSession=function(){return u(e,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this,[4,solid.auth.currentSession(localStorage)];case 1:return t.session=e.sent(),[2]}})})},this.getValueFromVcard=function(t,n){return e.getValueFromNamespace(t,ol,n)},this.getValueFromFoaf=function(t,n){return e.getValueFromNamespace(t,sl,n)},this.transformDataForm=function(t,n,r){var i=[],o=[],s=Object.keys(t.value),a=JSON.parse(localStorage.getItem("oldProfileData"))||{};return s.map(function(s){var u=ol(e.getFieldName(s)),l=e.getUriForField(s,n),c=r,h=e.getFieldValue(t,s),f=e.getOldFieldValue(s,a);f||!h||"phone"!==s&&"email"!==s?a[s]&&t.value[s]&&!t.controls[s].pristine?(o.push($rdf.st(l,u,f,c)),i.push($rdf.st(l,u,h,c))):!a[s]||t.value[s]||t.controls[s].pristine?a[s]||!t.value[s]||t.controls[s].pristine||i.push($rdf.st(l,u,h,c)):o.push($rdf.st(l,u,f,c)):e.addNewLinkedField(s,i,u,h,c,n)}),{insertions:i,deletions:o}},this.updateProfile=function(t){return u(e,void 0,void 0,function(){var e,n,r,i=this;return l(this,function(o){return e=$rdf.sym(this.session.webId),n=$rdf.NamedNode.fromValue(this.session.webId.split("#")[0]),((r=this.transformDataForm(t,e,n)).insertions.length>0||r.deletions.length>0)&&this.updateManager.update(r.deletions,r.insertions,function(e,n,r){n?(i.toastr.success("Your Solid profile has been successfully updated","Success!"),t.form.markAsPristine(),t.form.markAsTouched()):i.toastr.error("Message: "+r,"An error has occurred")}),[2]})})},this.getAddress=function(){var t=e.getValueFromVcard("hasAddress");return t?{locality:e.getValueFromVcard("locality",t),country_name:e.getValueFromVcard("country-name",t),region:e.getValueFromVcard("region",t),street:e.getValueFromVcard("street-address",t)}:{}},this.getEmail=function(){var t=e.getValueFromVcard("hasEmail");return t?e.getValueFromVcard("value",t).split("mailto:")[1]:""},this.getPhone=function(){var t=e.getValueFromVcard("hasTelephone");if(t)return e.getValueFromVcard("value",t).split("tel:+")[1]},this.getProfile=function(){return u(e,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return this.session?[3,2]:[4,this.getSession()];case 1:e.sent(),e.label=2;case 2:console.log("Wait for it..."),null==this.session&&console.log("NULL SESSION!!!"),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,this.fetcher.load(this.session.webId)];case 4:return e.sent(),console.log("Profile loaded: "+this.getValueFromVcard("fn")),[2,{fn:this.getValueFromVcard("fn"),company:this.getValueFromVcard("organization-name"),phone:this.getPhone(),role:this.getValueFromVcard("role"),image:this.getValueFromVcard("hasPhoto"),address:this.getAddress(),email:this.getEmail()}];case 5:return t=e.sent(),console.log("Error fetching data: "+t),[3,6];case 6:return[2]}})})},this.fetcher=new $rdf.Fetcher(this.store,{}),this.updateManager=new $rdf.UpdateManager(this.store),this.getSession()}return t.prototype.addNewLinkedField=function(t,e,n,r,i,o){var s=t+":"+Date.now(),a=$rdf.sym(this.session.webId.split("#")[0]+"#"+s),u="phone"===t?$rdf.sym(ol("hasTelephone")):$rdf.sym(ol("hasEmail"));e.push($rdf.st(a,n,r,i));var l="phone"===t?$rdf.literal("Home"):$rdf.literal("Personal");e.push($rdf.st(a,ol("type"),l,i)),e.push($rdf.st(o,u,a,i))},t.prototype.getUriForField=function(t,e){var n,r;switch(t){case"phone":(n=this.getValueFromVcard("hasTelephone"))&&(r=$rdf.sym(n));break;case"email":(n=this.getValueFromVcard("hasEmail"))&&(r=$rdf.sym(n));break;default:r=e}return r},t.prototype.getFieldValue=function(t,e){var n;if(t.value[e]){switch(e){case"phone":n=$rdf.sym("tel:+"+t.value[e]);break;case"email":n=$rdf.sym("mailto:"+t.value[e]);break;default:n=t.value[e]}return n}},t.prototype.getOldFieldValue=function(t,e){var n;if(e&&e[t]){switch(t){case"phone":n=$rdf.sym("tel:+"+e[t]);break;case"email":n=$rdf.sym("mailto:"+e[t]);break;default:n=e[t]}return n}},t.prototype.getFieldName=function(t){switch(t){case"company":return"organization-name";case"phone":case"email":return"value";default:return t}},t.prototype.getValueFromNamespace=function(t,e,n){var r=this.store.any($rdf.sym(n||this.session.webId),e(t));return r?r.value:""},t.prototype.getContacts=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:t=this.session.webId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetcher.load(this.store.sym(t).doc())];case 2:return n.sent(),[2,this.store.each(this.store.sym(t),sl("knows"))];case 3:return e=n.sent(),console.log("Error fetching contacts data: "+e),[3,4];case 4:return[2]}})})},t.prototype.getWebID=function(){return this.session.webId},t.prototype.getUserName=function(){return this.getValueFromVcard("fn")},t.ngInjectableDef=wt({factory:function(){return new t(fe(el))},token:t,providedIn:"root"}),t}(),ul=new D(function(t){return t.complete()});function ll(t){return t?function(t){return new D(function(e){return t.schedule(function(){return e.complete()})})}(t):ul}function cl(t){var e=new D(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}function hl(){for(var t=[],e=0;e0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?yl(function(e,n){return t(e,n,r)}):ct,_l(1),n?Il(e):Tl(function(){return new pl}))}}function Nl(t,e){return function(n){return n.lift(new jl(t,e,n))}}var jl=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Dl(t,this.predicate,this.thisArg,this.source))},t}(),Dl=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return i(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(I);function Ml(t){return function(e){var n=new Ll(t),r=e.lift(n);return n.caught=r}}var Ll=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ul(t,this.selector,this.caught))},t}(),Ul=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return i(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(i){return void t.prototype.error.call(this,i)}this._unsubscribeAndRecycle();var r=new q(this,void 0,void 0);this.add(r),tt(this,n,void 0,void 0,r)}},e}(et);function Fl(t){return function(e){return 0===t?ll():e.lift(new Vl(t))}}var Vl=function(){function t(t){if(this.total=t,this.total<0)throw new wl}return t.prototype.call=function(t,e){return e.subscribe(new Bl(t,this.total))},t}(),Bl=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return i(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(I);function zl(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?yl(function(e,n){return t(e,n,r)}):ct,Fl(1),n?Il(e):Tl(function(){return new pl}))}}function Hl(t,e){return at(t,e,1)}function ql(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Wl(t,e,n))}}var Wl=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Gl(t,this.accumulator,this.seed,this.hasSeed))},t}(),Gl=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return i(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(r){this.destination.error(r)}this.seed=e,this.destination.next(e)},e}(I),$l=function(){return function(t,e){this.id=t,this.url=e}}(),Jl=function(t){function e(e,n,r,i){void 0===r&&(r="imperative"),void 0===i&&(i=null);var o=t.call(this,e,n)||this;return o.navigationTrigger=r,o.restoredState=i,o}return i(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}($l),Kl=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.urlAfterRedirects=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}($l),Yl=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.reason=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}($l),Ql=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.error=r,i}return i(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}($l),Xl=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),Zl=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),tc=function(t){function e(e,n,r,i,o){var s=t.call(this,e,n)||this;return s.urlAfterRedirects=r,s.state=i,s.shouldActivate=o,s}return i(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}($l),ec=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),nc=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}($l),rc=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),ic=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),oc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),sc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),ac=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),uc=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),lc=function(){function t(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}return t.prototype.toString=function(){return"Scroll(anchor: '"+this.anchor+"', position: '"+(this.position?this.position[0]+", "+this.position[1]:null)+"')"},t}(),cc=function(){return function(){}}(),hc="primary",fc=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return this.params.hasOwnProperty(t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();function pc(t){return new fc(t)}function dc(t,e,n){var r=n.path.split("/");if(r.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.length0?t[t.length-1]:null}function Sc(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Cc(t){return t.pipe(ht(),Nl(function(t){return!0===t}))}function Ec(t){return Ce(t)?t:Se(t)?st(Promise.resolve(t)):hl(t)}function kc(t,e,n){return n?function(t,e){return wc(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!Pc(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!e.children[r])return!1;if(!t(e.children[r],n.children[r]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return e[n]===t[n]})}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,r,i){if(n.segments.length>i.length)return!!Pc(s=n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!Pc(n.segments,i))return!1;for(var o in r.children){if(!n.children[o])return!1;if(!t(n.children[o],r.children[o]))return!1}return!0}var s=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!!Pc(n.segments,s)&&!!n.children[hc]&&e(n.children[hc],r,a)}(e,n,n.segments)}(t.root,e.root)}var Tc=function(){function t(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=pc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return jc.serialize(this)},t}(),Oc=function(){function t(t,e){var n=this;this.segments=t,this.children=e,this.parent=null,Sc(e,function(t,e){return t.parent=n})}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return Dc(this)},t}(),Ic=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=pc(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return Bc(this)},t}();function Pc(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}function Ac(t,e){var n=[];return Sc(t.children,function(t,r){r===hc&&(n=n.concat(e(t,r)))}),Sc(t.children,function(t,r){r!==hc&&(n=n.concat(e(t,r)))}),n}var Rc=function(){return function(){}}(),Nc=function(){function t(){}return t.prototype.parse=function(t){var e=new Gc(t);return new Tc(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){var e,n;return"/"+function t(e,n){if(!e.hasChildren())return Dc(e);if(n){var r=e.children[hc]?t(e.children[hc],!1):"",i=[];return Sc(e.children,function(e,n){n!==hc&&i.push(n+":"+t(e,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=Ac(e,function(n,r){return r===hc?[t(e.children[hc],!1)]:[r+":"+t(n,!1)]});return Dc(e)+"/("+o.join("//")+")"}(t.root,!0)+(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return Lc(t)+"="+Lc(e)}).join("&"):Lc(t)+"="+Lc(n)})).length?"?"+n.join("&"):"")+("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"")},t}(),jc=new Nc;function Dc(t){return t.segments.map(function(t){return Bc(t)}).join("/")}function Mc(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Lc(t){return Mc(t).replace(/%3B/gi,";")}function Uc(t){return Mc(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Fc(t){return decodeURIComponent(t)}function Vc(t){return Fc(t.replace(/\+/g,"%20"))}function Bc(t){return""+Uc(t.path)+(e=t.parameters,Object.keys(e).map(function(t){return";"+Uc(t)+"="+Uc(e[t])}).join(""));var e}var zc=/^[^\/()?;=#]+/;function Hc(t){var e=t.match(zc);return e?e[0]:""}var qc=/^[^=?&#]+/,Wc=/^[^?&#]+/,Gc=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Oc([],{}):new Oc([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[hc]=new Oc(t,e)),n},t.prototype.parseSegment=function(){var t=Hc(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new Ic(Fc(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=Hc(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var r=Hc(this.remaining);r&&this.capture(n=r)}t[Fc(e)]=Fc(n)}},t.prototype.parseQueryParam=function(t){var e,n=(e=this.remaining.match(qc))?e[0]:"";if(n){this.capture(n);var r="";if(this.consumeOptional("=")){var i=function(t){var e=t.match(Wc);return e?e[0]:""}(this.remaining);i&&this.capture(r=i)}var o=Vc(n),s=Vc(r);if(t.hasOwnProperty(o)){var a=t[o];Array.isArray(a)||(t[o]=a=[a]),a.push(s)}else t[o]=s}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=Hc(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=hc);var o=this.parseChildren();e[i]=1===Object.keys(o).length?o[hc]:new Oc([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),$c=function(){return function(t){this.segmentGroup=t||null}}(),Jc=function(){return function(t){this.urlTree=t}}();function Kc(t){return new D(function(e){return e.error(new $c(t))})}function Yc(t){return new D(function(e){return e.error(new Jc(t))})}function Qc(t){return new D(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))})}var Xc=function(){function t(t,e,n,r,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=t.get($e)}return t.prototype.apply=function(){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,hc).pipe(nt(function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)})).pipe(Ml(function(e){if(e instanceof Jc)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof $c)throw t.noMatchError(e);throw e}))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,hc).pipe(nt(function(n){return e.createUrlTree(n,t.queryParams,t.fragment)})).pipe(Ml(function(t){if(t instanceof $c)throw e.noMatchError(t);throw t}))},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,n){var r,i=t.segments.length>0?new Oc([],((r={})[hc]=t,r)):t;return new Tc(i,e,n)},t.prototype.expandSegmentGroup=function(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(nt(function(t){return new Oc([],t)})):this.expandSegment(t,n,e,n.segments,r,!0)},t.prototype.expandChildren=function(t,e,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return hl({});var o=[],s=[],a={};return Sc(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(t,e,l,u)).pipe(nt(function(t){return a[i]=t}));i===hc?o.push(c):s.push(c)}),hl.apply(null,o.concat(s)).pipe(gl(),Rl(),nt(function(){return a}))}(n.children)},t.prototype.expandSegment=function(t,e,n,r,i,o){var s=this;return hl.apply(void 0,f(n)).pipe(nt(function(a){return s.expandSegmentAgainstRoute(t,e,n,a,r,i,o).pipe(Ml(function(t){if(t instanceof $c)return hl(null);throw t}))}),gl(),zl(function(t){return!!t}),Ml(function(t,n){if(t instanceof pl||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,r,i))return hl(new Oc([],{}));throw new $c(e)}throw t}))},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.expandSegmentAgainstRoute=function(t,e,n,r,i,o,s){return nh(r)!==o?Kc(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,i):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o):Kc(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Yc(o):this.lineralizeSegments(n,o).pipe(at(function(n){var o=new Oc(n,{});return i.expandSegment(t,o,e,n,r,!1)}))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){var s=this,a=Zc(e,r,i),u=a.consumedSegments,l=a.lastChild,c=a.positionalParamSegments;if(!a.matched)return Kc(e);var h=this.applyRedirectCommands(u,r.redirectTo,c);return r.redirectTo.startsWith("/")?Yc(h):this.lineralizeSegments(r,h).pipe(at(function(r){return s.expandSegment(t,e,n,r.concat(i.slice(l)),o,!1)}))},t.prototype.matchSegmentAgainstRoute=function(t,e,n,r){var i=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(nt(function(t){return n._loadedConfig=t,new Oc(r,{})})):hl(new Oc(r,{}));var s=Zc(e,n,r),a=s.consumedSegments,u=s.lastChild;if(!s.matched)return Kc(e);var l=r.slice(u);return this.getChildConfig(t,n).pipe(at(function(t){var n=t.module,r=t.routes,s=function(t,e,n,r){return n.length>0&&function(t,e,n){return r.some(function(n){return eh(t,e,n)&&nh(n)!==hc})}(t,n)?{segmentGroup:th(new Oc(e,function(t,e){var n,r,i={};i[hc]=e;try{for(var o=c(t),s=o.next();!s.done;s=o.next()){var a=s.value;""===a.path&&nh(a)!==hc&&(i[nh(a)]=new Oc([],{}))}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(r,new Oc(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return r.some(function(n){return eh(t,e,n)})}(t,n)?{segmentGroup:th(new Oc(t.segments,function(t,e,n,r){var i,s,a={};try{for(var u=c(n),l=u.next();!l.done;l=u.next()){var h=l.value;eh(t,e,h)&&!r[nh(h)]&&(a[nh(h)]=new Oc([],{}))}}catch(f){i={error:f}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}return o({},r,a)}(t,n,r,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,a,l,r),u=s.segmentGroup,h=s.slicedSegments;return 0===h.length&&u.hasChildren()?i.expandChildren(n,r,u).pipe(nt(function(t){return new Oc(a,t)})):0===r.length&&0===h.length?hl(new Oc(a,{})):i.expandSegment(n,u,r,h,hc,!0).pipe(nt(function(t){return new Oc(a.concat(t.segments),t.children)}))}))},t.prototype.getChildConfig=function(t,e){var n=this;return e.children?hl(new gc(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?hl(e._loadedConfig):function(t,e){var n=e.canLoad;return n&&0!==n.length?Cc(st(n).pipe(nt(function(n){var r=t.get(n);return Ec(r.canLoad?r.canLoad(e):r(e))}))):hl(!0)}(t.injector,e).pipe(at(function(r){return r?n.configLoader.load(t.injector,e).pipe(nt(function(t){return e._loadedConfig=t,t})):function(t){return new D(function(e){return e.error(((n=Error("NavigationCancelingError: Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false")).ngNavigationCancelingError=!0,n));var n})}(e)})):hl(new gc([],t))},t.prototype.lineralizeSegments=function(t,e){for(var n=[],r=e.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return hl(n);if(r.numberOfChildren>1||!r.children[hc])return Qc(t.redirectTo);r=r.children[hc]}},t.prototype.applyRedirectCommands=function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,n,r){var i=this.createSegmentGroup(t,e.root,n,r);return new Tc(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var n={};return Sc(t,function(t,r){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);n[r]=e[i]}else n[r]=t}),n},t.prototype.createSegmentGroup=function(t,e,n,r){var i=this,o=this.createSegments(t,e.segments,n,r),s={};return Sc(e.children,function(e,o){s[o]=i.createSegmentGroup(t,e,n,r)}),new Oc(o,s)},t.prototype.createSegments=function(t,e,n,r){var i=this;return e.map(function(e){return e.path.startsWith(":")?i.findPosParam(t,e,r):i.findOrReturn(e,n)})},t.prototype.findPosParam=function(t,e,n){var r=n[e.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return r},t.prototype.findOrReturn=function(t,e){var n,r,i=0;try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.path===t.path)return e.splice(i),a;i++}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return t},t}();function Zc(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(e.matcher||dc)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function th(t){if(1===t.numberOfChildren&&t.children[hc]){var e=t.children[hc];return new Oc(t.segments.concat(e.segments),e.children)}return t}function eh(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function nh(t){return t.outlet||hc}var rh=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=ih(t,this._root);return e?e.children.map(function(t){return t.value}):[]},t.prototype.firstChild=function(t){var e=ih(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=oh(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})},t.prototype.pathFromRoot=function(t){return oh(t,this._root).map(function(t){return t.value})},t}();function ih(t,e){var n,r;if(t===e.value)return e;try{for(var i=c(e.children),o=i.next();!o.done;o=i.next()){var s=ih(t,o.value);if(s)return s}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return null}function oh(t,e){var n,r;if(t===e.value)return[e];try{for(var i=c(e.children),o=i.next();!o.done;o=i.next()){var s=oh(t,o.value);if(s.length)return s.unshift(e),s}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return[]}var sh=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ah(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var uh=function(t){function e(e,n){var r=t.call(this,e)||this;return r.snapshot=n,dh(r,e),r}return i(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(rh);function lh(t,e){var n=function(t,e){var n=new fh([],{},{},"",{},hc,e,null,t.root,-1,{});return new ph("",new sh(n,[]))}(t,e),r=new dl([new Ic("",{})]),i=new dl({}),o=new dl({}),s=new dl({}),a=new dl(""),u=new ch(r,i,s,a,o,hc,e,n.root);return u.snapshot=n.root,new uh(new sh(u,[]),n)}var ch=function(){function t(t,e,n,r,i,o,s,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(nt(function(t){return pc(t)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(nt(function(t){return pc(t)}))),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function hh(t,e){void 0===e&&(e="emptyOnly");var n=t.pathFromRoot,r=0;if("always"!==e)for(r=n.length-1;r>=1;){var i=n[r],s=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(s.component)break;r--}}return function(t){return t.reduce(function(t,e){return{params:o({},t.params,e.params),data:o({},t.data,e.data),resolve:o({},t.resolve,e._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var fh=function(){function t(t,e,n,r,i,o,s,a,u,l,c){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this.routeConfig=a,this._urlSegment=u,this._lastPathIndex=l,this._resolve=c}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=pc(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=pc(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),ph=function(t){function e(e,n){var r=t.call(this,n)||this;return r.url=e,dh(r,n),r}return i(e,t),e.prototype.toString=function(){return gh(this._root)},e}(rh);function dh(t,e){e.value._routerState=t,e.children.forEach(function(e){return dh(t,e)})}function gh(t){var e=t.children.length>0?" { "+t.children.map(gh).join(", ")+" } ":"";return""+t.value+e}function yh(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,wc(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),wc(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;n0&&bh(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(r&&r!==xc(n))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),xh=function(){return function(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}();function Sh(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[hc]:""+t}function Ch(t,e,n){if(t||(t=new Oc([],{})),0===t.segments.length&&t.hasChildren())return Eh(t,e,n);var r=function(t,e,n){for(var r=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i=n.length)return o;var s=t.segments[i],a=Sh(n[r]),u=r0&&void 0===a)break;if(a&&u&&"object"==typeof u&&void 0===u.outlets){if(!Ih(a,u,s))return o;r+=2}else{if(!Ih(a,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex=2?function(e){return N(ql(t,void 0),_l(1),Il(void 0))(e)}:function(e){return N(ql(function(e,n,r){return t(e)}),_l(1))(e)}}(function(t,e){return t})):hl(null)},t.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},t.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},t.prototype.setupChildRouteGuards=function(t,e,n,r){var i=this,o=ah(e);t.children.forEach(function(t){i.setupRouteGuards(t,o[t.value.outlet],n,r.concat([t.value])),delete o[t.value.outlet]}),Sc(o,function(t,e){return i.deactivateRouteAndItsChildren(t,n.getContext(e))})},t.prototype.setupRouteGuards=function(t,e,n,r){var i=t.value,o=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var a=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);a?this.canActivateChecks.push(new Ph(r)):(i.data=o.data,i._resolvedData=o._resolvedData),this.setupChildRouteGuards(t,e,i.component?s?s.children:null:n,r),a&&this.canDeactivateChecks.push(new Ah(s.outlet.component,o))}else o&&this.deactivateRouteAndItsChildren(e,s),this.canActivateChecks.push(new Ph(r)),this.setupChildRouteGuards(t,null,i.component?s?s.children:null:n,r)},t.prototype.shouldRunGuardsAndResolvers=function(t,e,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!mh(t,e)||!wc(t.queryParams,e.queryParams);case"paramsChange":default:return!mh(t,e)}},t.prototype.deactivateRouteAndItsChildren=function(t,e){var n=this,r=ah(t),i=t.value;Sc(r,function(t,r){n.deactivateRouteAndItsChildren(t,i.component?e?e.children.getContext(r):null:e)}),this.canDeactivateChecks.push(new Ah(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))},t.prototype.runCanDeactivateChecks=function(){var t=this;return st(this.canDeactivateChecks).pipe(at(function(e){return t.runCanDeactivate(e.component,e.route)}),Nl(function(t){return!0===t}))},t.prototype.runCanActivateChecks=function(){var t=this;return st(this.canActivateChecks).pipe(Hl(function(e){return Cc(st([t.fireChildActivationStart(e.route.parent),t.fireActivationStart(e.route),t.runCanActivateChild(e.path),t.runCanActivate(e.route)]))}),Nl(function(t){return!0===t}))},t.prototype.fireActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new ac(t)),hl(!0)},t.prototype.fireChildActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new oc(t)),hl(!0)},t.prototype.runCanActivate=function(t){var e=this,n=t.routeConfig?t.routeConfig.canActivate:null;return n&&0!==n.length?Cc(st(n).pipe(nt(function(n){var r=e.getToken(n,t);return Ec(r.canActivate?r.canActivate(t,e.future):r(t,e.future)).pipe(zl())}))):hl(!0)},t.prototype.runCanActivateChild=function(t){var e=this,n=t[t.length-1];return Cc(st(t.slice(0,t.length-1).reverse().map(function(t){return e.extractCanActivateChild(t)}).filter(function(t){return null!==t})).pipe(nt(function(t){return Cc(st(t.guards).pipe(nt(function(r){var i=e.getToken(r,t.node);return Ec(i.canActivateChild?i.canActivateChild(n,e.future):i(n,e.future)).pipe(zl())})))})))},t.prototype.extractCanActivateChild=function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null},t.prototype.runCanDeactivate=function(t,e){var n=this,r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return r&&0!==r.length?st(r).pipe(at(function(r){var i=n.getToken(r,e);return Ec(i.canDeactivate?i.canDeactivate(t,e,n.curr,n.future):i(t,e,n.curr,n.future)).pipe(zl())})).pipe(Nl(function(t){return!0===t})):hl(!0)},t.prototype.runResolve=function(t,e){return this.resolveNode(t._resolve,t).pipe(nt(function(n){return t._resolvedData=n,t.data=o({},t.data,hh(t,e).resolve),null}))},t.prototype.resolveNode=function(t,e){var n=this,r=Object.keys(t);if(0===r.length)return hl({});if(1===r.length){var i=r[0];return this.getResolver(t[i],e).pipe(nt(function(t){var e;return(e={})[i]=t,e}))}var o={};return st(r).pipe(at(function(r){return n.getResolver(t[r],e).pipe(nt(function(t){return o[r]=t,t}))})).pipe(Rl(),nt(function(){return o}))},t.prototype.getResolver=function(t,e){var n=this.getToken(t,e);return Ec(n.resolve?n.resolve(e,this.future):n(e,this.future))},t.prototype.getToken=function(t,e){var n=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(n?n.module.injector:this.moduleInjector).get(t)},t}(),Nh=function(){return function(){}}(),jh=function(){function t(t,e,n,r,i,o){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){try{var t=Lh(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,hc),n=new fh([],Object.freeze({}),Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,{},hc,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new sh(n,e),i=new ph(this.url,r);return this.inheritParamsAndData(i._root),hl(i)}catch(s){return new D(function(t){return t.error(s)})}},t.prototype.inheritParamsAndData=function(t){var e=this,n=t.value,r=hh(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})},t.prototype.processSegmentGroup=function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)},t.prototype.processChildren=function(t,e){var n,r=this,i=Ac(e,function(e,n){return r.processSegmentGroup(t,e,n)});return n={},i.forEach(function(t){var e=n[t.value.outlet];if(e){var r=e.url.map(function(t){return t.toString()}).join("/"),i=t.value.url.map(function(t){return t.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[t.value.outlet]=t.value}),i.sort(function(t,e){return t.value.outlet===hc?-1:e.value.outlet===hc?1:t.value.outlet.localeCompare(e.value.outlet)}),i},t.prototype.processSegment=function(t,e,n,r){var i,o;try{for(var s=c(t),a=s.next();!a.done;a=s.next()){var u=a.value;try{return this.processSegmentAgainstRoute(u,e,n,r)}catch(l){if(!(l instanceof Nh))throw l}}}catch(h){i={error:h}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}if(this.noLeftoversInUrl(e,n,r))return[];throw new Nh},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.processSegmentAgainstRoute=function(t,e,n,r){if(t.redirectTo)throw new Nh;if((t.outlet||hc)!==r)throw new Nh;var i,s=[],a=[];if("**"===t.path){var u=n.length>0?xc(n).parameters:{};i=new fh(n,u,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Vh(t),r,t.component,t,Dh(e),Mh(e)+n.length,Bh(t))}else{var l=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new Nh;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(e.matcher||dc)(n,t,e);if(!r)throw new Nh;var i={};Sc(r.posParams,function(t,e){i[e]=t.path});var s=r.consumed.length>0?o({},i,r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s}}(e,t,n);s=l.consumedSegments,a=n.slice(l.lastChild),i=new fh(s,l.parameters,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Vh(t),r,t.component,t,Dh(e),Mh(e)+s.length,Bh(t))}var c=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),h=Lh(e,s,a,c,this.relativeLinkResolution),f=h.segmentGroup,p=h.slicedSegments;if(0===p.length&&f.hasChildren()){var d=this.processChildren(c,f);return[new sh(i,d)]}if(0===c.length&&0===p.length)return[new sh(i,[])];var g=this.processSegment(c,f,p,hc);return[new sh(i,g)]},t}();function Dh(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function Mh(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Lh(t,e,n,r,i){if(n.length>0&&function(t,e,n){return r.some(function(n){return Uh(t,e,n)&&Fh(n)!==hc})}(t,n)){var s=new Oc(e,function(t,e,n,r){var i,o,s={};s[hc]=r,r._sourceSegment=t,r._segmentIndexShift=e.length;try{for(var a=c(n),u=a.next();!u.done;u=a.next()){var l=u.value;if(""===l.path&&Fh(l)!==hc){var h=new Oc([],{});h._sourceSegment=t,h._segmentIndexShift=e.length,s[Fh(l)]=h}}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return s}(t,e,r,new Oc(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return r.some(function(n){return Uh(t,e,n)})}(t,n)){var a=new Oc(t.segments,function(t,e,n,r,i,s){var a,u,l={};try{for(var h=c(r),f=h.next();!f.done;f=h.next()){var p=f.value;if(Uh(t,n,p)&&!i[Fh(p)]){var d=new Oc([],{});d._sourceSegment=t,d._segmentIndexShift="legacy"===s?t.segments.length:e.length,l[Fh(p)]=d}}}catch(g){a={error:g}}finally{try{f&&!f.done&&(u=h.return)&&u.call(h)}finally{if(a)throw a.error}}return o({},i,l)}(t,e,n,r,t.children,i));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}var u=new Oc(t.segments,t.children);return u._sourceSegment=t,u._segmentIndexShift=e.length,{segmentGroup:u,slicedSegments:n}}function Uh(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Fh(t){return t.outlet||hc}function Vh(t){return t.data||{}}function Bh(t){return t.resolve||{}}var zh=function(){return function(){}}(),Hh=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),qh=new _t("ROUTES"),Wh=function(){function t(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}return t.prototype.load=function(t,e){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(nt(function(r){n.onLoadEndListener&&n.onLoadEndListener(e);var i=r.create(t);return new gc(_c(i.injector.get(qh)).map(bc),i)}))},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?st(this.loader.load(t)):Ec(t()).pipe(at(function(t){return t instanceof Je?hl(t):st(e.compiler.compileModuleAsync(t))}))},t}(),Gh=function(){return function(){}}(),$h=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();function Jh(t){throw t}function Kh(t,e,n){return e.parse("/")}function Yh(t,e){return hl(null)}var Qh=function(){function t(t,e,n,r,i,o,s,a){var u=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=a,this.navigations=new dl(null),this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new B,this.errorHandler=Jh,this.malformedUriErrorHandler=Kh,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Yh,afterPreactivation:Yh},this.urlHandlingStrategy=new $h,this.routeReuseStrategy=new Hh,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=i.get($e),this.console=i.get(Ne);var l=i.get(en);this.isNgZoneEnabled=l instanceof en,this.resetConfig(a),this.currentUrlTree=new Tc(new Oc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new Wh(o,s,function(t){return u.triggerEvent(new rc(t))},function(t){return u.triggerEvent(new ic(t))}),this.routerState=lh(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.parseUrl(e.url),r="popstate"===e.type?"popstate":"hashchange",i=e.state&&e.state.navigationId?{navigationId:e.state.navigationId}:null;setTimeout(function(){t.scheduleNavigation(n,r,i,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){yc(t),this.config=t.map(bc),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,r=e.queryParams,i=e.fragment,s=e.preserveQueryParams,a=e.queryParamsHandling,u=e.preserveFragment;yn()&&s&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,c=u?this.currentUrlTree.fragment:i,h=null;if(a)switch(a){case"merge":h=o({},this.currentUrlTree.queryParams,r);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=r||null}else h=s?this.currentUrlTree.queryParams:r||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,n,r,i){if(0===n.length)return wh(e.root,e.root,e,r,i);var o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new _h(!0,0,t);var e=0,n=!1,r=t.reduce(function(t,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return Sc(r.outlets,function(t,e){o[e]="string"==typeof t?t.split("/"):t}),f(t,[{outlets:o}])}if(r.segmentPath)return f(t,[r.segmentPath])}return"string"!=typeof r?f(t,[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):f(t,[r])},[]);return new _h(n,e,r)}(n);if(o.toRoot())return wh(e.root,new Oc([],{}),e,r,i);var s=function(t,n,r){if(t.isAbsolute)return new xh(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new xh(r.snapshot._urlSegment,!0,0);var i=bh(t.commands[0])?0:1;return function(e,n,o){for(var s=r.snapshot._urlSegment,a=r.snapshot._lastPathIndex+i,u=t.numberOfDoubleDots;u>a;){if(u-=a,!(s=s.parent))throw new Error("Invalid number of '../'");a=s.segments.length}return new xh(s,!1,a-u)}()}(o,0,t),a=s.processChildren?Eh(s.segmentGroup,s.index,o.commands):Ch(s.segmentGroup,s.index,o.commands);return wh(s.segmentGroup,a,e,r,i)}(l,this.currentUrlTree,t,h,c)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),yn()&&this.isNgZoneEnabled&&!en.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=t instanceof Tc?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function(t){for(var e=0;e active",animation:{type:4,styles:null,timings:"{{ easeTime }}ms {{ easing }}"},options:null},{type:1,expr:"active => removed",animation:{type:4,styles:null,timings:"{{ easeTime }}ms {{ easing }}"},options:null}],options:{}}]}});function zf(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"button",[["aria-label","Close"],["class","toast-close-button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.remove()&&r),r},null,null)),(t()(),Ai(1,0,null,null,1,"span",[["aria-hidden","true"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\xd7"]))],null,null)}function Hf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],[[8,"className",0],[1,"aria-label",0]],null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,n.options.titleClass,n.title),t(e,1,0,n.title)})}function qf(t){return Jo(0,[(t()(),Ai(0,0,null,null,0,"div",[["aria-live","polite"],["role","alertdialog"]],[[8,"className",0],[8,"innerHTML",1]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,0,0,n.options.messageClass,n.message)})}function Wf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["aria-live","polite"],["role","alertdialog"]],[[8,"className",0],[1,"aria-label",0]],null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){var n=e.component;t(e,0,0,n.options.messageClass,n.message),t(e,1,0,n.message)})}function Gf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"div",[["class","toast-progress"]],[[4,"width",null]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.width+"%")})}function $f(t){return Jo(0,[(t()(),Pi(16777216,null,null,1,null,zf)),wo(1,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Hf)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,qf)),wo(5,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Wf)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Gf)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,n.options.closeButton),t(e,3,0,n.title),t(e,5,0,n.message&&n.options.enableHtml),t(e,7,0,n.message&&!n.options.enableHtml),t(e,9,0,n.options.progressBar)},null)}function Jf(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["toast-component",""]],[[8,"className",0],[40,"@flyInOut",0]],[[null,"click"],[null,"mouseenter"],[null,"mouseleave"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,1).tapToast()&&r),"mouseenter"===e&&(r=!1!==so(t,1).stickAround()&&r),"mouseleave"===e&&(r=!1!==so(t,1).delayedHideToast()&&r),r},$f,Bf)),wo(1,180224,null,0,nl,[el,Wu,en],null,null)],null,function(t,e){t(e,0,0,so(e,1).toastClasses,so(e,1).state)})}var Kf=Ki("[toast-component]",nl,Jf,{},{},[]),Yf=function(){return function(){}}(),Qf=function(){return function(){}}(),Xf="*";function Zf(t,e){return void 0===e&&(e=null),{type:2,steps:t,options:e}}function tp(t){return{type:6,styles:t,offset:null}}function ep(t){Promise.resolve(null).then(t)}var np=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.init=function(){},t.prototype.play=function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0},t.prototype.triggerMicrotask=function(){var t=this;ep(function(){return t._onFinish()})},t.prototype._onStart=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.pause=function(){},t.prototype.restart=function(){},t.prototype.finish=function(){this._onFinish()},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){},t.prototype.setPosition=function(t){},t.prototype.getPosition=function(){return 0},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),rp=function(){function t(t){var e=this;this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var n=0,r=0,i=0,o=this.players.length;0==o?ep(function(){return e._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++n==o&&e._onFinish()}),t.onDestroy(function(){++r==o&&e._onDestroy()}),t.onStart(function(){++i==o&&e._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this.players.forEach(function(t){return t.init()})},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype._onStart=function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.hasStarted=function(){return this._started},t.prototype.play=function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})},t.prototype.pause=function(){this.players.forEach(function(t){return t.pause()})},t.prototype.restart=function(){this.players.forEach(function(t){return t.restart()})},t.prototype.finish=function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})},t.prototype.destroy=function(){this._onDestroy()},t.prototype._onDestroy=function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.reset=function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype.setPosition=function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})},t.prototype.getPosition=function(){var t=0;return this.players.forEach(function(e){var n=e.getPosition();t=Math.min(n,t)}),t},t.prototype.beforeDestroy=function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),ip="!";function op(){throw Error("Host already has a portal attached")}var sp=function(){function t(){}return t.prototype.attach=function(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&op(),this._attachedHost=t,t.attach(this)},t.prototype.detach=function(){var t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),ap=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.component=e,o.viewContainerRef=n,o.injector=r,o.componentFactoryResolver=i,o}return i(e,t),e}(sp),up=function(t){function e(e,n,r){var i=t.call(this)||this;return i.templateRef=e,i.viewContainerRef=n,i.context=r,i}return i(e,t),Object.defineProperty(e.prototype,"origin",{get:function(){return this.templateRef.elementRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e,n){return void 0===n&&(n=this.context),this.context=n,t.prototype.attach.call(this,e)},e.prototype.detach=function(){return this.context=void 0,t.prototype.detach.call(this)},e}(sp),lp=function(){function t(){this._isDisposed=!1}return t.prototype.hasAttached=function(){return!!this._attachedPortal},t.prototype.attach=function(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&op(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof ap?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof up?(this._attachedPortal=t,this.attachTemplatePortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()},t.prototype.detach=function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()},t.prototype.dispose=function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t.prototype._invokeDisposeFn=function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)},t}(),cp=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.outletElement=e,o._componentFactoryResolver=n,o._appRef=r,o._defaultInjector=i,o}return i(e,t),e.prototype.attachComponentPortal=function(t){var e,n=this,r=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(r,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=r.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),e},e.prototype.attachTemplatePortal=function(t){var e=this,n=t.viewContainerRef,r=n.createEmbeddedView(t.templateRef,t.context);return r.detectChanges(),r.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),this.setDisposeFn(function(){var t=n.indexOf(r);-1!==t&&n.remove(t)}),r},e.prototype.dispose=function(){t.prototype.dispose.call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)},e.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},e}(lp),hp=function(t){function e(e,n){var r=t.call(this)||this;return r._componentFactoryResolver=e,r._viewContainerRef=n,r._isInitialized=!1,r.attached=new tn,r}return i(e,t),Object.defineProperty(e.prototype,"portal",{get:function(){return this._attachedPortal},set:function(e){(!this.hasAttached()||e||this._isInitialized)&&(this.hasAttached()&&t.prototype.detach.call(this),e&&t.prototype.attach.call(this,e),this._attachedPortal=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attachedRef",{get:function(){return this._attachedRef},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this._isInitialized=!0},e.prototype.ngOnDestroy=function(){t.prototype.dispose.call(this),this._attachedPortal=null,this._attachedRef=null},e.prototype.attachComponentPortal=function(e){e.setAttachedHost(this);var n=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,r=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),i=n.createComponent(r,n.length,e.injector||n.injector);return t.prototype.setDisposeFn.call(this,function(){return i.destroy()}),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i},e.prototype.attachTemplatePortal=function(e){var n=this;e.setAttachedHost(this);var r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context);return t.prototype.setDisposeFn.call(this,function(){return n._viewContainerRef.clear()}),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r},e}(lp),fp=function(){return function(){}}(),pp=function(){function t(t,e){this._parentInjector=t,this._customTokens=e}return t.prototype.get=function(t,e){var n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)},t}(),dp=27;function gp(){for(var t=[],e=0;e0?ot(t,n):ll(n):cl(t[0]),e)}}var yp=new _t("cdk-dir-doc",{providedIn:"root",factory:function(){return fe(Aa)}}),mp=function(){function t(t){if(this.value="ltr",this.change=new tn,t){var e=(t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null);this.value="ltr"===e||"rtl"===e?e:"ltr"}}return t.prototype.ngOnDestroy=function(){this.change.complete()},t.ngInjectableDef=wt({factory:function(){return new t(fe(yp,8))},token:t,providedIn:"root"}),t}(),vp=function(){return function(){}}();function bp(t){return Array.isArray(t)?t:[t]}function wp(t){return null==t?"":"string"==typeof t?t:t+"px"}function _p(t,e,n,r){return g(n)&&(r=n,n=void 0),r?_p(t,e,n).pipe(nt(function(t){return p(t)?r.apply(void 0,t):r(t)})):new D(function(r){!function t(e,n,r,i,o){var s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var a=e;e.addEventListener(n,r,o),s=function(){return a.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),s=function(){return u.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var l=e;e.addListener(n,r),s=function(){return l.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var c=0,h=e.length;c1?Array.prototype.slice.call(arguments):t)},r,n)})}var xp=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return i(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return i(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(x)),Sp=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),Cp=new(function(t){function e(n,r){void 0===r&&(r=Sp.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return i(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(Sp))(xp),Ep=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new kp(t,this.durationSelector))},t}(),kp=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return i(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=b(this.durationSelector)(t);if(e===m)this.destination.error(m.e);else{var n=tt(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(et);function Tp(t){return!p(t)&&t-parseFloat(t)+1>=0}function Op(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function Ip(t,e){return void 0===e&&(e=Cp),n=function(){return function(t,e,n){void 0===t&&(t=0);var r=-1;return Tp(e)?r=Number(e)<1?1:Number(e):H(e)&&(n=e),H(n)||(n=Cp),new D(function(e){var i=Tp(t)?t:+t-n.now();return n.schedule(Op,i,{index:0,period:r,subscriber:e})})}(t,e)},function(t){return t.lift(new Ep(n))};var n}function Pp(t){return function(e){return e.lift(new Ap(t))}}var Ap=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Rp(t),r=tt(n,this.notifier);return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),Rp=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(et),Np="undefined"!=typeof Intl&&Intl.v8BreakIterator,jp=function(){function t(t){this._platformId=t,this.isBrowser=this._platformId?this._platformId===Ra:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Np)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return t.ngInjectableDef=wt({factory:function(){return new t(fe(Ae,8))},token:t,providedIn:"root"}),t}(),Dp=function(){return function(){}}(),Mp=function(){function t(t,e){this._ngZone=t,this._platform=e,this._scrolled=new B,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}return t.prototype.register=function(t){var e=this;this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(function(){return e._scrolled.next(t)}))},t.prototype.deregister=function(t){var e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))},t.prototype.scrolled=function(t){var e=this;return void 0===t&&(t=20),this._platform.isBrowser?new D(function(n){e._globalSubscription||e._addGlobalListener();var r=t>0?e._scrolled.pipe(Ip(t)).subscribe(n):e._scrolled.subscribe(n);return e._scrolledCount++,function(){r.unsubscribe(),e._scrolledCount--,e._scrolledCount||e._removeGlobalListener()}}):hl()},t.prototype.ngOnDestroy=function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()},t.prototype.ancestorScrolled=function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(yl(function(t){return!t||n.indexOf(t)>-1}))},t.prototype.getAncestorScrollContainers=function(t){var e=this,n=[];return this.scrollContainers.forEach(function(r,i){e._scrollableContainsElement(i,t)&&n.push(i)}),n},t.prototype._scrollableContainsElement=function(t,e){var n=e.nativeElement,r=t.getElementRef().nativeElement;do{if(n==r)return!0}while(n=n.parentElement);return!1},t.prototype._addGlobalListener=function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return _p(window.document,"scroll").subscribe(function(){return t._scrolled.next()})})},t.prototype._removeGlobalListener=function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)},t.ngInjectableDef=wt({factory:function(){return new t(fe(en),fe(jp))},token:t,providedIn:"root"}),t}(),Lp=function(){return function(){}}(),Up=function(){function t(t,e){var n=this;this._platform=t,e.runOutsideAngular(function(){n._change=t.isBrowser?ft(_p(window,"resize"),_p(window,"orientationchange")):hl(),n._invalidateCache=n.change().subscribe(function(){return n._updateViewportSize()})})}return t.prototype.ngOnDestroy=function(){this._invalidateCache.unsubscribe()},t.prototype.getViewportSize=function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t},t.prototype.getViewportRect=function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,r=e.height;return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}},t.prototype.getViewportScrollPosition=function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=document.documentElement,e=t.getBoundingClientRect();return{top:-e.top||document.body.scrollTop||window.scrollY||t.scrollTop||0,left:-e.left||document.body.scrollLeft||window.scrollX||t.scrollLeft||0}},t.prototype.change=function(t){return void 0===t&&(t=20),t>0?this._change.pipe(Ip(t)):this._change},t.prototype._updateViewportSize=function(){this._viewportSize=this._platform.isBrowser?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}},t.ngInjectableDef=wt({factory:function(){return new t(fe(jp),fe(en))},token:t,providedIn:"root"}),t}(),Fp=function(){function t(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}return t.prototype.attach=function(){},t.prototype.enable=function(){if(this._canBeEnabled()){var t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=wp(-this._previousScrollPosition.left),t.style.top=wp(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}},t.prototype.disable=function(){if(this._isEnabled){var t=this._document.documentElement,e=t.style,n=this._document.body.style,r=e.scrollBehavior||"",i=n.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),e.scrollBehavior=n.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.scrollBehavior=r,n.scrollBehavior=i}},t.prototype._canBeEnabled=function(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;var t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width},t}();function Vp(){return Error("Scroll strategy has already been attached.")}var Bp=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=function(){i.disable(),i._overlayRef.hasAttached()&&i._ngZone.run(function(){return i._overlayRef.detach()})}}return t.prototype.attach=function(t){if(this._overlayRef)throw Vp();this._overlayRef=t},t.prototype.enable=function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),zp=function(){function t(){}return t.prototype.enable=function(){},t.prototype.disable=function(){},t.prototype.attach=function(){},t}();function Hp(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function qp(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var Wp=function(){function t(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r,this._scrollSubscription=null}return t.prototype.attach=function(t){if(this._overlayRef)throw Vp();this._overlayRef=t},t.prototype.enable=function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),r=n.width,i=n.height;Hp(e,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))},t.prototype.disable=function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)},t}(),Gp=function(){function t(t,e,n,r){var i=this;this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this.noop=function(){return new zp},this.close=function(t){return new Bp(i._scrollDispatcher,i._ngZone,i._viewportRuler,t)},this.block=function(){return new Fp(i._viewportRuler,i._document)},this.reposition=function(t){return new Wp(i._scrollDispatcher,i._viewportRuler,i._ngZone,t)},this._document=r}return t.ngInjectableDef=wt({factory:function(){return new t(fe(Mp),fe(Up),fe(en),fe(Aa))},token:t,providedIn:"root"}),t}(),$p=function(){return function(t){var e=this;this.scrollStrategy=new zp,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t&&Object.keys(t).forEach(function(n){void 0!==t[n]&&(e[n]=t[n])})}}(),Jp=function(){return function(t,e,n,r,i){this.offsetX=n,this.offsetY=r,this.panelClass=i,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}(),Kp=function(){return function(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}();function Yp(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "top", "bottom" or "center".')}function Qp(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid "+t+' "'+e+'". Expected "start", "end" or "center".')}var Xp=function(){function t(t){var e=this;this._attachedOverlays=[],this._keydownListener=function(t){for(var n=e._attachedOverlays,r=n.length-1;r>-1;r--)if(n[r]._keydownEventSubscriptions>0){n[r]._keydownEvents.next(t);break}},this._document=t}return t.prototype.ngOnDestroy=function(){this._detach()},t.prototype.add=function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener,!0),this._isAttached=!0),this._attachedOverlays.push(t)},t.prototype.remove=function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()},t.prototype._detach=function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener,!0),this._isAttached=!1)},t.ngInjectableDef=wt({factory:function(){return new t(fe(Aa))},token:t,providedIn:"root"}),t}(),Zp=function(){function t(t){this._document=t}return t.prototype.ngOnDestroy=function(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)},t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=this._document.createElement("div");t.classList.add("cdk-overlay-container"),this._document.body.appendChild(t),this._containerElement=t},t.ngInjectableDef=wt({factory:function(){return new t(fe(Aa))},token:t,providedIn:"root"}),t}(),td=function(){function t(t,e,n,r,i,o,s,a){var u=this;this._portalOutlet=t,this._host=e,this._pane=n,this._config=r,this._ngZone=i,this._keyboardDispatcher=o,this._document=s,this._location=a,this._backdropElement=null,this._backdropClick=new B,this._attachments=new B,this._detachments=new B,this._locationChanges=x.EMPTY,this._keydownEventsObservable=new D(function(t){var e=u._keydownEvents.subscribe(t);return u._keydownEventSubscriptions++,function(){e.unsubscribe(),u._keydownEventSubscriptions--}}),this._keydownEvents=new B,this._keydownEventSubscriptions=0,r.scrollStrategy&&r.scrollStrategy.attach(this),this._positionStrategy=r.positionStrategy}return Object.defineProperty(t.prototype,"overlayElement",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backdropElement",{get:function(){return this._backdropElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostElement",{get:function(){return this._host},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this,n=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._config.scrollStrategy&&this._config.scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(Fl(1)).subscribe(function(){e.hasAttached()&&e.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(function(){return e.dispose()})),n},t.prototype.detach=function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._config.scrollStrategy&&this._config.scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),t}},t.prototype.dispose=function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._config.scrollStrategy&&this._config.scrollStrategy.disable(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()},t.prototype.hasAttached=function(){return this._portalOutlet.hasAttached()},t.prototype.backdropClick=function(){return this._backdropClick.asObservable()},t.prototype.attachments=function(){return this._attachments.asObservable()},t.prototype.detachments=function(){return this._detachments.asObservable()},t.prototype.keydownEvents=function(){return this._keydownEventsObservable},t.prototype.getConfig=function(){return this._config},t.prototype.updatePosition=function(){this._positionStrategy&&this._positionStrategy.apply()},t.prototype.updatePositionStrategy=function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))},t.prototype.updateSize=function(t){this._config=o({},this._config,t),this._updateElementSize()},t.prototype.setDirection=function(t){this._config=o({},this._config,{direction:t}),this._updateElementDirection()},t.prototype.addPanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!0)},t.prototype.removePanelClass=function(t){this._pane&&this._toggleClasses(this._pane,t,!1)},t.prototype.getDirection=function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"},t.prototype._updateElementDirection=function(){this._host.setAttribute("dir",this.getDirection())},t.prototype._updateElementSize=function(){var t=this._pane.style;t.width=wp(this._config.width),t.height=wp(this._config.height),t.minWidth=wp(this._config.minWidth),t.minHeight=wp(this._config.minHeight),t.maxWidth=wp(this._config.maxWidth),t.maxHeight=wp(this._config.maxHeight)},t.prototype._togglePointerEvents=function(t){this._pane.style.pointerEvents=t?"auto":"none"},t.prototype._attachBackdrop=function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",function(e){return t._backdropClick.next(e)}),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")},t.prototype._updateStackingOrder=function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)},t.prototype.detachBackdrop=function(){var t=this,e=this._backdropElement;if(e){var n,r=function(){e&&e.parentNode&&e.parentNode.removeChild(e),t._backdropElement==e&&(t._backdropElement=null),t._config.backdropClass&&t._toggleClasses(e,t._config.backdropClass,!1),clearTimeout(n)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(function(){e.addEventListener("transitionend",r)}),e.style.pointerEvents="none",n=this._ngZone.runOutsideAngular(function(){return setTimeout(r,500)})}},t.prototype._toggleClasses=function(t,e,n){var r=t.classList;bp(e).forEach(function(t){n?r.add(t):r.remove(t)})},t.prototype._detachContentWhenStable=function(){var t=this;this._ngZone.runOutsideAngular(function(){var e=t._ngZone.onStable.asObservable().pipe(Pp(ft(t._attachments,t._detachments))).subscribe(function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())})})},t}(),ed=function(){function t(t,e,n,r,i){var o=this;this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=i,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this.scrollables=[],this._preferredPositions=[],this._positionChanges=new B,this._resizeSubscription=x.EMPTY,this._offsetX=0,this._offsetY=0,this._positionChangeSubscriptions=0,this._appliedPanelClasses=[],this.positionChanges=new D(function(t){var e=o._positionChanges.subscribe(t);return o._positionChangeSubscriptions++,function(){e.unsubscribe(),o._positionChangeSubscriptions--}}),this.setOrigin(t)}return Object.defineProperty(t.prototype,"positions",{get:function(){return this._preferredPositions},enumerable:!0,configurable:!0}),t.prototype.attach=function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(function(){e._isInitialRender=!0,e.apply()})},t.prototype.apply=function(){if(!(this._isDisposed||this._platform&&!this._platform.isBrowser))if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();for(var t,e=this._originRect,n=this._overlayRect,r=this._viewportRect,i=[],o=0,s=this._preferredPositions;of&&(f=y,h=g)}return this._isPushed=!1,void this._applyPosition(h.position,h.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}},t.prototype.detach=function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()},t.prototype.dispose=function(){this._isDisposed||(this._boundingBox&&nd(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)},t.prototype.reapplyLastPosition=function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}},t.prototype.withScrollableContainers=function(t){this.scrollables=t},t.prototype.withPositions=function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this},t.prototype.withViewportMargin=function(t){return this._viewportMargin=t,this},t.prototype.withFlexibleDimensions=function(t){return void 0===t&&(t=!0),this._hasFlexibleDimensions=t,this},t.prototype.withGrowAfterOpen=function(t){return void 0===t&&(t=!0),this._growAfterOpen=t,this},t.prototype.withPush=function(t){return void 0===t&&(t=!0),this._canPush=t,this},t.prototype.withLockedPosition=function(t){return void 0===t&&(t=!0),this._positionLocked=t,this},t.prototype.setOrigin=function(t){return this._origin=t,this},t.prototype.withDefaultOffsetX=function(t){return this._offsetX=t,this},t.prototype.withDefaultOffsetY=function(t){return this._offsetY=t,this},t.prototype.withTransformOriginOn=function(t){return this._transformOriginSelector=t,this},t.prototype._getOriginPoint=function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var r=this._isRtl()?t.right:t.left,i=this._isRtl()?t.left:t.right;n="start"==e.originX?r:i}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}},t.prototype._getOverlayPoint=function(t,e,n){var r;return r="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+r,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}},t.prototype._getOverlayFit=function(t,e,n,r){var i=t.x,o=t.y,s=this._getOffset(r,"x"),a=this._getOffset(r,"y");s&&(i+=s),a&&(o+=a);var u=0-o,l=o+e.height-n.height,c=this._subtractOverflows(e.width,0-i,i+e.width-n.width),h=this._subtractOverflows(e.height,u,l),f=c*h;return{visibleArea:f,isCompletelyWithinViewport:e.width*e.height===f,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:c==e.width}},t.prototype._canFitWithFlexibleDimensions=function(t,e,n){if(this._hasFlexibleDimensions){var r=n.bottom-e.y,i=n.right-e.x,o=this._overlayRef.getConfig().minHeight,s=this._overlayRef.getConfig().minWidth;return(t.fitsInViewportVertically||null!=o&&o<=r)&&(t.fitsInViewportHorizontally||null!=s&&s<=i)}},t.prototype._pushOverlayOnScreen=function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var r,i,o=this._viewportRect,s=Math.max(t.x+e.width-o.right,0),a=Math.max(t.y+e.height-o.bottom,0),u=Math.max(o.top-n.top-t.y,0),l=Math.max(o.left-n.left-t.x,0);return this._previousPushAmount={x:r=e.width<=o.width?l||-s:t.x0){var n=this._getScrollVisibility(),r=new Kp(t,n);this._positionChanges.next(r)}this._isInitialRender=!1},t.prototype._setTransformOrigin=function(t){if(this._transformOriginSelector){var e,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var i=0;ih&&!this._isInitialRender&&!this._growAfterOpen&&(r=t.y-h/2)}if("end"===e.overlayX&&!l||"start"===e.overlayX&&l)a=u.right-t.x+this._viewportMargin,o=t.x-u.left;else if("start"===e.overlayX&&!l||"end"===e.overlayX&&l)s=t.x,o=u.right-t.x;else{c=Math.min(u.right-t.x+u.left,t.x);var f=this._lastBoundingBoxSize.width;s=t.x-c,(o=2*c)>f&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.x-f/2)}return{top:r,left:s,bottom:i,right:a,width:o,height:n}},t.prototype._setBoundingBoxStyles=function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right="",r.width=r.height="100%";else{var i=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=wp(n.height),r.top=wp(n.top),r.bottom=wp(n.bottom),r.width=wp(n.width),r.left=wp(n.left),r.right=wp(n.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",i&&(r.maxHeight=wp(i)),o&&(r.maxWidth=wp(o))}this._lastBoundingBoxSize=n,nd(this._boundingBox.style,r)},t.prototype._resetBoundingBoxStyles=function(){nd(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})},t.prototype._resetOverlayElementStyles=function(){nd(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})},t.prototype._setOverlayElementStyles=function(t,e){var n={};if(this._hasExactPosition()){var r=this._viewportRuler.getViewportScrollPosition();nd(n,this._getExactOverlayY(e,t,r)),nd(n,this._getExactOverlayX(e,t,r))}else n.position="static";var i="",o=this._getOffset(e,"x"),s=this._getOffset(e,"y");o&&(i+="translateX("+o+"px) "),s&&(i+="translateY("+s+"px)"),n.transform=i.trim(),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxHeight&&(n.maxHeight=""),this._hasFlexibleDimensions&&this._overlayRef.getConfig().maxWidth&&(n.maxWidth=""),nd(this._pane.style,n)},t.prototype._getExactOverlayY=function(t,e,n){var r={top:null,bottom:null},i=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n));var o=this._overlayContainer?this._overlayContainer.getContainerElement().getBoundingClientRect().top:0;return i.y-=o,"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(i.y+this._overlayRect.height)+"px":r.top=wp(i.y),r},t.prototype._getExactOverlayX=function(t,e,n){var r={left:null,right:null},i=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?r.right=this._document.documentElement.clientWidth-(i.x+this._overlayRect.width)+"px":r.left=wp(i.x),r},t.prototype._getScrollVisibility=function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this.scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:qp(t,n),isOriginOutsideView:Hp(t,n),isOverlayClipped:qp(e,n),isOverlayOutsideView:Hp(e,n)}},t.prototype._subtractOverflows=function(t){for(var e=[],n=1;n-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._afterAllClosed.next()))},t.prototype._hideNonDialogContentFromAssistiveTechnology=function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var r=e[n];r===t||"SCRIPT"===r.nodeName||"STYLE"===r.nodeName||r.hasAttribute("aria-live")||(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}},t.prototype._closeDialogs=function(t){for(var e=t.length;e--;)t[e].close()},t}(),_d=function(){return function(){}}(),xd=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Sd(t,this.dueTime,this.scheduler))},t}(),Sd=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return i(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Cd,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(I);function Cd(t){t.debouncedNext()}var Ed=function(){function t(t){this._platform=t}return t.prototype.isDisabled=function(t){return t.hasAttribute("disabled")},t.prototype.isVisible=function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility},t.prototype.isTabbable=function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(e){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){var r=n&&n.nodeName.toLowerCase();if(-1===Td(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===r)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),o=Td(t);if(t.hasAttribute("contenteditable"))return-1!==o;if("iframe"===i)return!1;if("audio"===i){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===i){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==i||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&t.tabIndex>=0},t.prototype.isFocusable=function(t){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||kd(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)},t.ngInjectableDef=wt({factory:function(){return new t(fe(jp))},token:t,providedIn:"root"}),t}();function kd(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function Td(t){if(!kd(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Od=function(){function t(t,e,n,r,i){void 0===i&&(i=!1);var o=this;this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._hasAttached=!1,this._startAnchorListener=function(){return o.focusLastTabbableElement()},this._endAnchorListener=function(){return o.focusFirstTabbableElement()},this._enabled=!0,i||this.attachAnchors()}return Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this._startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this._endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null},t.prototype.attachAnchors=function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t._startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t._endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)},t.prototype.focusInitialElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})},t.prototype.focusFirstTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})},t.prototype.focusLastTabbableElementWhenReady=function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})},t.prototype._getRegionBoundary=function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-"+t+"], [cdkFocusRegion"+t+"], [cdk-focus-"+t+"]"),n=0;n=0;n--){var r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null},t.prototype._createAnchor=function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t},t.prototype._toggleAnchorTabIndex=function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")},t.prototype._executeOnStable=function(t){this._ngZone.isStable?t():this._ngZone.onStable.asObservable().pipe(Fl(1)).subscribe(t)},t}(),Id=function(){function t(t,e,n){this._checker=t,this._ngZone=e,this._document=n}return t.prototype.create=function(t,e){return void 0===e&&(e=!1),new Od(t,this._checker,this._ngZone,this._document,e)},t.ngInjectableDef=wt({factory:function(){return new t(fe(Ed),fe(en),fe(Aa))},token:t,providedIn:"root"}),t}(),Pd=new _t("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Ad=function(){function t(t,e){this._sanityChecksEnabled=t,this._hammerLoader=e,this._hasDoneGlobalChecks=!1,this._hasCheckedHammer=!1,this._document="object"==typeof document&&document?document:null,this._window="object"==typeof window&&window?window:null,this._areChecksEnabled()&&!this._hasDoneGlobalChecks&&(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._hasDoneGlobalChecks=!0)}return t.prototype._areChecksEnabled=function(){return this._sanityChecksEnabled&&yn()&&!this._isTestEnv()},t.prototype._isTestEnv=function(){var t=this._window;return t&&(t.__karma__||t.jasmine)},t.prototype._checkDoctypeIsDefined=function(){this._document&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")},t.prototype._checkThemeIsPresent=function(){if(this._document&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}},t.prototype._checkHammerIsAvailable=function(){!this._hasCheckedHammer&&this._window&&(!this._areChecksEnabled()||this._window.Hammer||this._hammerLoader||console.warn("Could not find HammerJS. Certain Angular Material components may not work correctly."),this._hasCheckedHammer=!0)},t}(),Rd=ri({encapsulation:2,styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}@media (-ms-high-contrast:active){.mat-dialog-container{outline:solid 1px}}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button+.mat-button,.mat-dialog-actions .mat-button+.mat-raised-button,.mat-dialog-actions .mat-raised-button+.mat-button,.mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-button+.mat-raised-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-button,[dir=rtl] .mat-dialog-actions .mat-raised-button+.mat-raised-button{margin-left:0;margin-right:8px}"],data:{animation:[{type:7,name:"dialogContainer",definitions:[{type:0,name:"void, exit",styles:{type:6,styles:{opacity:0,transform:"scale(0.7)"},offset:null},options:void 0},{type:0,name:"enter",styles:{type:6,styles:{transform:"none"},offset:null},options:void 0},{type:1,expr:"* => enter",animation:{type:4,styles:{type:6,styles:{transform:"none",opacity:1},offset:null},timings:"150ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void, * => exit",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"75ms cubic-bezier(0.4, 0.0, 0.2, 1)"},options:null}],options:{}}]}});function Nd(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function jd(t){return Jo(0,[Lo(402653184,1,{_portalOutlet:0}),(t()(),Pi(16777216,null,null,1,null,Nd)),wo(2,212992,[[1,4]],0,hp,[qe,Mn],{portal:[0,"portal"]},null)],function(t,e){t(e,2,0,"")},null)}function Dd(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"mat-dialog-container",[["aria-modal","true"],["class","mat-dialog-container"],["tabindex","-1"]],[[1,"id",0],[1,"role",0],[1,"aria-labelledby",0],[1,"aria-label",0],[1,"aria-describedby",0],[40,"@dialogContainer",0]],[["component","@dialogContainer.start"],["component","@dialogContainer.done"]],function(t,e,n){var r=!0;return"component:@dialogContainer.start"===e&&(r=!1!==so(t,1)._onAnimationStart(n)&&r),"component:@dialogContainer.done"===e&&(r=!1!==so(t,1)._onAnimationDone(n)&&r),r},jd,Rd)),wo(1,49152,null,0,pd,[On,Id,Ln,[2,Aa],hd],null,null)],null,function(t,e){t(e,0,0,so(e,1)._id,so(e,1)._config.role,so(e,1)._config.ariaLabel?null:so(e,1)._ariaLabelledBy,so(e,1)._config.ariaLabel,so(e,1)._config.ariaDescribedBy||null,so(e,1)._state)})}var Md=Ki("mat-dialog-container",pd,Dd,{},{},[]),Ld=function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;ot?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return Vd(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return Vd(t.value)?null:Bd.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(Vd(e.value))return null;var n=e.value?e.value.length:0;return nt?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),function(t){if(Vd(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:r,actualValue:e}}}):t.nullValidator;var n,r},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(Hd);return 0==e.length?null:function(t){return Wd(function(t,n){return e.map(function(e){return e(t)})}(t))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(Hd);return 0==e.length?null:function(t){return function t(){for(var e,n=[],r=0;r=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name},t}(),ng=function(){function t(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(tg),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')},t}(),rg='\n

\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',ig='\n
\n
\n \n
\n
';function og(t,e){return f(e.path,[t])}function sg(t,e){t||ug(e,"Cannot find control with"),e.valueAccessor||ug(e,"No value accessor for form control with"),t.validator=zd.compose([t.validator,e.validator]),t.asyncValidator=zd.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&ag(t,e)})}(t,e),function(t,e){t.registerOnChange(function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&ag(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function ag(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function ug(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function lg(t){return null!=t?zd.compose(t.map(Yd)):null}function cg(t){return null!=t?zd.composeAsync(t.map(Qd)):null}var hg=[$d,function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),Xd,function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Lt}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){var e,n;try{for(var r=c(Array.from(this._optionMap.keys())),i=r.next();!i.done;i=r.next()){var o=i.value;if(this._compareWith(this._optionMap.get(o),t))return o}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t},t}(),function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Lt}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var r=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(r.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(bg),xg=function(t){function e(e,n,r){var i=t.call(this,yg(n),mg(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return i(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,r){n._throwIfControlMissing(r),n.at(r).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,r){n.at(r)&&n.at(r).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof wg?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){var t,e;try{for(var n=c(this.controls),r=n.next();!r.done;r=n.next())if(r.value.enabled)return!1}catch(i){t={error:i}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(bg),Sg=Promise.resolve(null),Cg=function(t){function e(e,n){var r=t.call(this)||this;return r.submitted=!1,r._directives=[],r.ngSubmit=new tn,r.form=new _g({},lg(e),cg(n)),r}return i(e,t),e.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),sg(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;Sg.then(function(){var n,r,i=e._findContainer(t.path);i&&i.removeControl(t.name),(r=(n=e._directives).indexOf(t))>-1&&n.splice(r,1)})},e.prototype.addFormGroup=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path),r=new _g({});(function(t,e){null==t&&ug(e,"Cannot find control with"),t.validator=zd.compose([t.validator,e.validator]),t.asyncValidator=zd.composeAsync([t.asyncValidator,e.asyncValidator])})(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;Sg.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;Sg.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this.submitted=!0,e=this._directives,this.form._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},e}(Fd),Eg=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n \n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n
\n \n \n
\n ')},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+rg+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+ig)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+rg+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+ig)},t}(),kg=function(t){function e(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}var n;return i(e,t),n=e,e.prototype._checkParentType=function(){this._parent instanceof n||this._parent instanceof Cg||Eg.modelGroupParentException()},e}(fg),Tg=Promise.resolve(null),Og=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.control=new wg,o._registered=!1,o.update=new tn,o._parent=e,o._rawValidators=n||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e)||ug(t,"Value accessor was not provided as an array for form control with");var n=void 0,r=void 0,i=void 0;return e.forEach(function(e){var o;e.constructor===Kd?n=e:(o=e,hg.some(function(t){return o.constructor===t})?(r&&ug(t,"More than one built-in value accessor matches form control with"),r=e):(i&&ug(t,"More than one custom value accessor matches form control with"),i=e))}),i||r||n||(ug(t,"No valid value accessor for form control with"),null)}(o,i),o}return i(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Lt(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?og(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return lg(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return cg(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){sg(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof kg)&&this._parent instanceof fg?Eg.formGroupNameException():this._parent instanceof kg||this._parent instanceof Cg||Eg.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Eg.missingNameException()},e.prototype._updateValue=function(t){var e=this;Tg.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,r=""===n||n&&"false"!==n;Tg.then(function(){r&&!e.control.disabled?e.control.disable():!r&&e.control.disabled&&e.control.enable()})},e}(tg),Ig=new _t("NgModelWithFormControlWarning"),Pg=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t);return new _g(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)},t.prototype.control=function(t,e,n){return new wg(t,e,n)},t.prototype.array=function(t,e,n){var r=this,i=t.map(function(t){return r._createControl(t)});return new xg(i,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){n[r]=e._createControl(t[r])}),n},t.prototype._createControl=function(t){return t instanceof wg||t instanceof _g||t instanceof xg?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)},t}(),Ag=function(){return function(){}}(),Rg=function(){return function(){}}(),Ng=function(){return function(){}}(),jg=function(){function t(){}var e;return e=t,t.withConfig=function(t){return{ngModule:e,providers:[{provide:Ig,useValue:t.warnOnNgModelWithFormControl}]}},t}(),Dg=function(){return function(t){this.template=t}}(),Mg=function(){function t(){}return t.prototype.warn=function(t){console.warn(t)},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}();function Lg(t){return null!=t}function Ug(t){return"object"==typeof t&&Lg(t)}function Fg(t){return t instanceof Function}var Vg={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03c9":"\u03c9","\u03c2":"\u03c3"};function Bg(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return Vg[t]||t})}function zg(){return"axxxxxxxxxxx".replace(/[x]/g,function(t){return(16*Math.random()|0).toString(16)})}var Hg=function(){function t(t,e){this._ngSelect=t,this._selectionModel=e,this._items=[],this._filteredItems=[],this._markedIndex=-1}return Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filteredItems",{get:function(){return this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"markedIndex",{get:function(){return this._markedIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){return this._selectionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"markedItem",{get:function(){return this._filteredItems[this._markedIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"noItemsToSelect",{get:function(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxItemsSelected",{get:function(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastSelectedItem",{get:function(){return this.selectedItems[this.selectedItems.length-1]},enumerable:!0,configurable:!0}),t.prototype.setItems=function(t){var e=this;this._items=t.map(function(t,n){return e.mapItem(t,n)}),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=f(this._items)},t.prototype.select=function(t){if(!t.selected&&!this.maxItemsSelected){var e=this._ngSelect.multiple;e||this.clearSelected(),this._selectionModel.select(t,e,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&e&&this._hideSelected(t)}},t.prototype.unselect=function(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&Lg(t.index)&&this._ngSelect.multiple&&this._showSelected(t))},t.prototype.findItem=function(t){var e,n=this;return e=this._ngSelect.compareWith?function(e){return n._ngSelect.compareWith(e.value,t)}:this._ngSelect.bindValue?function(e){return!e.children&&n.resolveNested(e.value,n._ngSelect.bindValue)===t}:function(e){return e.value===t||!e.children&&e.label&&e.label===n.resolveNested(t,n._ngSelect.bindLabel)},this._items.find(function(t){return e(t)})},t.prototype.addItem=function(t){var e=this.mapItem(t,this._items.length);return this._items.push(e),this._filteredItems.push(e),e},t.prototype.clearSelected=function(){this._selectionModel.clear(),this._items.forEach(function(t){t.selected=!1,t.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()},t.prototype.findByLabel=function(t){return t=Bg(t).toLocaleLowerCase(),this.filteredItems.find(function(e){return Bg(e.label).toLocaleLowerCase().substr(0,t.length)===t})},t.prototype.filter=function(t){var e,n;if(t){this._filteredItems=[],t=this._ngSelect.searchFn?t:Bg(t).toLocaleLowerCase();var r=this._ngSelect.searchFn||this._defaultSearchFn,i=this._ngSelect.hideSelected,o=function(e){var n,o,a,u=[];try{for(var l=c(s._groups.get(e)),p=l.next();!p.done;p=l.next()){var d=p.value;i&&(d.parent&&d.parent.selected||d.selected)||r(t,s._ngSelect.searchFn?d.value:d)&&u.push(d)}}catch(m){n={error:m}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}if(u.length>0){var g=h(u.slice(-1),1)[0];if(g.parent){var y=s._items.find(function(t){return t===g.parent});s._filteredItems.push(y)}(a=s._filteredItems).push.apply(a,f(u))}},s=this;try{for(var a=c(Array.from(this._groups.keys())),u=a.next();!u.done;u=a.next())o(u.value)}catch(l){e={error:l}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}else this.resetFilteredItems()},t.prototype.resetFilteredItems=function(){this._filteredItems.length!==this._items.length&&(this._filteredItems=this._ngSelect.hideSelected&&this.selectedItems.length>0?this._items.filter(function(t){return!t.selected}):this._items)},t.prototype.unmarkItem=function(){this._markedIndex=-1},t.prototype.markNextItem=function(){this._stepToItem(1)},t.prototype.markPreviousItem=function(){this._stepToItem(-1)},t.prototype.markItem=function(t){this._markedIndex=this._filteredItems.indexOf(t)},t.prototype.markSelectedOrDefault=function(t){if(0!==this._filteredItems.length){var e=this._ngSelect.hideSelected?-1:this._filteredItems.indexOf(this.lastSelectedItem);this._markedIndex=this.lastSelectedItem&&e>-1?e:t?this.filteredItems.findIndex(function(t){return!t.disabled}):-1}},t.prototype.resolveNested=function(t,e){if(!Ug(t))return t;if(-1===e.indexOf("."))return t[e];for(var n=e.split("."),r=t,i=0,o=n.length;i-1},t.prototype._getNextItemIndex=function(t){return t>0?this._markedIndex===this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1},t.prototype._stepToItem=function(t){0===this._filteredItems.length||this._filteredItems.every(function(t){return t.disabled})||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))},t.prototype._groupBy=function(t,e){var n,r,i=Fg(this._ngSelect.groupBy),o=new Map;try{for(var s=c(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=i?e(u.value):u.value[e];l=Lg(l)?l:void 0;var h=o.get(l);h?h.push(u):o.set(l,[u])}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o},t.prototype._flatten=function(t){var e,n,r=Fg(this._ngSelect.groupBy),i=[],o=t.get(void 0)||[];i.push.apply(i,f(o));var s=o.length,a=function(e){if(!Lg(e))return"continue";var n={label:e,children:void 0,parent:null,index:s++,disabled:!u._ngSelect.selectableGroup,htmlId:zg()},o=r?u._ngSelect.bindLabel:u._ngSelect.groupBy,a=u._ngSelect.groupValue||function(){var t;return(t={})[o]=e,t},l=t.get(e).map(function(t){return t.parent=n,t.children=void 0,t.index=s++,t});n.children=l,n.value=a(e,l.map(function(t){return t.value})),i.push(n),i.push.apply(i,f(l))},u=this;try{for(var l=c(Array.from(t.keys())),h=l.next();!h.done;h=l.next())a(h.value)}catch(p){e={error:p}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return i},t}(),qg=function(){var t={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};return t[t.Tab]="Tab",t[t.Enter]="Enter",t[t.Esc]="Esc",t[t.Space]="Space",t[t.ArrowUp]="ArrowUp",t[t.ArrowDown]="ArrowDown",t[t.Backspace]="Backspace",t}(),Wg=function(){function t(){}return t.prototype.requestAnimationFrame=function(t){return window.requestAnimationFrame(t)},t.prototype.setTimeout=function(t,e){return window.setTimeout(t,e)},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Gg=function(){function t(){}return t.prototype.calculateItems=function(t,e,n){var r=t.childHeight*t.itemsLength;e.scrollTop>r&&(e.scrollTop=r);var i=Math.max(0,e.scrollTop)/r*t.itemsLength,o=Math.min(t.itemsLength,Math.ceil(i)+(t.itemsPerCol+1)),s=Math.max(0,o-t.itemsPerCol-1),a=Math.min(s,Math.floor(i)),u=t.childHeight*Math.ceil(a)-t.childHeight*Math.min(a,n);return u=isNaN(u)?0:u,a=isNaN(a)?-1:a,o=isNaN(o)?-1:o,a-=n,o+=n,{topPadding:u,scrollHeight:r,start:a=Math.max(0,a),end:o=Math.min(t.itemsLength,o)}},t.prototype.calculateDimensions=function(t,e,n,r){var i=n.getBoundingClientRect(),o=r.children[e]?r.children[e].getBoundingClientRect():{width:i.width,height:i.height,top:0},s=Math.max(1,Math.floor(i.height/o.height));return{itemsLength:t,viewWidth:i.width,viewHeight:i.height,childWidth:o.width,childHeight:o.height,itemsPerCol:s}},t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),$g=function(){function t(t,e,n,r,i,o){this._renderer=t,this._zone=e,this._virtualScrollService=n,this._window=r,this._document=o,this.items=[],this.position="auto",this.bufferAmount=4,this.virtualScroll=!1,this.update=new tn,this.scroll=new tn,this.scrollToEnd=new tn,this.outsideClick=new tn,this._destroy$=new B,this._startupLoop=!0,this._isScrolledToMarked=!1,this._scrollToEndFired=!1,this._disposeScrollListener=function(){},this._disposeDocumentResizeListener=function(){},this._dropdown=i.nativeElement}return t.prototype.handleMousedown=function(t){"INPUT"!==t.target.tagName&&(t.preventDefault(),t.stopPropagation())},t.prototype.ngOnInit=function(){var t=this;this._select=this._dropdown.parentElement,this._handleScroll(),this._document&&ft(_p(this._document,"touchstart",{capture:!0}),_p(this._document,"mousedown",{capture:!0})).pipe(Pp(this._destroy$)).subscribe(function(e){return t._handleOutsideClick(e)})},t.prototype.ngOnChanges=function(t){t.items&&(this._isScrolledToMarked=!1,this._handleItemsChange(t.items))},t.prototype.ngOnDestroy=function(){this._disposeDocumentResizeListener(),this._disposeScrollListener(),this._destroy$.next(),this._destroy$.complete(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)},t.prototype.ngAfterContentInit=function(){var t=this;this._whenContentReady().then(function(){t.appendTo&&(t._appendDropdown(),t._handleDocumentResize()),t.updateDropdownPosition()})},t.prototype.refresh=function(){var t=this;return new Promise(function(e){t._zone.runOutsideAngular(function(){t._window.requestAnimationFrame(function(){t._updateItems().then(e)})})})},t.prototype.scrollInto=function(t){if(t){var e=this.items.indexOf(t);if(!(e<0||e>=this.items.length)){var n=this._calculateDimensions(this.virtualScroll?0:e),r=this.scrollElementRef.nativeElement,i=Math.floor(n.viewHeight/n.childHeight)-1;if(this.virtualScroll)r.scrollTop=e*n.childHeight-n.childHeight*Math.min(e,i);else{var o=Array.from(this.contentElementRef.nativeElement.children).slice(0,e).reduce(function(t,e){return t+e.clientHeight},0);r.scrollTop=o-n.childHeight*Math.min(e,i)}}}},t.prototype.scrollIntoTag=function(){var t=this.scrollElementRef.nativeElement,e=this._calculateDimensions();t.scrollTop=e.childHeight*(e.itemsLength+1)},t.prototype.updateDropdownPosition=function(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),"top"===this._currentPosition?(this._renderer.addClass(this._dropdown,"ng-select-top"),this._renderer.removeClass(this._dropdown,"ng-select-bottom"),this._renderer.addClass(this._select,"ng-select-top"),this._renderer.removeClass(this._select,"ng-select-bottom")):(this._renderer.addClass(this._dropdown,"ng-select-bottom"),this._renderer.removeClass(this._dropdown,"ng-select-top"),this._renderer.addClass(this._select,"ng-select-bottom"),this._renderer.removeClass(this._select,"ng-select-top")),this.appendTo&&this._updateAppendedDropdownPosition(),this._dropdown.style.opacity="1"},t.prototype._handleOutsideClick=function(t){this._select.contains(t.target)||this._dropdown.contains(t.target)||t.target&&t.target.shadowRoot&&t.path&&t.path[0]&&this._select.contains(t.path[0])||this.outsideClick.emit()},t.prototype._handleScroll=function(){var t=this;this._disposeScrollListener=this._renderer.listen(this.scrollElementRef.nativeElement,"scroll",function(){t.refresh(),t._fireScrollToEnd()})},t.prototype._handleItemsChange=function(t){var e=this;this._scrollToEndFired=!1,this._previousStart=void 0,this._previousEnd=void 0,(void 0!==t&&void 0===t.previousValue||void 0!==t.previousValue&&0===t.previousValue.length)&&(this._startupLoop=!0),this.items=t.currentValue||[],this.refresh().then(function(){e.appendTo&&"top"===e._currentPosition&&e._updateAppendedDropdownPosition()})},t.prototype._updateItems=function(){var t=this;if(en.assertNotInAngularZone(),!this.virtualScroll)return this._zone.run(function(){t.update.emit(t.items.slice()),t._scrollToMarked()}),Promise.resolve();var e=function(n){var r=t._calculateDimensions(),i=t._virtualScrollService.calculateItems(r,t.scrollElementRef.nativeElement,t.bufferAmount||0);t.paddingElementRef.nativeElement.style.height=i.scrollHeight+"px",t.contentElementRef.nativeElement.style.transform="translateY("+i.topPadding+"px)",i.start!==t._previousStart||i.end!==t._previousEnd?(t._zone.run(function(){t.update.emit(t.items.slice(i.start,i.end)),t.scroll.emit({start:i.start,end:i.end})}),t._previousStart=i.start,t._previousEnd=i.end,!0===t._startupLoop&&e(n)):!0===t._startupLoop&&(t._startupLoop=!1,t._scrollToMarked(),n())};return new Promise(function(t){return e(t)})},t.prototype._fireScrollToEnd=function(){this._scrollToEndFired||this.scrollElementRef.nativeElement.scrollTop+this._dropdown.clientHeight>=(this.virtualScroll?this.paddingElementRef.nativeElement:this.contentElementRef.nativeElement).clientHeight&&(this.scrollToEnd.emit(),this._scrollToEndFired=!0)},t.prototype._calculateDimensions=function(t){return void 0===t&&(t=0),this._virtualScrollService.calculateDimensions(this.items.length,t,this.scrollElementRef.nativeElement,this.contentElementRef.nativeElement)},t.prototype._handleDocumentResize=function(){var t=this;this.appendTo&&(this._disposeDocumentResizeListener=this._renderer.listen("window","resize",function(){t._updateAppendedDropdownPosition()}))},t.prototype._scrollToMarked=function(){!this._isScrolledToMarked&&this.markedItem&&(this._isScrolledToMarked=!0,this.scrollInto(this.markedItem))},t.prototype._calculateCurrentPosition=function(t){if("auto"!==this.position)return this.position;var e=this._select.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop;return e.top+window.pageYOffset+e.height+t.getBoundingClientRect().height>n+document.documentElement.clientHeight?"top":"bottom"},t.prototype._appendDropdown=function(){var t=document.querySelector(this.appendTo);if(!t)throw new Error("appendTo selector "+this.appendTo+" did not found any parent element");t.appendChild(this._dropdown)},t.prototype._updateAppendedDropdownPosition=function(){var t=document.querySelector(this.appendTo)||document.body,e=this._select.getBoundingClientRect(),n=t.getBoundingClientRect(),r=e.left-n.left;this._dropdown.style.top=e.top-n.top+("bottom"===this._currentPosition?e.height:-this._dropdown.clientHeight)+"px",this._dropdown.style.bottom="auto",this._dropdown.style.left=r+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"},t.prototype._whenContentReady=function(){var t=this;if(0===this.items.length)return Promise.resolve();var e=function(n){t._dropdown.querySelector(".ng-option")?n():t._zone.runOutsideAngular(function(){setTimeout(function(){return e(n)},5)})};return new Promise(function(t){return e(t)})},t}(),Jg=function(){function t(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0}return t.ngInjectableDef=wt({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Kg=new _t("ng-select-selection-model"),Yg=function(){function t(t,e,n,r,i,o,s){var a=this;this.classes=t,this.tabIndex=e,this._cd=o,this._console=s,this.items=[],this.clearable=!0,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.labelForId=null,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.isOpen=!1,this.blurEvent=new tn,this.focusEvent=new tn,this.changeEvent=new tn,this.openEvent=new tn,this.closeEvent=new tn,this.searchEvent=new tn,this.clearEvent=new tn,this.addEvent=new tn,this.removeEvent=new tn,this.scroll=new tn,this.scrollToEnd=new tn,this.disabled=!1,this.viewPortItems=[],this.filterValue=null,this.dropdownId=zg(),this.selectedItemId=0,this._defaultLabel="label",this._primitive=!0,this._pressedKeys=[],this._destroy$=new B,this._keyPress$=new B,this._onChange=function(t){},this._onTouched=function(){},this.clearItem=function(t){var e=a.selectedItems.find(function(e){return e.value===t});a.unselect(e)},this._mergeGlobalConfig(n),this.itemsList=new Hg(this,r()),this.element=i.nativeElement}return Object.defineProperty(t.prototype,"compareWith",{get:function(){return this._compareWith},set:function(t){if(!Fg(t))throw Error("`compareWith` must be a function.");this._compareWith=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clearSearchOnAdd",{get:function(){return Lg(this._clearSearchOnAdd)?this._clearSearchOnAdd:this.closeOnSelect},set:function(t){this._clearSearchOnAdd=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filtered",{get:function(){return!!this.filterValue&&this.searchable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItems",{get:function(){return this.itemsList.selectedItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedValues",{get:function(){return this.selectedItems.map(function(t){return t.value})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasValue",{get:function(){return this.selectedItems.length>0},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this._handleKeyPresses()},t.prototype.ngOnChanges=function(t){t.multiple&&this.itemsList.clearSelected(),t.items&&this._setItems(t.items.currentValue||[]),t.isOpen&&(this._manualOpen=!0)},t.prototype.ngAfterViewInit=function(){this.items&&0===this.items.length&&this._setItemsFromNgOptions()},t.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},t.prototype.handleKeyDown=function(t){if(qg[t.which])switch(t.which){case qg.ArrowDown:this._handleArrowDown(t);break;case qg.ArrowUp:this._handleArrowUp(t);break;case qg.Space:this._handleSpace(t);break;case qg.Enter:this._handleEnter(t);break;case qg.Tab:this._handleTab(t);break;case qg.Esc:this.close(),t.preventDefault(),t.stopPropagation();break;case qg.Backspace:this._handleBackspace()}else t.key&&1===t.key.length&&this._keyPress$.next(t.key.toLocaleLowerCase())},t.prototype.handleMousedown=function(t){var e=t.target;"INPUT"!==e.tagName&&t.preventDefault(),t.stopPropagation(),"ng-clear"!==e.className?"ng-arrow-wrapper"!==e.className?e.className.includes("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle()):this.handleArrowClick():this.handleClearClick()},t.prototype.handleArrowClick=function(){this.isOpen?this.close():this.open()},t.prototype.handleClearClick=function(){this.hasValue&&this.clearModel(),this._clearSearch(),this.focus(),this._isTypeahead&&this.typeahead.next(null),this.clearEvent.emit()},t.prototype.clearModel=function(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())},t.prototype.writeValue=function(t){this.itemsList.clearSelected(),this._handleWriteValue(t),this._cd.markForCheck()},t.prototype.registerOnChange=function(t){this._onChange=t},t.prototype.registerOnTouched=function(t){this._onTouched=t},t.prototype.setDisabledState=function(t){this.disabled=t,this._cd.markForCheck()},t.prototype.toggle=function(){this.isOpen?this.close():this.open()},t.prototype.open=function(){this.disabled||this.isOpen||this.itemsList.maxItemsSelected||this._manualOpen||(this._isTypeahead||this.addTag||!this.itemsList.noItemsToSelect)&&(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.filterValue||this.focus(),this.detectChanges())},t.prototype.close=function(){this.isOpen&&!this._manualOpen&&(this.isOpen=!1,this._clearSearch(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())},t.prototype.toggleItem=function(t){!t||t.disabled||this.disabled||(this.multiple&&t.selected?this.unselect(t):this.select(t))},t.prototype.select=function(t){t.selected||(this.itemsList.select(t),this.clearSearchOnAdd&&this._clearSearch(),this.multiple&&this.addEvent.emit(t.value),this._updateNgModel()),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()},t.prototype.focus=function(){this.filterInput.nativeElement.focus()},t.prototype.unselect=function(t){this.itemsList.unselect(t),this.focus(),this._updateNgModel(),this.removeEvent.emit(t)},t.prototype.selectTag=function(){var t,e,n=this;e=Fg(this.addTag)?this.addTag(this.filterValue):this._primitive?this.filterValue:((t={})[this.bindLabel]=this.filterValue,t);var r=function(t){return n._isTypeahead||!n.isOpen?n.itemsList.mapItem(t,null):n.itemsList.addItem(t)};e instanceof Promise?e.then(function(t){return n.select(r(t))}).catch(function(){}):e&&this.select(r(e))},t.prototype.showClear=function(){return this.clearable&&(this.hasValue||this.filterValue)&&!this.disabled},Object.defineProperty(t.prototype,"showAddTag",{get:function(){if(!this.filterValue)return!1;var t=this.filterValue.toLowerCase();return this.addTag&&!this.itemsList.filteredItems.some(function(e){return e.label.toLowerCase()===t})&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(function(e){return e.label.toLowerCase()===t}))&&!this.loading},enumerable:!0,configurable:!0}),t.prototype.showNoItemsFound=function(){var t=0===this.itemsList.filteredItems.length;return(t&&!this._isTypeahead&&!this.loading||t&&this._isTypeahead&&this.filterValue&&!this.loading)&&!this.showAddTag},t.prototype.showTypeToSearch=function(){return 0===this.itemsList.filteredItems.length&&this._isTypeahead&&!this.filterValue&&!this.loading},t.prototype.filter=function(t){this.filterValue=t,this.open(),this._isTypeahead?this.typeahead.next(this.filterValue):(this.itemsList.filter(this.filterValue),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit(t)},t.prototype.onInputFocus=function(t){this.focused||(this.element.classList.add("ng-select-focused"),this.focusEvent.emit(t),this.focused=!0)},t.prototype.onInputBlur=function(t){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(t),this.isOpen||this.disabled||this._onTouched(),this.focused=!1},t.prototype.onItemHover=function(t){t.disabled||this.itemsList.markItem(t)},t.prototype.detectChanges=function(){this._cd.destroyed||this._cd.detectChanges()},t.prototype.updateDropdownPosition=function(){this.dropdownPanel&&this.dropdownPanel.updateDropdownPosition()},t.prototype._setItems=function(t){var e=t[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=Lg(e)?!Ug(e):this._primitive,this.itemsList.setItems(t),t.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&Lg(this.filterValue)&&!this._isTypeahead&&this.itemsList.filter(this.filterValue),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)},t.prototype._setItemsFromNgOptions=function(){var t=this;this.ngOptions.changes.pipe(gp(this.ngOptions),Pp(this._destroy$),yl(function(t){return!!t.length})).subscribe(function(e){var n;t.bindLabel=t._defaultLabel,function(e){t.items=e.map(function(t){return{$ngOptionValue:t.value,$ngOptionLabel:t.elementRef.nativeElement.innerHTML,disabled:t.disabled}}),t.itemsList.setItems(t.items),t.hasValue&&t.itemsList.mapSelectedItems(),t.detectChanges()}(e),n=ft(t.ngOptions.changes,t._destroy$),ft.apply(void 0,f(t.ngOptions.map(function(t){return t.stateChange$}))).pipe(Pp(n)).subscribe(function(e){t.itemsList.findItem(e.value).disabled=e.disabled,t._cd.markForCheck()})})},t.prototype._isValidWriteValue=function(t){var e=this;if(!Lg(t)||this.multiple&&""===t||Array.isArray(t)&&0===t.length)return!1;var n=function(t){return!(!Lg(e.compareWith)&&Ug(t)&&e.bindValue&&(e._console.warn("Binding object("+JSON.stringify(t)+") with bindValue is not allowed."),1))};return this.multiple?Array.isArray(t)?t.every(function(t){return n(t)}):(this._console.warn("Multiple select ngModel should be array."),!1):n(t)},t.prototype._handleWriteValue=function(t){var e=this;if(this._isValidWriteValue(t)){var n=function(t){var n,r=e.itemsList.findItem(t);if(r)e.itemsList.select(r);else{var i=Ug(t);i||!i&&!e.bindValue?e.itemsList.select(e.itemsList.mapItem(t,null)):e.bindValue&&((n={})[e.bindLabel]=null,n[e.bindValue]=t,e.itemsList.select(e.itemsList.mapItem(r=n,null)))}};this.multiple?t.forEach(function(t){return n(t)}):n(t)}},t.prototype._handleKeyPresses=function(){var t,e=this;this.searchable||this._keyPress$.pipe(Pp(this._destroy$),Cl(function(t){return e._pressedKeys.push(t)}),(200,void 0===t&&(t=Cp),function(e){return e.lift(new xd(200,t))}),yl(function(){return e._pressedKeys.length>0}),nt(function(){return e._pressedKeys.join("")})).subscribe(function(t){var n=e.itemsList.findByLabel(t);n&&(e.isOpen?(e.itemsList.markItem(n),e._cd.markForCheck()):e.select(n)),e._pressedKeys=[]})},t.prototype._updateNgModel=function(){var t,e,n=[];try{for(var r=c(this.selectedItems),i=r.next();!i.done;i=r.next()){var o,s=i.value;if(this.bindValue)o=s.children?s.value[this.groupBy]:this.itemsList.resolveNested(s.value,this.bindValue),n.push(o);else n.push(s.value)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}var a=this.selectedItems.map(function(t){return t.value});this.multiple?(this._onChange(n),this.changeEvent.emit(a)):(this._onChange(Lg(n[0])?n[0]:null),this.changeEvent.emit(a[0])),this._cd.markForCheck()},t.prototype._clearSearch=function(){this.filterValue&&(this.filterValue=null,this.itemsList.resetFilteredItems())},t.prototype._scrollToMarked=function(){this.isOpen&&this.dropdownPanel&&this.dropdownPanel.scrollInto(this.itemsList.markedItem)},t.prototype._scrollToTag=function(){this.isOpen&&this.dropdownPanel&&this.dropdownPanel.scrollIntoTag()},t.prototype._handleTab=function(t){this.isOpen&&(this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),t.preventDefault()):this.showAddTag?(this.selectTag(),t.preventDefault()):this.close():this.close())},t.prototype._handleEnter=function(t){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else{if(!this.openOnEnter)return;this.open()}t.preventDefault(),t.stopPropagation()},t.prototype._handleSpace=function(t){this.isOpen||this._manualOpen||(this.open(),t.preventDefault())},t.prototype._handleArrowDown=function(t){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),t.preventDefault()},t.prototype._handleArrowUp=function(t){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),t.preventDefault())},t.prototype._nextItemIsTag=function(t){var e=this.itemsList.markedIndex+t;return this.addTag&&this.filterValue&&this.itemsList.markedItem&&(e<0||e===this.itemsList.filteredItems.length)},t.prototype._handleBackspace=function(){!this.filterValue&&this.clearable&&this.hasValue&&(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())},Object.defineProperty(t.prototype,"_isTypeahead",{get:function(){return this.typeahead&&this.typeahead.observers.length>0},enumerable:!0,configurable:!0}),t.prototype._mergeGlobalConfig=function(t){this.placeholder=this.placeholder||t.placeholder,this.notFoundText=this.notFoundText||t.notFoundText,this.typeToSearchText=this.typeToSearchText||t.typeToSearchText,this.addTagText=this.addTagText||t.addTagText,this.loadingText=this.loadingText||t.loadingText,this.clearAllText=this.clearAllText||t.clearAllText,this.virtualScroll=Lg(this.virtualScroll)?this.virtualScroll:!!Lg(t.disableVirtualScroll)&&!t.disableVirtualScroll,this.openOnEnter=Lg(this.openOnEnter)?this.openOnEnter:t.openOnEnter},t}();function Qg(){return new Xg}var Xg=function(){function t(){this._selected=[]}return Object.defineProperty(t.prototype,"value",{get:function(){return this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(t,e,n){if(t.selected=!0,!n&&t.children||this._selected.push(t),e)if(t.parent){var r=t.parent.children.length,i=t.parent.children.filter(function(t){return t.selected}).length;t.parent.selected=r===i}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),n||(this._selected=f(this._selected,t.children)))},t.prototype.unselect=function(t,e){var n;if(this._selected=this._selected.filter(function(e){return e!==t}),t.selected=!1,e)if(t.parent&&t.parent.selected){var r=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),(n=this._selected).push.apply(n,f(r.filter(function(e){return e!==t}))),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))},t.prototype.clear=function(){this._selected=[]},t.prototype._setChildrenSelectedState=function(t,e){t.forEach(function(t){return t.selected=e})},t.prototype._removeChildren=function(t){this._selected=this._selected.filter(function(e){return e.parent!==t})},t.prototype._removeParent=function(t){this._selected=this._selected.filter(function(e){return e!==t})},t}(),Zg=function(){return function(){}}(),ty=ri({encapsulation:2,styles:[".ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{color:#333;cursor:default;display:flex;outline:0;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none;border:0;box-shadow:none;outline:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute;z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:.8s linear infinite load8;animation:.8s linear infinite load8}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}"],data:{}});function ey(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["aria-hidden","true"],["class","ng-value-icon left"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.unselect(t.parent.context.$implicit)&&r),r},null,null)),(t()(),Wo(-1,null,["\xd7"])),(t()(),Ai(2,0,null,null,1,"span",[["class","ng-value-label"]],null,null,null,null,null)),(t()(),Wo(3,null,["",""]))],null,function(t,e){t(e,3,0,e.parent.context.$implicit.label)})}function ny(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function ry(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-value"]],[[2,"ng-value-disabled",null]],null,null,null,null)),(t()(),Pi(0,[["defaultLabelTemplate",2]],null,0,null,ey)),(t()(),Pi(16777216,null,null,2,null,ny)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{item:0,clear:1,label:2})],function(t,e){var n=e.component,r=t(e,4,0,e.context.$implicit.value,n.clearItem,e.context.$implicit.label);t(e,3,0,r,n.labelTemplate||so(e,1))},function(t,e){t(e,0,0,e.context.$implicit.disabled)})}function iy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,null,null,null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,ry)),wo(2,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Pi(0,null,null,0))],function(t,e){t(e,2,0,e.component.selectedItems)},null)}function oy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function sy(t){return Jo(0,[(t()(),Pi(16777216,null,null,2,null,oy)),wo(1,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(2,{items:0,clear:1}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,2,0,n.selectedValues,n.clearItem);t(e,1,0,r,n.multiLabelTemplate)},null)}function ay(t){return Jo(0,[(t()(),Ai(0,0,null,null,0,"div",[["class","ng-spinner-loader"]],null,null,null,null,null))],null,null)}function uy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"span",[["class","ng-clear-wrapper"]],[[8,"title",0]],null,null,null,null)),(t()(),Ai(1,0,null,null,1,"span",[["aria-hidden","true"],["class","ng-clear"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\xd7"]))],null,function(t,e){var n;t(e,0,0,""+(null!=(n=e.component.clearAllText)?n.toString():""))})}function ly(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","ng-option-label"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.parent.context.$implicit.label)})}function cy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function hy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-option"]],[[1,"role",0],[2,"ng-option-disabled",null],[2,"ng-option-selected",null],[2,"ng-optgroup",null],[2,"ng-option",null],[2,"ng-option-child",null],[2,"ng-option-marked",null],[1,"id",0]],[[null,"click"],[null,"mouseover"]],function(t,e,n){var r=!0,i=t.component;return"click"===e&&(r=!1!==i.toggleItem(t.context.$implicit)&&r),"mouseover"===e&&(r=!1!==i.onItemHover(t.context.$implicit)&&r),r},null,null)),(t()(),Pi(0,[["defaultOptionTemplate",2]],null,0,null,ly)),(t()(),Pi(16777216,null,null,2,null,cy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{item:0,item$:1,index:2,searchTerm:3})],function(t,e){var n=e.component,r=t(e,4,0,e.context.$implicit.value,e.context.$implicit,e.context.$implicit.index,n.filterValue);t(e,3,0,r,e.context.$implicit.children?n.optgroupTemplate||so(e,1):n.optionTemplate||so(e,1))},function(t,e){t(e,0,0,e.context.$implicit.children?"group":"option",e.context.$implicit.disabled,e.context.$implicit.selected,e.context.$implicit.children,!e.context.$implicit.children,!!e.context.$implicit.parent,e.context.$implicit===e.component.itemsList.markedItem,null==e.context.$implicit?null:e.context.$implicit.htmlId)})}function fy(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"span",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"span",[["class","ng-tag-label"]],null,null,null,null,null)),(t()(),Wo(2,null,["",""])),(t()(),Wo(3,null,['"','"']))],null,function(t,e){var n=e.component;t(e,2,0,n.addTagText),t(e,3,0,n.filterValue)})}function py(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function dy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","ng-option"],["role","option"]],[[2,"ng-option-marked",null]],[[null,"mouseover"],[null,"click"]],function(t,e,n){var r=!0,i=t.component;return"mouseover"===e&&(r=!1!==i.itemsList.unmarkItem()&&r),"click"===e&&(r=!1!==i.selectTag()&&r),r},null,null)),(t()(),Pi(0,[["defaultTagTemplate",2]],null,0,null,fy)),(t()(),Pi(16777216,null,null,2,null,py)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0})],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.tagTemplate||so(e,1))},function(t,e){t(e,0,0,!e.component.itemsList.markedItem)})}function gy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.notFoundText)})}function yy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function my(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultNotFoundTemplate",2]],null,0,null,gy)),(t()(),Pi(16777216,null,null,2,null,yy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.notFoundTemplate||so(e,1))},null)}function vy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.typeToSearchText)})}function by(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function wy(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultTypeToSearchTemplate",2]],null,0,null,vy)),(t()(),Pi(16777216,null,null,1,null,by)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null),(t()(),Pi(0,null,null,0))],function(t,e){t(e,3,0,e.component.typeToSearchTemplate||so(e,1))},null)}function _y(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","ng-option ng-option-disabled"]],null,null,null,null,null)),(t()(),Wo(1,null,["",""]))],null,function(t,e){t(e,1,0,e.component.loadingText)})}function xy(t){return Jo(0,[(t()(),Pi(0,null,null,0))],null,null)}function Sy(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,null,null,null,null,null,null,null)),(t()(),Pi(0,[["defaultLoadingTextTemplate",2]],null,0,null,_y)),(t()(),Pi(16777216,null,null,2,null,xy)),wo(3,540672,null,0,Ea,[Mn],{ngTemplateOutletContext:[0,"ngTemplateOutletContext"],ngTemplateOutlet:[1,"ngTemplateOutlet"]},null),Ho(4,{searchTerm:0}),(t()(),Pi(0,null,null,0))],function(t,e){var n=e.component,r=t(e,4,0,n.filterValue);t(e,3,0,r,n.loadingTextTemplate||so(e,1))},null)}function Cy(t){return Jo(0,[(t()(),Ai(0,0,null,null,13,"ng-dropdown-panel",[["class","ng-dropdown-panel"]],[[2,"ng-select-multiple",null],[8,"id",0]],[[null,"update"],[null,"scroll"],[null,"scrollToEnd"],[null,"outsideClick"],[null,"mousedown"]],function(t,e,n){var r=!0,i=t.component;return"mousedown"===e&&(r=!1!==so(t,2).handleMousedown(n)&&r),"update"===e&&(r=!1!==(i.viewPortItems=n)&&r),"scroll"===e&&(r=!1!==i.scroll.emit(n)&&r),"scrollToEnd"===e&&(r=!1!==i.scrollToEnd.emit(n)&&r),"outsideClick"===e&&(r=!1!==i.close()&&r),r},Iy,ky)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),wo(2,1818624,[[1,4]],0,$g,[Tn,en,Gg,Wg,On,[2,Aa]],{items:[0,"items"],markedItem:[1,"markedItem"],position:[2,"position"],appendTo:[3,"appendTo"],bufferAmount:[4,"bufferAmount"],virtualScroll:[5,"virtualScroll"],headerTemplate:[6,"headerTemplate"],footerTemplate:[7,"footerTemplate"]},{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"}),(t()(),Ai(3,0,null,0,4,null,null,null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,hy)),wo(5,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Pi(16777216,null,null,1,null,dy)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,my)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,wy)),wo(11,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,0,1,null,Sy)),wo(13,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"ng-dropdown-panel",n.classes),t(e,2,0,n.itemsList.filteredItems,n.itemsList.markedItem,n.dropdownPosition,n.appendTo,n.bufferAmount,n.virtualScroll,n.headerTemplate,n.footerTemplate),t(e,5,0,n.viewPortItems),t(e,7,0,n.showAddTag),t(e,9,0,n.showNoItemsFound()),t(e,11,0,n.showTypeToSearch()),t(e,13,0,n.loading&&0===n.itemsList.filteredItems.length)},function(t,e){var n=e.component;t(e,0,0,n.multiple,n.dropdownId)})}function Ey(t){return Jo(2,[Lo(671088640,1,{dropdownPanel:0}),Lo(402653184,2,{filterInput:0}),(t()(),Ai(2,0,null,null,15,"div",[["class","ng-select-container"]],[[2,"ng-has-value",null]],[[null,"mousedown"]],function(t,e,n){var r=!0;return"mousedown"===e&&(r=!1!==t.component.handleMousedown(n)&&r),r},null,null)),(t()(),Ai(3,0,null,null,8,"div",[["class","ng-value-container"]],null,null,null,null,null)),(t()(),Ai(4,0,null,null,1,"div",[["class","ng-placeholder"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Pi(16777216,null,null,1,null,iy)),wo(7,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,sy)),wo(9,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(10,0,null,null,1,"div",[["class","ng-input"]],null,null,null,null,null)),(t()(),Ai(11,0,[[2,0],["filterInput",1]],null,0,"input",[["role","combobox"],["type","text"]],[[1,"autocomplete",0],[1,"id",0],[1,"tabindex",0],[8,"readOnly",0],[8,"disabled",0],[8,"value",0],[1,"aria-expanded",0],[1,"aria-owns",0],[1,"aria-activedescendant",0]],[[null,"input"],[null,"focus"],[null,"blur"],[null,"change"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==i.filter(so(t,11).value)&&r),"focus"===e&&(r=!1!==i.onInputFocus(n)&&r),"blur"===e&&(r=!1!==i.onInputBlur(n)&&r),"change"===e&&(r=!1!==n.stopPropagation()&&r),r},null,null)),(t()(),Pi(16777216,null,null,1,null,ay)),wo(13,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,uy)),wo(15,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(16,0,null,null,1,"span",[["class","ng-arrow-wrapper"]],null,null,null,null,null)),(t()(),Ai(17,0,null,null,0,"span",[["class","ng-arrow"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,Cy)),wo(19,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,7,0,!n.multiLabelTemplate&&n.selectedItems.length>0),t(e,9,0,n.multiLabelTemplate&&n.selectedValues.length>0),t(e,13,0,n.loading),t(e,15,0,n.showClear()),t(e,19,0,n.isOpen)},function(t,e){var n=e.component;t(e,2,0,n.hasValue),t(e,5,0,n.placeholder),t(e,11,0,n.labelForId?"off":n.dropdownId,n.labelForId,n.tabIndex,!n.searchable,n.disabled,n.filterValue?n.filterValue:"",n.isOpen,n.isOpen?n.dropdownId:null,n.isOpen?null==n.itemsList?null:null==n.itemsList.markedItem?null:n.itemsList.markedItem.htmlId:null)})}var ky=ri({encapsulation:2,styles:[".ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}"],data:{}});function Ty(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","ng-dropdown-header"]],null,null,null,null,null)),(t()(),Ai(1,16777216,null,null,1,null,null,null,null,null,null,null)),wo(2,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null)],function(t,e){t(e,2,0,e.component.headerTemplate)},null)}function Oy(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","ng-dropdown-footer"]],null,null,null,null,null)),(t()(),Ai(1,16777216,null,null,1,null,null,null,null,null,null,null)),wo(2,540672,null,0,Ea,[Mn],{ngTemplateOutlet:[0,"ngTemplateOutlet"]},null)],function(t,e){t(e,2,0,e.component.footerTemplate)},null)}function Iy(t){return Jo(2,[Lo(402653184,1,{contentElementRef:0}),Lo(402653184,2,{scrollElementRef:0}),Lo(402653184,3,{paddingElementRef:0}),(t()(),Pi(16777216,null,null,1,null,Ty)),wo(4,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(5,0,[[2,0],["scroll",1]],null,3,"div",[["class","ng-dropdown-panel-items scroll-host"]],null,null,null,null,null)),(t()(),Ai(6,0,[[3,0],["padding",1]],null,0,"div",[],[[2,"total-padding",null]],null,null,null,null)),(t()(),Ai(7,0,[[1,0],["content",1]],null,1,"div",[],[[2,"scrollable-content",null]],null,null,null,null)),(null,0,{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:null,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:0}}),(t()(),Pi(16777216,null,null,1,null,Oy)),wo(10,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,n.headerTemplate),t(e,10,0,n.footerTemplate)},function(t,e){var n=e.component;t(e,6,0,n.virtualScroll),t(e,7,0,n.virtualScroll&&n.items.length>0)})}var Py=ri({encapsulation:0,styles:[[".login-page[_ngcontent-%COMP%]{text-align:center;font-family:Roboto,sans-serif;color:#666}.login-page[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:38px;text-transform:uppercase;font-weight:700;line-height:50px;letter-spacing:1.9px;padding-top:12px;margin-top:0}.login-page[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#666;font-size:16px;font-weight:500;letter-spacing:1px;line-height:21px;margin-top:48px}.login-page[_ngcontent-%COMP%] .small-link[_ngcontent-%COMP%]{font-size:12px;color:#666;letter-spacing:.75px;line-height:16px}.login-page[_ngcontent-%COMP%] .registration-link[_ngcontent-%COMP%]{margin-top:38px}.login-page[_ngcontent-%COMP%] .registration-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:16px;color:#666;letter-spacing:1px}.login-page[_ngcontent-%COMP%] .item-divider[_ngcontent-%COMP%]{box-sizing:border-box;height:1px;width:354px;border-bottom:1px solid #e0e0e0;position:absolute;bottom:-8px;left:-9px}"]],data:{}});function Ay(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"div",[["style","height:40px; padding-top:10px; position: relative;"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"img",[["style","float: left; height: 32px; width: 32px; margin-top:-5px;"]],[[8,"src",4]],null,null,null,null)),(t()(),Ai(2,0,null,null,1,"span",[["style","float: left; margin-left: 10px;"]],null,null,null,null,null)),(t()(),Wo(3,null,["",""])),(t()(),Ai(4,0,null,null,0,"div",[["style","clear: both;"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,0,"div",[["class","item-divider"]],null,null,null,null,null))],null,function(t,e){t(e,1,0,e.context.item.image),t(e,3,0,e.context.item.name)})}function Ry(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"input",[["class","wide-text"],["placeholder","Enter WebID"],["style","margin-top:10px; padding: 12px 10px; width: 340px; height: 16px; display: block; margin-left: auto; margin-right: auto;"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,1)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,1).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,1)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,1)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.customProviderUrl=n)&&r),r},null,null)),wo(1,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(3,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(5,16384,null,0,dg,[[4,tg]],null,null)],function(t,e){t(e,3,0,e.component.customProviderUrl)},function(t,e){t(e,0,0,so(e,5).ngClassUntouched,so(e,5).ngClassTouched,so(e,5).ngClassPristine,so(e,5).ngClassDirty,so(e,5).ngClassValid,so(e,5).ngClassInvalid,so(e,5).ngClassPending)})}function Ny(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"button",[["class","wide-button"],["style","margin-top:10px;"]],[[8,"disabled",0]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onLogin()&&r),r},null,null)),(t()(),Wo(-1,null,["Go"]))],null,function(t,e){var n=e.component;t(e,0,0,null===n.selectedProviderUrl&&!n.customProviderUrl)})}function jy(t){return Jo(0,[(t()(),Ai(0,0,null,null,39,"div",[["class","login-page"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"div",[["style","margin-top:60px;"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"i",[["class","fas fa-user-circle"],["style","font-size: 64px;"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Profile Demo App "])),(t()(),Ai(5,0,null,null,1,"h2",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Login with Solid Identity "])),(t()(),Ai(7,0,null,null,23,"div",[["style","margin-top: 10px;"]],null,null,null,null,null)),(t()(),Ai(8,0,null,null,18,"ng-select",[["bindLabel","name"],["bindValue","loginUrl"],["class","login-select ng-select"],["dropdownPosition","bottom"],["placeholder","Select ID Provider"],["role","listbox"],["style","width: 360px; height: 48px; margin-left: auto; margin-right: auto;"]],[[2,"ng-select-single",null],[2,"ng-select-typeahead",null],[2,"ng-select-multiple",null],[2,"ng-select-taggable",null],[2,"ng-select-searchable",null],[2,"ng-select-opened",null],[2,"ng-select-disabled",null],[2,"ng-select-filtered",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keydown"]],function(t,e,n){var r=!0,i=t.component;return"keydown"===e&&(r=!1!==so(t,9).handleKeyDown(n)&&r),"ngModelChange"===e&&(r=!1!==(i.selectedProviderUrl=n)&&r),r},Ey,ty)),wo(9,4964352,null,11,Yg,[[8,"login-select"],[8,null],Jg,Kg,On,Ln,Mg],{items:[0,"items"],bindLabel:[1,"bindLabel"],bindValue:[2,"bindValue"],placeholder:[3,"placeholder"],dropdownPosition:[4,"dropdownPosition"]},null),Lo(335544320,1,{optionTemplate:0}),Lo(335544320,2,{optgroupTemplate:0}),Lo(335544320,3,{labelTemplate:0}),Lo(335544320,4,{multiLabelTemplate:0}),Lo(335544320,5,{headerTemplate:0}),Lo(335544320,6,{footerTemplate:0}),Lo(335544320,7,{notFoundTemplate:0}),Lo(335544320,8,{typeToSearchTemplate:0}),Lo(335544320,9,{loadingTextTemplate:0}),Lo(335544320,10,{tagTemplate:0}),Lo(603979776,11,{ngOptions:1}),xo(1024,null,Gd,function(t){return[t]},[Yg]),wo(22,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(24,16384,null,0,dg,[[4,tg]],null,null),(t()(),Pi(0,[[1,2]],null,1,null,Ay)),wo(26,16384,null,0,Dg,[Dn],null,null),(t()(),Pi(16777216,null,null,1,null,Ry)),wo(28,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Ny)),wo(30,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Ai(31,0,null,null,4,"div",[["class","registration-link"]],null,null,null,null,null)),(t()(),Ai(32,0,null,null,1,"p",[["style","margin: 12px;"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Don't have a Solid Identity?"])),(t()(),Ai(34,0,null,null,1,"button",[["class","wide-button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.goToRegistration()&&r),r},null,null)),(t()(),Wo(-1,null,["Register"])),(t()(),Ai(36,0,null,null,3,"div",[["style","margin-top: 48px;"]],null,null,null,null,null)),(t()(),Ai(37,0,null,null,2,"a",[["class","small-link"],["href","https://solid.mit.edu"],["target","_blank"]],null,null,null,null,null)),(t()(),Ai(38,0,null,null,0,"i",[["class","fas fa-info-circle"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" What is a Solid Identity? "]))],function(t,e){var n=e.component;t(e,9,0,n.identityProviders,"name","loginUrl","Select ID Provider","bottom"),t(e,22,0,n.selectedProviderUrl),t(e,28,0,null===n.selectedProviderUrl),t(e,30,0,void 0!==n.selectedProviderUrl||void 0!==n.customProviderUrl)},function(t,e){t(e,8,1,[!so(e,9).multiple,so(e,9).typeahead,so(e,9).multiple,so(e,9).addTag,so(e,9).searchable,so(e,9).isOpen,so(e,9).disabled,so(e,9).filtered,so(e,24).ngClassUntouched,so(e,24).ngClassTouched,so(e,24).ngClassPristine,so(e,24).ngClassDirty,so(e,24).ngClassValid,so(e,24).ngClassInvalid,so(e,24).ngClassPending])})}function Dy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-login",[],null,null,null,jy,Py)),wo(1,114688,null,0,Rf,[Tf,Qh],null,null)],function(t,e){t(e,1,0)},null)}var My=Ki("app-login",Rf,Dy,{},{},[]),Ly=ri({encapsulation:0,styles:[[""]],data:{}});function Uy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["id","app-container"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Loading..."]))],null,null)}function Fy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-login-popup",[],null,null,null,Uy,Ly)),wo(1,114688,null,0,Af,[On],null,null)],function(t,e){t(e,1,0)},null)}var Vy=Ki("app-login-popup",Af,Fy,{},{},[]),By=ri({encapsulation:0,styles:[[""]],data:{}});function zy(t){return Jo(0,[(t()(),Ai(0,0,null,null,11,"div",[["class","dashboard"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"p",[],null,null,null,null,null)),(t()(),Wo(2,null,["Your webId is ",""])),(t()(),Ai(3,0,null,null,8,"ul",[],null,null,null,null,null)),(t()(),Ai(4,0,null,null,4,"li",[],null,null,null,null,null)),(t()(),Ai(5,0,null,null,3,"a",[],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,6).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),wo(6,671744,null,0,tf,[Qh,ch,oa],{routerLink:[0,"routerLink"]},null),qo(32,7,new Array(1)),(t()(),Wo(-1,null,["Profile"])),(t()(),Ai(9,0,null,null,2,"li",[],null,null,null,null,null)),(t()(),Ai(10,0,null,null,1,"a",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onSignOut()&&r),r},null,null)),(t()(),Wo(-1,null,["Signout"]))],function(t,e){var n=t(e,7,0,"/card");t(e,6,0,n)},function(t,e){t(e,2,0,e.component.session.webId),t(e,5,0,so(e,6).target,so(e,6).href)})}function Hy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-dashboard",[],null,null,null,zy,By)),wo(1,114688,null,0,Pf,[Tf,ch],null,null)],function(t,e){t(e,1,0)},null)}var qy=Ki("app-dashboard",Pf,Hy,{},{},[]),Wy=ri({encapsulation:0,styles:[[".profile-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.profile-container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:24px;color:#7c55fb;font-weight:700;line-height:32px;letter-spacing:1.2px;text-align:center;margin-top:82px;text-transform:uppercase}.profile-fields-container[_ngcontent-%COMP%]{max-width:740px;min-height:500px;margin:0 auto;border:1px solid #ccc;box-shadow:#ccc 1px 1px 4px;position:relative}.profile-fields-container[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{height:200px;width:100%;background-size:cover!important;background:url(/dechat_en1a/assets/images/Solid_Pattern.png)}.profile-fields-container[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:128px;border-radius:50%;margin-left:auto;margin-right:auto;position:relative;top:40px;display:block}.profile-fields-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#89969f;padding-left:26px;padding-right:10px;margin-top:24px}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]{height:12px;width:280px;border:1px solid #89969f;border-radius:4px;padding:10px}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::-webkit-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]:-ms-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::-ms-input-placeholder{color:rgba(102,102,102,.2)}.profile-fields-container[_ngcontent-%COMP%] input[type=text].field-text[_ngcontent-%COMP%]::placeholder{color:rgba(102,102,102,.2)}.profile-save-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:auto;height:100px;flex-direction:column;justify-content:flex-end}.profile-save-button[_ngcontent-%COMP%]{background-color:#7c55fb;margin-left:auto;margin-right:auto;width:280px}.profile-save-button[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb;cursor:not-allowed}.topnav[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;background-color:#7c4dff;height:50px;color:#fff}.topnav[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{display:inline-block;font-family:'Roboto Slab',serif;font-size:24px;font-weight:700;text-transform:uppercase;line-height:32px;padding-right:80px;position:relative;top:-8px;left:28px}.topnav[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%]{display:inline-block;font-size:10px;line-height:13px;width:100px;height:100%;text-align:center}.topnav[_ngcontent-%COMP%] .menu-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px;margin-top:8px;margin-bottom:2px}.topnav[_ngcontent-%COMP%] .profile-menu[_ngcontent-%COMP%]{float:right;display:inline-block;width:50px;height:50px;background-color:rgba(0,0,0,.25)}.topnav[_ngcontent-%COMP%] .profile-menu[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;height:30px;width:30px;border-radius:50%;margin:10px auto 0;cursor:pointer}.loading-image[_ngcontent-%COMP%]{text-align:center;margin-top:50px}"]],data:{}});function Gy(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[["class","loading-image"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"i",[["class","fas fa-circle-notch fa-4x fa-spin"]],null,null,null,null,null))],null,null)}function $y(t){return Jo(0,[(t()(),Ai(0,0,null,null,61,"div",[["class","profile-fields-container"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"div",[["class","profile-image-container"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),Ai(3,0,null,null,58,"form",[["novalidate",""],["style","padding-top: 26px;"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"submit"],[null,"reset"]],function(t,e,n){var r=!0,i=t.component;return"submit"===e&&(r=!1!==so(t,5).onSubmit(n)&&r),"reset"===e&&(r=!1!==so(t,5).onReset()&&r),"submit"===e&&(r=!1!==i.onSubmit()&&r),r},null,null)),wo(4,16384,null,0,Ag,[],null,null),wo(5,4210688,[[1,4],["f",4]],0,Cg,[[8,null],[8,null]],null,null),xo(2048,null,Fd,null,[Cg]),wo(7,16384,null,0,gg,[[4,Fd]],null,null),(t()(),Ai(8,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(9,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,0,"i",[["class","fas fa-user"]],null,null,null,null,null)),(t()(),Ai(11,0,null,null,5,"input",[["class","field-text form-control"],["name","fn"],["placeholder","NAME"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,12)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,12).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,12)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,12)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.fn=n)&&r),r},null,null)),wo(12,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(14,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(16,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(17,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(18,0,null,null,0,"i",[["class","fas fa-phone"]],null,null,null,null,null)),(t()(),Ai(19,0,null,null,5,"input",[["class","field-text form-control"],["name","phone"],["placeholder","PHONE"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,20)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,20).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,20)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,20)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.phone=n)&&r),r},null,null)),wo(20,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(22,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(24,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(25,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(26,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(27,0,null,null,0,"i",[["class","fas fa-user-astronaut"]],null,null,null,null,null)),(t()(),Ai(28,0,null,null,5,"input",[["class","field-text form-control"],["name","role"],["placeholder","ROLE"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,29)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,29).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,29)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,29)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.role=n)&&r),r},null,null)),wo(29,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(31,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(33,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(34,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(35,0,null,null,0,"i",[["class","fas fa-envelope"]],null,null,null,null,null)),(t()(),Ai(36,0,null,null,5,"input",[["class","field-text form-control"],["name","email"],["placeholder","EMAIL"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,37)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,37).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,37)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,37)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.email=n)&&r),r},null,null)),wo(37,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(39,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(41,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(42,0,null,null,16,"div",[["class","fields pure-g"]],null,null,null,null,null)),(t()(),Ai(43,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(44,0,null,null,0,"i",[["class","fas fa-building"]],null,null,null,null,null)),(t()(),Ai(45,0,null,null,5,"input",[["class","field-text form-control"],["name","company"],["placeholder","ORGANIZATION"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,46)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,46).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,46)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,46)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.company=n)&&r),r},null,null)),wo(46,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(48,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(50,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(51,0,null,null,7,"div",[["class","pure-u-1-1 pure-u-md-1-2 form-group"]],null,null,null,null,null)),(t()(),Ai(52,0,null,null,0,"i",[["class","fas fa-map-marker-alt"],["style","width: 12px; margin-left: 2px;"]],null,null,null,null,null)),(t()(),Ai(53,0,null,null,5,"input",[["class","field-text form-control"],["name","address"],["placeholder","ADDRESS"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,54)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,54).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,54)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,54)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.profile.address.street=n)&&r),r},null,null)),wo(54,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(56,671744,null,0,Og,[[2,Fd],[8,null],[8,null],[6,Gd]],{name:[0,"name"],model:[1,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(58,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(59,0,null,null,2,"div",[["class","profile-save-button-container"]],null,null,null,null,null)),(t()(),Ai(60,0,null,null,1,"button",[["class","wide-button profile-save-button"],["type","submit"]],[[8,"disabled",0]],null,null,null,null)),(t()(),Wo(-1,null,["Save"]))],function(t,e){var n=e.component;t(e,14,0,"fn",n.profile.fn),t(e,22,0,"phone",n.profile.phone),t(e,31,0,"role",n.profile.role),t(e,39,0,"email",n.profile.email),t(e,48,0,"company",n.profile.company),t(e,56,0,"address",n.profile.address.street)},function(t,e){var n=e.component;t(e,2,0,n.profileImage),t(e,3,0,so(e,7).ngClassUntouched,so(e,7).ngClassTouched,so(e,7).ngClassPristine,so(e,7).ngClassDirty,so(e,7).ngClassValid,so(e,7).ngClassInvalid,so(e,7).ngClassPending),t(e,11,0,so(e,16).ngClassUntouched,so(e,16).ngClassTouched,so(e,16).ngClassPristine,so(e,16).ngClassDirty,so(e,16).ngClassValid,so(e,16).ngClassInvalid,so(e,16).ngClassPending),t(e,19,0,so(e,24).ngClassUntouched,so(e,24).ngClassTouched,so(e,24).ngClassPristine,so(e,24).ngClassDirty,so(e,24).ngClassValid,so(e,24).ngClassInvalid,so(e,24).ngClassPending),t(e,28,0,so(e,33).ngClassUntouched,so(e,33).ngClassTouched,so(e,33).ngClassPristine,so(e,33).ngClassDirty,so(e,33).ngClassValid,so(e,33).ngClassInvalid,so(e,33).ngClassPending),t(e,36,0,so(e,41).ngClassUntouched,so(e,41).ngClassTouched,so(e,41).ngClassPristine,so(e,41).ngClassDirty,so(e,41).ngClassValid,so(e,41).ngClassInvalid,so(e,41).ngClassPending),t(e,45,0,so(e,50).ngClassUntouched,so(e,50).ngClassTouched,so(e,50).ngClassPristine,so(e,50).ngClassDirty,so(e,50).ngClassValid,so(e,50).ngClassInvalid,so(e,50).ngClassPending),t(e,53,0,so(e,58).ngClassUntouched,so(e,58).ngClassTouched,so(e,58).ngClassPristine,so(e,58).ngClassDirty,so(e,58).ngClassValid,so(e,58).ngClassInvalid,so(e,58).ngClassPending),t(e,60,0,!n.cardForm||n.cardForm.pristine)})}function Jy(t){return Jo(0,[Lo(671088640,1,{cardForm:0}),(t()(),Ai(1,0,null,null,23,"div",[["class","profile-container"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,16,"div",[["class","topnav"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"div",[["class","logo"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Solid"])),(t()(),Ai(5,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(6,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(7,0,null,null,0,"i",[["class","far fa-compass"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 1 "])),(t()(),Ai(9,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(11,0,null,null,0,"i",[["class","far fa-comment"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 2 "])),(t()(),Ai(13,0,null,null,3,"div",[["class","menu-item"]],null,null,null,null,null)),(t()(),Ai(14,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(15,0,null,null,0,"i",[["class","fas fa-sliders-h"]],null,null,null,null,null)),(t()(),Wo(-1,null,[" Menu Item 3 "])),(t()(),Ai(17,0,null,null,1,"div",[["class","profile-menu"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.logout()&&r),r},null,null)),(t()(),Ai(18,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null)),(t()(),Ai(19,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["Profile"])),(t()(),Pi(16777216,null,null,1,null,Gy)),wo(22,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,$y)),wo(24,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,22,0,n.loadingProfile),t(e,24,0,!n.loadingProfile)},function(t,e){t(e,18,0,e.component.profileImage)})}function Ky(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-card",[],null,null,null,Jy,Wy)),wo(1,114688,null,0,Of,[al,ch,Tf],null,null)],function(t,e){t(e,1,0)},null)}var Yy=Ki("app-card",Of,Ky,{},{},[]),Qy=function(){return function(t){this.chatId=t,this.users=[],this.administrators=[]}}(),Xy=function(){return function(t){this.url=t,this.nickname=t.replace("https://","").split(".")[0],this.profileImage="/assets/images/profile.png"}}(),Zy=function(){function t(t,e){this.rdf=t,this.auth=e,console.log("User service constructor"),this.user=null,this.loadingProfile=!0,this.profileLoaded=!1,this.contacts=[],this.loadProfile(),localStorage.removeItem("oldProfileData")}return t.prototype.loadProfile=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:if(this.profileLoaded)return[2];if(!this.loadingProfile)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),this.loadingProfile=!0,[4,this.rdf.getProfile()];case 2:return(t=n.sent())&&(this.profile=t,this.auth.saveOldUserData(t)),this.loadingProfile=!1,this.profileLoaded=!0,this.profile?this.setupFromProfile():this.setupDefault(),[3,4];case 3:return e=n.sent(),console.log("Error: "+e),[3,4];case 4:return[2]}})})},t.prototype.setupFromProfile=function(){this.user=new Xy(this.rdf.getWebID()),this.user.url=this.rdf.getWebID(),this.user.userName=this.profile.fn,this.user.status="online",this.user.profileImage=this.profile.image?this.profile.image:"/assets/images/profile.png",this.loadContacts()},t.prototype.setupDefault=function(){console.log("UserService failed fetching user data. Loading default user."),this.user=new Xy("")},t.prototype.loadContacts=function(){return u(this,void 0,void 0,function(){var t,e=this;return l(this,function(n){switch(n.label){case 0:return console.log("Fetching contacts..."),[4,this.rdf.getContacts()];case 1:return t=n.sent(),console.log("Contact count = "+t.length),t.forEach(function(t){var n=new Xy(t.value);console.log("Contact: "+n.nickname),e.contacts.map(function(t){return t.url}).includes(n.url)||e.contacts.push(n)}),[2]}})})},t.prototype.getUser=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user]}})})},t.prototype.getUserName=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user.userName]}})})},t.prototype.getProfileImage=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.user.profileImage]}})})},t.prototype.getContacts=function(){return u(this,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,this.loadProfile()];case 1:return t.sent(),[2,this.contacts]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(al),fe(Tf))},token:t,providedIn:"root"}),t}(),tm=n("Q45J"),em=function(){function t(t){this.rdf=t}return t.prototype.getRoot=function(t){return t.url.replace("/profile/card#me","/private/dechat_en1a/")},t.prototype.checkUserFiles=function(t){return u(this,void 0,void 0,function(){var e,n,r=this;return l(this,function(i){switch(i.label){case 0:return[4,this.rdf.getSession()];case 1:return i.sent(),e=t.url.replace("/profile/card#me","/private/"),n=t.url.replace("/profile/card#me","/inbox/"),this.checkFolderExistence(n),this.checkFolderExistence(e).then(function(t){return r.checkFolderExistence(e+"dechat_en1a/").then(function(t){return r.checkFolderExistence(e+"dechat_en1a/chats/")})}),[2]}})})},t.prototype.checkFolderExistence=function(t,e){return void 0===e&&(e=function(t){}),u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,this.rdf.getSession()];case 1:r.sent();try{tm.readFolder(t).then(function(t){console.log("Existent folder!")},function(r){console.log("Non existent folder. Creating new one..."),n.createFolder(t).then(e)})}catch(i){console.log("Error creating folder: "+i)}return[2]}})})},t.prototype.checkChatFolder=function(t,e){return u(this,void 0,void 0,function(){var n,r=this;return l(this,function(i){switch(i.label){case 0:return[4,this.rdf.getSession()];case 1:return i.sent(),n=this.getChatUrl(t,e),[4,this.checkFolderExistence(n,function(i){r.checkChatDataFile(n,e),r.givePermissions(n,t)})];case 2:return i.sent(),[2]}})})},t.prototype.checkChatDataFile=function(t,e){var n=t+"data.txt",r=JSON.stringify(e);this.updateFile(n,r)},t.prototype.getChatsRootUrl=function(t){return this.getRoot(t)+"chats/"},t.prototype.getChatUrl=function(t,e){var n=this.getRoot(t)+"chats/"+e.chatId+"/";return console.log("Chat url = "+n),n},t.prototype.getInboxUrl=function(t){return t.url.replace("/profile/card#me","/inbox/")},t.prototype.createFolder=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,tm.createFolder(t).then(function(e){console.log("Created folder "+t+".")},function(t){console.log("Could not create folder: "+t)})];case 1:return e.sent(),[2]}})})},t.prototype.createFile=function(t,e){return void 0===e&&(e=null),u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,tm.createFile(t).then(function(r){console.log("Created file "+t+"."),null!=e&&n.updateFile(t,e)},function(t){console.log("Could not create file: "+t)})];case 1:return r.sent(),[2]}})})},t.prototype.updateFile=function(t,e){return u(this,void 0,void 0,function(){var n=this;return l(this,function(r){switch(r.label){case 0:return[4,tm.updateFile(t,e).then(function(t){console.log("File edited!")},function(r){n.createFile(t,e)})];case 1:return r.sent(),[2]}})})},t.prototype.readFile=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e="",[4,tm.readFile(t).then(function(t){console.log("File content is : "+t+"."),e=t},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.deleteFile=function(t){tm.deleteFile(t).then(function(e){console.log("Deleted "+t+".")},function(t){return console.log(t)})},t.prototype.readFolder=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=[],[4,tm.readFolder(t).then(function(t){e=t.files.map(function(t){return t.url})},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.deleteFolder=function(t){tm.deleteFolder(t).then(function(e){console.log("Deleted "+t+".")},function(t){return console.log(t)})},t.prototype.readFolderSubfolders=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return e=[],[4,tm.readFolder(t).then(function(t){e=t.folders.map(function(t){return t.url})},function(t){return console.log(t)})];case 1:return n.sent(),[2,e]}})})},t.prototype.givePermissions=function(t,e){return u(this,void 0,void 0,function(){var n;return l(this,function(r){return n="# ACL resource for the profile folder\n @prefix acl: .\n @prefix foaf: .\n \n # The owner has all permissions\n <#owner>\n a acl:Authorization;\n acl:agent <"+e.url+">;\n acl:accessTo <./>;\n acl:defaultForNew <./>;\n acl:mode acl:Read, acl:Write, acl:Control.\n \n # The public has read permissions\n <#public>\n a acl:Authorization;\n acl:agentClass foaf:Agent;\n acl:accessTo <./>;\n acl:defaultForNew <./>;\n acl:mode acl:Read.",this.readFile(t+=".acl"),tm.updateFile(t,n).then(function(t){console.log("Folder permisions added")},function(t){return console.log("Could not set folder permisions"+t)}),[2]})})},t.prototype.addUserToAclFile=function(t,e){for(var n=e.url,r=t.split("\n"),i=0,o=r.filter(function(t,e,n){return!!t.startsWith("@prefix")&&(i=e,!0)}),s=!1,a="http://www.w3.org/ns/auth/acl#",u=0;u.\n"),i++);var l=!1;for(u=0;u.\n");var c=r.findIndex(function(t,e,n){return t.startsWith(":Read")});-1==c&&(c=r.length,r.push(":Read\n"),r.push("a n0:Authorization;\n"),r.push("n0:accessTo <./>:;\n"),r.push("n0:defaultForNew <./>:;\n"),r.push("n0:mode n0:Read.`;\n"),r.push("n0:agent c0:me;\n"))},t.ngInjectableDef=wt({factory:function(){return new t(fe(al))},token:t,providedIn:"root"}),t}(),nm=n("EcEN"),rm=function(){function t(t){void 0===t&&(t=""),this.id=Object(nm.v4)(),this.message=t,this.date=new Date}return t.prototype.isMessageFrom=function(t){return null!=this.userUrl&&this.userUrl==t.url},t}(),im=function(){function t(t,e){this.MAX_MSG_COUNT=100,this.chatId=t,this.bundleId=e,this.messages=[],this.creationDate=new Date}return t.prototype.addMessage=function(t){return!(this.messages.length>=this.MAX_MSG_COUNT||(this.messages.push(t),0))},t}(),om=function(t){return t[t.CHAT_REQUEST=0]="CHAT_REQUEST",t[t.NEW_MESSAGE=1]="NEW_MESSAGE",t}({}),sm=function(){return function(){}}(),am=function(){function t(t,e){this.files=t,this.users=e,this.newElements=[],this.onElementFoundCallbacks=[],this.setUp()}return t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,4];case 1:return e.sent(),console.log("Inbox setting up..."),t=this,[4,this.users.getUser()];case 2:return t.user=e.sent(),setInterval(this.checkInbox.bind(this),500),[2]}})})},t.prototype.addOnElementFoundCallback=function(t){this.onElementFoundCallbacks.push(t)},t.prototype.checkInbox=function(){return u(this,void 0,void 0,function(){var t,e,n,r=this;return l(this,function(i){switch(i.label){case 0:return null!=this.user?[3,2]:(t=this,[4,this.users.getUser()]);case 1:return t.user=i.sent(),[2];case 2:return e=this.files.getInboxUrl(this.user),n=[],[4,this.files.readFolder(e).then(function(t){n=t.filter(function(t,e,n){return t.includes("DeChatEn1a")}),r.addInboxFiles(n)})];case 3:return i.sent(),this.processNewElements(),[2]}})})},t.prototype.processNewElements=function(){var t=this;this.newElements.forEach(function(e){t.onElementFoundCallbacks.forEach(function(t){t(e)})}),this.newElements=[]},t.prototype.addInboxFiles=function(t){return u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:e=0,i.label=1;case 1:return e0&&(r=JSON.parse(n),this.newElements.push(r),console.log("Inbox element pushed: "+r)),this.files.deleteFile(t[e]),i.label=3;case 3:return e++,[3,1];case 4:return[2]}})})},t.prototype.sendChatRequest=function(t,e){var n;(n=new sm).chat=e,n.type=om.CHAT_REQUEST;var r=this.files.getInboxUrl(t);this.sendRequest(n,r+"DeChatEn1a_chatreq_"+e.chatId+".txt")},t.prototype.sendNewMessage=function(t,e,n){var r;(r=new sm).chat=e,r.message=n,r.type=om.NEW_MESSAGE;var i=this.files.getInboxUrl(t);this.sendRequest(r,i+"DeChatEn1a_newmsg_"+n.id+".txt")},t.prototype.sendRequest=function(t,e){console.log("Sending request...");var n=JSON.stringify(t);this.files.createFile(e,n)},t.ngInjectableDef=wt({factory:function(){return new t(fe(em),fe(Zy))},token:t,providedIn:"root"}),t}(),um=function(){function t(t){this.chatInfo=t,this.bundles=new Map}return t.prototype.addBundle=function(t){return this.bundles.has(t.bundleId)?(console.log("Failed to add bundle: already existent."),!1):(this.bundles.set(t.bundleId,t),console.log("Bundle added to the Chat."),!0)},t.prototype.getBundles=function(){var t=[];return this.bundles.forEach(function(e,n,r){return t.push(e)}),t},t.prototype.getBundle=function(t){if(!this.bundles.has(t))return this.bundles.get(t)},t}(),lm=function(){function t(t,e){var n=this;this.files=t,this.inbox=e,this.currentMessages=[],this.chatMap=new Map,this.inbox.addOnElementFoundCallback(function(t){t.type==om.NEW_MESSAGE&&n.createMessageFromRequest(t)})}return t.prototype.setCurrentUser=function(t){this.user=t},t.prototype.fetchChat=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return console.log("Message Service Fetching chat: "+t.chatId),this.chatMap.has(t.chatId)||this.chatMap.set(t.chatId,new um(t)),e=this.chatMap.get(t.chatId),n=this.files.getChatUrl(this.user,t),[4,this.loadAllMessageBundles(n,e)];case 1:return r.sent(),[2]}})})},t.prototype.setCurrentChat=function(t){return u(this,void 0,void 0,function(){var e,n,r=this;return l(this,function(i){switch(i.label){case 0:for(console.log("Message service setting current chat");this.currentMessages.length>0;)this.currentMessages.pop();return this.chatMap.has(t.chatId)||this.chatMap.set(t.chatId,new um(t)),this.currentChat=this.chatMap.get(t.chatId),this.currentChatUrl=this.files.getChatUrl(this.user,t),[4,this.loadAllMessageBundles(this.currentChatUrl,this.currentChat)];case 1:return e=i.sent(),console.log("New bundles added: "+e),0==(n=this.currentChat.getBundles()).length&&console.log("... man, the chat has no bundles"),[4,n.forEach(function(t){console.log("Bundle "+t.bundleId+" has "+t.messages.length+" messages"),t.messages=t.messages.sort(function(t,e){return t.date.getTime()-e.date.getTime()}),t.messages.forEach(function(t){return r.currentMessages.push(t)}),r.currentBundle=t})];case 2:return i.sent(),[2]}})})},t.prototype.getFullTimeStamp=function(){var t=new Date;return t.getUTCFullYear()+"_"+(t.getUTCMonth()+1)+"_"+t.getUTCDate()+" "+t.getUTCHours()+"_"+t.getUTCMinutes()+"_"+t.getSeconds()+"_"+t.getMilliseconds()},t.prototype.getMessages=function(){return hl(this.currentMessages)},t.prototype.sendMultimedia=function(t){this.currentMultimedia.push(t)},t.prototype.sendMessage=function(t){return u(this,void 0,void 0,function(){var e,n,r,i=this;return l(this,function(o){switch(o.label){case 0:return null!=this.currentBundle?[3,2]:(e=this,[4,this.createBundle(this.currentChat,this.getFullTimeStamp())]);case 1:e.currentBundle=o.sent(),o.label=2;case 2:return n=this.createMessage(t),this.currentBundle.addMessage(n)?[3,4]:(r=this,[4,this.createBundle(this.currentChat,this.getFullTimeStamp())]);case 3:r.currentBundle=o.sent(),this.currentBundle.addMessage(n),o.label=4;case 4:return this.currentMessages.push(n),this.currentChat.chatInfo.users.forEach(function(t){return u(i,void 0,void 0,function(){return l(this,function(e){return this.inbox.sendNewMessage(t,this.currentChat.chatInfo,n),[2]})})}),console.log("[Message sent] : "+t),[2]}})})},t.prototype.createMessage=function(t){var e=new rm;return e.message=t,e.userName=this.user.userName,e.chatId=this.currentChat.chatInfo.chatId,e.bundleId=this.currentBundle.bundleId,e},t.prototype.createMessageFromRequest=function(t){return u(this,void 0,void 0,function(){var e,n,r,i,o,s;return l(this,function(a){switch(a.label){case 0:return e=t.message,n=t.chat,null==this.currentChat?console.log("Undefined current chat!!!!"):this.currentChat.chatInfo.chatId==n.chatId?null==this.currentMessages.find(function(t,n,r){return t.id==e.id})&&this.currentMessages.push(e):this.currentChat.unreadMessageCount++,this.chatMap.has(e.chatId)?[4,(r=this.chatMap.get(e.chatId)).getBundle(e.bundleId)]:(console.log("[ERROR] We have received a message and we don't have the chat in the map!!!!!!"),[2]);case 1:return null!=(i=a.sent())?[3,3]:(console.log("Undefined bundle. Creating it."),o=this,[4,this.createBundle(r,e.bundleId)]);case 2:o.currentBundle=a.sent(),i=this.currentBundle,a.label=3;case 3:return i.addMessage(e),[4,this.files.getChatUrl(this.user,this.currentChat.chatInfo)];case 4:return s=a.sent(),[4,this.files.createFile(s=(s=s+i.bundleId+"/")+e.id+".txt",JSON.stringify(e))];case 5:return a.sent(),[2]}})})},t.prototype.getMessageFromFile=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.files.readFile(t).then(function(t){return e=JSON.parse(t)})];case 1:return n.sent(),[2,new rm(e.message)]}})})},t.prototype.loadAllMessageBundles=function(t,e){return u(this,void 0,void 0,function(){var n,r,i=this;return l(this,function(o){switch(o.label){case 0:return console.log("Loading all message bundles in the POD chat folder "+t),[4,this.files.readFolderSubfolders(t)];case 1:return 0==(n=o.sent()).length?(console.log("The chat has no bundles"),[2,0]):(console.log("Number of bundles in the POD: "+n.length),console.log("Number of bundles locally: "+e.getBundles().length),r=0,[4,n.forEach(function(n){return u(i,void 0,void 0,function(){var i;return l(this,function(o){switch(o.label){case 0:return[4,this.loadMessageBundle(e,t,n)];case 1:return i=o.sent(),console.log("Trying to add bundle"),[4,e.addBundle(i)];case 2:return o.sent()&&(r++,console.log("Bundle added :D")),console.log("Count = "+r),[2]}})})})]);case 2:return o.sent(),[2,r]}})})},t.prototype.loadMessageBundle=function(t,e,n){return u(this,void 0,void 0,function(){var r,i,o=this;return l(this,function(s){switch(s.label){case 0:return console.log("Fetching message bundle."),r=n.replace(e,"").replace("/",""),console.log("URL: "+n),console.log("ID: "+r),console.log("Getting the bundle."),[4,this.getBundle(t,r)];case 1:return i=s.sent(),console.log("Reading all messages inside the bundle folder"),[4,this.files.readFolder(n)];case 2:return[4,s.sent().forEach(function(t){return u(o,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.getMessageFromFile(t)];case 1:return e=n.sent(),[4,i.addMessage(e)];case 2:return n.sent(),[2]}})})})];case 3:return s.sent(),[2,i]}})})},t.prototype.getBundle=function(t,e){return u(this,void 0,void 0,function(){var n;return l(this,function(r){switch(r.label){case 0:return null!=(n=t.getBundle(e))?[2,n]:[4,this.createBundle(t,e)];case 1:return[2,r.sent()]}})})},t.prototype.createBundle=function(t,e){return u(this,void 0,void 0,function(){var n,r;return l(this,function(i){switch(i.label){case 0:return n=new im(t.chatInfo.chatId,e),[4,this.files.getChatUrl(this.user,t.chatInfo)];case 1:return r=i.sent(),[4,this.files.checkFolderExistence(r+n.bundleId+"/")];case 2:return i.sent(),[2,n]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(em),fe(am))},token:t,providedIn:"root"}),t}(),cm=function(){function t(t,e,n,r){var i=this;this.userService=t,this.files=e,this.messages=n,this.inbox=r,this.allChats=[],this.setUp(),this.inbox.addOnElementFoundCallback(function(t){t.type==om.CHAT_REQUEST&&i.createChatFromRequest(t)})}return t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t,e,n=this;return l(this,function(r){switch(r.label){case 0:return[4,1];case 1:return r.sent(),t=this,[4,this.userService.getUser()];case 2:return t.user=r.sent(),this.messages.setCurrentUser(this.user),[4,this.userService.getContacts()];case 3:return r.sent(),[4,this.files.checkUserFiles(this.user)];case 4:return r.sent(),console.log("Checking existent chats..."),[4,this.files.getChatsRootUrl(this.user)];case 5:return e=r.sent(),[4,this.files.readFolderSubfolders(e)];case 6:return[4,r.sent().forEach(function(t){return u(n,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,this.fetchChat(t)];case 1:return null!=(e=n.sent())&&this.allChats.push(e),[2]}})})})];case 7:return r.sent(),[2]}})})},t.prototype.openChat=function(t){return u(this,void 0,void 0,function(){return l(this,function(e){return this.messages.setCurrentChat(t),this.currentChat=t,this.files.checkChatFolder(this.user,t),[2]})})},t.prototype.getAllChats=function(){return hl(this.allChats)},t.prototype.isAdmin=function(t){return t.administrators.includes(this.user)},t.prototype.createChat=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){return(e=[]).push(t),[2,this.createGroupChat(t.nickname,e)]})})},t.prototype.createChatFromRequest=function(t){return u(this,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return this.allChats.push(e=t.chat),[4,this.files.checkChatFolder(this.user,e)];case 1:return n.sent(),[2,e]}})})},t.prototype.createGroupChat=function(t,e){return u(this,void 0,void 0,function(){var n,r,i=this;return l(this,function(o){switch(o.label){case 0:return console.log("Chat service creating new chat: "+t),r=(r=Object(nm.v4)()).replace(/-/g,""),console.log("New chat id: "+r),(n=new Qy(r)).chatName=t,n.users=e,n.administrators=[],n.administrators.push(this.user),n.users.push(this.user),n.users.forEach(function(t){return u(i,void 0,void 0,function(){return l(this,function(e){return t!==this.user&&this.inbox.sendChatRequest(t,n),[2]})})}),[4,this.files.checkChatFolder(this.user,n)];case 1:return o.sent(),[2,n]}})})},t.prototype.addUserToChat=function(t,e){return!!this.isAdmin(t)&&(t.users.push(e),this.files.checkChatFolder(e,t),!0)},t.prototype.fetchChat=function(t){return u(this,void 0,void 0,function(){var e,n;return l(this,function(r){switch(r.label){case 0:return console.log("Fetching chat: "+t),[4,this.files.readFile(t+"data.txt")];case 1:return 0==(e=r.sent()).length||null==e?(console.log("Something bad happened."),this.files.deleteFolder(t),[2,null]):null==(n=JSON.parse(e))?(console.log("Something bad happened."),this.files.deleteFolder(t),[2,null]):[4,this.messages.fetchChat(n)];case 2:return r.sent(),[2,n]}})})},t.ngInjectableDef=wt({factory:function(){return new t(fe(Zy),fe(em),fe(lm),fe(am))},token:t,providedIn:"root"}),t}(),hm=function(){function t(t){this.chatService=t}return t.prototype.ngOnInit=function(){},t.prototype.isActive=function(){return this.chatService.currentChat==this.chatInfo?"activeChatItem":"chatItem"},t.prototype.openChat=function(){console.log("Oppening chat with "+this.chatInfo.chatName),this.chatService.openChat(this.chatInfo)},t}(),fm=ri({encapsulation:0,styles:[[".chatItem[_ngcontent-%COMP%]{height:auto;padding:10px;width:90%;margin-top:10px;border-radius:8px;align-items:flex-start;background-color:var(--background-light-dark);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);color:var(--foreground-dark-light);transition:ease-in .2s}.chatItem[_ngcontent-%COMP%]:hover{background-color:var(--background-light);color:var(--foreground-purple);transition:ease-in .1s}.activeChatItem[_ngcontent-%COMP%], .activeChatItem[_ngcontent-%COMP%]:hover{background-color:var(--background-purple-light);color:var(--foreground-light)}.userName[_ngcontent-%COMP%]{display:inline-block}"]],data:{}});function pm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","userName"]],null,null,null,null,null)),(t()(),Wo(1,null,[" "," "]))],null,function(t,e){t(e,1,0,e.component.chatInfo.chatName)})}function dm(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[["class","chatItem"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.openChat()&&r),r},null,null)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),Pi(16777216,null,null,1,null,pm)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"chatItem",n.isActive()),t(e,3,0,null!=n.chatInfo)},null)}var gm=function(){function t(t,e,n){this.dialogRef=t,this.userService=e,this.chatService=n,this.users=[],this.contacts=[],this.setUp()}return t.prototype.ngOnInit=function(){},t.prototype.setUp=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,this.userService.getContacts()];case 1:return e.sent().forEach(function(e){return t.contacts.push(e)}),[2]}})})},t.prototype.onContactClick=function(t){console.log("You clicked on "+t.nickname);for(var e=0;e0)},null)}var _m=function(t,e,n){this.url=t,this.type=e,this.extension=n},xm=function(){function t(t){this.dialogRef=t}return t.prototype.ngOnInit=function(){},t.prototype.cancel=function(){this.closeDialog()},t.prototype.closeDialog=function(){this.dialogRef.close("Dialog closed!")},t.prototype.addMultimedia=function(){this.multimedia=new _m(this.url,this.type,"")},t}(),Sm=function(){function t(t,e){this.messageService=t,this.dialog=e,this.message=""}return t.prototype.ngOnInit=function(){},t.prototype.send=function(){this.message=this.message.trim(),this.message.length<=0||(this.messageService.sendMessage(this.message),this.message="")},t.prototype.handleSubmit=function(t){13===t.keyCode&&this.send()},t.prototype.multimedia=function(){var t=new hd;t.disableClose=!0,t.autoFocus=!0,this.dialog.open(xm,t)},t}(),Cm=ri({encapsulation:0,styles:[[".chatButton[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 24px;font-size:1em;background-color:#2a2845;color:#fff;transition:.2s ease-out;min-width:50px;text-align:center}.chatButton[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb}.chatButton[_ngcontent-%COMP%]:hover{background-color:#444}.chatMultimediaButton[_ngcontent-%COMP%]{flex:1;border-radius:8px;padding:8px 24px;font-size:1em;background-color:#2a2845;color:#fff;transition:.2s ease-out;min-width:50px;text-align:center}.chatMultimediaButton[_ngcontent-%COMP%]:disabled{background-color:#f0eeeb;border-color:#f0eeeb}.chatMultimediaButton[_ngcontent-%COMP%]:hover{background-color:#444}.inputWrapper[_ngcontent-%COMP%]{flex:5;padding-left:80px;padding-right:16px;display:flex}.chatInput[_ngcontent-%COMP%]{flex:1;border-radius:8px;font-size:1.3em;color:#000;background-color:#fff;transition:.1s ease-out;padding-left:16px;width:100%;box-sizing:border-box}.chatInput[_ngcontent-%COMP%]:focus{background-color:#eef2f7;color:#222;transition:.1s ease-in}"]],data:{}});function Em(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"button",[["class","chatMultimediaButton"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.multimedia()&&r),r},null,null)),(t()(),Wo(-1,null,["Multimedia"])),(t()(),Ai(2,0,null,null,6,"div",[["class","inputWrapper"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,5,"textarea",[["class","chatInput"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"keydown"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,4)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,4).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,4)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,4)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.message=n)&&r),"keydown"===e&&(r=!1!==i.handleSubmit(n)&&r),r},null,null)),wo(4,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(6,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(8,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(9,0,null,null,1,"button",[["class","chatButton"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.send()&&r),r},null,null)),(t()(),Wo(-1,null,["Send"]))],function(t,e){t(e,6,0,e.component.message)},function(t,e){t(e,3,0,so(e,8).ngClassUntouched,so(e,8).ngClassTouched,so(e,8).ngClassPristine,so(e,8).ngClassDirty,so(e,8).ngClassValid,so(e,8).ngClassInvalid,so(e,8).ngClassPending)})}var km=function(){function t(){this.ready=!0}return t.prototype.ngOnInit=function(t){void 0===t&&(t=this.multimedia),this.multimediaURL=t.url,this.multimediaType=t.type,this.multimediaExten=t.extension},t}(),Tm=ri({encapsulation:0,styles:[[""]],data:{}});function Om(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"video",[["controls",""],["height","360"],["width","480"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"source",[],[[8,"src",4]],null,null,null,null)),(t()(),Wo(-1,null,[" Your browser does not support the video HTML tag. "]))],null,function(t,e){t(e,2,0,e.component.multimediaURL)})}function Im(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"audio",[["controls",""]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,0,"source",[],[[8,"src",4]],null,null,null,null)),(t()(),Wo(-1,null,[" Your browser does not support the audio HTML tag. "]))],null,function(t,e){t(e,2,0,e.component.multimediaURL)})}function Pm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null))],null,function(t,e){t(e,1,0,e.component.multimediaURL)})}function Am(t){return Jo(0,[(t()(),Pi(16777216,null,null,1,null,Om)),wo(1,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Im)),wo(3,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null),(t()(),Pi(16777216,null,null,1,null,Pm)),wo(5,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,1,0,"video"===n.multimediaType),t(e,3,0,"audio"===n.multimediaType),t(e,5,0,"image"===n.multimediaType)},null)}var Rm=function(){function t(t){this.users=t,this.ready=!0,this.isOwnMessage=!1}return t.prototype.ngOnInit=function(t,e){return void 0===t&&(t=this.chatMessage),void 0===e&&(e=this.multimedia),u(this,void 0,void 0,function(){var e,n,r;return l(this,function(i){switch(i.label){case 0:return null==t&&((t=new rm("")).userName="dummy"),this.messageContent=t.message,this.userName=t.userName,this.timeSent=this.getTimeStamp(t.date),e=this,r=(n=t).isMessageFrom,[4,this.users.getUser()];case 1:return e.isOwnMessage=r.apply(n,[i.sent()]),[2]}})})},t.prototype.getTimeStamp=function(t){return t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate()+" "+t.getUTCHours()+":"+t.getUTCMinutes()},t}(),Nm=ri({encapsulation:0,styles:[[".messageContainer[_ngcontent-%COMP%]{display:flex;height:auto;width:70%;min-width:400px;border-radius:5px;align-items:stretch;background-color:#dadada;box-shadow:0 3px 6px rgba(0,0,0,.26),0 3px 6px rgba(0,0,0,.23)}.isOwnMessageContainer[_ngcontent-%COMP%]{background-color:#4cd362}.messageData[_ngcontent-%COMP%]{flex:1;padding:10px;font-size:.7em}.sender[_ngcontent-%COMP%]{display:block;color:#222;font-weight:700}.isOwnSender[_ngcontent-%COMP%]{color:#d3d3d3}.timeSent[_ngcontent-%COMP%]{color:#555;font-style:italic}.isOwnTimeSent[_ngcontent-%COMP%]{color:green}.messageContent[_ngcontent-%COMP%]{height:auto;flex:9;background-color:#fff;padding:10px;border-top-right-radius:5px;border-bottom-right-radius:5px}.isOwnMessageContent[_ngcontent-%COMP%]{background-color:#e3f2fd;color:#20b2aa}"]],data:{}});function jm(t){return Jo(0,[(t()(),Ai(0,0,null,null,14,"div",[["class","messageContainer"]],null,null,null,null,null)),wo(1,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Ho(2,{isOwnMessageContainer:0}),(t()(),Ai(3,0,null,null,4,"div",[["class","messageData"]],null,null,null,null,null)),(t()(),Ai(4,0,null,null,1,"span",[["class","sender"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Ai(6,0,null,null,1,"span",[["class","timeSent"]],null,null,null,null,null)),(t()(),Wo(7,null,["",""])),(t()(),Ai(8,0,null,null,3,"div",[["class","messageContent"]],null,null,null,null,null)),wo(9,278528,null,0,va,[or,sr,On,Tn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Ho(10,{isOwnMessageContent:0}),(t()(),Wo(11,null,[" "," "])),(t()(),Ai(12,0,null,null,2,"div",[["class","multimediaWrapper"]],null,null,null,null,null)),(t()(),Ai(13,0,null,null,1,"app-multimedia-display",[],null,null,null,Am,Tm)),wo(14,114688,null,0,km,[],null,null)],function(t,e){var n=e.component,r=t(e,2,0,n.isOwnMessage);t(e,1,0,"messageContainer",r);var i=t(e,10,0,n.isOwnMessage);t(e,9,0,"messageContent",i),t(e,14,0)},function(t,e){var n=e.component;t(e,5,0,n.userName),t(e,7,0,n.timeSent),t(e,11,0,n.messageContent)})}var Dm=function(){function t(t){this.messageService=t,this.ready=!0}return t.prototype.ngOnInit=function(){this.update()},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.feed=this.messageService.getMessages()},t}(),Mm=ri({encapsulation:0,styles:[[".feed[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:fixed;bottom:0}.message[_ngcontent-%COMP%]{flex-direction:column;margin:10px 0}"]],data:{}});function Lm(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","message"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-message",[],null,null,null,jm,Nm)),wo(2,114688,null,0,Rm,[Zy],{chatMessage:[0,"chatMessage"]},null)],function(t,e){t(e,2,0,e.context.$implicit)},null)}function Um(t){return Jo(0,[(t()(),Ai(0,0,null,null,3,"div",[["class","feed"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,2,null,Lm)),wo(2,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),_o(131072,Ia,[Ln])],function(t,e){var n=e.component;t(e,2,0,ti(e,2,0,so(e,3).transform(n.feed)))},null)}var Fm=function(){function t(t){this.chatService=t}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewChecked=function(){this.scrollToBottom()},t.prototype.scrollToBottom=function(){this.feedContainer.nativeElement.scrollTop=this.feedContainer.nativeElement.scrollHeight},t}(),Vm=ri({encapsulation:0,styles:[[".chatroom[_ngcontent-%COMP%]{display:grid;grid-template-rows:80% 20%;height:100%;overflow:hidden}.chatHeaderWrapper[_ngcontent-%COMP%]{display:flex;height:50px;width:100%;background-color:#fff;z-index:1}.feedWrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;overflow-y:scroll;padding:20px 0 0 24px}.chatFormWrapper[_ngcontent-%COMP%]{display:flex;height:80px;background-color:rgba(0,0,0,0);z-index:3;padding:8px}"]],data:{}});function Bm(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[["class","chatFormWrapper"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-chat-form",[],null,null,null,Em,Cm)),wo(2,114688,null,0,Sm,[lm,wd],null,null)],function(t,e){t(e,2,0)},null)}function zm(t){return Jo(0,[Lo(402653184,1,{feedContainer:0}),(t()(),Ai(1,0,null,null,5,"div",[["class","chatroom"]],null,null,null,null,null)),(t()(),Ai(2,0,[[1,0],["scroller",1]],null,2,"div",[["class","feedWrapper"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,1,"app-feed",[],null,null,null,Um,Mm)),wo(4,638976,null,0,Dm,[lm],null,null),(t()(),Pi(16777216,null,null,1,null,Bm)),wo(6,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0),t(e,6,0,null!=n.chatService.currentChat)},null)}var Hm=ri({encapsulation:0,styles:[[".mainContent[_ngcontent-%COMP%]{height:100%;width:100%;display:grid;grid-template-columns:minmax(256px,20%) auto;overflow:hidden}.userListWrapper[_ngcontent-%COMP%]{display:flex;flex:1;background-color:var(--background-purple);color:#fff;padding:20px 0 40px 30px;border-right:1px solid #222;overflow-y:scroll}.chatroomWrapper[_ngcontent-%COMP%]{background:linear-gradient(180deg,rgba(196,228,238,.5),rgba(0,0,0,.7)),url(chat-bg-1.937abfca71e6cf87f520.jpg) center center no-repeat}app-chatroom[_ngcontent-%COMP%]{height:100%}"]],data:{}});function qm(t){return Jo(0,[(t()(),Ai(0,0,null,null,6,"div",[["class","mainContent"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","userListWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"app-chat-list",[],null,null,null,wm,mm)),wo(3,638976,null,0,ym,[cm,wd],null,null),(t()(),Ai(4,0,null,null,2,"div",[["class","chatroomWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,1,"app-chatroom",[],null,null,null,zm,Vm)),wo(6,8503296,null,0,Fm,[cm],null,null)],function(t,e){t(e,3,0),t(e,6,0)},null)}function Wm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-main-content",[],null,null,null,qm,Hm)),wo(1,114688,null,0,Nf,[],null,null)],function(t,e){t(e,1,0)},null)}var Gm=Ki("app-main-content",Nf,Wm,{},{},[]),$m=function(){function t(){}return t.prototype.ngOnInit=function(t){void 0===t&&(t=this.user),null==t&&(t=new Xy("dummy")),this.userName=t.nickname},t}(),Jm=ri({encapsulation:0,styles:[[".userDisplaySlot[_ngcontent-%COMP%]{cursor:pointer;display:inline-block}"]],data:{}});function Km(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"span",[["class","userDisplaySlot"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"p",[],null,null,null,null,null)),(t()(),Wo(2,null,["User: ",""]))],null,function(t,e){t(e,2,0,e.component.userName)})}var Ym=ri({encapsulation:0,styles:[[".newChatDialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;z-index:10}"]],data:{}});function Qm(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"span",[["class","contactCheck"]],null,null,null,null,null)),(t()(),Wo(-1,null,["\u2714\ufe0f"]))],null,null)}function Xm(t){return Jo(0,[(t()(),Ai(0,0,null,null,4,"div",[["class","contactWrapper"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onContactClick(t.context.$implicit)&&r),r},null,null)),(t()(),Ai(1,0,null,null,1,"app-user-display-slot",[],null,null,null,Km,Jm)),wo(2,114688,null,0,$m,[],{user:[0,"user"]},null),(t()(),Pi(16777216,null,null,1,null,Qm)),wo(4,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,2,0,e.context.$implicit),t(e,4,0,n.isContactIn(e.context.$implicit))},null)}function Zm(t){return Jo(0,[(t()(),Ai(0,0,null,null,18,"div",[["class","newChatDialog"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","titleWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["New chat"])),(t()(),Ai(4,0,null,null,6,"div",[["class","nameWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,5,"input",[["placeholder","New chat name"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,6)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,6).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,6)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,6)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.chatName=n)&&r),r},null,null)),wo(6,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(8,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(10,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(11,0,null,null,2,"div",[["class","contactListWrapper"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,Xm)),wo(13,278528,null,0,wa,[Mn,Dn,or],{ngForOf:[0,"ngForOf"]},null),(t()(),Ai(14,0,null,null,4,"div",[["class","actionsWrapper"]],null,null,null,null,null)),(t()(),Ai(15,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.cancel()&&r),r},null,null)),(t()(),Wo(-1,null,["Back"])),(t()(),Ai(17,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.create()&&r),r},null,null)),(t()(),Wo(-1,null,["Let's chat!"]))],function(t,e){var n=e.component;t(e,8,0,n.chatName),t(e,13,0,n.contacts)},function(t,e){t(e,5,0,so(e,10).ngClassUntouched,so(e,10).ngClassTouched,so(e,10).ngClassPristine,so(e,10).ngClassDirty,so(e,10).ngClassValid,so(e,10).ngClassInvalid,so(e,10).ngClassPending)})}function tv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-new-chat-dialog",[],null,null,null,Zm,Ym)),wo(1,114688,null,0,gm,[gd,Zy,cm],null,null)],function(t,e){t(e,1,0)},null)}var ev=Ki("app-new-chat-dialog",gm,tv,{},{},[]),nv=ri({encapsulation:0,styles:[[".newMultimediaDialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;z-index:10}"]],data:{}});function rv(t){return Jo(0,[(t()(),Ai(0,0,null,null,22,"div",[["class","newMultimediaDialog"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","titleWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),Wo(-1,null,["Multimedia selector"])),(t()(),Ai(4,0,null,null,6,"div",[["class","urlWrapper"]],null,null,null,null,null)),(t()(),Ai(5,0,null,null,5,"input",[["placeholder","URL of the multimedia element"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,6)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,6).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,6)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,6)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.url=n)&&r),r},null,null)),wo(6,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(8,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(10,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(11,0,null,null,6,"div",[["class","typeWrapper"]],null,null,null,null,null)),(t()(),Ai(12,0,null,null,5,"input",[["placeholder","Type of the multimedia element"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0,i=t.component;return"input"===e&&(r=!1!==so(t,13)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==so(t,13).onTouched()&&r),"compositionstart"===e&&(r=!1!==so(t,13)._compositionStart()&&r),"compositionend"===e&&(r=!1!==so(t,13)._compositionEnd(n.target.value)&&r),"ngModelChange"===e&&(r=!1!==(i.type=n)&&r),r},null,null)),wo(13,16384,null,0,Kd,[Tn,On,[2,Jd]],null,null),xo(1024,null,Gd,function(t){return[t]},[Kd]),wo(15,671744,null,0,Og,[[8,null],[8,null],[8,null],[6,Gd]],{model:[0,"model"]},{update:"ngModelChange"}),xo(2048,null,tg,null,[Og]),wo(17,16384,null,0,dg,[[4,tg]],null,null),(t()(),Ai(18,0,null,null,4,"div",[["class","actionsWrapper"]],null,null,null,null,null)),(t()(),Ai(19,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.cancel()&&r),r},null,null)),(t()(),Wo(-1,null,["Back"])),(t()(),Ai(21,0,null,null,1,"button",[],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.addMultimedia()&&r),r},null,null)),(t()(),Wo(-1,null,["Add multimedia"]))],function(t,e){var n=e.component;t(e,8,0,n.url),t(e,15,0,n.type)},function(t,e){t(e,5,0,so(e,10).ngClassUntouched,so(e,10).ngClassTouched,so(e,10).ngClassPristine,so(e,10).ngClassDirty,so(e,10).ngClassValid,so(e,10).ngClassInvalid,so(e,10).ngClassPending),t(e,12,0,so(e,17).ngClassUntouched,so(e,17).ngClassTouched,so(e,17).ngClassPristine,so(e,17).ngClassDirty,so(e,17).ngClassValid,so(e,17).ngClassInvalid,so(e,17).ngClassPending)})}function iv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-new-multimedia-dialog",[],null,null,null,rv,nv)),wo(1,114688,null,0,xm,[gd],null,null)],function(t,e){t(e,1,0)},null)}var ov=Ki("app-new-multimedia-dialog",xm,iv,{},{},[]),sv=function(){function t(t){this.user=t,this.profileImage="/assets/images/profile.png"}return t.prototype.ngOnInit=function(){this.loadProfile()},t.prototype.loadProfile=function(){return u(this,void 0,void 0,function(){var t,e;return l(this,function(n){switch(n.label){case 0:return t=this,[4,this.user.getUserName()];case 1:return t.userName=n.sent(),e=this,[4,this.user.getProfileImage()];case 2:return e.profileImage=n.sent(),[2]}})})},t}(),av=ri({encapsulation:0,styles:[[".profileIcon[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 64px}.imgWrapper[_ngcontent-%COMP%]{display:inline-block;width:64px;height:64px;min-width:64px;padding-left:12px}.imgWrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;border-radius:50%;border:2px solid #5a5a5a}.textWrapper[_ngcontent-%COMP%]{display:grid;grid-template-rows:50% 50%;grid-row-gap:8px;width:100%;align-self:center;align-content:right;text-align:right}.username[_ngcontent-%COMP%]{color:var(--foreground-purple)}.logout[_ngcontent-%COMP%]{color:var(--foreground-dark-light);text-decoration:none;transition:ease-in .2s;margin-top:8px;overflow:hidden}.logout[_ngcontent-%COMP%]:hover{color:var(--foreground-purple-light);transition:ease-in .2s}"]],data:{}});function uv(t){return Jo(0,[(t()(),Ai(0,0,null,null,10,"div",[["class","profileIcon"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,7,"span",[["class","textWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,3,"span",[],null,null,null,null,null)),(t()(),Wo(-1,null,[" Hello, "])),(t()(),Ai(4,0,null,null,1,"span",[["class","username"]],null,null,null,null,null)),(t()(),Wo(5,null,["",""])),(t()(),Ai(6,0,null,null,2,"span",[],null,null,null,null,null)),(t()(),Ai(7,0,null,null,1,"a",[["class","logout"],["href","/logout"]],null,null,null,null,null)),(t()(),Wo(-1,null,["Logout"])),(t()(),Ai(9,0,null,null,1,"div",[["class","imgWrapper"]],null,null,null,null,null)),(t()(),Ai(10,0,null,null,0,"img",[],[[8,"src",4]],null,null,null,null))],null,function(t,e){var n=e.component;t(e,5,0,n.userName),t(e,10,0,n.profileImage)})}var lv=function(){function t(t){this.router=t}return t.prototype.ngOnInit=function(){},t.prototype.showProfileIcon=function(){return"/chat"===this.router.url},t}(),cv=ri({encapsulation:0,styles:[['.navBar[_ngcontent-%COMP%]{width:100%;height:100%;display:grid;grid-template-columns:96px auto minmax(auto,30%);background-color:var(--background-light)}#logo[_ngcontent-%COMP%]{display:inline-block;background:url(logo.b197b1b2cd028be0e8f4.png) 0 0/cover no-repeat;margin:0 10px 12px 12px;width:96px;height:96px;min-width:96px}#heading[_ngcontent-%COMP%]{flex:4;padding-left:16px;align-self:center;height:60px;font-size:2em;font-weight:700}#heading[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;color:var(--foreground-dark);text-shadow:-1px 2px rgba(0,0,0,.3);font-family:"Trebuchet MS",Helvetica,sans-serif}.profileIconWrapper[_ngcontent-%COMP%]{padding:16px 16px 0 0;font-weight:700}']],data:{}});function hv(t){return Jo(0,[(t()(),Ai(0,0,null,null,2,"div",[],null,null,null,null,null)),(t()(),Ai(1,0,null,null,1,"app-profile-icon",[],null,null,null,uv,av)),wo(2,114688,null,0,sv,[Zy],null,null)],function(t,e){t(e,2,0)},null)}function fv(t){return Jo(0,[(t()(),Ai(0,0,null,null,8,"div",[["class","navBar"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,0,"div",[["id","logo"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,3,"div",[["id","heading"]],null,null,null,null,null)),(t()(),Ai(3,0,null,null,2,"a",[["routerLink","/"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==so(t,4).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),wo(4,671744,null,0,tf,[Qh,ch,oa],{routerLink:[0,"routerLink"]},null),(t()(),Wo(-1,null,["DeChat"])),(t()(),Ai(6,0,null,null,2,"div",[["class","profileIconWrapper"]],null,null,null,null,null)),(t()(),Pi(16777216,null,null,1,null,hv)),wo(8,16384,null,0,xa,[Mn,Dn],{ngIf:[0,"ngIf"]},null)],function(t,e){var n=e.component;t(e,4,0,"/"),t(e,8,0,n.showProfileIcon())},function(t,e){t(e,3,0,so(e,4).target,so(e,4).href)})}var pv=ri({encapsulation:0,styles:[["[_nghost-%COMP%]{position:absolute;left:0;right:0;bottom:0;top:0}.navWrapper[_ngcontent-%COMP%]{width:100%;height:auto;color:#222;box-shadow:0 2px 3px rgba(0,0,0,.37),1px 2px 3px rgba(0,0,0,.54);z-index:2}.application[_ngcontent-%COMP%]{height:100%;display:grid;grid-template-rows:minmax(10%,15%) 0 minmax(85%,90%)}router-outlet[_ngcontent-%COMP%]{height:0}"]],data:{}});function dv(t){return Jo(0,[(t()(),Ai(0,0,null,null,5,"div",[["class","application"]],null,null,null,null,null)),(t()(),Ai(1,0,null,null,2,"div",[["class","navWrapper"]],null,null,null,null,null)),(t()(),Ai(2,0,null,null,1,"app-navbar",[],null,null,null,fv,cv)),wo(3,114688,null,0,lv,[Qh],null,null),(t()(),Ai(4,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),wo(5,212992,null,0,of,[rf,Mn,qe,[8,null],Ln],null,null)],function(t,e){t(e,3,0),t(e,5,0)},null)}function gv(t){return Jo(0,[(t()(),Ai(0,0,null,null,1,"app-root",[],null,null,null,dv,pv)),wo(1,49152,null,0,Mf,[],null,null)],null,null)}var yv=Ki("app-root",Mf,gv,{},{},[]);function mv(){return"undefined"!=typeof process}function vv(t){switch(t.length){case 0:return new np;case 1:return t[0];default:return new rp(t)}}function bv(t,e,n,r,i,o){void 0===i&&(i={}),void 0===o&&(o={});var s=[],a=[],u=-1,l=null;if(r.forEach(function(t){var n=t.offset,r=n==u,c=r&&l||{};Object.keys(t).forEach(function(n){var r=n,a=t[n];if("offset"!==n)switch(r=e.normalizePropertyName(r,s),a){case ip:a=i[n];break;case Xf:a=o[n];break;default:a=e.normalizeStyleValue(n,r,a,s)}c[r]=a}),r||a.push(c),l=c,u=n}),s.length)throw new Error("Unable to animate due to the following errors:\n - "+s.join("\n - "));return a}function wv(t,e,n,r){switch(e){case"start":t.onStart(function(){return r(n&&_v(n,"start",t))});break;case"done":t.onDone(function(){return r(n&&_v(n,"done",t))});break;case"destroy":t.onDestroy(function(){return r(n&&_v(n,"destroy",t))})}}function _v(t,e,n){var r=n.totalTime,i=xv(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==r?t.totalTime:r,!!n.disabled),o=t._data;return null!=o&&(i._data=o),i}function xv(t,e,n,r,i,o,s){return void 0===i&&(i=""),void 0===o&&(o=0),{element:t,triggerName:e,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function Sv(t,e,n){var r;return t instanceof Map?(r=t.get(e))||t.set(e,r=n):(r=t[e])||(r=t[e]=n),r}function Cv(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Ev=function(t,e){return!1},kv=function(t,e){return!1},Tv=function(t,e,n){return[]},Ov=mv();if(Ov||"undefined"!=typeof Element){if(Ev=function(t,e){return t.contains(e)},Ov||Element.prototype.matches)kv=function(t,e){return t.matches(e)};else{var Iv=Element.prototype,Pv=Iv.matchesSelector||Iv.mozMatchesSelector||Iv.msMatchesSelector||Iv.oMatchesSelector||Iv.webkitMatchesSelector;Pv&&(kv=function(t,e){return Pv.apply(t,[e])})}Tv=function(t,e,n){var r=[];if(n)r.push.apply(r,f(t.querySelectorAll(e)));else{var i=t.querySelector(e);i&&r.push(i)}return r}}var Av=null,Rv=!1;function Nv(t){Av||(Av=("undefined"!=typeof document?document.body:null)||{},Rv=!!Av.style&&"WebkitAppearance"in Av.style);var e=!0;return Av.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&!(e=t in Av.style)&&Rv&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in Av.style),e}var jv=kv,Dv=Ev,Mv=Tv;function Lv(t){var e={};return Object.keys(t).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}var Uv=function(){function t(){}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return n||""},t.prototype.animate=function(t,e,n,r,i,o,s){return void 0===o&&(o=[]),new np(n,r)},t}(),Fv=function(){function t(){}return t.NOOP=new Uv,t}(),Vv=1e3;function Bv(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:zv(parseFloat(e[1]),e[2])}function zv(t,e){switch(e){case"s":return t*Vv;default:return t}}function Hv(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var r,i=0,o="";if("string"==typeof t){var s=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return e.push('The provided timing value "'+t+'" is invalid.'),{duration:0,delay:0,easing:""};r=zv(parseFloat(s[1]),s[2]);var a=s[3];null!=a&&(i=zv(Math.floor(parseFloat(a)),s[4]));var u=s[5];u&&(o=u)}else r=t;if(!n){var l=!1,c=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(e.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&e.splice(c,0,'The provided timing value "'+t+'" is invalid.')}return{duration:r,delay:i,easing:o}}(t,e,n)}function qv(t,e){return void 0===e&&(e={}),Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function Wv(t,e,n){if(void 0===n&&(n={}),e)for(var r in t)n[r]=t[r];else qv(t,n);return n}function Gv(t,e,n){return n?e+":"+n+";":""}function $v(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}var i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'+t+'" is not supported'),e;var o=i[1],s=i[2],a=i[3];e.push(cb(o,a)),"<"!=s[0]||o==ab&&a==ab||e.push(cb(a,o))}(t,i,r)}):i.push(n),i),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:yb(t.options)}},t.prototype.visitSequence=function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return ob(n,t,e)}),options:yb(t.options)}},t.prototype.visitGroup=function(t,e){var n=this,r=e.currentTime,i=0,o=t.steps.map(function(t){e.currentTime=r;var o=ob(n,t,e);return i=Math.max(i,e.currentTime),o});return e.currentTime=i,{type:3,steps:o,options:yb(t.options)}},t.prototype.visitAnimate=function(t,e){var n,r=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return mb(Hv(t,e).duration,0,"");var r=t;if(r.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var i=mb(0,0,"");return i.dynamic=!0,i.strValue=r,i}return mb((n=n||Hv(r,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=r;var i=t.styles?t.styles:tp({});if(5==i.type)n=this.visitKeyframes(i,e);else{var o=t.styles,s=!1;if(!o){s=!0;var a={};r.easing&&(a.easing=r.easing),o=tp(a)}e.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,e);u.isEmptyStep=s,n=u}return e.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}},t.prototype.visitStyle=function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n},t.prototype._makeStyleAst=function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==Xf?n.push(t):e.errors.push("The provided style string value "+t+" is not allowed."):n.push(t)}):n.push(t.styles);var r=!1,i=null;return n.forEach(function(t){if(gb(t)){var e=t,n=e.easing;if(n&&(i=n,delete e.easing),!r)for(var o in e)if(e[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:t.offset,containsDynamicStyles:r,options:null}},t.prototype._validateStyleAst=function(t,e){var n=this,r=e.currentAnimateTimings,i=e.currentTime,o=e.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(r){if(n._driver.validateStyleProperty(r)){var s,a,u,l=e.collectedStyles[e.currentQuerySelector],c=l[r],h=!0;c&&(o!=i&&o>=c.startTime&&i<=c.endTime&&(e.errors.push('The CSS property "'+r+'" that exists between the times of "'+c.startTime+'ms" and "'+c.endTime+'ms" is also being animated in a parallel animation between the times of "'+o+'ms" and "'+i+'ms"'),h=!1),o=c.startTime),h&&(l[r]={startTime:o,endTime:i}),e.options&&(s=e.errors,a=e.options.params||{},(u=Xv(t[r])).length&&u.forEach(function(t){a.hasOwnProperty(t)||s.push("Unable to resolve the local animation param "+t+" in the given list of values")}))}else e.errors.push('The provided animation property "'+r+'" is not a supported CSS property for animations')})})},t.prototype.visitKeyframes=function(t,e){var n=this,r={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],s=!1,a=!1,u=0,l=t.steps.map(function(t){var r=n._makeStyleAst(t,e),l=null!=r.offset?r.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(gb(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(gb(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),a=a||c<0||c>1,s=s||c0&&i0?i==f?1:h*i:o[i],a=s*g;e.currentTime=p+d.delay+a,d.duration=a,n._validateStyleAst(t,e),t.offset=s,r.styles.push(t)}),r},t.prototype.visitReference=function(t,e){return{type:8,animation:ob(this,Yv(t.animation),e),options:yb(t.options)}},t.prototype.visitAnimateChild=function(t,e){return e.depCount++,{type:9,options:yb(t.options)}},t.prototype.visitAnimateRef=function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:yb(t.options)}},t.prototype.visitQuery=function(t,e){var n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;var i=h(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return":self"==t});return e&&(t=t.replace(hb,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),o=i[0],s=i[1];e.currentQuerySelector=n.length?n+" "+o:o,Sv(e.collectedStyles,e.currentQuerySelector,{});var a=ob(this,Yv(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:yb(t.options)}},t.prototype.visitStagger=function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Hv(t.timings,e.errors,!0);return{type:12,animation:ob(this,Yv(t.animation),e),timings:n,options:null}},t}(),db=function(){return function(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}();function gb(t){return!Array.isArray(t)&&"object"==typeof t}function yb(t){var e;return t?(t=qv(t)).params&&(t.params=(e=t.params)?qv(e):null):t={},t}function mb(t,e,n){return{duration:t,delay:e,easing:n}}function vb(t,e,n,r,i,o,s,a){return void 0===s&&(s=null),void 0===a&&(a=!1),{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var bb=function(){function t(){this._map=new Map}return t.prototype.consume=function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e},t.prototype.append=function(t,e){var n=this._map.get(t);n||this._map.set(t,n=[]),n.push.apply(n,f(e))},t.prototype.has=function(t){return this._map.has(t)},t.prototype.clear=function(){this._map.clear()},t}(),wb=new RegExp(":enter","g"),_b=new RegExp(":leave","g");function xb(t,e,n,r,i,o,s,a,u,l){return void 0===o&&(o={}),void 0===s&&(s={}),void 0===l&&(l=[]),(new Sb).buildKeyframes(t,e,n,r,i,o,s,a,u,l)}var Sb=function(){function t(){}return t.prototype.buildKeyframes=function(t,e,n,r,i,o,s,a,u,l){void 0===l&&(l=[]),u=u||new bb;var c=new Eb(t,e,u,r,i,l,[]);c.options=a,c.currentTimeline.setStyles([o],null,c.errors,a),ob(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(s).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([s],null,c.errors,a)}return h.length?h.map(function(t){return t.buildKeyframes()}):[vb(e,[],[],[],0,0,"",!1)]},t.prototype.visitTrigger=function(t,e){},t.prototype.visitState=function(t,e){},t.prototype.visitTransition=function(t,e){},t.prototype.visitAnimateChild=function(t,e){var n=e.subInstructions.consume(e.element);if(n){var r=e.createSubContext(t.options),i=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t},t.prototype.visitAnimateRef=function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t},t.prototype._visitSubInstructions=function(t,e,n){var r=e.currentTimeline.currentTime,i=null!=n.duration?Bv(n.duration):null,o=null!=n.delay?Bv(n.delay):null;return 0!==i&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,i,o);r=Math.max(r,n.duration+n.delay)}),r},t.prototype.visitReference=function(t,e){e.updateOptions(t.options,!0),ob(this,t.animation,e),e.previousNode=t},t.prototype.visitSequence=function(t,e){var n=this,r=e.subContextCount,i=e,o=t.options;if(o&&(o.params||o.delay)&&((i=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Cb);var s=Bv(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(function(t){return ob(n,t,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),e.previousNode=t},t.prototype.visitGroup=function(t,e){var n=this,r=[],i=e.currentTimeline.currentTime,o=t.options&&t.options.delay?Bv(t.options.delay):0;t.steps.forEach(function(s){var a=e.createSubContext(t.options);o&&a.delayNextStep(o),ob(n,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(i),e.previousNode=t},t.prototype._visitTiming=function(t,e){if(t.dynamic){var n=t.strValue;return Hv(e.params?Zv(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}},t.prototype.visitAnimate=function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());var i=t.style;5==i.type?this.visitKeyframes(i,e):(e.incrementTime(n.duration),this.visitStyle(i,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t},t.prototype.visitStyle=function(t,e){var n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(i):n.setStyles(t.styles,i,e.errors,e.options),e.previousNode=t},t.prototype.visitKeyframes=function(t,e){var n=e.currentAnimateTimings,r=e.currentTimeline.duration,i=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*i),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(r+i),e.previousNode=t},t.prototype.visitQuery=function(t,e){var n=this,r=e.currentTimeline.currentTime,i=t.options||{},o=i.delay?Bv(i.delay):0;o&&(6===e.previousNode.type||0==r&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Cb);var s=r,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=a.length;var u=null;a.forEach(function(r,i){e.currentQueryIndex=i;var a=e.createSubContext(t.options,r);o&&a.delayNextStep(o),r===e.element&&(u=a.currentTimeline),ob(n,t.animation,a),a.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,a.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),u&&(e.currentTimeline.mergeTimelineCollectedStyles(u),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t},t.prototype.visitStagger=function(t,e){var n=e.parentContext,r=e.currentTimeline,i=t.timings,o=Math.abs(i.duration),s=o*(e.currentQueryTotal-1),a=o*e.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":a=s-a;break;case"full":a=n.currentStaggerTime}var u=e.currentTimeline;a&&u.delayNextStep(a);var l=u.currentTime;ob(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)},t}(),Cb={},Eb=function(){function t(t,e,n,r,i,o,s,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=i,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Cb,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new kb(this._driver,e,0),s.push(this.currentTimeline)}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.updateOptions=function(t,e){var n=this;if(t){var r=t,i=this.options;null!=r.duration&&(i.duration=Bv(r.duration)),null!=r.delay&&(i.delay=Bv(r.delay));var o=r.params;if(o){var s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(function(t){e&&s.hasOwnProperty(t)||(s[t]=Zv(o[t],s,n.errors))})}}},t.prototype._copyOptions=function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t},t.prototype.createSubContext=function(e,n,r){void 0===e&&(e=null);var i=n||this.element,o=new t(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o},t.prototype.transformIntoNewTimeline=function(t){return this.previousNode=Cb,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline},t.prototype.appendInstructionToTimeline=function(t,e,n){var r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},i=new Tb(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(i),r},t.prototype.incrementTime=function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)},t.prototype.delayNextStep=function(t){t>0&&this.currentTimeline.delayNextStep(t)},t.prototype.invokeQuery=function(t,e,n,r,i,o){var s=[];if(r&&s.push(this.element),t.length>0){t=(t=t.replace(wb,"."+this._enterClassName)).replace(_b,"."+this._leaveClassName);var a=this._driver.query(this.element,t,1!=n);0!==n&&(a=n<0?a.slice(a.length+n,a.length):a.slice(0,n)),s.push.apply(s,f(a))}return i||0!=s.length||o.push('`query("'+e+'")` returned zero elements. (Use `query("'+e+'", { optional: true })` if you wish to allow this.)'),s},t}(),kb=function(){function t(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}return t.prototype.containsAnimation=function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}},t.prototype.getCurrentStyleProperties=function(){return Object.keys(this._currentKeyframe)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.startTime+this.duration},enumerable:!0,configurable:!0}),t.prototype.delayNextStep=function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t},t.prototype.fork=function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)},t.prototype._loadKeyframe=function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))},t.prototype.forwardFrame=function(){this.duration+=1,this._loadKeyframe()},t.prototype.forwardTime=function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()},t.prototype._updateStyle=function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}},t.prototype.allowOnlyTimelineStyles=function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe},t.prototype.applyEmptyStep=function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||Xf,e._currentKeyframe[t]=Xf}),this._currentEmptyStepKeyframe=this._currentKeyframe},t.prototype.setStyles=function(t,e,n,r){var i=this;e&&(this._previousKeyframe.easing=e);var o=r&&r.params||{},s=function(t,e){var n,r={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){r[t]=Xf}):Wv(t,!1,r)}),r}(t,this._globalTimelineStyles);Object.keys(s).forEach(function(t){var e=Zv(s[t],o,n);i._pendingStyles[t]=e,i._localTimelineStyles.hasOwnProperty(t)||(i._backFill[t]=i._globalTimelineStyles.hasOwnProperty(t)?i._globalTimelineStyles[t]:Xf),i._updateStyle(t,e)})},t.prototype.applyStylesToKeyframe=function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))},t.prototype.snapshotCurrentStyles=function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})},t.prototype.getFinalKeyframe=function(){return this._keyframes.get(this.duration)},Object.defineProperty(t.prototype,"properties",{get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t},enumerable:!0,configurable:!0}),t.prototype.mergeTimelineCollectedStyles=function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var r=e._styleSummary[n],i=t._styleSummary[n];(!r||i.time>r.time)&&e._updateStyle(n,i.value)})},t.prototype.buildKeyframes=function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,s){var a=Wv(o,!0);Object.keys(a).forEach(function(t){var r=a[t];r==ip?e.add(t):r==Xf&&n.add(t)}),r||(a.offset=s/t.duration),i.push(a)});var o=e.size?tb(e.values()):[],s=n.size?tb(n.values()):[];if(r){var a=i[0],u=qv(a);a.offset=0,u.offset=1,i=[a,u]}return vb(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)},t}(),Tb=function(t){function e(e,n,r,i,o,s,a){void 0===a&&(a=!1);var u=t.call(this,e,n,s.delay)||this;return u.element=n,u.keyframes=r,u.preStyleProps=i,u.postStyleProps=o,u._stretchStartingKeyframe=a,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return i(e,t),e.prototype.containsAnimation=function(){return this.keyframes.length>1},e.prototype.buildKeyframes=function(){var t=this.keyframes,e=this.timings,n=e.delay,r=e.duration,i=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],s=r+n,a=n/s,u=Wv(t[0],!1);u.offset=0,o.push(u);var l=Wv(t[0],!1);l.offset=Ob(a),o.push(l);for(var c=t.length-1,h=1;h<=c;h++){var f=Wv(t[h],!1);f.offset=Ob((n+f.offset*r)/s),o.push(f)}r=s,n=0,i="",t=o}return vb(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)},e}(kb);function Ob(t,e){void 0===e&&(e=3);var n=Math.pow(10,e-1);return Math.round(t*n)/n}var Ib=function(){return function(){}}(),Pb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.normalizePropertyName=function(t,e){return nb(t)},e.prototype.normalizeStyleValue=function(t,e,n,r){var i="",o=n.toString().trim();if(Ab[e]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var s=n.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push("Please provide a CSS unit value for "+t+":"+n)}return o+i},e}(Ib),Ab=Rb("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","));function Rb(t){var e={};return t.forEach(function(t){return e[t]=!0}),e}function Nb(t,e,n,r,i,o,s,a,u,l,c,h,f){return{type:0,element:t,triggerName:e,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:f}}var jb={},Db=function(){function t(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}return t.prototype.match=function(t,e,n,r){return function(t,e,n,r,i){return t.some(function(t){return t(e,n,r,i)})}(this.ast.matchers,t,e,n,r)},t.prototype.buildStyles=function(t,e,n){var r=this._stateStyles["*"],i=this._stateStyles[t],o=r?r.buildStyles(e,n):{};return i?i.buildStyles(e,n):o},t.prototype.build=function(t,e,n,r,i,s,a,u,l,c){var h=[],f=this.ast.options&&this.ast.options.params||jb,p=this.buildStyles(n,a&&a.params||jb,h),d=u&&u.params||jb,g=this.buildStyles(r,d,h),y=new Set,m=new Map,v=new Map,b="void"===r,w={params:o({},f,d)},_=c?[]:xb(t,e,this.ast.animation,i,s,p,g,w,l,h),x=0;if(_.forEach(function(t){x=Math.max(t.duration+t.delay,x)}),h.length)return Nb(e,this._triggerName,n,r,b,p,g,[],[],m,v,x,h);_.forEach(function(t){var n=t.element,r=Sv(m,n,{});t.preStyleProps.forEach(function(t){return r[t]=!0});var i=Sv(v,n,{});t.postStyleProps.forEach(function(t){return i[t]=!0}),n!==e&&y.add(n)});var S=tb(y.values());return Nb(e,this._triggerName,n,r,b,p,g,_,S,m,v,x)},t}(),Mb=function(){function t(t,e){this.styles=t,this.defaultParams=e}return t.prototype.buildStyles=function(t,e){var n={},r=qv(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var i=t;Object.keys(i).forEach(function(t){var o=i[t];o.length>1&&(o=Zv(o,r,e)),n[t]=o})}}),n},t}(),Lb=function(){function t(t,e){var n=this;this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(function(t){n.states[t.name]=new Mb(t.style,t.options&&t.options.params||{})}),Ub(this.states,"true","1"),Ub(this.states,"false","0"),e.transitions.forEach(function(e){n.transitionFactories.push(new Db(t,e,n.states))}),this.fallbackTransition=new Db(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return Object.defineProperty(t.prototype,"containsQueries",{get:function(){return this.ast.queryCount>0},enumerable:!0,configurable:!0}),t.prototype.matchTransition=function(t,e,n,r){return this.transitionFactories.find(function(i){return i.match(t,e,n,r)})||null},t.prototype.matchStyles=function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)},t}();function Ub(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Fb=new bb,Vb=function(){function t(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}return t.prototype.register=function(t,e){var n=[],r=fb(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r},t.prototype._buildPlayer=function(t,e,n){var r=t.element,i=bv(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,i,t.duration,t.delay,t.easing,[],!0)},t.prototype.create=function(t,e,n){var r=this;void 0===n&&(n={});var i,o=[],s=this._animations[t],a=new Map;if(s?(i=xb(this._driver,e,s,"ng-enter","ng-leave",{},{},n,Fb,o)).forEach(function(t){var e=Sv(a,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),i=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));a.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=r._driver.computeStyle(e,n,Xf)})});var u=vv(i.map(function(t){var e=a.get(t.element);return r._buildPlayer(t,{},e)}));return this._playersById[t]=u,u.onDestroy(function(){return r.destroy(t)}),this.players.push(u),u},t.prototype.destroy=function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)},t.prototype._getPlayer=function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e},t.prototype.listen=function(t,e,n,r){var i=xv(e,"","","");return wv(this._getPlayer(t),n,i,r),function(){}},t.prototype.command=function(t,e,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(t);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,r[0]||{});else this.register(t,r[0])},t}(),Bb=[],zb={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hb={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},qb="__ng_removed",Wb=function(){function t(t,e){void 0===e&&(e=""),this.namespaceId=e;var n=t&&t.hasOwnProperty("value");if(this.value=function(t){return null!=t?t:null}(n?t.value:t),n){var r=qv(t);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}return Object.defineProperty(t.prototype,"params",{get:function(){return this.options.params},enumerable:!0,configurable:!0}),t.prototype.absorbOptions=function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}},t}(),Gb=new Wb("void"),$b=function(){function t(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,ew(e,this._hostClassName)}return t.prototype.listen=function(t,e,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'+n+'" because the animation trigger "'+e+"\" doesn't exist!");if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'+e+'" because the provided event is undefined!');if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'+n+'" for the animation trigger "'+e+'" is not supported!');var s=Sv(this._elementListeners,t,[]),a={name:e,phase:n,callback:r};s.push(a);var u=Sv(this._engine.statesByElement,t,{});return u.hasOwnProperty(e)||(ew(t,"ng-trigger"),ew(t,"ng-trigger-"+e),u[e]=Gb),function(){o._engine.afterFlush(function(){var t=s.indexOf(a);t>=0&&s.splice(t,1),o._triggers[e]||delete u[e]})}},t.prototype.register=function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)},t.prototype._getTrigger=function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'+t+'" has not been registered!');return e},t.prototype.trigger=function(t,e,n,r){var i=this;void 0===r&&(r=!0);var o=this._getTrigger(e),s=new Kb(this.id,e,t),a=this._engine.statesByElement.get(t);a||(ew(t,"ng-trigger"),ew(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,a={}));var u=a[e],l=new Wb(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),a[e]=l,u||(u=Gb),"void"===l.value||u.value!==l.value){var c=Sv(this._engine.playersByElement,t,[]);c.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var h=o.matchTransition(u.value,l.value,t,l.params),f=!1;if(!h){if(!r)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:u,toState:l,player:s,isFallbackTransition:f}),f||(ew(t,"ng-animate-queued"),s.onStart(function(){nw(t,"ng-animate-queued")})),s.onDone(function(){var e=i.players.indexOf(s);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(s);r>=0&&n.splice(r,1)}}),this.players.push(s),c.push(s),s}if(!function(t,e){var n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(var i=0;i=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,e)){this._namespaceList.splice(i+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t},t.prototype.register=function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n},t.prototype.registerTrigger=function(t,e,n){var r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++},t.prototype.destroy=function(t,e){var n=this;if(t){var r=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(r);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(e)})}},t.prototype._fetchNamespace=function(t){return this._namespaceLookup[t]},t.prototype.fetchNamespacesByElement=function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(t){var s=this._fetchNamespace(t);s&&s.insertNode(e,n)}r&&this.collectEnterElement(e)}},t.prototype.collectEnterElement=function(t){this.collectedEnterElements.push(t)},t.prototype.markElementAsDisabled=function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),ew(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),nw(t,"ng-animate-disabled"))},t.prototype.removeNode=function(t,e,n){if(Yb(e)){var r=t?this._fetchNamespace(t):null;r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n)}else this._onRemovalComplete(e,n)},t.prototype.markElementAsRemoved=function(t,e,n,r){this.collectedLeaveElements.push(e),e[qb]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}},t.prototype.listen=function(t,e,n,r,i){return Yb(e)?this._fetchNamespace(t).listen(e,n,r,i):function(){}},t.prototype._buildInstruction=function(t,e,n,r,i){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,i)},t.prototype.destroyInnerAnimations=function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})},t.prototype.destroyActiveAnimationsForElement=function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})},t.prototype.finishActiveQueriedAnimationOnElement=function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})},t.prototype.whenRenderingDone=function(){var t=this;return new Promise(function(e){if(t.players.length)return vv(t.players).onDone(function(){return e()});e()})},t.prototype.processLeaveNode=function(t){var e=this,n=t[qb];if(n&&n.setForRemoval){if(t[qb]=zb,n.namespaceId){this.destroyInnerAnimations(t);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(function(n){e.markElementAsDisabled(t,!1)})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=-1);var n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r=0;k--)this._namespaceList[k].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(C.push(e),n.collectedEnterElements.length){var s=o[qb];if(s&&s.setForMove)return void e.destroy()}var h=!p||!n.driver.containsElement(p,o),f=x.get(o),d=y.get(o),g=n._buildInstruction(t,r,d,f,h);if(g.errors&&g.errors.length)E.push(g);else{if(h)return e.onStart(function(){return Kv(o,g.fromStyles)}),e.onDestroy(function(){return Jv(o,g.toStyles)}),void i.push(e);if(t.isFallbackTransition)return e.onStart(function(){return Kv(o,g.fromStyles)}),e.onDestroy(function(){return Jv(o,g.toStyles)}),void i.push(e);g.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),r.append(o,g.timelines),a.push({instruction:g,player:e,element:o}),g.queriedElements.forEach(function(t){return Sv(u,t,[]).push(e)}),g.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var r=l.get(e);r||l.set(e,r=new Set),n.forEach(function(t){return r.add(t)})}}),g.postStyleProps.forEach(function(t,e){var n=Object.keys(t),r=c.get(e);r||c.set(e,r=new Set),n.forEach(function(t){return r.add(t)})})}});if(E.length){var T=[];E.forEach(function(t){T.push("@"+t.triggerName+" has failed due to:\n"),t.errors.forEach(function(t){return T.push("- "+t+"\n")})}),C.forEach(function(t){return t.destroy()}),this.reportError(T)}var O=new Map,I=new Map;a.forEach(function(t){var e=t.element;r.has(e)&&(I.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,O))}),i.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Sv(O,e,[]).push(t),t.destroy()})});var P=v.filter(function(t){return iw(t,l,c)}),A=new Map;Xb(A,this.driver,w,c,Xf).forEach(function(t){iw(t,l,c)&&P.push(t)});var R=new Map;g.forEach(function(t,e){Xb(R,n.driver,new Set(t),l,ip)}),P.forEach(function(t){var e=A.get(t),n=R.get(t);A.set(t,o({},e,n))});var N=[],j=[],D={};a.forEach(function(t){var e=t.element,o=t.player,a=t.instruction;if(r.has(e)){if(h.has(e))return o.onDestroy(function(){return Jv(e,a.toStyles)}),o.disabled=!0,o.overrideTotalTime(a.totalTime),void i.push(o);var u=D;if(I.size>1){for(var l=e,c=[];l=l.parentNode;){var f=I.get(l);if(f){u=f;break}c.push(l)}c.forEach(function(t){return I.set(t,u)})}var p=n._buildAnimation(o.namespaceId,a,O,s,R,A);if(o.setRealPlayer(p),u===D)N.push(o);else{var d=n.playersByElement.get(u);d&&d.length&&(o.parentPlayer=vv(d)),i.push(o)}}else Kv(e,a.fromStyles),o.onDestroy(function(){return Jv(e,a.toStyles)}),j.push(o),h.has(e)&&i.push(o)}),j.forEach(function(t){var e=s.get(t.element);if(e&&e.length){var n=vv(e);t.setRealPlayer(n)}}),i.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var M=0;M0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new np(t.duration,t.delay)},t}(),Kb=function(){function t(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new np,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return t.prototype.setRealPlayer=function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return wv(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)},t.prototype.getRealPlayer=function(){return this._player},t.prototype.overrideTotalTime=function(t){this.totalTime=t},t.prototype.syncPlayerEvents=function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})},t.prototype._queueEvent=function(t,e){Sv(this._queuedCallbacks,t,[]).push(e)},t.prototype.onDone=function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)},t.prototype.onStart=function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)},t.prototype.onDestroy=function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)},t.prototype.init=function(){this._player.init()},t.prototype.hasStarted=function(){return!this.queued&&this._player.hasStarted()},t.prototype.play=function(){!this.queued&&this._player.play()},t.prototype.pause=function(){!this.queued&&this._player.pause()},t.prototype.restart=function(){!this.queued&&this._player.restart()},t.prototype.finish=function(){this._player.finish()},t.prototype.destroy=function(){this.destroyed=!0,this._player.destroy()},t.prototype.reset=function(){!this.queued&&this._player.reset()},t.prototype.setPosition=function(t){this.queued||this._player.setPosition(t)},t.prototype.getPosition=function(){return this.queued?0:this._player.getPosition()},t.prototype.triggerCallback=function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)},t}();function Yb(t){return t&&1===t.nodeType}function Qb(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Xb(t,e,n,r,i){var o=[];n.forEach(function(t){return o.push(Qb(t))});var s=[];r.forEach(function(n,r){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(r,t,i);n&&0!=n.length||(r[qb]=Hb,s.push(r))}),t.set(r,o)});var a=0;return n.forEach(function(t){return Qb(t,o[a++])}),s}function Zb(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var r=new Set(e),i=new Map;return e.forEach(function(t){var e=function t(e){if(!e)return 1;var o=i.get(e);if(o)return o;var s=e.parentNode;return o=n.has(s)?s:r.has(s)?1:t(s),i.set(e,o),o}(t);1!==e&&n.get(e).push(t)}),n}var tw="$$classes";function ew(t,e){if(t.classList)t.classList.add(e);else{var n=t[tw];n||(n=t[tw]={}),n[e]=!0}}function nw(t,e){if(t.classList)t.classList.remove(e);else{var n=t[tw];n&&delete n[e]}}function rw(t,e,n){vv(n).onDone(function(){return t.processLeaveNode(e)})}function iw(t,e,n){var r=n.get(t);if(!r)return!1;var i=e.get(t);return i?r.forEach(function(t){return i.add(t)}):e.set(t,r),n.delete(t),!0}var ow=function(){function t(t,e,n){var r=this;this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new Jb(t,e,n),this._timelineEngine=new Vb(t,e,n),this._transitionEngine.onRemovalComplete=function(t,e){return r.onRemovalComplete(t,e)}}return t.prototype.registerTrigger=function(t,e,n,r,i){var o=t+"-"+r,s=this._triggerCache[o];if(!s){var a=[],u=fb(this._driver,i,a);if(a.length)throw new Error('The animation trigger "'+r+'" has failed to build due to the following errors:\n - '+a.join("\n - "));s=function(t,e){return new Lb(t,e)}(r,u),this._triggerCache[o]=s}this._transitionEngine.registerTrigger(e,r,s)},t.prototype.register=function(t,e){this._transitionEngine.register(t,e)},t.prototype.destroy=function(t,e){this._transitionEngine.destroy(t,e)},t.prototype.onInsert=function(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)},t.prototype.onRemove=function(t,e,n){this._transitionEngine.removeNode(t,e,n)},t.prototype.disableAnimations=function(t,e){this._transitionEngine.markElementAsDisabled(t,e)},t.prototype.process=function(t,e,n,r){if("@"==n.charAt(0)){var i=h(Cv(n),2);this._timelineEngine.command(i[0],e,i[1],r)}else this._transitionEngine.trigger(t,e,n,r)},t.prototype.listen=function(t,e,n,r,i){if("@"==n.charAt(0)){var o=h(Cv(n),2);return this._timelineEngine.listen(o[0],e,o[1],i)}return this._transitionEngine.listen(t,e,n,r,i)},t.prototype.flush=function(t){void 0===t&&(t=-1),this._transitionEngine.flush(t)},Object.defineProperty(t.prototype,"players",{get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)},enumerable:!0,configurable:!0}),t.prototype.whenRenderingDone=function(){return this._transitionEngine.whenRenderingDone()},t}(),sw="animation",aw="animationend",uw=function(){function t(t,e,n,r,i,o,s){var a=this;this._element=t,this._name=e,this._duration=n,this._delay=r,this._easing=i,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return a._handleCallback(t)}}return t.prototype.apply=function(){var t,e,n;e=this._duration+"ms "+this._easing+" "+this._delay+"ms 1 normal "+this._fillMode+" "+this._name,(n=dw(t=this._element,"").trim()).length&&(function(t,e){for(var n=0;n=this._delay&&n>=this._duration&&this.finish()},t.prototype.finish=function(){this._finished||(this._finished=!0,this._onDoneFn(),fw(this._element,this._eventFn,!0))},t.prototype.destroy=function(){var t,e,n,r;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(r=hw(n=dw(t=this._element,"").split(","),e))>=0&&(n.splice(r,1),pw(t,"",n.join(","))))},t}();function lw(t,e,n){pw(t,"PlayState",n,cw(t,e))}function cw(t,e){var n=dw(t,"");return n.indexOf(",")>0?hw(n.split(","),e):hw([n],e)}function hw(t,e){for(var n=0;n=0)return n;return-1}function fw(t,e,n){n?t.removeEventListener(aw,e):t.addEventListener(aw,e)}function pw(t,e,n,r){var i=sw+e;if(null!=r){var o=t.style[i];if(o.length){var s=o.split(",");s[r]=n,n=s.join(",")}}t.style[i]=n}function dw(t,e){return t.style[sw+e]}var gw="linear",yw=function(){function t(t,e,n,r,i,o,s){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=i,this._finalStyles=s,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||gw,this.totalTime=r+i,this._buildStyler()}return t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.destroy=function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype._flushDoneFns=function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]},t.prototype._flushStartFns=function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]},t.prototype.finish=function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._flushDoneFns())},t.prototype.setPosition=function(t){this._styler.setPosition(t)},t.prototype.getPosition=function(){return this._styler.getPosition()},t.prototype.hasStarted=function(){return this._state>=2},t.prototype.init=function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())},t.prototype.play=function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2),this._styler.resume()},t.prototype.pause=function(){this.init(),this._styler.pause()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.reset=function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()},t.prototype._buildStyler=function(){var t=this;this._styler=new uw(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t.prototype.beforeDestroy=function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(e[r]=n?t._finalStyles[r]:sb(t.element,r))})}this.currentSnapshot=e},t}(),mw=function(t){function e(e,n){var r=t.call(this)||this;return r.element=e,r._startingStyles={},r.__initialized=!1,r._styles=Lv(n),r}return i(e,t),e.prototype.init=function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),t.prototype.init.call(this))},e.prototype.play=function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),t.prototype.play.call(this))},e.prototype.destroy=function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,t.prototype.destroy.call(this))},e}(np),vw=function(){function t(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.buildKeyframeElement=function(t,e,n){n=n.map(function(t){return Lv(t)});var r="@keyframes "+e+" {\n",i="";n.forEach(function(t){i=" ";var e=parseFloat(t.offset);r+=""+i+100*e+"% {\n",i+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=i+"animation-timing-function: "+n+";\n"));default:return void(r+=""+i+e+": "+n+";\n")}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.innerHTML=r,o},t.prototype.animate=function(t,e,n,r,i,o,s){void 0===o&&(o=[]),s&&this._notifyFaultyScrubber();var a=o.filter(function(t){return t instanceof yw}),u={};rb(n,r)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})});var l=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=ib(t,e,u));if(0==n)return new mw(t,l);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,c,e);document.querySelector("head").appendChild(h);var f=new yw(t,e,c,n,r,i,l);return f.onDestroy(function(){var t;(t=h).parentNode.removeChild(t)}),f},t.prototype._notifyFaultyScrubber=function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)},t}(),bw=function(){function t(t,e,n){this.element=t,this.keyframes=e,this.options=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}return t.prototype._onFinish=function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])},t.prototype.init=function(){this._buildPlayer(),this._preparePlayerBeforeStart()},t.prototype._buildPlayer=function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}},t.prototype._preparePlayerBeforeStart=function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()},t.prototype._triggerWebAnimation=function(t,e,n){return t.animate(e,n)},t.prototype.onStart=function(t){this._onStartFns.push(t)},t.prototype.onDone=function(t){this._onDoneFns.push(t)},t.prototype.onDestroy=function(t){this._onDestroyFns.push(t)},t.prototype.play=function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0),this.domPlayer.play()},t.prototype.pause=function(){this.init(),this.domPlayer.pause()},t.prototype.finish=function(){this.init(),this._onFinish(),this.domPlayer.finish()},t.prototype.reset=function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1},t.prototype._resetDomPlayerState=function(){this.domPlayer&&this.domPlayer.cancel()},t.prototype.restart=function(){this.reset(),this.play()},t.prototype.hasStarted=function(){return this._started},t.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])},t.prototype.setPosition=function(t){this.domPlayer.currentTime=t*this.time},t.prototype.getPosition=function(){return this.domPlayer.currentTime/this.time},Object.defineProperty(t.prototype,"totalTime",{get:function(){return this._delay+this._duration},enumerable:!0,configurable:!0}),t.prototype.beforeDestroy=function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:sb(t.element,n))}),this.currentSnapshot=e},t.prototype.triggerCallback=function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0},t}(),ww=function(){function t(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(_w().toString()),this._cssKeyframesDriver=new vw}return t.prototype.validateStyleProperty=function(t){return Nv(t)},t.prototype.matchesElement=function(t,e){return jv(t,e)},t.prototype.containsElement=function(t,e){return Dv(t,e)},t.prototype.query=function(t,e,n){return Mv(t,e,n)},t.prototype.computeStyle=function(t,e,n){return window.getComputedStyle(t)[e]},t.prototype.overrideWebAnimationsSupport=function(t){this._isNativeImpl=t},t.prototype.animate=function(t,e,n,r,i,o,s){if(void 0===o&&(o=[]),!s&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,i,o);var a={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(a.easing=i);var u={},l=o.filter(function(t){return t instanceof bw});return rb(n,r)&&l.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return u[t]=e[t]})}),e=ib(t,e=e.map(function(t){return Wv(t,!1)}),u),new bw(t,e,a)},t}();function _w(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var xw=function(t){function e(e,n){var r=t.call(this)||this;return r._nextAnimationId=0,r._renderer=e.createRenderer(n.body,{id:"0",encapsulation:pe.None,styles:[],data:{animation:[]}}),r}return i(e,t),e.prototype.build=function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?Zf(t):t;return Ew(this._renderer,null,e,"register",[n]),new Sw(e,this._renderer)},e}(Yf),Sw=function(t){function e(e,n){var r=t.call(this)||this;return r._id=e,r._renderer=n,r}return i(e,t),e.prototype.create=function(t,e){return new Cw(this._id,t,e||{},this._renderer)},e}(Qf),Cw=function(){function t(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}return t.prototype._listen=function(t,e){return this._renderer.listen(this.element,"@@"+this.id+":"+t,e)},t.prototype._command=function(t){for(var e=[],n=1;n=0&&t>>>>>> master "requires": { "buffer-equal": "^1.0.0" } @@ -1402,6 +1398,7 @@ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, + "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" @@ -1462,8 +1459,6 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, -<<<<<<< HEAD -======= "array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", @@ -1495,14 +1490,11 @@ } } }, ->>>>>>> master "array-slice": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" }, -<<<<<<< HEAD -======= "array-sort": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", @@ -1520,7 +1512,6 @@ } } }, ->>>>>>> master "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -2006,21 +1997,6 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, -<<<<<<< HEAD - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", -======= "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", @@ -2030,7 +2006,6 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", ->>>>>>> master "requires": { "lodash": "^4.17.11" } @@ -2233,23 +2208,10 @@ "to-fast-properties": "^1.0.3" } }, -<<<<<<< HEAD - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", -======= "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", ->>>>>>> master "dev": true }, "bach": { @@ -2279,12 +2241,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, -<<<<<<< HEAD - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" -======= "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -2340,7 +2296,6 @@ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", "dev": true ->>>>>>> master }, "base64-js": { "version": "1.3.0", @@ -2389,17 +2344,6 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, -<<<<<<< HEAD - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", -======= "binary-extensions": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", @@ -2417,7 +2361,6 @@ "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "optional": true, ->>>>>>> master "requires": { "inherits": "~2.0.0" } @@ -2493,84 +2436,24 @@ "multicast-dns-service-types": "^1.1.0" } }, -<<<<<<< HEAD - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, - "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", -======= "boom": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", ->>>>>>> master "dev": true, "requires": { "hoek": "2.x.x" } }, -<<<<<<< HEAD - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", - "dev": true, -======= "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", ->>>>>>> master "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, -<<<<<<< HEAD - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" -======= "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", @@ -2597,7 +2480,6 @@ } } } ->>>>>>> master }, "brorand": { "version": "1.1.0", @@ -2609,23 +2491,10 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, -<<<<<<< HEAD - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", -======= "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", ->>>>>>> master "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -2878,48 +2747,10 @@ } } }, -<<<<<<< HEAD - "coveralls": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.3.tgz", - "integrity": "sha512-viNfeGlda2zJr8Gj1zqXpDMRjw9uM54p7wzZdvLRyOgnAfCe974Dq4veZkjJdxQXbmdppu6flEajFYseHYaUhg==", - "dev": true, - "requires": { - "growl": "~> 1.10.0", - "js-yaml": "^3.11.0", - "lcov-parse": "^0.0.10", - "log-driver": "^1.2.7", - "minimist": "^1.2.0", - "request": "^2.86.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", -======= "chokidar": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", ->>>>>>> master "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.0", @@ -2951,26 +2782,10 @@ "tslib": "^1.9.0" } }, -<<<<<<< HEAD - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.x.x" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", -======= "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", ->>>>>>> master "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" @@ -3020,24 +2835,11 @@ } } }, -<<<<<<< HEAD - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", -======= "cli": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", "dev": true, ->>>>>>> master "requires": { "exit": "0.1.2", "glob": "^7.1.1" @@ -3080,26 +2882,10 @@ "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" }, -<<<<<<< HEAD - "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", -======= "cloneable-readable": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", ->>>>>>> master "requires": { "inherits": "^2.0.1", "process-nextick-args": "^2.0.0", @@ -3116,22 +2902,10 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, -<<<<<<< HEAD - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", -======= "codelyzer": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", ->>>>>>> master "dev": true, "requires": { "app-root-path": "^2.0.1", @@ -3325,61 +3099,6 @@ } } }, -<<<<<<< HEAD - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - }, - "dependencies": { - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", -======= "connect-history-api-fallback": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", @@ -3390,7 +3109,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", ->>>>>>> master "dev": true, "requires": { "date-now": "^0.1.4" @@ -3400,7 +3118,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "constants-browserify": { "version": "1.0.0", @@ -3561,30 +3280,10 @@ "sha.js": "^2.4.0" } }, -<<<<<<< HEAD - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", - "dev": true - }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, -======= "create-hmac": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", ->>>>>>> master "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -3594,19 +3293,12 @@ "sha.js": "^2.4.8" } }, -<<<<<<< HEAD - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", -======= "cross-spawn": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "dev": true, "optional": true, ->>>>>>> master "requires": { "lru-cache": "^4.0.1", "which": "^1.2.9" @@ -3661,61 +3353,10 @@ "regexpu-core": "^1.0.0" } }, -<<<<<<< HEAD - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", -======= "cssauron": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", ->>>>>>> master "dev": true, "requires": { "through": "X.X.X" @@ -3741,18 +3382,11 @@ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", "dev": true }, -<<<<<<< HEAD - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" -======= "cyclist": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true ->>>>>>> master }, "d": { "version": "1.0.0", @@ -3762,18 +3396,6 @@ "es5-ext": "^0.10.9" } }, -<<<<<<< HEAD - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", -======= "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -3786,7 +3408,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.0.0.tgz", "integrity": "sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA==", ->>>>>>> master "dev": true }, "date-now": { @@ -3971,7 +3592,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true + "dev": true, + "optional": true }, "denodeify": { "version": "1.2.1", @@ -3979,22 +3601,10 @@ "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", "dev": true }, -<<<<<<< HEAD - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fastparse": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", - "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=", -======= "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", ->>>>>>> master "dev": true }, "des.js": { @@ -4098,35 +3708,11 @@ "void-elements": "^2.0.0" } }, -<<<<<<< HEAD - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", -======= "dom-serializer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", "dev": true, ->>>>>>> master "requires": { "domelementtype": "^1.3.0", "entities": "^1.1.1" @@ -5205,7 +4791,8 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "optional": true }, "aproba": { "version": "1.2.0", @@ -5226,12 +4813,14 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5246,17 +4835,20 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5373,7 +4965,8 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "optional": true }, "ini": { "version": "1.3.5", @@ -5385,6 +4978,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5399,6 +4993,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5406,12 +5001,14 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "optional": true }, "minipass": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5430,6 +5027,7 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5494,132 +5092,6 @@ "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" } -<<<<<<< HEAD - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "dev": true, - "requires": { - "null-check": "^1.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, -======= }, "npmlog": { "version": "4.1.2", @@ -5636,19 +5108,20 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "optional": true }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", ->>>>>>> master "optional": true }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "optional": true, "requires": { "wrappy": "1" } @@ -5734,7 +5207,8 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5770,6 +5244,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5789,6 +5264,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5832,12 +5308,14 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "optional": true }, "yallist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", + "optional": true } } }, @@ -5846,6 +5324,7 @@ "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.1.2", "inherits": "~2.0.0", @@ -5868,6 +5347,7 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, + "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -6594,139 +6074,10 @@ "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", "dev": true }, -<<<<<<< HEAD - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true, - "optional": true - } - } - }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "optional": true, - "requires": { - "globule": "^1.0.0" - } - }, - "generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dev": true, - "requires": { - "is-property": "^1.0.2" - } - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "requires": { - "is-property": "^1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, - "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "gh-pages": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-0.12.0.tgz", - "integrity": "sha1-2VHj7Zi4VpnUsEGOsaFbGgSYjcE=", - "dev": true, - "requires": { - "async": "2.1.2", - "commander": "2.9.0", - "globby": "^6.1.0", - "graceful-fs": "4.1.10", - "q": "1.4.1", - "q-io": "1.13.2", - "rimraf": "^2.5.4" - }, - "dependencies": { - "async": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.1.2.tgz", - "integrity": "sha1-YSpKtF70KnDN6Aa62G7m2wR+g4U=", -======= - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", ->>>>>>> master + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", "dev": true, "requires": { "brace-expansion": "^1.0.0" @@ -6980,29 +6331,7 @@ } } }, -<<<<<<< HEAD - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - } - }, - "global-modules": { -======= "gulplog": { ->>>>>>> master "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", @@ -7010,106 +6339,6 @@ "glogg": "^1.0.0" } }, -<<<<<<< HEAD - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" - }, - "grunt": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.4.tgz", - "integrity": "sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ==", - "dev": true, - "requires": { - "coffeescript": "~1.10.0", - "dateformat": "~1.0.12", - "eventemitter2": "~0.4.13", - "exit": "~0.1.1", - "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", - "grunt-known-options": "~1.1.0", - "grunt-legacy-log": "~2.0.0", - "grunt-legacy-util": "~1.1.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.13.0", - "minimatch": "~3.0.2", - "mkdirp": "~0.5.1", - "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.6.2" - }, - "dependencies": { - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", - "dev": true, - "requires": { - "glob": "~5.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", - "dev": true, - "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } -======= "handle-thing": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", @@ -7138,642 +6367,94 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" ->>>>>>> master }, - "grunt-cli": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz", - "integrity": "sha512-8OHDiZZkcptxVXtMfDxJvmN7MVJNE8L/yIcPb4HB7TlyFD1kDvjHrb62uhySsU14wJx9ORMnTuhRMQ40lH/orQ==", + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", "requires": { - "grunt-known-options": "~1.1.0", - "interpret": "~1.1.0", - "liftoff": "~2.5.0", - "nopt": "~4.0.1", - "v8flags": "~3.1.1" + "ajv": "^5.3.0", + "har-schema": "^2.0.0" }, "dependencies": { - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" } } } }, - "grunt-contrib-jshint": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", - "integrity": "sha512-65S2/C/6RfjY/umTxfwXXn+wVvaYmykHkHSsW6Q6rhkbv3oudTEgqnFFZvWzWCoHUb+3GMZLbP3oSrNyvshmIQ==", + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "chalk": "^2.4.2", - "hooker": "^0.2.3", - "jshint": "~2.10.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } + "ansi-regex": "^2.0.0" } }, - "grunt-karma-coveralls": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/grunt-karma-coveralls/-/grunt-karma-coveralls-2.5.4.tgz", - "integrity": "sha1-rzFHM17YzIcte4PP62mZbrlM8wk=", + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", "dev": true, "requires": { - "coveralls": "^2.10", - "glob": "^4.0", - "karma-coverage": "^0.2", - "log-driver": "^1.2" + "isarray": "2.0.1" }, "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "coveralls": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz", - "integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==", - "dev": true, - "requires": { - "js-yaml": "3.6.1", - "lcov-parse": "0.0.10", - "log-driver": "1.2.5", - "minimist": "1.2.0", - "request": "2.79.0" - }, - "dependencies": { - "log-driver": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", - "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=", - "dev": true - } - } - }, - "escodegen": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz", - "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=", - "dev": true, - "requires": { - "esprima": "^1.2.2", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.5.0", - "source-map": "~0.2.0" - }, - "dependencies": { - "esprima": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", - "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", - "dev": true - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "fast-levenshtein": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", - "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", - "dev": true - }, - "fileset": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz", - "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=", - "dev": true, - "requires": { - "glob": "5.x", - "minimatch": "2.x" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^2.0.1", - "once": "^1.3.0" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "istanbul": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz", - "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.7.x", - "esprima": "2.5.x", - "fileset": "0.2.x", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "esprima": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz", - "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "js-yaml": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", - "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^2.6.0" - } - }, - "karma-coverage": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-0.2.7.tgz", - "integrity": "sha1-92dAsnW78woKufQdjPVoQ6CZRXY=", - "dev": true, - "requires": { - "dateformat": "~1.0.6", - "ibrik": "~2.0.0", - "istanbul": "~0.3.0", - "minimatch": "~0.3.0" - }, - "dependencies": { - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "levn": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", - "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.0", - "type-check": "~0.3.1" - } - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "optionator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", - "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", - "dev": true, - "requires": { - "deep-is": "~0.1.2", - "fast-levenshtein": "~1.0.0", - "levn": "~0.2.5", - "prelude-ls": "~1.1.1", - "type-check": "~0.3.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true } } }, - "grunt-known-options": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", - "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==" + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", + "dev": true }, - "grunt-legacy-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", - "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", - "dev": true, - "requires": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.5" - } + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, - "grunt-legacy-log-utils": { + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, + "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", - "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, + "optional": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { - "chalk": "~2.4.1", - "lodash": "~4.17.10" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "grunt-legacy-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", - "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", - "dev": true, - "requires": { - "async": "~1.5.2", - "exit": "~0.1.1", - "getobject": "~0.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.10", - "underscore.string": "~3.3.4", - "which": "~1.3.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", - "dev": true - }, - "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", - "requires": { - "ajv": "^5.3.0", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -7781,514 +6462,233 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "http": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz", - "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I=" - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", - "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "ibrik": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ibrik/-/ibrik-2.0.0.tgz", - "integrity": "sha1-iaJDTypcgrkhZsPZfeO1Y27qLpw=", - "dev": true, - "requires": { - "coffee-script": "~1.8.0", - "esprima": "1.2.x", - "estraverse": "~1.8.0", - "fileset": "0.1.x", - "istanbul": "~0.3.2", - "lodash": "~2.4.1", - "mkdirp": "~0.5.0", - "optimist": "~0.6.1", - "which": "~1.0.5" - }, - "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "coffee-script": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.8.0.tgz", - "integrity": "sha1-nJ8dK0pSoADe0Vtll5FwNkgmPB0=", - "dev": true, - "requires": { - "mkdirp": "~0.3.5" - }, - "dependencies": { - "mkdirp": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", - "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", - "dev": true - } - } - }, - "escodegen": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz", - "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=", - "dev": true, - "requires": { - "esprima": "^1.2.2", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.5.0", - "source-map": "~0.2.0" - }, - "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - } - } - }, - "esprima": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz", - "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek=", - "dev": true - }, - "estraverse": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.8.0.tgz", - "integrity": "sha1-PxJk+2LIUA265eT3NwXNV21q9Cg=", - "dev": true - }, - "fast-levenshtein": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz", - "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk=", - "dev": true - }, - "fileset": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.1.8.tgz", - "integrity": "sha1-UGuRqTluqn4y+0KoQHfHoMc2t0E=", - "dev": true, - "requires": { - "glob": "3.x", - "minimatch": "0.x" - } - }, - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "dev": true, - "requires": { - "inherits": "2", - "minimatch": "0.3" - }, - "dependencies": { - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - } - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "istanbul": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz", - "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.7.x", - "esprima": "2.5.x", - "fileset": "0.2.x", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "esprima": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz", - "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw=", - "dev": true - }, - "fileset": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz", - "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=", - "dev": true, - "requires": { - "glob": "5.x", - "minimatch": "2.x" - } - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", - "dev": true, - "requires": { - "brace-expansion": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "levn": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz", - "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.0", - "type-check": "~0.3.1" - } - }, - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "minimatch": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz", - "integrity": "sha1-vSx9Bg0sjI/Xzefx8u0tWycP2xs=", - "dev": true, - "requires": { - "lru-cache": "2", - "sigmund": "~1.0.0" - } - }, - "optionator": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz", - "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=", - "dev": true, - "requires": { - "deep-is": "~0.1.2", - "fast-levenshtein": "~1.0.0", - "levn": "~0.2.5", - "prelude-ls": "~1.1.1", - "type-check": "~0.3.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "dev": true, + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, - "optional": true, "requires": { - "amdefine": ">=0.0.4" + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" } }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz", + "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I=" + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-parser-js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", + "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", + "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", "dev": true, "requires": { - "has-flag": "^1.0.0" + "ms": "^2.1.1" } }, - "which": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", - "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true } } @@ -8960,12 +7360,7 @@ "is-negated-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", -<<<<<<< HEAD - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true -======= "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" ->>>>>>> master }, "is-number": { "version": "3.0.0", @@ -9082,12 +7477,7 @@ "is-valid-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", -<<<<<<< HEAD - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true -======= "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=" ->>>>>>> master }, "is-windows": { "version": "1.0.2", @@ -9676,12 +8066,7 @@ "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", -<<<<<<< HEAD - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true -======= "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" ->>>>>>> master }, "json-stringify-safe": { "version": "5.0.1", @@ -9946,8 +8331,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, -<<<<<<< HEAD -======= "last-run": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", @@ -9957,15 +8340,10 @@ "es6-weak-map": "^2.0.1" } }, ->>>>>>> master "lazystream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "readable-stream": "^2.0.5" } @@ -9999,10 +8377,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "flush-write-stream": "^1.0.2" } @@ -10898,14 +9272,11 @@ "version": "2.6.0", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==" -<<<<<<< HEAD -======= }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" ->>>>>>> master }, "ngx-toastr": { "version": "9.1.1", @@ -11136,10 +9507,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "once": "^1.3.2" } @@ -11189,6 +9556,7 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, + "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -11442,10 +9810,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "readable-stream": "^2.0.1" } @@ -12527,10 +10891,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "is-buffer": "^1.1.5", "is-utf8": "^0.2.1" @@ -12540,10 +10900,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "remove-bom-buffer": "^3.0.0", "safe-buffer": "^5.1.0", @@ -12576,10 +10932,6 @@ "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", -<<<<<<< HEAD - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true -======= "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, "replace-homedir": { @@ -12591,7 +10943,6 @@ "is-absolute": "^1.0.0", "remove-trailing-separator": "^1.1.0" } ->>>>>>> master }, "request": { "version": "2.88.0", @@ -12678,10 +11029,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "value-or-function": "^3.0.0" } @@ -14206,10 +12553,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "through2": "~2.0.0", "xtend": "~4.0.0" @@ -14248,10 +12591,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "is-absolute": "^1.0.0", "is-negated-glob": "^1.0.0" @@ -14317,10 +12656,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "through2": "^2.0.3" } @@ -14573,8 +12908,6 @@ "util-deprecate": "^1.0.2" } }, -<<<<<<< HEAD -======= "undertaker": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", @@ -14596,7 +12929,6 @@ "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=" }, ->>>>>>> master "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -14651,10 +12983,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "json-stable-stringify-without-jsonify": "^1.0.1", "through2-filter": "^3.0.0" @@ -14834,12 +13162,7 @@ "value-or-function": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", -<<<<<<< HEAD - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true -======= "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=" ->>>>>>> master }, "vary": { "version": "1.1.2", @@ -14861,10 +13184,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "clone": "^2.1.1", "clone-buffer": "^1.0.0", @@ -14878,10 +13197,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "fs-mkdirp-stream": "^1.0.0", "glob-stream": "^6.1.0", @@ -14906,10 +13221,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", -<<<<<<< HEAD - "dev": true, -======= ->>>>>>> master "requires": { "append-buffer": "^1.0.2", "convert-source-map": "^1.5.0", diff --git a/src/app/chatComponents/multimedia-display/multimedia-display.component.ts b/src/app/chatComponents/multimedia-display/multimedia-display.component.ts index 41392ad..139d13c 100644 --- a/src/app/chatComponents/multimedia-display/multimedia-display.component.ts +++ b/src/app/chatComponents/multimedia-display/multimedia-display.component.ts @@ -69,7 +69,6 @@ export class MultimediaDisplayComponent implements OnInit { this.multimediaType = 'image'; this.multimediaExten = 'jpg'; */ - // Video this.multimediaURL = 'https://audio-video.gnu.org/video/short--undated--rms--what-is-gnu-plus-linux--480p.webm'; this.multimediaType = 'video'; diff --git a/src/coverage/lcov-report/index.html b/src/coverage/lcov-report/index.html index 677745b..6428ec1 100644 --- a/src/coverage/lcov-report/index.html +++ b/src/coverage/lcov-report/index.html @@ -64,7 +64,7 @@