diff --git a/007a14b8b2bbc6a854c5.svg b/007a14b8b2bbc6a854c5.svg new file mode 100644 index 0000000..d53c4c8 --- /dev/null +++ b/007a14b8b2bbc6a854c5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/01849ee091e1762a5dd5.ttf b/01849ee091e1762a5dd5.ttf new file mode 100644 index 0000000..df70936 Binary files /dev/null and b/01849ee091e1762a5dd5.ttf differ diff --git a/0d90cac54350b3631a2b.svg b/0d90cac54350b3631a2b.svg new file mode 100644 index 0000000..cb57f63 --- /dev/null +++ b/0d90cac54350b3631a2b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/1e08c7f04f4855050724.eot b/1e08c7f04f4855050724.eot new file mode 100644 index 0000000..2bb271e Binary files /dev/null and b/1e08c7f04f4855050724.eot differ diff --git a/2185c437d9db32386425.ttf b/2185c437d9db32386425.ttf new file mode 100644 index 0000000..69b63bb Binary files /dev/null and b/2185c437d9db32386425.ttf differ diff --git a/2318786d81923a2a0398.png b/2318786d81923a2a0398.png new file mode 100644 index 0000000..2e12b44 Binary files /dev/null and b/2318786d81923a2a0398.png differ diff --git a/247c7159ff708fcea332.png b/247c7159ff708fcea332.png new file mode 100644 index 0000000..43994f8 Binary files /dev/null and b/247c7159ff708fcea332.png differ diff --git a/26b129ebbf99cd63da7a.svg b/26b129ebbf99cd63da7a.svg new file mode 100644 index 0000000..b0e5ced --- /dev/null +++ b/26b129ebbf99cd63da7a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/2a71880a5d8c0edcd943.png b/2a71880a5d8c0edcd943.png new file mode 100644 index 0000000..e796a16 Binary files /dev/null and b/2a71880a5d8c0edcd943.png differ diff --git a/2de41d37b7115877d5b6.png b/2de41d37b7115877d5b6.png new file mode 100644 index 0000000..d0ae38f Binary files /dev/null and b/2de41d37b7115877d5b6.png differ diff --git a/324a9a105daaf65a97ce.svg b/324a9a105daaf65a97ce.svg new file mode 100644 index 0000000..c2866c1 --- /dev/null +++ b/324a9a105daaf65a97ce.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/333cb30c20e31999802a.ttf b/333cb30c20e31999802a.ttf new file mode 100644 index 0000000..e76ec69 Binary files /dev/null and b/333cb30c20e31999802a.ttf differ diff --git a/3524ffc3226f4578e5c5.ttf b/3524ffc3226f4578e5c5.ttf new file mode 100644 index 0000000..3e6c942 Binary files /dev/null and b/3524ffc3226f4578e5c5.ttf differ diff --git a/35c26b06df90f45f6c0e.png b/35c26b06df90f45f6c0e.png new file mode 100644 index 0000000..3d33f76 Binary files /dev/null and b/35c26b06df90f45f6c0e.png differ diff --git a/35d26b781dc5fda684cc.ttf b/35d26b781dc5fda684cc.ttf new file mode 100644 index 0000000..9f0c71b Binary files /dev/null and b/35d26b781dc5fda684cc.ttf differ diff --git a/3c622a812a32e90d9a9b.png b/3c622a812a32e90d9a9b.png new file mode 100644 index 0000000..a9c2ea3 Binary files /dev/null and b/3c622a812a32e90d9a9b.png differ diff --git a/3ebfb41b2f65bd2855c2.svg b/3ebfb41b2f65bd2855c2.svg new file mode 100644 index 0000000..e05db51 --- /dev/null +++ b/3ebfb41b2f65bd2855c2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/4131672cef0cfa987695.svg b/4131672cef0cfa987695.svg new file mode 100644 index 0000000..783a361 --- /dev/null +++ b/4131672cef0cfa987695.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/41a9daeb541338b469fa.svg b/41a9daeb541338b469fa.svg new file mode 100644 index 0000000..22ebcb5 --- /dev/null +++ b/41a9daeb541338b469fa.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/4a7d59f898225cc2f2e7.ttf b/4a7d59f898225cc2f2e7.ttf new file mode 100644 index 0000000..9e70be6 Binary files /dev/null and b/4a7d59f898225cc2f2e7.ttf differ diff --git a/52672ddfc0b2472f8310.png b/52672ddfc0b2472f8310.png new file mode 100644 index 0000000..859e266 Binary files /dev/null and b/52672ddfc0b2472f8310.png differ diff --git a/556d108e74d43f559161.png b/556d108e74d43f559161.png new file mode 100644 index 0000000..0786f47 Binary files /dev/null and b/556d108e74d43f559161.png differ diff --git a/563eda3d3407af0fb581.ttf b/563eda3d3407af0fb581.ttf new file mode 100644 index 0000000..7aeb58b Binary files /dev/null and b/563eda3d3407af0fb581.ttf differ diff --git a/57531072a966f65a2305.png b/57531072a966f65a2305.png new file mode 100644 index 0000000..3c397fa Binary files /dev/null and b/57531072a966f65a2305.png differ diff --git a/58cc2e4dfa1880e72951.png b/58cc2e4dfa1880e72951.png new file mode 100644 index 0000000..fc41281 Binary files /dev/null and b/58cc2e4dfa1880e72951.png differ diff --git a/59ff6a729e30c99b478e.ttf b/59ff6a729e30c99b478e.ttf new file mode 100644 index 0000000..03e7366 Binary files /dev/null and b/59ff6a729e30c99b478e.ttf differ diff --git a/5d29fd86fba153c1025d.svg b/5d29fd86fba153c1025d.svg new file mode 100644 index 0000000..cd51e8a --- /dev/null +++ b/5d29fd86fba153c1025d.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/65cf2841f6551c4233c9.png b/65cf2841f6551c4233c9.png new file mode 100644 index 0000000..fbba19e Binary files /dev/null and b/65cf2841f6551c4233c9.png differ diff --git a/673ed42382ab264e0bf5.ttf b/673ed42382ab264e0bf5.ttf new file mode 100644 index 0000000..6bcdcc2 Binary files /dev/null and b/673ed42382ab264e0bf5.ttf differ diff --git a/6a0bf4e5c677b095e328.png b/6a0bf4e5c677b095e328.png new file mode 100644 index 0000000..9d57438 Binary files /dev/null and b/6a0bf4e5c677b095e328.png differ diff --git a/6c8297b1515dcd712777.svg b/6c8297b1515dcd712777.svg new file mode 100644 index 0000000..7798c38 --- /dev/null +++ b/6c8297b1515dcd712777.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/73d4495be63ad83b25cc.ttf b/73d4495be63ad83b25cc.ttf new file mode 100644 index 0000000..14d2b37 Binary files /dev/null and b/73d4495be63ad83b25cc.ttf differ diff --git a/7547ed76b90d5776991c.svg b/7547ed76b90d5776991c.svg new file mode 100644 index 0000000..c7d8f0a --- /dev/null +++ b/7547ed76b90d5776991c.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/7641a0f76ca9ef6c252c.ttf b/7641a0f76ca9ef6c252c.ttf new file mode 100644 index 0000000..bc36bcc Binary files /dev/null and b/7641a0f76ca9ef6c252c.ttf differ diff --git a/86b906ee82b391bdc09a.svg b/86b906ee82b391bdc09a.svg new file mode 100644 index 0000000..217e497 --- /dev/null +++ b/86b906ee82b391bdc09a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/8809b45a3f0566911799.woff b/8809b45a3f0566911799.woff new file mode 100644 index 0000000..64b6b03 Binary files /dev/null and b/8809b45a3f0566911799.woff differ diff --git a/89e040c6a64d18f620dc.ttf b/89e040c6a64d18f620dc.ttf new file mode 100644 index 0000000..be67410 Binary files /dev/null and b/89e040c6a64d18f620dc.ttf differ diff --git a/9a37b4e9b7769fb9e083.png b/9a37b4e9b7769fb9e083.png new file mode 100644 index 0000000..72f6fcf Binary files /dev/null and b/9a37b4e9b7769fb9e083.png differ diff --git a/9c989372615cb2cfbaa6.woff2 b/9c989372615cb2cfbaa6.woff2 new file mode 100644 index 0000000..52ef126 Binary files /dev/null and b/9c989372615cb2cfbaa6.woff2 differ diff --git a/9d5e661e645ce9a32fe6.ttf b/9d5e661e645ce9a32fe6.ttf new file mode 100644 index 0000000..e26db5d Binary files /dev/null and b/9d5e661e645ce9a32fe6.ttf differ diff --git a/a3add48e0c2437e3b88d.png b/a3add48e0c2437e3b88d.png new file mode 100644 index 0000000..c20eed2 Binary files /dev/null and b/a3add48e0c2437e3b88d.png differ diff --git a/ac8d04b620e54be9b0f0.ttf b/ac8d04b620e54be9b0f0.ttf new file mode 100644 index 0000000..74c726e Binary files /dev/null and b/ac8d04b620e54be9b0f0.ttf differ diff --git a/b53376cd3ae8f3c426ab.png b/b53376cd3ae8f3c426ab.png new file mode 100644 index 0000000..3f49fc7 Binary files /dev/null and b/b53376cd3ae8f3c426ab.png differ diff --git a/b8844d260be87e87ad10.svg b/b8844d260be87e87ad10.svg new file mode 100644 index 0000000..76ab687 --- /dev/null +++ b/b8844d260be87e87ad10.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/b8dbe7c879da3b9be4ca.png b/b8dbe7c879da3b9be4ca.png new file mode 100644 index 0000000..89b3481 Binary files /dev/null and b/b8dbe7c879da3b9be4ca.png differ diff --git a/be027ddaf24e9820054a.svg b/be027ddaf24e9820054a.svg new file mode 100644 index 0000000..c76431c --- /dev/null +++ b/be027ddaf24e9820054a.svg @@ -0,0 +1,2 @@ + + diff --git a/bundle.74d7d3b8bacd4d384b45.js b/bundle.74d7d3b8bacd4d384b45.js new file mode 100644 index 0000000..9b40018 --- /dev/null +++ b/bundle.74d7d3b8bacd4d384b45.js @@ -0,0 +1,8 @@ +/*! For license information please see bundle.74d7d3b8bacd4d384b45.js.LICENSE.txt */ +(()=>{var t={6533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;const i=n(7159),r=n(3924),o=n(6121),a=n(1448),s=n(808),c=n(1240),h=n(2500),u="https://json-schema.org/draft/2019-09/schema";class l extends i.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),r.default.forEach((t=>this.addVocabulary(t))),this.addVocabulary(a.default),this.addVocabulary(s.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:e}=this.opts;e&&(h.default.call(this,t),this.refs["http://json-schema.org/schema"]=u)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.exports=e=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var d=n(4815);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var p=n(3487);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var f=n(7426);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var m=n(6646);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},7023:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends n{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=i;class r extends n{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function o(t,...e){const n=[t[0]];let i=0;for(;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const i=n(7023),r=n(8490);var o=n(7023);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var a=n(8490);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class s{optimizeNodes(){return this}optimizeNames(t,e){return this}}class c extends s{constructor(t,e,n){super(),this.varKind=t,this.name=e,this.rhs=n}render({es5:t,_n:e}){const n=t?r.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,t,e)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class h extends s{constructor(t,e,n){super(),this.lhs=t,this.rhs=e,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,e){if(!(this.lhs instanceof i.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,t,e),this}get names(){return j(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class u extends h{constructor(t,e,n,i){super(t,n,i),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class l extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class d extends s{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class p extends s{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class f extends s{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=O(this.code,t,e),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class m extends s{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,n)=>e+n.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const n=t[e].optimizeNodes();Array.isArray(n)?t.splice(e,1,...n):n?t[e]=n:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:n}=this;let i=n.length;for(;i--;){const r=n[i];r.optimizeNames(t,e)||(P(t,r.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>C(t,e.names)),{})}}class y extends m{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class g extends m{}class v extends y{}v.kind="else";class b extends y{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new v(t):t}return e?!1===t?e instanceof b?e:e.nodes:this.nodes.length?this:new b(I(t),e instanceof b?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=O(this.condition,t,e),this}get names(){const t=super.names;return j(t,this.condition),this.else&&C(t,this.else.names),t}}b.kind="if";class _ extends y{}_.kind="for";class w extends _{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=O(this.iteration,t,e),this}get names(){return C(super.names,this.iteration.names)}}class x extends _{constructor(t,e,n,i){super(),this.varKind=t,this.name=e,this.from=n,this.to=i}render(t){const e=t.es5?r.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${e} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){const t=j(super.names,this.from);return j(t,this.to)}}class M extends _{constructor(t,e,n,i){super(),this.loop=t,this.varKind=e,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=O(this.iterable,t,e),this}get names(){return C(super.names,this.iterable.names)}}class k extends y{constructor(t,e,n){super(),this.name=t,this.args=e,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}k.kind="func";class S extends m{render(t){return"return "+super.render(t)}}S.kind="return";class E extends y{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var n,i;return super.optimizeNames(t,e),null===(n=this.catch)||void 0===n||n.optimizeNames(t,e),null===(i=this.finally)||void 0===i||i.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&C(t,this.catch.names),this.finally&&C(t,this.finally.names),t}}class A extends y{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}A.kind="catch";class T extends y{render(t){return"finally"+super.render(t)}}function C(t,e){for(const n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function j(t,e){return e instanceof i._CodeOrName?C(t,e.names):t}function O(t,e,n){return t instanceof i.Name?o(t):(r=t)instanceof i._Code&&r._items.some((t=>t instanceof i.Name&&1===e[t.str]&&void 0!==n[t.str]))?new i._Code(t._items.reduce(((t,e)=>(e instanceof i.Name&&(e=o(e)),e instanceof i._Code?t.push(...e._items):t.push(e),t)),[])):t;var r;function o(t){const i=n[t.str];return void 0===i||1!==e[t.str]?t:(delete e[t.str],i)}}function P(t,e){for(const n in e)t[n]=(t[n]||0)-(e[n]||0)}function I(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:i._`!${N(t)}`}T.kind="finally",e.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new r.Scope({parent:t}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const n=this._extScope.value(t,e);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,n,i){const r=this._scope.toName(e);return void 0!==n&&i&&(this._constants[r.str]=n),this._leafNode(new c(t,r,n)),r}const(t,e,n){return this._def(r.varKinds.const,t,e,n)}let(t,e,n){return this._def(r.varKinds.let,t,e,n)}var(t,e,n){return this._def(r.varKinds.var,t,e,n)}assign(t,e,n){return this._leafNode(new h(t,e,n))}add(t,n){return this._leafNode(new u(t,e.operators.ADD,n))}code(t){return"function"==typeof t?t():t!==i.nil&&this._leafNode(new f(t)),this}object(...t){const e=["{"];for(const[n,r]of t)e.length>1&&e.push(","),e.push(n),(n!==r||this.opts.es5)&&(e.push(":"),(0,i.addCodeArg)(e,r));return e.push("}"),new i._Code(e)}if(t,e,n){if(this._blockNode(new b(t)),e&&n)this.code(e).else().code(n).endIf();else if(e)this.code(e).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new b(t))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new w(t),e)}forRange(t,e,n,i,o=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const a=this._scope.toName(t);return this._for(new x(o,a,e,n),(()=>i(a)))}forOf(t,e,n,o=r.varKinds.const){const a=this._scope.toName(t);if(this.opts.es5){const t=e instanceof i.Name?e:this.var("_arr",e);return this.forRange("_i",0,i._`${t}.length`,(e=>{this.var(a,i._`${t}[${e}]`),n(a)}))}return this._for(new M("of",o,a,e),(()=>n(a)))}forIn(t,e,n,o=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,i._`Object.keys(${e})`,n);const a=this._scope.toName(t);return this._for(new M("in",o,a,e),(()=>n(a)))}endFor(){return this._endBlockNode(_)}label(t){return this._leafNode(new l(t))}break(t){return this._leafNode(new d(t))}return(t){const e=new S;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(t,e,n){if(!e&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new E;if(this._blockNode(i),this.code(t),e){const t=this.name("e");this._currNode=i.catch=new A(t),e(t)}return n&&(this._currNode=i.finally=new T,this.code(n)),this._endBlockNode(A,T)}throw(t){return this._leafNode(new p(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-e;if(n<0||void 0!==t&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=e,this}func(t,e=i.nil,n,r){return this._blockNode(new k(t,e,n)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(k)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const n=this._currNode;if(n instanceof t||e&&n instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},e.not=I;const $=L(e.operators.AND);e.and=function(...t){return t.reduce($)};const R=L(e.operators.OR);function L(t){return(e,n)=>e===i.nil?n:n===i.nil?e:i._`${N(e)} ${t} ${N(n)}`}function N(t){return t instanceof i.Name?t:i._`(${t})`}e.or=function(...t){return t.reduce(R)}},8490:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const i=n(7023);class r extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var o;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(o=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class a{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,n;if((null===(n=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===n?void 0:n.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}e.Scope=a;class s extends i.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:e,itemIndex:n}){this.value=t,this.scopePath=i._`.${new i.Name(e)}[${n}]`}}e.ValueScopeName=s;const c=i._`\n`;e.ValueScope=class extends a{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?c:i.nil}}get(){return this._scope}name(t){return new s(t,this._newName(t))}value(t,e){var n;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(t),{prefix:r}=i,o=null!==(n=e.key)&&void 0!==n?n:e.ref;let a=this._values[r];if(a){const t=a.get(o);if(t)return t}else a=this._values[r]=new Map;a.set(o,i);const s=this._scope[r]||(this._scope[r]=[]),c=s.length;return s[c]=e.ref,i.setValue(e,{property:r,itemIndex:c}),i}getValue(t,e){const n=this._values[t];if(n)return n.get(e)}scopeRefs(t,e=this._values){return this._reduceValues(e,(e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return i._`${t}${e.scopePath}`}))}scopeCode(t=this._values,e,n){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,n)}_reduceValues(t,n,a={},s){let c=i.nil;for(const h in t){const u=t[h];if(!u)continue;const l=a[h]=a[h]||new Map;u.forEach((t=>{if(l.has(t))return;l.set(t,o.Started);let a=n(t);if(a){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=i._`${c}${n} ${t} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(t)))throw new r(t);c=i._`${c}${a}${this.opts._n}`}l.set(t,o.Completed)}))}return c}}},4181:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const i=n(3487),r=n(6776),o=n(2141);function a(t,e){const n=t.const("err",e);t.if(i._`${o.default.vErrors} === null`,(()=>t.assign(o.default.vErrors,i._`[${n}]`)),i._`${o.default.vErrors}.push(${n})`),t.code(i._`${o.default.errors}++`)}function s(t,e){const{gen:n,validateName:r,schemaEnv:o}=t;o.$async?n.throw(i._`new ${t.ValidationError}(${e})`):(n.assign(i._`${r}.errors`,e),n.return(!1))}e.keywordError={message:({keyword:t})=>i.str`must pass "${t}" keyword validation`},e.keyword$DataError={message:({keyword:t,schemaType:e})=>e?i.str`"${t}" keyword must be ${e} ($data)`:i.str`"${t}" keyword is invalid ($data)`},e.reportError=function(t,n=e.keywordError,r,o){const{it:c}=t,{gen:u,compositeRule:l,allErrors:d}=c,p=h(t,n,r);(null!=o?o:l||d)?a(u,p):s(c,i._`[${p}]`)},e.reportExtraError=function(t,n=e.keywordError,i){const{it:r}=t,{gen:c,compositeRule:u,allErrors:l}=r;a(c,h(t,n,i)),u||l||s(r,o.default.vErrors)},e.resetErrorsCount=function(t,e){t.assign(o.default.errors,e),t.if(i._`${o.default.vErrors} !== null`,(()=>t.if(e,(()=>t.assign(i._`${o.default.vErrors}.length`,e)),(()=>t.assign(o.default.vErrors,null)))))},e.extendErrors=function({gen:t,keyword:e,schemaValue:n,data:r,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const c=t.name("err");t.forRange("i",a,o.default.errors,(a=>{t.const(c,i._`${o.default.vErrors}[${a}]`),t.if(i._`${c}.instancePath === undefined`,(()=>t.assign(i._`${c}.instancePath`,(0,i.strConcat)(o.default.instancePath,s.errorPath)))),t.assign(i._`${c}.schemaPath`,i.str`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign(i._`${c}.schema`,n),t.assign(i._`${c}.data`,r))}))};const c={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function h(t,e,n){const{createErrors:r}=t.it;return!1===r?i._`{}`:function(t,e,n={}){const{gen:r,it:a}=t,s=[u(a,n),l(t,n)];return function(t,{params:e,message:n},r){const{keyword:a,data:s,schemaValue:h,it:u}=t,{opts:l,propertyName:d,topSchemaRef:p,schemaPath:f}=u;r.push([c.keyword,a],[c.params,"function"==typeof e?e(t):e||i._`{}`]),l.messages&&r.push([c.message,"function"==typeof n?n(t):n]),l.verbose&&r.push([c.schema,h],[c.parentSchema,i._`${p}${f}`],[o.default.data,s]),d&&r.push([c.propertyName,d])}(t,e,s),r.object(...s)}(t,e,n)}function u({errorPath:t},{instancePath:e}){const n=e?i.str`${t}${(0,r.getErrorPath)(e,r.Type.Str)}`:t;return[o.default.instancePath,(0,i.strConcat)(o.default.instancePath,n)]}function l({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:o}){let a=o?e:i.str`${e}/${t}`;return n&&(a=i.str`${a}${(0,r.getErrorPath)(n,r.Type.Str)}`),[c.schemaPath,a]}},5173:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const i=n(3487),r=n(7426),o=n(2141),a=n(2531),s=n(6776),c=n(4815);class h{constructor(t){var e;let n;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,a.normalizeId)(null==n?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function u(t){const e=d.call(this,t);if(e)return e;const n=(0,a.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:h}=this.opts.code,{ownProperties:u}=this.opts,l=new i.CodeGen(this.scope,{es5:s,lines:h,ownProperties:u});let p;t.$async&&(p=l.scopeValue("Error",{ref:r.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const f=l.scopeName("validate");t.validateName=f;const m={gen:l,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,i.stringify)(t.schema)}:{ref:t.schema}),validateName:f,ValidationError:p,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(t),(0,c.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const e=l.toString();y=`${l.scopeRefs(o.default.scope)}return ${e}`,this.opts.code.process&&(y=this.opts.code.process(y,t));const n=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(f,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:f,validateCode:e,scopeValues:l._values}),this.opts.unevaluated){const{props:t,items:e}=m;n.evaluated={props:t instanceof i.Name?void 0:t,items:e instanceof i.Name?void 0:e,dynamicProps:t instanceof i.Name,dynamicItems:e instanceof i.Name},n.source&&(n.source.evaluated=(0,i.stringify)(n.evaluated))}return t.validate=n,t}catch(e){throw delete t.validate,delete t.validateName,y&&this.logger.error("Error compiling schema, function code:",y),e}finally{this._compilations.delete(t)}}function l(t){return(0,a.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:u.call(this,t)}function d(t){for(const i of this._compilations)if(n=t,(e=i).schema===n.schema&&e.root===n.root&&e.baseId===n.baseId)return i;var e,n}function p(t,e){let n;for(;"string"==typeof(n=this.refs[e]);)e=n;return n||this.schemas[e]||f.call(this,t,e)}function f(t,e){const n=this.opts.uriResolver.parse(e),i=(0,a._getFullPath)(this.opts.uriResolver,n);let r=(0,a.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return y.call(this,n,t);const o=(0,a.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){const e=f.call(this,t,s);if("object"!=typeof(null==e?void 0:e.schema))return;return y.call(this,n,e)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||u.call(this,s),o===(0,a.normalizeId)(e)){const{schema:e}=s,{schemaId:n}=this.opts,i=e[n];return i&&(r=(0,a.resolveUrl)(this.opts.uriResolver,r,i)),new h({schema:e,schemaId:n,root:t,baseId:r})}return y.call(this,n,s)}}e.SchemaEnv=h,e.compileSchema=u,e.resolveRef=function(t,e,n){var i;n=(0,a.resolveUrl)(this.opts.uriResolver,e,n);const r=t.refs[n];if(r)return r;let o=p.call(this,t,n);if(void 0===o){const r=null===(i=t.localRefs)||void 0===i?void 0:i[n],{schemaId:a}=this.opts;r&&(o=new h({schema:r,schemaId:a,root:t,baseId:e}))}return void 0!==o?t.refs[n]=l.call(this,o):void 0},e.getCompilingSchema=d,e.resolveSchema=f;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(t,{baseId:e,schema:n,root:i}){var r;if("/"!==(null===(r=t.fragment)||void 0===r?void 0:r[0]))return;for(const i of t.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const t=n[(0,s.unescapeFragment)(i)];if(void 0===t)return;const r="object"==typeof(n=t)&&n[this.opts.schemaId];!m.has(i)&&r&&(e=(0,a.resolveUrl)(this.opts.uriResolver,e,r))}let o;if("boolean"!=typeof n&&n.$ref&&!(0,s.schemaHasRulesButRef)(n,this.RULES)){const t=(0,a.resolveUrl)(this.opts.uriResolver,e,n.$ref);o=f.call(this,i,t)}const{schemaId:c}=this.opts;return o=o||new h({schema:n,schemaId:c,root:i,baseId:e}),o.schema!==o.root.schema?o:void 0}},2141:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};e.default=r},6646:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(2531);class r extends Error{constructor(t,e,n,r){super(r||`can't resolve reference ${n} from id ${e}`),this.missingRef=(0,i.resolveUrl)(t,e,n),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(t,this.missingRef))}}e.default=r},2531:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const i=n(6776),r=n(4063),o=n(9461),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!c(t):!!e&&h(t)<=e)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(t){for(const e in t){if(s.has(e))return!0;const n=t[e];if(Array.isArray(n)&&n.some(c))return!0;if("object"==typeof n&&c(n))return!0}return!1}function h(t){let e=0;for(const n in t){if("$ref"===n)return 1/0;if(e++,!a.has(n)&&("object"==typeof t[n]&&(0,i.eachItem)(t[n],(t=>e+=h(t))),e===1/0))return 1/0}return e}function u(t,e="",n){!1!==n&&(e=p(e));const i=t.parse(e);return l(t,i)}function l(t,e){return t.serialize(e).split("#")[0]+"#"}e.getFullPath=u,e._getFullPath=l;const d=/#\/?$/;function p(t){return t?t.replace(d,""):""}e.normalizeId=p,e.resolveUrl=function(t,e,n){return n=p(n),t.resolve(e,n)};const f=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:i}=this.opts,a=p(t[n]||e),s={"":a},c=u(i,a,!1),h={},l=new Set;return o(t,{allKeys:!0},((t,e,i,r)=>{if(void 0===r)return;const o=c+e;let a=s[r];function u(e){const n=this.opts.uriResolver.resolve;if(e=p(a?n(a,e):e),l.has(e))throw m(e);l.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?d(t,i.schema,e):e!==p(o)&&("#"===e[0]?(d(t,h[e],e),h[e]=t):this.refs[e]=o),e}function y(t){if("string"==typeof t){if(!f.test(t))throw new Error(`invalid anchor "${t}"`);u.call(this,`#${t}`)}}"string"==typeof t[n]&&(a=u.call(this,t[n])),y.call(this,t.$anchor),y.call(this,t.$dynamicAnchor),s[e]=a})),h;function d(t,e,n){if(void 0!==e&&!r(t,e))throw m(n)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}}},3141:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(t){return"string"==typeof t&&n.has(t)},e.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}},6776:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const i=n(3487),r=n(7023);function o(t,e=t.schema){const{opts:n,self:i}=t;if(!n.strictSchema)return;if("boolean"==typeof e)return;const r=i.RULES.keywords;for(const n in e)r[n]||f(t,`unknown keyword: "${n}"`)}function a(t,e){if("boolean"==typeof t)return!t;for(const n in t)if(e[n])return!0;return!1}function s(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function c(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function h({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(o,a,s,c)=>{const h=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?t(o,a,s):e(o,a,s),s):a instanceof i.Name?(e(o,s,a),a):n(a,s);return c!==i.Name||h instanceof i.Name?h:r(o,h)}}function u(t,e){if(!0===e)return t.var("props",!0);const n=t.var("props",i._`{}`);return void 0!==e&&l(t,n,e),n}function l(t,e,n){Object.keys(n).forEach((n=>t.assign(i._`${e}${(0,i.getProperty)(n)}`,!0)))}e.toHash=function(t){const e={};for(const n of t)e[n]=!0;return e},e.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(o(t,e),!a(e,t.self.RULES.all))},e.checkUnknownRules=o,e.schemaHasRules=a,e.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const n in t)if("$ref"!==n&&e.all[n])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:t,schemaPath:e},n,r,o){if(!o){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return i._`${n}`}return i._`${t}${e}${(0,i.getProperty)(r)}`},e.unescapeFragment=function(t){return c(decodeURIComponent(t))},e.escapeFragment=function(t){return encodeURIComponent(s(t))},e.escapeJsonPointer=s,e.unescapeJsonPointer=c,e.eachItem=function(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)},e.mergeEvaluated={props:h({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>{t.if(i._`${e} === true`,(()=>t.assign(n,!0)),(()=>t.assign(n,i._`${n} || {}`).code(i._`Object.assign(${n}, ${e})`)))})),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>{!0===e?t.assign(n,!0):(t.assign(n,i._`${n} || {}`),l(t,n,e))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:u}),items:h({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>t.assign(n,i._`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`))),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>t.assign(n,!0===e||i._`${n} > ${e} ? ${n} : ${e}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},e.evaluatedPropsToName=u,e.setEvaluated=l;const d={};var p;function f(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,!0===n)throw new Error(e);t.self.logger.warn(e)}}e.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:d[e.code]||(d[e.code]=new r._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(p=e.Type||(e.Type={})),e.getErrorPath=function(t,e,n){if(t instanceof i.Name){const r=e===p.Num;return n?r?i._`"[" + ${t} + "]"`:i._`"['" + ${t} + "']"`:r?i._`"/" + ${t}`:i._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,i.getProperty)(t).toString():"/"+s(t)},e.checkStrictMode=f},8876:(t,e)=>{"use strict";function n(t,e){return e.rules.some((e=>i(t,e)))}function i(t,e){var n;return void 0!==t[e.keyword]||(null===(n=e.definition.implements)||void 0===n?void 0:n.some((e=>void 0!==t[e])))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:t,self:e},i){const r=e.RULES.types[i];return r&&!0!==r&&n(t,r)},e.shouldUseGroup=n,e.shouldUseRule=i},5667:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const i=n(4181),r=n(3487),o=n(2141),a={message:"boolean schema is false"};function s(t,e){const{gen:n,data:r}=t,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,i.reportError)(o,a,void 0,e)}e.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:i}=t;!1===n?s(t,!1):"object"==typeof n&&!0===n.$async?e.return(o.default.data):(e.assign(r._`${i}.errors`,null),e.return(!0))},e.boolOrEmptySchema=function(t,e){const{gen:n,schema:i}=t;!1===i?(n.var(e,!1),s(t)):n.var(e,!0)}},453:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const i=n(3141),r=n(8876),o=n(4181),a=n(3487),s=n(6776);var c;function h(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(i.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(c=e.DataType||(e.DataType={})),e.getSchemaTypes=function(t){const e=h(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},e.getJSONTypes=h,e.coerceAndCheckDataType=function(t,e){const{gen:n,data:i,opts:o}=t,s=function(t,e){return e?t.filter((t=>u.has(t)||"array"===e&&"array"===t)):[]}(e,o.coerceTypes),h=e.length>0&&!(0===s.length&&1===e.length&&(0,r.schemaHasRulesForType)(t,e[0]));if(h){const r=d(e,i,o.strictNumbers,c.Wrong);n.if(r,(()=>{s.length?function(t,e,n){const{gen:i,data:r,opts:o}=t,s=i.let("dataType",a._`typeof ${r}`),c=i.let("coerced",a._`undefined`);"array"===o.coerceTypes&&i.if(a._`${s} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>i.assign(r,a._`${r}[0]`).assign(s,a._`typeof ${r}`).if(d(e,r,o.strictNumbers),(()=>i.assign(c,r))))),i.if(a._`${c} !== undefined`);for(const t of n)(u.has(t)||"array"===t&&"array"===o.coerceTypes)&&h(t);function h(t){switch(t){case"string":return void i.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(c,a._`"" + ${r}`).elseIf(a._`${r} === null`).assign(c,a._`""`);case"number":return void i.elseIf(a._`${s} == "boolean" || ${r} === null + || (${s} == "string" && ${r} && ${r} == +${r})`).assign(c,a._`+${r}`);case"integer":return void i.elseIf(a._`${s} === "boolean" || ${r} === null + || (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,a._`+${r}`);case"boolean":return void i.elseIf(a._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf(a._`${r} === "true" || ${r} === 1`).assign(c,!0);case"null":return i.elseIf(a._`${r} === "" || ${r} === 0 || ${r} === false`),void i.assign(c,null);case"array":i.elseIf(a._`${s} === "string" || ${s} === "number" + || ${s} === "boolean" || ${r} === null`).assign(c,a._`[${r}]`)}}i.else(),f(t),i.endIf(),i.if(a._`${c} !== undefined`,(()=>{i.assign(r,c),function({gen:t,parentData:e,parentDataProperty:n},i){t.if(a._`${e} !== undefined`,(()=>t.assign(a._`${e}[${n}]`,i)))}(t,c)}))}(t,e,s):f(t)}))}return h};const u=new Set(["string","number","integer","boolean","null"]);function l(t,e,n,i=c.Correct){const r=i===c.Correct?a.operators.EQ:a.operators.NEQ;let o;switch(t){case"null":return a._`${e} ${r} null`;case"array":o=a._`Array.isArray(${e})`;break;case"object":o=a._`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s(a._`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return a._`typeof ${e} ${r} ${t}`}return i===c.Correct?o:(0,a.not)(o);function s(t=a.nil){return(0,a.and)(a._`typeof ${e} == "number"`,t,n?a._`isFinite(${e})`:a.nil)}}function d(t,e,n,i){if(1===t.length)return l(t[0],e,n,i);let r;const o=(0,s.toHash)(t);if(o.array&&o.object){const t=a._`typeof ${e} != "object"`;r=o.null?t:a._`!${e} || ${t}`,delete o.null,delete o.array,delete o.object}else r=a.nil;o.number&&delete o.integer;for(const t in o)r=(0,a.and)(r,l(t,e,n,i));return r}e.checkDataType=l,e.checkDataTypes=d;const p={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?a._`{type: ${t}}`:a._`{type: ${e}}`};function f(t){const e=function(t){const{gen:e,data:n,schema:i}=t,r=(0,s.schemaRefOrVal)(t,i,"type");return{gen:e,keyword:"type",data:n,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:t}}(t);(0,o.reportError)(e,p)}e.reportTypeError=f},313:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;const i=n(3487),r=n(6776);function o(t,e,n){const{gen:o,compositeRule:a,data:s,opts:c}=t;if(void 0===n)return;const h=i._`${s}${(0,i.getProperty)(e)}`;if(a)return void(0,r.checkStrictMode)(t,`default is ignored for: ${h}`);let u=i._`${h} === undefined`;"empty"===c.useDefaults&&(u=i._`${u} || ${h} === null || ${h} === ""`),o.if(u,i._`${h} = ${(0,i.stringify)(n)}`)}e.assignDefaults=function(t,e){const{properties:n,items:i}=t.schema;if("object"===e&&n)for(const e in n)o(t,e,n[e].default);else"array"===e&&Array.isArray(i)&&i.forEach(((e,n)=>o(t,n,e.default)))}},4815:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const i=n(5667),r=n(453),o=n(8876),a=n(453),s=n(313),c=n(5005),h=n(3099),u=n(3487),l=n(2141),d=n(2531),p=n(6776),f=n(4181);function m({gen:t,validateName:e,schema:n,schemaEnv:i,opts:r},o){r.code.es5?t.func(e,u._`${l.default.data}, ${l.default.valCxt}`,i.$async,(()=>{t.code(u._`"use strict"; ${y(n,r)}`),function(t,e){t.if(l.default.valCxt,(()=>{t.var(l.default.instancePath,u._`${l.default.valCxt}.${l.default.instancePath}`),t.var(l.default.parentData,u._`${l.default.valCxt}.${l.default.parentData}`),t.var(l.default.parentDataProperty,u._`${l.default.valCxt}.${l.default.parentDataProperty}`),t.var(l.default.rootData,u._`${l.default.valCxt}.${l.default.rootData}`),e.dynamicRef&&t.var(l.default.dynamicAnchors,u._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{t.var(l.default.instancePath,u._`""`),t.var(l.default.parentData,u._`undefined`),t.var(l.default.parentDataProperty,u._`undefined`),t.var(l.default.rootData,l.default.data),e.dynamicRef&&t.var(l.default.dynamicAnchors,u._`{}`)}))}(t,r),t.code(o)})):t.func(e,u._`${l.default.data}, ${function(t){return u._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${t.dynamicRef?u._`, ${l.default.dynamicAnchors}={}`:u.nil}}={}`}(r)}`,i.$async,(()=>t.code(y(n,r)).code(o)))}function y(t,e){const n="object"==typeof t&&t[e.schemaId];return n&&(e.code.source||e.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function g({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const n in t)if(e.RULES.all[n])return!0;return!1}function v(t){return"boolean"!=typeof t.schema}function b(t){(0,p.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:n,opts:i,self:r}=t;e.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(e,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(t)}function _(t,e){if(t.opts.jtd)return x(t,[],!1,e);const n=(0,r.getSchemaTypes)(t.schema);x(t,n,!(0,r.coerceAndCheckDataType)(t,n),e)}function w({gen:t,schemaEnv:e,schema:n,errSchemaPath:i,opts:r}){const o=n.$comment;if(!0===r.$comment)t.code(u._`${l.default.self}.logger.log(${o})`);else if("function"==typeof r.$comment){const n=u.str`${i}/$comment`,r=t.scopeValue("root",{ref:e.root});t.code(u._`${l.default.self}.opts.$comment(${o}, ${n}, ${r}.schema)`)}}function x(t,e,n,i){const{gen:r,schema:s,data:c,allErrors:h,opts:d,self:f}=t,{RULES:m}=f;function y(p){(0,o.shouldUseGroup)(s,p)&&(p.type?(r.if((0,a.checkDataType)(p.type,c,d.strictNumbers)),M(t,p),1===e.length&&e[0]===p.type&&n&&(r.else(),(0,a.reportTypeError)(t)),r.endIf()):M(t,p),h||r.if(u._`${l.default.errors} === ${i||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(s,m)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{k(t.dataTypes,e)||S(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const n=[];for(const i of t.dataTypes)k(e,i)?n.push(i):e.includes("integer")&&"number"===i&&n.push("integer");t.dataTypes=n}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&S(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const n=t.self.RULES.all;for(const i in n){const r=n[i];if("object"==typeof r&&(0,o.shouldUseRule)(t.schema,r)){const{type:n}=r.definition;n.length&&!n.some((t=>{return i=t,(n=e).includes(i)||"number"===i&&n.includes("integer");var n,i}))&&S(t,`missing type "${n.join(",")}" for keyword "${i}"`)}}}(t,t.dataTypes))}(t,e),r.block((()=>{for(const t of m.rules)y(t);y(m.post)}))):r.block((()=>A(t,"$ref",m.all.$ref.definition)))}function M(t,e){const{gen:n,schema:i,opts:{useDefaults:r}}=t;r&&(0,s.assignDefaults)(t,e.type),n.block((()=>{for(const n of e.rules)(0,o.shouldUseRule)(i,n)&&A(t,n.keyword,n.definition,e.type)}))}function k(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function S(t,e){e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(t,e,t.opts.strictTypes)}e.validateFunctionCode=function(t){v(t)&&(b(t),g(t))?function(t){const{schema:e,opts:n,gen:i}=t;m(t,(()=>{n.$comment&&e.$comment&&w(t),function(t){const{schema:e,opts:n}=t;void 0!==e.default&&n.useDefaults&&n.strictSchema&&(0,p.checkStrictMode)(t,"default is ignored in the schema root")}(t),i.let(l.default.vErrors,null),i.let(l.default.errors,0),n.unevaluated&&function(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",u._`${n}.evaluated`),e.if(u._`${t.evaluated}.dynamicProps`,(()=>e.assign(u._`${t.evaluated}.props`,u._`undefined`))),e.if(u._`${t.evaluated}.dynamicItems`,(()=>e.assign(u._`${t.evaluated}.items`,u._`undefined`)))}(t),_(t),function(t){const{gen:e,schemaEnv:n,validateName:i,ValidationError:r,opts:o}=t;n.$async?e.if(u._`${l.default.errors} === 0`,(()=>e.return(l.default.data)),(()=>e.throw(u._`new ${r}(${l.default.vErrors})`))):(e.assign(u._`${i}.errors`,l.default.vErrors),o.unevaluated&&function({gen:t,evaluated:e,props:n,items:i}){n instanceof u.Name&&t.assign(u._`${e}.props`,n),i instanceof u.Name&&t.assign(u._`${e}.items`,i)}(t),e.return(u._`${l.default.errors} === 0`))}(t)}))}(t):m(t,(()=>(0,i.topBoolOrEmptySchema)(t)))};class E{constructor(t,e,n){if((0,c.validateKeywordUsage)(t,e,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",j(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",l.default.errors))}result(t,e,n){this.failResult((0,u.not)(t),e,n)}failResult(t,e,n){this.gen.if(t),n?n():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,u.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(u._`${e} !== undefined && (${(0,u.or)(this.invalid$data(),t)})`)}error(t,e,n){if(e)return this.setParams(e),this._error(t,n),void this.setParams({});this._error(t,n)}_error(t,e){(t?f.reportExtraError:f.reportError)(this,this.def.error,e)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,n=u.nil){this.gen.block((()=>{this.check$data(t,n),e()}))}check$data(t=u.nil,e=u.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:r,def:o}=this;n.if((0,u.or)(u._`${i} === undefined`,e)),t!==u.nil&&n.assign(t,!0),(r.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==u.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:n,def:i,it:r}=this;return(0,u.or)(function(){if(n.length){if(!(e instanceof u.Name))throw new Error("ajv implementation error");const t=Array.isArray(n)?n:[n];return u._`${(0,a.checkDataTypes)(t,e,r.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(i.validateSchema){const n=t.scopeValue("validate$data",{ref:i.validateSchema});return u._`!${n}(${e})`}return u.nil}())}subschema(t,e){const n=(0,h.getSubschema)(this.it,t);(0,h.extendSubschemaData)(n,this.it,t),(0,h.extendSubschemaMode)(n,t);const r={...this.it,...n,items:void 0,props:void 0};return function(t,e){v(t)&&(b(t),g(t))?function(t,e){const{schema:n,gen:i,opts:r}=t;r.$comment&&n.$comment&&w(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,d.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const o=i.const("_errs",l.default.errors);_(t,o),i.var(e,u._`${o} === ${l.default.errors}`)}(t,e):(0,i.boolOrEmptySchema)(t,e)}(r,e),r}mergeEvaluated(t,e){const{it:n,gen:i}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==t.props&&(n.props=p.mergeEvaluated.props(i,t.props,n.props,e)),!0!==n.items&&void 0!==t.items&&(n.items=p.mergeEvaluated.items(i,t.items,n.items,e)))}mergeValidEvaluated(t,e){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return i.if(e,(()=>this.mergeEvaluated(t,u.Name))),!0}}function A(t,e,n,i){const r=new E(t,n,e);"code"in n?n.code(r,i):r.$data&&n.validate?(0,c.funcKeywordCode)(r,n):"macro"in n?(0,c.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,c.funcKeywordCode)(r,n)}e.KeywordCxt=E;const T=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j(t,{dataLevel:e,dataNames:n,dataPathArr:i}){let r,o;if(""===t)return l.default.rootData;if("/"===t[0]){if(!T.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);r=t,o=l.default.rootData}else{const a=C.exec(t);if(!a)throw new Error(`Invalid JSON-pointer: ${t}`);const s=+a[1];if(r=a[2],"#"===r){if(s>=e)throw new Error(c("property/index",s));return i[e-s]}if(s>e)throw new Error(c("data",s));if(o=n[e-s],!r)return o}let a=o;const s=r.split("/");for(const t of s)t&&(o=u._`${o}${(0,u.getProperty)((0,p.unescapeJsonPointer)(t))}`,a=u._`${a} && ${o}`);return a;function c(t,n){return`Cannot access ${t} ${n} levels up, current level is ${e}`}}e.getData=j},5005:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;const i=n(3487),r=n(2141),o=n(412),a=n(4181);function s(t){const{gen:e,data:n,it:r}=t;e.if(r.parentData,(()=>e.assign(n,i._`${r.parentData}[${r.parentDataProperty}]`)))}function c(t,e,n){if(void 0===n)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,i.stringify)(n)})}e.macroKeywordCode=function(t,e){const{gen:n,keyword:r,schema:o,parentSchema:a,it:s}=t,h=e.macro.call(s.self,o,a,s),u=c(n,r,h);!1!==s.opts.validateSchema&&s.self.validateSchema(h,!0);const l=n.name("valid");t.subschema({schema:h,schemaPath:i.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:u,compositeRule:!0},l),t.pass(l,(()=>t.error(!0)))},e.funcKeywordCode=function(t,e){var n;const{gen:h,keyword:u,schema:l,parentSchema:d,$data:p,it:f}=t;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(f,e);const m=!p&&e.compile?e.compile.call(f.self,l,d,f):e.validate,y=c(h,u,m),g=h.let("valid");function v(n=(e.async?i._`await `:i.nil)){const a=f.opts.passContext?r.default.this:r.default.self,s=!("compile"in e&&!p||!1===e.schema);h.assign(g,i._`${n}${(0,o.callValidateCode)(t,y,a,s)}`,e.modifying)}function b(t){var n;h.if((0,i.not)(null!==(n=e.valid)&&void 0!==n?n:g),t)}t.block$data(g,(function(){if(!1===e.errors)v(),e.modifying&&s(t),b((()=>t.error()));else{const n=e.async?function(){const t=h.let("ruleErrs",null);return h.try((()=>v(i._`await `)),(e=>h.assign(g,!1).if(i._`${e} instanceof ${f.ValidationError}`,(()=>h.assign(t,i._`${e}.errors`)),(()=>h.throw(e))))),t}():function(){const t=i._`${y}.errors`;return h.assign(t,null),v(i.nil),t}();e.modifying&&s(t),b((()=>function(t,e){const{gen:n}=t;n.if(i._`Array.isArray(${e})`,(()=>{n.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${e} : ${r.default.vErrors}.concat(${e})`).assign(r.default.errors,i._`${r.default.vErrors}.length`),(0,a.extendErrors)(t)}),(()=>t.error()))}(t,n)))}})),t.ok(null!==(n=e.valid)&&void 0!==n?n:g)},e.validSchemaType=function(t,e,n=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||n&&void 0===t))},e.validateKeywordUsage=function({schema:t,opts:e,self:n,errSchemaPath:i},r,o){if(Array.isArray(r.keyword)?!r.keyword.includes(o):r.keyword!==o)throw new Error("ajv implementation error");const a=r.dependencies;if(null==a?void 0:a.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(t[o])){const t=`keyword "${o}" value is invalid at path "${i}": `+n.errorsText(r.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);n.logger.error(t)}}},3099:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;const i=n(3487),r=n(6776);e.getSubschema=function(t,{keyword:e,schemaProp:n,schema:o,schemaPath:a,errSchemaPath:s,topSchemaRef:c}){if(void 0!==e&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==e){const o=t.schema[e];return void 0===n?{schema:o,schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[n],schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(e)}${(0,i.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,r.escapeFragment)(n)}`}}if(void 0!==o){if(void 0===a||void 0===s||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:a,topSchemaRef:c,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(t,e,{dataProp:n,dataPropType:o,data:a,dataTypes:s,propertyName:c}){if(void 0!==a&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=e;if(void 0!==n){const{errorPath:a,dataPathArr:s,opts:c}=e;u(h.let("data",i._`${e.data}${(0,i.getProperty)(n)}`,!0)),t.errorPath=i.str`${a}${(0,r.getErrorPath)(n,o,c.jsPropertySyntax)}`,t.parentDataProperty=i._`${n}`,t.dataPathArr=[...s,t.parentDataProperty]}function u(n){t.data=n,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,n]}void 0!==a&&(u(a instanceof i.Name?a:h.let("data",a,!0)),void 0!==c&&(t.propertyName=c)),s&&(t.dataTypes=s)},e.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:i,createErrors:r,allErrors:o}){void 0!==i&&(t.compositeRule=i),void 0!==r&&(t.createErrors=r),void 0!==o&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=n}},7159:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var i=n(4815);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var r=n(3487);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const o=n(7426),a=n(6646),s=n(3141),c=n(5173),h=n(3487),u=n(2531),l=n(453),d=n(6776),p=n(4775),f=n(3589),m=(t,e)=>new RegExp(t,e);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(t){var e,n,i,r,o,a,s,c,h,u,l,d,p,y,g,v,b,_,w,x,M,k,S,E,A;const T=t.strict,C=null===(e=t.code)||void 0===e?void 0:e.optimize,j=!0===C||void 0===C?1:C||0,O=null!==(i=null===(n=t.code)||void 0===n?void 0:n.regExp)&&void 0!==i?i:m,P=null!==(r=t.uriResolver)&&void 0!==r?r:f.default;return{strictSchema:null===(a=null!==(o=t.strictSchema)&&void 0!==o?o:T)||void 0===a||a,strictNumbers:null===(c=null!==(s=t.strictNumbers)&&void 0!==s?s:T)||void 0===c||c,strictTypes:null!==(u=null!==(h=t.strictTypes)&&void 0!==h?h:T)&&void 0!==u?u:"log",strictTuples:null!==(d=null!==(l=t.strictTuples)&&void 0!==l?l:T)&&void 0!==d?d:"log",strictRequired:null!==(y=null!==(p=t.strictRequired)&&void 0!==p?p:T)&&void 0!==y&&y,code:t.code?{...t.code,optimize:j,regExp:O}:{optimize:j,regExp:O},loopRequired:null!==(g=t.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=t.loopEnum)&&void 0!==v?v:200,meta:null===(b=t.meta)||void 0===b||b,messages:null===(_=t.messages)||void 0===_||_,inlineRefs:null===(w=t.inlineRefs)||void 0===w||w,schemaId:null!==(x=t.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(M=t.addUsedSchema)||void 0===M||M,validateSchema:null===(k=t.validateSchema)||void 0===k||k,validateFormats:null===(S=t.validateFormats)||void 0===S||S,unicodeRegExp:null===(E=t.unicodeRegExp)||void 0===E||E,int32range:null===(A=t.int32range)||void 0===A||A,uriResolver:P}}class w{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,..._(t)};const{es5:e,lines:n}=this.opts.code;this.scope=new h.ValueScope({scope:{},prefixes:g,es5:e,lines:n}),this.logger=function(t){if(!1===t)return T;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,v,t,"NOT SUPPORTED"),x.call(this,b,t,"DEPRECATED","warn"),this._metaOpts=A.call(this),t.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&E.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),k.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:n}=this.opts;let i=p;"id"===n&&(i={...p},i.id=i.$id,delete i.$id),e&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let n;if("string"==typeof t){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);const i=n(e);return"$async"in n||(this.errors=n.errors),i}compile(t,e){const n=this._addSchema(t,e);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return i.call(this,t,e);async function i(t,e){await r.call(this,t.$schema);const n=this._addSchema(t,e);return n.validate||o.call(this,n)}async function r(t){t&&!this.getSchema(t)&&await i.call(this,{$ref:t},!0)}async function o(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof a.default))throw e;return s.call(this,e),await c.call(this,e.missingSchema),o.call(this,t)}}function s({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function c(t){const n=await h.call(this,t);this.refs[t]||await r.call(this,n.$schema),this.refs[t]||this.addSchema(n,t,e)}async function h(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=n(t))}finally{delete this._loading[t]}}}addSchema(t,e,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,n,i);return this}let r;if("object"==typeof t){const{schemaId:e}=this.opts;if(r=t[e],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${e} must be string`)}return e=(0,u.normalizeId)(e||r),this._checkUnique(e),this.schemas[e]=this._addSchema(t,n,e,i,!0),this}addMetaSchema(t,e,n=this.opts.validateSchema){return this.addSchema(t,e,!0,n),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let n;if(n=t.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(n,t);if(!i&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return i}getSchema(t){let e;for(;"string"==typeof(e=M.call(this,t));)t=e;if(void 0===e){const{schemaId:n}=this.opts,i=new c.SchemaEnv({schema:{},schemaId:n});if(e=c.resolveSchema.call(this,i,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=M.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{const e=t;this._cache.delete(e);let n=t[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let n;if("string"==typeof t)n=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=n);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(n=(e=t).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,n,e),!e)return(0,d.eachItem)(n,(t=>O.call(this,t))),this;I.call(this,e);const i={...e,type:(0,l.getJSONTypes)(e.type),schemaType:(0,l.getJSONTypes)(e.schemaType)};return(0,d.eachItem)(n,0===i.type.length?t=>O.call(this,t,i):t=>i.type.forEach((e=>O.call(this,t,i,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const n of e.rules){const e=n.rules.findIndex((e=>e.keyword===t));e>=0&&n.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:n="data"}={}){return t&&0!==t.length?t.map((t=>`${n}${t.instancePath} ${t.message}`)).reduce(((t,n)=>t+e+n)):"No errors"}$dataMetaSchema(t,e){const n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const i of e){const e=i.split("/").slice(1);let r=t;for(const t of e)r=r[t];for(const t in n){const e=n[t];if("object"!=typeof e)continue;const{$data:i}=e.definition,o=r[t];i&&o&&(r[t]=R(o))}}return t}_removeAllSchemas(t,e){for(const n in t){const i=t[n];e&&!e.test(n)||("string"==typeof i?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,e,n,i=this.opts.validateSchema,r=this.opts.addUsedSchema){let o;const{schemaId:a}=this.opts;if("object"==typeof t)o=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let s=this._cache.get(t);if(void 0!==s)return s;n=(0,u.normalizeId)(o||n);const h=u.getSchemaRefs.call(this,t,n);return s=new c.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:n,localRefs:h}),this._cache.set(s.schema,s),r&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=s),i&&this.validateSchema(t,!0),s}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):c.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,t)}finally{this.opts=e}}}function x(t,e,n,i="error"){for(const r in t){const o=r;o in e&&this.logger[i](`${n}: option ${r}. ${t[o]}`)}}function M(t){return t=(0,u.normalizeId)(t),this.schemas[t]||this.refs[t]}function k(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function S(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function E(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}}function A(){const t={...this.opts};for(const e of y)delete t[e];return t}e.default=w,w.ValidationError=o.default,w.MissingRefError=a.default;const T={log(){},warn(){},error(){}},C=/^[a-z_$][a-z0-9_$:-]*$/i;function j(t,e){const{RULES:n}=this;if((0,d.eachItem)(t,(t=>{if(n.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!C.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function O(t,e,n){var i;const r=null==e?void 0:e.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let a=r?o.post:o.rules.find((({type:t})=>t===n));if(a||(a={type:n,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;const s={keyword:t,definition:{...e,type:(0,l.getJSONTypes)(e.type),schemaType:(0,l.getJSONTypes)(e.schemaType)}};e.before?P.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,null===(i=e.implements)||void 0===i||i.forEach((t=>this.addKeyword(t)))}function P(t,e,n){const i=t.rules.findIndex((t=>t.keyword===n));i>=0?t.rules.splice(i,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function I(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=R(e)),t.validateSchema=this.compile(e,!0))}const $={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(t){return{anyOf:[t,$]}}},2500:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3329),r=n(8161),o=n(7114),a=n(484),s=n(877),c=n(5032),h=n(2374),u=["/properties"];e.default=function(t){return[i,r,o,a,e(this,s),c,e(this,h)].forEach((t=>this.addMetaSchema(t,void 0,!1))),this;function e(e,n){return t?e.$dataMetaSchema(n,u):n}}},3510:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(4063);i.code='require("ajv/dist/runtime/equal").default',e.default=i},4499:(t,e)=>{"use strict";function n(t){const e=t.length;let n,i=0,r=0;for(;r=55296&&n<=56319&&r{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(540);i.code='require("ajv/dist/runtime/uri").default',e.default=i},7426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}e.default=n},4783:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;const i=n(3487),r=n(6776),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{parentSchema:e,it:n}=t,{items:i}=e;Array.isArray(i)?a(t,i):(0,r.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(t,e){const{gen:n,schema:o,data:a,keyword:s,it:c}=t;c.items=!0;const h=n.const("len",i._`${a}.length`);if(!1===o)t.setParams({len:e.length}),t.pass(i._`${h} <= ${e.length}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(c,o)){const o=n.var("valid",i._`${h} <= ${e.length}`);n.if((0,i.not)(o),(()=>function(o){n.forRange("i",e.length,h,(e=>{t.subschema({keyword:s,dataProp:e,dataPropType:r.Type.Num},o),c.allErrors||n.if((0,i.not)(o),(()=>n.break()))}))}(o))),t.ok(o)}}e.validateAdditionalItems=a,e.default=o},9351:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(412),r=n(3487),o=n(2141),a=n(6776),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>r._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:n,parentSchema:s,data:c,errsCount:h,it:u}=t;if(!h)throw new Error("ajv implementation error");const{allErrors:l,opts:d}=u;if(u.props=!0,"all"!==d.removeAdditional&&(0,a.alwaysValidSchema)(u,n))return;const p=(0,i.allSchemaProperties)(s.properties),f=(0,i.allSchemaProperties)(s.patternProperties);function m(t){e.code(r._`delete ${c}[${t}]`)}function y(i){if("all"===d.removeAdditional||d.removeAdditional&&!1===n)m(i);else{if(!1===n)return t.setParams({additionalProperty:i}),t.error(),void(l||e.break());if("object"==typeof n&&!(0,a.alwaysValidSchema)(u,n)){const n=e.name("valid");"failing"===d.removeAdditional?(g(i,n,!1),e.if((0,r.not)(n),(()=>{t.reset(),m(i)}))):(g(i,n),l||e.if((0,r.not)(n),(()=>e.break())))}}}function g(e,n,i){const r={keyword:"additionalProperties",dataProp:e,dataPropType:a.Type.Str};!1===i&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(r,n)}e.forIn("key",c,(n=>{p.length||f.length?e.if(function(n){let o;if(p.length>8){const t=(0,a.schemaRefOrVal)(u,s.properties,"properties");o=(0,i.isOwnProperty)(e,t,n)}else o=p.length?(0,r.or)(...p.map((t=>r._`${n} === ${t}`))):r.nil;return f.length&&(o=(0,r.or)(o,...f.map((e=>r._`${(0,i.usePattern)(t,e)}.test(${n})`)))),(0,r.not)(o)}(n),(()=>y(n))):y(n)})),t.ok(r._`${h} === ${o.default.errors}`)}};e.default=s},1125:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6776),r={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const o=e.name("valid");n.forEach(((e,n)=>{if((0,i.alwaysValidSchema)(r,e))return;const a=t.subschema({keyword:"allOf",schemaProp:n},o);t.ok(o),t.mergeEvaluated(a)}))}};e.default=r},19:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(412).validateUnion,error:{message:"must match a schema in anyOf"}};e.default=i},9864:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>void 0===e?i.str`must contain at least ${t} valid item(s)`:i.str`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>void 0===e?i._`{minContains: ${t}}`:i._`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:n,parentSchema:o,data:a,it:s}=t;let c,h;const{minContains:u,maxContains:l}=o;s.opts.next?(c=void 0===u?1:u,h=l):c=1;const d=e.const("len",i._`${a}.length`);if(t.setParams({min:c,max:h}),void 0===h&&0===c)return void(0,r.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==h&&c>h)return(0,r.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,r.alwaysValidSchema)(s,n)){let e=i._`${d} >= ${c}`;return void 0!==h&&(e=i._`${e} && ${d} <= ${h}`),void t.pass(e)}s.items=!0;const p=e.name("valid");function f(){const t=e.name("_valid"),n=e.let("count",0);m(t,(()=>e.if(t,(()=>function(t){e.code(i._`${t}++`),void 0===h?e.if(i._`${t} >= ${c}`,(()=>e.assign(p,!0).break())):(e.if(i._`${t} > ${h}`,(()=>e.assign(p,!1).break())),1===c?e.assign(p,!0):e.if(i._`${t} >= ${c}`,(()=>e.assign(p,!0))))}(n)))))}function m(n,i){e.forRange("i",0,d,(e=>{t.subschema({keyword:"contains",dataProp:e,dataPropType:r.Type.Num,compositeRule:!0},n),i()}))}void 0===h&&1===c?m(p,(()=>e.if(p,(()=>e.break())))):0===c?(e.let(p,!0),void 0!==h&&e.if(i._`${a}.length > 0`,f)):(e.let(p,!1),f()),t.result(p,(()=>t.reset()))}};e.default=o},7772:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const i=n(3487),r=n(6776),o=n(412);e.error={message:({params:{property:t,depsCount:e,deps:n}})=>{const r=1===e?"property":"properties";return i.str`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>i._`{property: ${t}, + missingProperty: ${r}, + depsCount: ${e}, + deps: ${n}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(t){const[e,n]=function({schema:t}){const e={},n={};for(const i in t)"__proto__"!==i&&((Array.isArray(t[i])?e:n)[i]=t[i]);return[e,n]}(t);s(t,e),c(t,n)}};function s(t,e=t.schema){const{gen:n,data:r,it:a}=t;if(0===Object.keys(e).length)return;const s=n.let("missing");for(const c in e){const h=e[c];if(0===h.length)continue;const u=(0,o.propertyInData)(n,r,c,a.opts.ownProperties);t.setParams({property:c,depsCount:h.length,deps:h.join(", ")}),a.allErrors?n.if(u,(()=>{for(const e of h)(0,o.checkReportMissingProp)(t,e)})):(n.if(i._`${u} && (${(0,o.checkMissingProp)(t,h,s)})`),(0,o.reportMissingProp)(t,s),n.else())}}function c(t,e=t.schema){const{gen:n,data:i,keyword:a,it:s}=t,c=n.name("valid");for(const h in e)(0,r.alwaysValidSchema)(s,e[h])||(n.if((0,o.propertyInData)(n,i,h,s.opts.ownProperties),(()=>{const e=t.subschema({keyword:a,schemaProp:h},c);t.mergeValidEvaluated(e,c)}),(()=>n.var(c,!0))),t.ok(c))}e.validatePropertyDeps=s,e.validateSchemaDeps=c,e.default=a},7274:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(7772),r={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,i.validateSchemaDeps)(t)};e.default=r},9434:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>i.str`must match "${t.ifClause}" schema`,params:({params:t})=>i._`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:n,it:o}=t;void 0===n.then&&void 0===n.else&&(0,r.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const s=a(o,"then"),c=a(o,"else");if(!s&&!c)return;const h=e.let("valid",!0),u=e.name("_valid");if(function(){const e=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);t.mergeEvaluated(e)}(),t.reset(),s&&c){const n=e.let("ifClause");t.setParams({ifClause:n}),e.if(u,l("then",n),l("else",n))}else s?e.if(u,l("then")):e.if((0,i.not)(u),l("else"));function l(n,r){return()=>{const o=t.subschema({keyword:n},u);e.assign(h,u),t.mergeValidEvaluated(o,h),r?e.assign(r,i._`${n}`):t.setParams({ifClause:n})}}t.pass(h,(()=>t.error(!0)))}};function a(t,e){const n=t.schema[e];return void 0!==n&&!(0,r.alwaysValidSchema)(t,n)}e.default=o},8200:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(4783),r=n(2924),o=n(4665),a=n(1119),s=n(9864),c=n(7772),h=n(3708),u=n(9351),l=n(6239),d=n(2296),p=n(5697),f=n(19),m=n(4200),y=n(1125),g=n(9434),v=n(6552);e.default=function(t=!1){const e=[p.default,f.default,m.default,y.default,g.default,v.default,h.default,u.default,c.default,l.default,d.default];return t?e.push(r.default,a.default):e.push(i.default,o.default),e.push(s.default),e}},4665:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;const i=n(3487),r=n(6776),o=n(412),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return s(t,"additionalItems",e);n.items=!0,(0,r.alwaysValidSchema)(n,e)||t.ok((0,o.validateArray)(t))}};function s(t,e,n=t.schema){const{gen:o,parentSchema:a,data:s,keyword:c,it:h}=t;!function(t){const{opts:i,errSchemaPath:o}=h,a=n.length,s=a===t.minItems&&(a===t.maxItems||!1===t[e]);if(i.strictTuples&&!s){const t=`"${c}" is ${a}-tuple, but minItems or maxItems/${e} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(h,t,i.strictTuples)}}(a),h.opts.unevaluated&&n.length&&!0!==h.items&&(h.items=r.mergeEvaluated.items(o,n.length,h.items));const u=o.name("valid"),l=o.const("len",i._`${s}.length`);n.forEach(((e,n)=>{(0,r.alwaysValidSchema)(h,e)||(o.if(i._`${l} > ${n}`,(()=>t.subschema({keyword:c,schemaProp:n,dataProp:n},u))),t.ok(u))}))}e.validateTuple=s,e.default=a},1119:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o=n(412),a=n(4783),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{schema:e,parentSchema:n,it:i}=t,{prefixItems:s}=n;i.items=!0,(0,r.alwaysValidSchema)(i,e)||(s?(0,a.validateAdditionalItems)(t,s):t.ok((0,o.validateArray)(t)))}};e.default=s},5697:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6776),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:n,it:r}=t;if((0,i.alwaysValidSchema)(r,n))return void t.fail();const o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,(()=>t.reset()),(()=>t.error()))},error:{message:"must NOT be valid"}};e.default=r},4200:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>i._`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:n,parentSchema:o,it:a}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&o.discriminator)return;const s=n,c=e.let("valid",!1),h=e.let("passing",null),u=e.name("_valid");t.setParams({passing:h}),e.block((function(){s.forEach(((n,o)=>{let s;(0,r.alwaysValidSchema)(a,n)?e.var(u,!0):s=t.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&e.if(i._`${u} && ${c}`).assign(c,!1).assign(h,i._`[${h}, ${o}]`).else(),e.if(u,(()=>{e.assign(c,!0),e.assign(h,o),s&&t.mergeEvaluated(s,i.Name)}))}))})),t.result(c,(()=>t.reset()),(()=>t.error(!0)))}};e.default=o},2296:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(412),r=n(3487),o=n(6776),a=n(6776),s={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,data:s,parentSchema:c,it:h}=t,{opts:u}=h,l=(0,i.allSchemaProperties)(n),d=l.filter((t=>(0,o.alwaysValidSchema)(h,n[t])));if(0===l.length||d.length===l.length&&(!h.opts.unevaluated||!0===h.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=e.name("valid");!0===h.props||h.props instanceof r.Name||(h.props=(0,a.evaluatedPropsToName)(e,h.props));const{props:m}=h;function y(t){for(const e in p)new RegExp(t).test(e)&&(0,o.checkStrictMode)(h,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function g(n){e.forIn("key",s,(o=>{e.if(r._`${(0,i.usePattern)(t,n)}.test(${o})`,(()=>{const i=d.includes(n);i||t.subschema({keyword:"patternProperties",schemaProp:n,dataProp:o,dataPropType:a.Type.Str},f),h.opts.unevaluated&&!0!==m?e.assign(r._`${m}[${o}]`,!0):i||h.allErrors||e.if((0,r.not)(f),(()=>e.break()))}))}))}!function(){for(const t of l)p&&y(t),h.allErrors?g(t):(e.var(f,!0),g(t),e.if(f))}()}};e.default=s},2924:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(4665),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,i.validateTuple)(t,"items")};e.default=r},6239:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(4815),r=n(412),o=n(6776),a=n(9351),s={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,parentSchema:s,data:c,it:h}=t;"all"===h.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new i.KeywordCxt(h,a.default,"additionalProperties"));const u=(0,r.allSchemaProperties)(n);for(const t of u)h.definedProperties.add(t);h.opts.unevaluated&&u.length&&!0!==h.props&&(h.props=o.mergeEvaluated.props(e,(0,o.toHash)(u),h.props));const l=u.filter((t=>!(0,o.alwaysValidSchema)(h,n[t])));if(0===l.length)return;const d=e.name("valid");for(const n of l)p(n)?f(n):(e.if((0,r.propertyInData)(e,c,n,h.opts.ownProperties)),f(n),h.allErrors||e.else().var(d,!0),e.endIf()),t.it.definedProperties.add(n),t.ok(d);function p(t){return h.opts.useDefaults&&!h.compositeRule&&void 0!==n[t].default}function f(e){t.subschema({keyword:"properties",schemaProp:e,dataProp:e},d)}}};e.default=s},3708:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>i._`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:n,data:o,it:a}=t;if((0,r.alwaysValidSchema)(a,n))return;const s=e.name("valid");e.forIn("key",o,(n=>{t.setParams({propertyName:n}),t.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},s),e.if((0,i.not)(s),(()=>{t.error(!0),a.allErrors||e.break()}))})),t.ok(s)}};e.default=o},6552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6776),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){void 0===e.if&&(0,i.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};e.default=r},412:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;const i=n(3487),r=n(6776),o=n(2141),a=n(6776);function s(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:i._`Object.prototype.hasOwnProperty`})}function c(t,e,n){return i._`${s(t)}.call(${e}, ${n})`}function h(t,e,n,r){const o=i._`${e}${(0,i.getProperty)(n)} === undefined`;return r?(0,i.or)(o,(0,i.not)(c(t,e,n))):o}function u(t){return t?Object.keys(t).filter((t=>"__proto__"!==t)):[]}e.checkReportMissingProp=function(t,e){const{gen:n,data:r,it:o}=t;n.if(h(n,r,e,o.opts.ownProperties),(()=>{t.setParams({missingProperty:i._`${e}`},!0),t.error()}))},e.checkMissingProp=function({gen:t,data:e,it:{opts:n}},r,o){return(0,i.or)(...r.map((r=>(0,i.and)(h(t,e,r,n.ownProperties),i._`${o} = ${r}`))))},e.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},e.hasPropFunc=s,e.isOwnProperty=c,e.propertyInData=function(t,e,n,r){const o=i._`${e}${(0,i.getProperty)(n)} !== undefined`;return r?i._`${o} && ${c(t,e,n)}`:o},e.noPropertyInData=h,e.allSchemaProperties=u,e.schemaProperties=function(t,e){return u(e).filter((n=>!(0,r.alwaysValidSchema)(t,e[n])))},e.callValidateCode=function({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:a,errorPath:s},it:c},h,u,l){const d=l?i._`${t}, ${e}, ${r}${a}`:e,p=[[o.default.instancePath,(0,i.strConcat)(o.default.instancePath,s)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&p.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const f=i._`${d}, ${n.object(...p)}`;return u!==i.nil?i._`${h}.call(${u}, ${f})`:i._`${h}(${f})`};const l=i._`new RegExp`;e.usePattern=function({gen:t,it:{opts:e}},n){const r=e.unicodeRegExp?"u":"",{regExp:o}=e.code,s=o(n,r);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:i._`${"new RegExp"===o.code?l:(0,a.useFunc)(t,o)}(${n}, ${r})`})},e.validateArray=function(t){const{gen:e,data:n,keyword:o,it:a}=t,s=e.name("valid");if(a.allErrors){const t=e.let("valid",!0);return c((()=>e.assign(t,!1))),t}return e.var(s,!0),c((()=>e.break())),s;function c(a){const c=e.const("len",i._`${n}.length`);e.forRange("i",0,c,(n=>{t.subschema({keyword:o,dataProp:n,dataPropType:r.Type.Num},s),e.if((0,i.not)(s),a)}))}},e.validateUnion=function(t){const{gen:e,schema:n,keyword:o,it:a}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((t=>(0,r.alwaysValidSchema)(a,t)))&&!a.opts.unevaluated)return;const s=e.let("valid",!1),c=e.name("_valid");e.block((()=>n.forEach(((n,r)=>{const a=t.subschema({keyword:o,schemaProp:r,compositeRule:!0},c);e.assign(s,i._`${s} || ${c}`),t.mergeValidEvaluated(a,c)||e.if((0,i.not)(s))})))),t.result(s,(()=>t.reset()),(()=>t.error(!0)))}},8386:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=n},5684:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(8386),r=n(8280),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",i.default,r.default];e.default=o},8280:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;const i=n(6646),r=n(412),o=n(3487),a=n(2141),s=n(5173),c=n(6776),h={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:n,it:r}=t,{baseId:a,schemaEnv:c,validateName:h,opts:d,self:p}=r,{root:f}=c;if(("#"===n||"#/"===n)&&a===f.baseId)return function(){if(c===f)return l(t,h,c,c.$async);const n=e.scopeValue("root",{ref:f});return l(t,o._`${n}.validate`,f,f.$async)}();const m=s.resolveRef.call(p,f,a,n);if(void 0===m)throw new i.default(r.opts.uriResolver,a,n);return m instanceof s.SchemaEnv?function(e){const n=u(t,e);l(t,n,e,e.$async)}(m):function(i){const r=e.scopeValue("schema",!0===d.code.source?{ref:i,code:(0,o.stringify)(i)}:{ref:i}),a=e.name("valid"),s=t.subschema({schema:i,dataTypes:[],schemaPath:o.nil,topSchemaRef:r,errSchemaPath:n},a);t.mergeEvaluated(s),t.ok(a)}(m)}};function u(t,e){const{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):o._`${n.scopeValue("wrapper",{ref:e})}.validate`}function l(t,e,n,i){const{gen:s,it:h}=t,{allErrors:u,schemaEnv:l,opts:d}=h,p=d.passContext?a.default.this:o.nil;function f(t){const e=o._`${t}.errors`;s.assign(a.default.vErrors,o._`${a.default.vErrors} === null ? ${e} : ${a.default.vErrors}.concat(${e})`),s.assign(a.default.errors,o._`${a.default.vErrors}.length`)}function m(t){var e;if(!h.opts.unevaluated)return;const i=null===(e=null==n?void 0:n.validate)||void 0===e?void 0:e.evaluated;if(!0!==h.props)if(i&&!i.dynamicProps)void 0!==i.props&&(h.props=c.mergeEvaluated.props(s,i.props,h.props));else{const e=s.var("props",o._`${t}.evaluated.props`);h.props=c.mergeEvaluated.props(s,e,h.props,o.Name)}if(!0!==h.items)if(i&&!i.dynamicItems)void 0!==i.items&&(h.items=c.mergeEvaluated.items(s,i.items,h.items));else{const e=s.var("items",o._`${t}.evaluated.items`);h.items=c.mergeEvaluated.items(s,e,h.items,o.Name)}}i?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const n=s.let("valid");s.try((()=>{s.code(o._`await ${(0,r.callValidateCode)(t,e,p)}`),m(e),u||s.assign(n,!0)}),(t=>{s.if(o._`!(${t} instanceof ${h.ValidationError})`,(()=>s.throw(t))),f(t),u||s.assign(n,!1)})),t.ok(n)}():t.result((0,r.callValidateCode)(t,e,p),(()=>m(e)),(()=>f(e)))}e.getValidate=u,e.callRef=l,e.default=h},1240:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(9306),o=n(5173),a=n(6776),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===r.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>i._`{error: ${t}, tag: ${n}, tagValue: ${e}}`},code(t){const{gen:e,data:n,schema:s,parentSchema:c,it:h}=t,{oneOf:u}=c;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=s.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const d=e.let("valid",!1),p=e.const("tag",i._`${n}${(0,i.getProperty)(l)}`);function f(n){const r=e.name("valid"),o=t.subschema({keyword:"oneOf",schemaProp:n},r);return t.mergeEvaluated(o,i.Name),r}e.if(i._`typeof ${p} == "string"`,(()=>function(){const n=function(){var t;const e={},n=r(c);let i=!0;for(let e=0;et.error(!1,{discrError:r.DiscrError.Tag,tag:p,tagName:l}))),t.ok(d)}};e.default=s},9306:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(n=e.DiscrError||(e.DiscrError={})).Tag="tag",n.Mapping="mapping"},3924:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(5684),r=n(2649),o=n(8200),a=n(9502),s=n(6167),c=[i.default,r.default,(0,o.default)(),a.default,s.metadataVocabulary,s.contentVocabulary];e.default=c},6215:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;const i=n(3487),r=n(2141),o=n(5173),a=n(8280),s={keyword:"$dynamicAnchor",schemaType:"string",code:t=>c(t,t.schema)};function c(t,e){const{gen:n,it:s}=t;s.schemaEnv.root.dynamicAnchors[e]=!0;const c=i._`${r.default.dynamicAnchors}${(0,i.getProperty)(e)}`,h="#"===s.errSchemaPath?s.validateName:function(t){const{schemaEnv:e,schema:n,self:i}=t.it,{root:r,baseId:s,localRefs:c,meta:h}=e.root,{schemaId:u}=i.opts,l=new o.SchemaEnv({schema:n,schemaId:u,root:r,baseId:s,localRefs:c,meta:h});return o.compileSchema.call(i,l),(0,a.getValidate)(t,l)}(t);n.if(i._`!${c}`,(()=>n.assign(c,h)))}e.dynamicAnchor=c,e.default=s},1919:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;const i=n(3487),r=n(2141),o=n(8280),a={keyword:"$dynamicRef",schemaType:"string",code:t=>s(t,t.schema)};function s(t,e){const{gen:n,keyword:a,it:s}=t;if("#"!==e[0])throw new Error(`"${a}" only supports hash fragment reference`);const c=e.slice(1);if(s.allErrors)h();else{const e=n.let("valid",!1);h(e),t.ok(e)}function h(t){if(s.schemaEnv.root.dynamicAnchors[c]){const e=n.let("_v",i._`${r.default.dynamicAnchors}${(0,i.getProperty)(c)}`);n.if(e,u(e,t),u(s.validateName,t))}else u(s.validateName,t)()}function u(e,i){return i?()=>n.block((()=>{(0,o.callRef)(t,e),n.let(i,!0)})):()=>(0,o.callRef)(t,e)}}e.dynamicRef=s,e.default=a},6121:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6215),r=n(1919),o=n(4094),a=n(3944),s=[i.default,r.default,o.default,a.default];e.default=s},4094:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6215),r=n(6776),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,i.dynamicAnchor)(t,""):(0,r.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};e.default=o},3944:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(1919),r={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,i.dynamicRef)(t,t.schema)};e.default=r},9651:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>i.str`must match format "${t}"`,params:({schemaCode:t})=>i._`{format: ${t}}`},code(t,e){const{gen:n,data:r,$data:o,schema:a,schemaCode:s,it:c}=t,{opts:h,errSchemaPath:u,schemaEnv:l,self:d}=c;h.validateFormats&&(o?function(){const o=n.scopeValue("formats",{ref:d.formats,code:h.code.formats}),a=n.const("fDef",i._`${o}[${s}]`),c=n.let("fType"),u=n.let("format");n.if(i._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>n.assign(c,i._`${a}.type || "string"`).assign(u,i._`${a}.validate`)),(()=>n.assign(c,i._`"string"`).assign(u,a))),t.fail$data((0,i.or)(!1===h.strictSchema?i.nil:i._`${s} && !${u}`,function(){const t=l.$async?i._`(${a}.async ? await ${u}(${r}) : ${u}(${r}))`:i._`${u}(${r})`,n=i._`(typeof ${u} == "function" ? ${t} : ${u}.test(${r}))`;return i._`${u} && ${u} !== true && ${c} === ${e} && !${n}`}()))}():function(){const o=d.formats[a];if(!o)return void function(){if(!1!==h.strictSchema)throw new Error(t());function t(){return`unknown format "${a}" ignored in schema at path "${u}"`}d.logger.warn(t())}();if(!0===o)return;const[s,c,p]=function(t){const e=t instanceof RegExp?(0,i.regexpCode)(t):h.code.formats?i._`${h.code.formats}${(0,i.getProperty)(a)}`:void 0,r=n.scopeValue("formats",{key:a,ref:t,code:e});return"object"!=typeof t||t instanceof RegExp?["string",t,r]:[t.type||"string",t.validate,i._`${r}.validate`]}(o);s===e&&t.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!l.$async)throw new Error("async format in sync schema");return i._`await ${p}(${r})`}return"function"==typeof c?i._`${p}(${r})`:i._`${p}.test(${r})`}())}())}};e.default=r},9502:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=[n(9651).default];e.default=i},6167:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},1448:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(8921),r=n(7274),o=n(3633),a=[i.default,r.default,o.default];e.default=a},808:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(1782),r=n(4641),o=[i.default,r.default];e.default=o},4641:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{gen:e,schema:n,data:o,it:a}=t,s=a.items||0;if(!0===s)return;const c=e.const("len",i._`${o}.length`);if(!1===n)t.setParams({len:s}),t.fail(i._`${c} > ${s}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(a,n)){const n=e.var("valid",i._`${c} <= ${s}`);e.if((0,i.not)(n),(()=>function(n,o){e.forRange("i",o,c,(o=>{t.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||e.if((0,i.not)(n),(()=>e.break()))}))}(n,s))),t.ok(n)}a.items=!0}};e.default=o},1782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o=n(2141),a={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>i._`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(t){const{gen:e,schema:n,data:a,errsCount:s,it:c}=t;if(!s)throw new Error("ajv implementation error");const{allErrors:h,props:u}=c;function l(o){if(!1===n)return t.setParams({unevaluatedProperty:o}),t.error(),void(h||e.break());if(!(0,r.alwaysValidSchema)(c,n)){const n=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:o,dataPropType:r.Type.Str},n),h||e.if((0,i.not)(n),(()=>e.break()))}}u instanceof i.Name?e.if(i._`${u} !== true`,(()=>e.forIn("key",a,(t=>e.if(function(t,e){return i._`!${t} || !${t}[${e}]`}(u,t),(()=>l(t))))))):!0!==u&&e.forIn("key",a,(t=>void 0===u?l(t):e.if(function(t,e){const n=[];for(const r in t)!0===t[r]&&n.push(i._`${e} !== ${r}`);return(0,i.and)(...n)}(u,t),(()=>l(t))))),c.props=!0,t.ok(i._`${s} === ${o.default.errors}`)}};e.default=a},4693:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o=n(3510),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>i._`{allowedValue: ${t}}`},code(t){const{gen:e,data:n,$data:a,schemaCode:s,schema:c}=t;a||c&&"object"==typeof c?t.fail$data(i._`!${(0,r.useFunc)(e,o.default)}(${n}, ${s})`):t.fail(i._`${c} !== ${n}`)}};e.default=a},8921:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(7772),r={keyword:"dependentRequired",type:"object",schemaType:"object",error:i.error,code:t=>(0,i.validatePropertyDeps)(t)};e.default=r},966:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o=n(3510),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>i._`{allowedValues: ${t}}`},code(t){const{gen:e,data:n,$data:a,schema:s,schemaCode:c,it:h}=t;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=h.opts.loopEnum;let l;const d=()=>null!=l?l:l=(0,r.useFunc)(e,o.default);let p;if(u||a)p=e.let("valid"),t.block$data(p,(function(){e.assign(p,!1),e.forOf("v",c,(t=>e.if(i._`${d()}(${n}, ${t})`,(()=>e.assign(p,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const t=e.const("vSchema",c);p=(0,i.or)(...s.map(((e,r)=>function(t,e){const r=s[e];return"object"==typeof r&&null!==r?i._`${d()}(${n}, ${t}[${e}])`:i._`${n} === ${r}`}(t,r))))}t.pass(p)}};e.default=a},2649:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3983),r=n(430),o=n(3229),a=n(4336),s=n(498),c=n(3301),h=n(1687),u=n(2958),l=n(4693),d=n(966),p=[i.default,r.default,o.default,a.default,s.default,c.default,h.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];e.default=p},3633:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6776),r={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:n}){void 0===e.contains&&(0,i.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};e.default=r},1687:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n="maxItems"===t?"more":"fewer";return i.str`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,o="maxItems"===e?i.operators.GT:i.operators.LT;t.fail$data(i._`${n}.length ${o} ${r}`)}};e.default=r},3229:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=n(6776),o=n(4499),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n="maxLength"===t?"more":"fewer";return i.str`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:a,it:s}=t,c="maxLength"===e?i.operators.GT:i.operators.LT,h=!1===s.opts.unicode?i._`${n}.length`:i._`${(0,r.useFunc)(t.gen,o.default)}(${n})`;t.fail$data(i._`${h} ${c} ${a}`)}};e.default=a},3983:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r=i.operators,o={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:t,schemaCode:e})=>i.str`must be ${o[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>i._`{comparison: ${o[t].okStr}, limit: ${e}}`},s={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:a,code(t){const{keyword:e,data:n,schemaCode:r}=t;t.fail$data(i._`${n} ${o[e].fail} ${r} || isNaN(${n})`)}};e.default=s},498:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const n="maxProperties"===t?"more":"fewer";return i.str`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>i._`{limit: ${t}}`},code(t){const{keyword:e,data:n,schemaCode:r}=t,o="maxProperties"===e?i.operators.GT:i.operators.LT;t.fail$data(i._`Object.keys(${n}).length ${o} ${r}`)}};e.default=r},430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3487),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>i.str`must be multiple of ${t}`,params:({schemaCode:t})=>i._`{multipleOf: ${t}}`},code(t){const{gen:e,data:n,schemaCode:r,it:o}=t,a=o.opts.multipleOfPrecision,s=e.let("res"),c=a?i._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:i._`${s} !== parseInt(${s})`;t.fail$data(i._`(${r} === 0 || (${s} = ${n}/${r}, ${c}))`)}};e.default=r},4336:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(412),r=n(3487),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>r.str`must match pattern "${t}"`,params:({schemaCode:t})=>r._`{pattern: ${t}}`},code(t){const{data:e,$data:n,schema:o,schemaCode:a,it:s}=t,c=s.opts.unicodeRegExp?"u":"",h=n?r._`(new RegExp(${a}, ${c}))`:(0,i.usePattern)(t,o);t.fail$data(r._`!${h}.test(${e})`)}};e.default=o},3301:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(412),r=n(3487),o=n(6776),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>r.str`must have required property '${t}'`,params:({params:{missingProperty:t}})=>r._`{missingProperty: ${t}}`},code(t){const{gen:e,schema:n,schemaCode:a,data:s,$data:c,it:h}=t,{opts:u}=h;if(!c&&0===n.length)return;const l=n.length>=u.loopRequired;if(h.allErrors?function(){if(l||c)t.block$data(r.nil,d);else for(const e of n)(0,i.checkReportMissingProp)(t,e)}():function(){const o=e.let("missing");if(l||c){const n=e.let("valid",!0);t.block$data(n,(()=>function(n,o){t.setParams({missingProperty:n}),e.forOf(n,a,(()=>{e.assign(o,(0,i.propertyInData)(e,s,n,u.ownProperties)),e.if((0,r.not)(o),(()=>{t.error(),e.break()}))}),r.nil)}(o,n))),t.ok(n)}else e.if((0,i.checkMissingProp)(t,n,o)),(0,i.reportMissingProp)(t,o),e.else()}(),u.strictRequired){const e=t.parentSchema.properties,{definedProperties:i}=t.it;for(const t of n)if(void 0===(null==e?void 0:e[t])&&!i.has(t)){const e=`required property "${t}" is not defined at "${h.schemaEnv.baseId+h.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(h,e,h.opts.strictRequired)}}function d(){e.forOf("prop",a,(n=>{t.setParams({missingProperty:n}),e.if((0,i.noPropertyInData)(e,s,n,u.ownProperties),(()=>t.error()))}))}}};e.default=a},2958:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(453),r=n(3487),o=n(6776),a=n(3510),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>r.str`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>r._`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:n,$data:s,schema:c,parentSchema:h,schemaCode:u,it:l}=t;if(!s&&!c)return;const d=e.let("valid"),p=h.items?(0,i.getSchemaTypes)(h.items):[];function f(o,a){const s=e.name("item"),c=(0,i.checkDataTypes)(p,s,l.opts.strictNumbers,i.DataType.Wrong),h=e.const("indices",r._`{}`);e.for(r._`;${o}--;`,(()=>{e.let(s,r._`${n}[${o}]`),e.if(c,r._`continue`),p.length>1&&e.if(r._`typeof ${s} == "string"`,r._`${s} += "_"`),e.if(r._`typeof ${h}[${s}] == "number"`,(()=>{e.assign(a,r._`${h}[${s}]`),t.error(),e.assign(d,!1).break()})).code(r._`${h}[${s}] = ${o}`)}))}function m(i,s){const c=(0,o.useFunc)(e,a.default),h=e.name("outer");e.label(h).for(r._`;${i}--;`,(()=>e.for(r._`${s} = ${i}; ${s}--;`,(()=>e.if(r._`${c}(${n}[${i}], ${n}[${s}])`,(()=>{t.error(),e.assign(d,!1).break(h)}))))))}t.block$data(d,(function(){const i=e.let("i",r._`${n}.length`),o=e.let("j");t.setParams({i,j:o}),e.assign(d,!0),e.if(r._`${i} > 1`,(()=>(p.length>0&&!p.some((t=>"object"===t||"array"===t))?f:m)(i,o)))}),r._`${u} === false`),t.ok(d)}};e.default=s},9809:(t,e,n)=>{"use strict";const i=e;i.bignum=n(4590),i.define=n(1050).define,i.base=n(1979),i.constants=n(6826),i.decoders=n(8307),i.encoders=n(6579)},1050:(t,e,n)=>{"use strict";const i=n(6579),r=n(8307),o=n(5717);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){const e=this.name;function n(t){this._initNamed(t,e)}return o(n,t),n.prototype._initNamed=function(e,n){t.call(this,e,n)},new n(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(r[t])),this.decoders[t]},a.prototype.decode=function(t,e,n){return this._getDecoder(e).decode(t,n)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(i[t])),this.encoders[t]},a.prototype.encode=function(t,e,n){return this._getEncoder(e).encode(t,n)}},6625:(t,e,n)=>{"use strict";const i=n(5717),r=n(8465).b,o=n(2399).Buffer;function a(t,e){r.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return s.isEncoderBuffer(t)||(t=new s(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}i(a,r),e.C=a,a.isDecoderBuffer=function(t){return t instanceof a||"object"==typeof t&&o.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},a.prototype.save=function(){return{offset:this.offset,reporter:r.prototype.save.call(this)}},a.prototype.restore=function(t){const e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,r.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const n=new a(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+t,this.offset+=t,n},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=s,s.isEncoderBuffer=function(t){return t instanceof s||"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},s.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(t,e),e+=n.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},1979:(t,e,n)=>{"use strict";const i=e;i.Reporter=n(8465).b,i.DecoderBuffer=n(6625).C,i.EncoderBuffer=n(6625).R,i.Node=n(1949)},1949:(t,e,n)=>{"use strict";const i=n(8465).b,r=n(6625).R,o=n(6625).C,a=n(9746),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function h(t,e,n){const i={};this._baseState=i,i.name=n,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}t.exports=h;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){const t=this._baseState,e={};u.forEach((function(n){e[n]=t[n]}));const n=new this.constructor(e.parent);return n._baseState=e,n},h.prototype._wrap=function(){const t=this._baseState;c.forEach((function(e){this[e]=function(){const n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},h.prototype._init=function(t){const e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(t){const e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(a(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);const i=t[n];e[i]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){h.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){h.prototype[t]=function(){const e=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(n),this}})),h.prototype.use=function(t){a(t);const e=this._baseState;return a(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){const e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){const e=this._baseState;return a(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(t){const e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},h.prototype.contains=function(t){const e=this._baseState;return a(null===e.use),e.contains=t,this},h.prototype._decode=function(t,e){const n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));let i,r=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){let i=null;if(null!==n.explicit?i=n.explicit:null!==n.implicit?i=n.implicit:null!==n.tag&&(i=n.tag),null!==i||n.any){if(a=this._peekTag(t,i,n.any),t.isError(a))return a}else{const i=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(i)}}if(n.obj&&a&&(i=t.enterObject()),a){if(null!==n.explicit){const e=this._decodeTag(t,n.explicit);if(t.isError(e))return e;t=e}const i=t.offset;if(null===n.use&&null===n.choice){let e;n.any&&(e=t.save());const i=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(i))return i;n.any?r=t.raw(e):t=i}if(e&&e.track&&null!==n.tag&&e.track(t.path(),i,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(r=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(r))return r;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const i=new o(r);r=this._getUse(n.contains,t._reporterState.obj)._decode(i,e)}}return n.obj&&a&&(r=t.leaveObject(i)),null===n.key||null===r&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,r),r},h.prototype._decodeGeneric=function(t,e,n){const i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],n):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},h.prototype._getUse=function(t,e){const n=this._baseState;return n.useDecoder=this._use(t,e),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},h.prototype._decodeChoice=function(t,e){const n=this._baseState;let i=null,r=!1;return Object.keys(n.choice).some((function(o){const a=t.save(),s=n.choice[o];try{const n=s._decode(t,e);if(t.isError(n))return!1;i={type:o,value:n},r=!0}catch(e){return t.restore(a),!1}return!0}),this),r?i:t.error("Choice not matched")},h.prototype._createEncoderBuffer=function(t){return new r(t,this.reporter)},h.prototype._encode=function(t,e,n){const i=this._baseState;if(null!==i.default&&i.default===t)return;const r=this._encodeValue(t,e,n);return void 0===r||this._skipDefault(r,e,n)?void 0:r},h.prototype._encodeValue=function(t,e,n){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(t,e||new i);let o=null;if(this.reporter=e,r.optional&&void 0===t){if(null===r.default)return;t=r.default}let a=null,s=!1;if(r.any)o=this._createEncoderBuffer(t);else if(r.choice)o=this._encodeChoice(t,e);else if(r.contains)a=this._getUse(r.contains,n)._encode(t,e),s=!0;else if(r.children)a=r.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");const i=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const r=n._encode(t[n._baseState.key],e,t);return e.leaveKey(i),r}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){const i=this._baseState;return this._getUse(i.args[0],t)._encode(n,e)}),n))}else null!==r.use?o=this._getUse(r.use,n)._encode(t,e):(a=this._encodePrimitive(r.tag,t),s=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,n=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(o=this._encodeComposite(t,s,n,a))}return null!==r.explicit&&(o=this._encodeComposite(r.explicit,!1,"context",o)),o},h.prototype._encodeChoice=function(t,e){const n=this._baseState,i=n.choice[t.type];return i||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){const n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},8465:(t,e,n)=>{"use strict";const i=n(5717);function r(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=r,r.prototype.isError=function(t){return t instanceof o},r.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},r.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},r.prototype.enterKey=function(t){return this._reporterState.path.push(t)},r.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},r.prototype.leaveKey=function(t,e,n){const i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=n)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},r.prototype.leaveObject=function(t){const e=this._reporterState,n=e.obj;return e.obj=t,n},r.prototype.error=function(t){let e;const n=this._reporterState,i=t instanceof o;if(e=i?t:new o(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return i||n.errors.push(e),e},r.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},i(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},160:(t,e)=>{"use strict";function n(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const i=t[n];e[i]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n(e.tag)},6826:(t,e,n)=>{"use strict";const i=e;i._reverse=function(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const i=t[n];e[i]=n})),e},i.der=n(160)},1671:(t,e,n)=>{"use strict";const i=n(5717),r=n(4590),o=n(6625).C,a=n(1949),s=n(160);function c(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){a.call(this,"der",t)}function u(t,e){let n=t.readUInt8(e);if(t.isError(n))return n;const i=s.tagClass[n>>6],r=0==(32&n);if(31==(31&n)){let i=n;for(n=0;128==(128&i);){if(i=t.readUInt8(e),t.isError(i))return i;n<<=7,n|=127&i}}else n&=31;return{cls:i,primitive:r,tag:n,tagStr:s.tag[n]}}function l(t,e,n){let i=t.readUInt8(n);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;const r=127&i;if(r>4)return t.error("length octect is too long");i=0;for(let e=0;e{"use strict";const i=e;i.der=n(1671),i.pem=n(9631)},9631:(t,e,n)=>{"use strict";const i=n(5717),r=n(2399).Buffer,o=n(1671);function a(t){o.call(this,t),this.enc="pem"}i(a,o),t.exports=a,a.prototype.decode=function(t,e){const n=t.toString().split(/[\r\n]+/g),i=e.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,c=-1;for(let t=0;t{"use strict";const i=n(5717),r=n(2399).Buffer,o=n(1949),a=n(160);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){o.call(this,"der",t)}function h(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},i(c,o),c.prototype._encodeComposite=function(t,e,n,i){const o=function(t,e,n,i){let r;if("seqof"===t?t="seq":"setof"===t&&(t="set"),a.tagByName.hasOwnProperty(t))r=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);r=t}return r>=31?i.error("Multi-octet tag encoding unsupported"):(e||(r|=32),r|=a.tagClassByName[n||"universal"]<<6,r)}(t,e,n,this.reporter);if(i.length<128){const t=r.alloc(2);return t[0]=o,t[1]=i.length,this._createEncoderBuffer([t,i])}let s=1;for(let t=i.length;t>=256;t>>=8)s++;const c=r.alloc(2+s);c[0]=o,c[1]=128|s;for(let t=1+s,e=i.length;e>0;t--,e>>=8)c[t]=255&e;return this._createEncoderBuffer([c,i])},c.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=r.alloc(2*t.length);for(let n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let i=0;for(let e=0;e=128;n>>=7)i++}const o=r.alloc(i);let a=o.length-1;for(let e=t.length-1;e>=0;e--){let n=t[e];for(o[a--]=127&n;(n>>=7)>0;)o[a--]=128|127&n}return this._createEncoderBuffer(o)},c.prototype._encodeTime=function(t,e){let n;const i=new Date(t);return"gentime"===e?n=[h(i.getUTCFullYear()),h(i.getUTCMonth()+1),h(i.getUTCDate()),h(i.getUTCHours()),h(i.getUTCMinutes()),h(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[h(i.getUTCFullYear()%100),h(i.getUTCMonth()+1),h(i.getUTCDate()),h(i.getUTCHours()),h(i.getUTCMinutes()),h(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!r.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=r.from(e)}if(r.isBuffer(t)){let e=t.length;0===t.length&&e++;const n=r.alloc(e);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let n=1;for(let e=t;e>=256;e>>=8)n++;const i=new Array(n);for(let e=i.length-1;e>=0;e--)i[e]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(r.from(i))},c.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},c.prototype._skipDefault=function(t,e,n){const i=this._baseState;let r;if(null===i.default)return!1;const o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r{"use strict";const i=e;i.der=n(6984),i.pem=n(2883)},2883:(t,e,n)=>{"use strict";const i=n(5717),r=n(6984);function o(t){r.call(this,t),this.enc="pem"}i(o,r),t.exports=o,o.prototype.encode=function(t,e){const n=r.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+e.label+"-----"];for(let t=0;t=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,o=s(t),a=o[0],c=o[1],h=new r(function(t,e,n){return 3*(e+n)/4-n}(0,a,c)),u=0,l=c>0?a-4:a;for(n=0;n>16&255,h[u++]=e>>8&255,h[u++]=255&e;return 2===c&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,h[u++]=255&e),1===c&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e),h},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,o=[],a=16383,s=0,h=i-r;sh?h:s+a));return 1===r?(e=t[i-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)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,i){for(var r,o,a=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3550:function(t,e,n){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(6601).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void i(!1,"Invalid character in "+t)}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,r){for(var o=0,a=0,s=Math.min(t.length,n),c=e;c=49?h-49+10:h>=17?h-17+10:h,i(h>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n._strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215,(r+=2)>=26&&(r-=26,a--),n=0!==o||a!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=p[t],u=f[t];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(u).toString(t);n=(l=l.idivn(u)).isZero()?m+n:d[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){this._strip();var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,r),a},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,i=0,r=0,o=0;r>8&255),n>16&255),6===o?(n>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(n=0&&(t[n--]=a>>8&255),n>=0&&(t[n--]=a>>16&255),6===o?(n>=0&&(t[n--]=a>>24&255),i=0,o=0):(i=a>>>24,o+=2)}if(n>=0)for(t[n--]=i;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function g(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n._strip()}function v(t,e,n){return g(t,e,n)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):n<63?m(this,t,e):n<1024?g(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},b.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[r]=67108863&a}return 0!==n&&(this.words[r]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s._strip(),i._strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var n=(1<<26)%t,r=0,o=this.length-1;o>=0;o--)r=(n*r+(0|this.words[o]))%t;return e?-r:r},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var n=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*n;this.words[r]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},r(x,w),x.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new x;else if("p224"===t)e=new M;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return _[t]=e,e},E.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},r(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9931:(t,e,n)=>{var i;function r(t){this.rand=t}if(t.exports=function(t){return i||(i=new r(null)),i.generate(t)},t.exports.Rand=r,r.prototype.generate=function(t){return this._rand(t)},r.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n{var i=n(9509).Buffer;function r(t){i.isBuffer(t)||(t=i.from(t));for(var e=t.length/4|0,n=new Array(e),r=0;r>>24]^u[f>>>16&255]^l[m>>>8&255]^d[255&y]^e[g++],a=h[f>>>24]^u[m>>>16&255]^l[y>>>8&255]^d[255&p]^e[g++],s=h[m>>>24]^u[y>>>16&255]^l[p>>>8&255]^d[255&f]^e[g++],c=h[y>>>24]^u[p>>>16&255]^l[f>>>8&255]^d[255&m]^e[g++],p=o,f=a,m=s,y=c;return o=(i[p>>>24]<<24|i[f>>>16&255]<<16|i[m>>>8&255]<<8|i[255&y])^e[g++],a=(i[f>>>24]<<24|i[m>>>16&255]<<16|i[y>>>8&255]<<8|i[255&p])^e[g++],s=(i[m>>>24]<<24|i[y>>>16&255]<<16|i[p>>>8&255]<<8|i[255&f])^e[g++],c=(i[y>>>24]<<24|i[p>>>16&255]<<16|i[f>>>8&255]<<8|i[255&m])^e[g++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],i=[],r=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var h=s^s<<1^s<<2^s<<3^s<<4;h=h>>>8^255&h^99,n[a]=h,i[h]=a;var u=t[a],l=t[u],d=t[l],p=257*t[h]^16843008*h;r[0][a]=p<<24|p>>>8,r[1][a]=p<<16|p>>>16,r[2][a]=p<<8|p>>>24,r[3][a]=p,p=16843009*d^65537*l^257*u^16843008*a,o[0][h]=p<<24|p>>>8,o[1][h]=p<<16|p>>>16,o[2][h]=p<<8|p>>>24,o[3][h]=p,0===a?a=s=1:(a=u^t[t[t[d^u]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:i,SUB_MIX:r,INV_SUB_MIX:o}}();function h(t){this._key=r(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,i=4*(n+1),r=[],o=0;o>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),r[o]=r[o-e]^a}for(var h=[],u=0;u>>24]]^c.INV_SUB_MIX[1][c.SBOX[d>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[d>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&d]]}this._nRounds=n,this._keySchedule=r,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return a(t=r(t),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=i.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},h.prototype.decryptBlock=function(t){var e=(t=r(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},2422:(t,e,n)=>{var i=n(4497),r=n(9509).Buffer,o=n(1027),a=n(5717),s=n(3288),c=n(7295),h=n(685);function u(t,e,n,a){o.call(this);var c=r.alloc(4,0);this._cipher=new i.AES(e);var u=this._cipher.encryptBlock(c);this._ghash=new s(u),n=function(t,e,n){if(12===e.length)return t._finID=r.concat([e,r.from([0,0,0,1])]),r.concat([e,r.from([0,0,0,2])]);var i=new s(n),o=e.length,a=o%16;i.update(e),a&&(a=16-a,i.update(r.alloc(a,0))),i.update(r.alloc(8,0));var c=8*o,u=r.alloc(8);u.writeUIntBE(c,0,8),i.update(u),t._finID=i.state;var l=r.from(t._finID);return h(l),l}(this,n,u),this._prev=r.from(n),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(u,o),u.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=r.alloc(e,0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var n=0;t.length!==e.length&&n++;for(var i=Math.min(t.length,e.length),r=0;r{var i=n(1494),r=n(6193),o=n(4946);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=r.createDecipher,e.createDecipheriv=e.Decipheriv=r.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},6193:(t,e,n)=>{var i=n(2422),r=n(9509).Buffer,o=n(45),a=n(5969),s=n(1027),c=n(4497),h=n(3048);function u(t,e,n){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new c.AES(e),this._prev=r.from(n),this._mode=t,this._autopadding=!0}function l(){this.cache=r.allocUnsafe(0)}function d(t,e,n){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=r.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=r.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,n,!0):"auth"===s.type?new i(s.module,e,n,!0):new u(s.module,e,n)}n(5717)(u,s),u.prototype._update=function(t){var e,n;this._cache.add(t);for(var i=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),i.push(n);return r.concat(i)},u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var n=-1;++n16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=o[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=h(e,!1,n.key,n.iv);return d(t,i.key,i.iv)},e.createDecipheriv=d},1494:(t,e,n)=>{var i=n(45),r=n(2422),o=n(9509).Buffer,a=n(5969),s=n(1027),c=n(4497),h=n(3048);function u(t,e,n){s.call(this),this._cache=new d,this._cipher=new c.AES(e),this._prev=o.from(n),this._mode=t,this._autopadding=!0}n(5717)(u,s),u.prototype._update=function(t){var e,n;this._cache.add(t);for(var i=[];e=this._cache.get();)n=this._mode.encrypt(this,e),i.push(n);return o.concat(i)};var l=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function p(t,e,n){var s=i[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==s.mode&&n.length!==s.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===s.type?new a(s.module,e,n):"auth"===s.type?new r(s.module,e,n):new u(s.module,e,n)}u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=o.concat([this.cache,t])},d.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},d.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),n=-1;++n{var i=n(9509).Buffer,r=i.alloc(16,0);function o(t){var e=i.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,n&&(i[0]=i[0]^225<<24)}this.state=o(r)},a.prototype.update=function(t){var e;for(this.cache=i.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(i.concat([this.cache,r],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},685:t=>{t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},5292:(t,e,n)=>{var i=n(7295);e.encrypt=function(t,e){var n=i(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var r=t._cipher.decryptBlock(e);return i(r,n)}},6311:(t,e,n)=>{var i=n(9509).Buffer,r=n(7295);function o(t,e,n){var o=e.length,a=r(e,t._cache);return t._cache=t._cache.slice(o),t._prev=i.concat([t._prev,n?e:a]),a}e.encrypt=function(t,e,n){for(var r,a=i.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=i.allocUnsafe(0)),!(t._cache.length<=e.length)){a=i.concat([a,o(t,e,n)]);break}r=t._cache.length,a=i.concat([a,o(t,e.slice(0,r),n)]),e=e.slice(r)}return a}},1510:(t,e,n)=>{var i=n(9509).Buffer;function r(t,e,n){for(var i,r,a=-1,s=0;++a<8;)i=e&1<<7-a?128:0,s+=(128&(r=t._cipher.encryptBlock(t._prev)[0]^i))>>a%8,t._prev=o(t._prev,n?i:r);return s}function o(t,e){var n=t.length,r=-1,o=i.allocUnsafe(t.length);for(t=i.concat([t,i.from([e])]);++r>7;return o}e.encrypt=function(t,e,n){for(var o=e.length,a=i.allocUnsafe(o),s=-1;++s{var i=n(9509).Buffer;function r(t,e,n){var r=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=i.concat([t._prev.slice(1),i.from([n?e:r])]),r}e.encrypt=function(t,e,n){for(var o=e.length,a=i.allocUnsafe(o),s=-1;++s{var i=n(7295),r=n(9509).Buffer,o=n(685);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),o=t._cache.length;t._cache=r.concat([t._cache,r.allocUnsafe(16*n)]);for(var s=0;s{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},45:(t,e,n)=>{var i={ECB:n(1084),CBC:n(5292),CFB:n(6311),CFB8:n(1964),CFB1:n(1510),OFB:n(8861),CTR:n(6009),GCM:n(6009)},r=n(4946);for(var o in r)r[o].module=i[r[o].mode];t.exports=r},8861:(t,e,n)=>{var i=n(8764).Buffer,r=n(7295);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length{var i=n(4497),r=n(9509).Buffer,o=n(1027);function a(t,e,n,a){o.call(this),this._cipher=new i.AES(e),this._prev=r.from(n),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._mode=t}n(5717)(a,o),a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},3614:(t,e,n)=>{var i=n(7667),r=n(4696),o=n(45),a=n(9715),s=n(3048);function c(t,e,n){if(t=t.toLowerCase(),o[t])return r.createCipheriv(t,e,n);if(a[t])return new i({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function h(t,e,n){if(t=t.toLowerCase(),o[t])return r.createDecipheriv(t,e,n);if(a[t])return new i({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,i;if(t=t.toLowerCase(),o[t])n=o[t].key,i=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");n=8*a[t].key,i=a[t].iv}var r=s(e,!1,n,i);return c(t,r.key,r.iv)},e.createCipheriv=e.Cipheriv=c,e.createDecipher=e.Decipher=function(t,e){var n,i;if(t=t.toLowerCase(),o[t])n=o[t].key,i=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");n=8*a[t].key,i=a[t].iv}var r=s(e,!1,n,i);return h(t,r.key,r.iv)},e.createDecipheriv=e.Decipheriv=h,e.listCiphers=e.getCiphers=function(){return Object.keys(a).concat(r.getCiphers())}},7667:(t,e,n)=>{var i=n(1027),r=n(5251),o=n(5717),a=n(9509).Buffer,s={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function c(t){i.call(this);var e,n=t.mode.toLowerCase(),r=s[n];e=t.decrypt?"decrypt":"encrypt";var o=t.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(o=a.concat([o,o.slice(0,8)]));var c=t.iv;a.isBuffer(c)||(c=a.from(c)),this._des=r.create({key:o,iv:c,type:e})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=c,o(c,i),c.prototype._update=function(t){return a.from(this._des.update(t))},c.prototype._final=function(){return a.from(this._des.final())}},9715:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},3663:(t,e,n)=>{var i=n(8764).Buffer,r=n(3550),o=n(1798);function a(t){var e,n=t.modulus.byteLength();do{e=new r(o(n))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function s(t,e){var n=function(t){var e=a(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),s=new r(t).mul(n.blinder).umod(e.modulus),c=s.toRed(r.mont(e.prime1)),h=s.toRed(r.mont(e.prime2)),u=e.coefficient,l=e.prime1,d=e.prime2,p=c.redPow(e.exponent1).fromRed(),f=h.redPow(e.exponent2).fromRed(),m=p.isub(f).imul(u).umod(l).imul(d);return f.iadd(m).imul(n.unblinder).umod(e.modulus).toArrayLike(i,"be",o)}s.getr=a,t.exports=s},6042:(t,e,n)=>{"use strict";t.exports=n(5207)},4743:(t,e,n)=>{"use strict";var i=n(9509).Buffer,r=n(3482),o=n(8473),a=n(5717),s=n(2957),c=n(7753),h=n(5207);function u(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error("Unknown message digest");this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){return new u(t)}function p(t){return new l(t)}Object.keys(h).forEach((function(t){h[t].id=i.from(h[t].id,"hex"),h[t.toLowerCase()]=h[t]})),a(u,o.Writable),u.prototype._write=function(t,e,n){this._hash.update(t),n()},u.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},u.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),i=s(n,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},a(l,o.Writable),l.prototype._write=function(t,e,n){this._hash.update(t),n()},l.prototype.update=function(t,e){return this._hash.update("string"==typeof t?i.from(t,e):t),this},l.prototype.verify=function(t,e,n){var r="string"==typeof e?i.from(e,n):e;this.end();var o=this._hash.digest();return c(r,o,t,this._signType,this._tag)},t.exports={Sign:d,Verify:p,createSign:d,createVerify:p}},2957:(t,e,n)=>{"use strict";var i=n(9509).Buffer,r=n(8355),o=n(3663),a=n(6266).ec,s=n(3550),c=n(980),h=n(1308);function u(t,e,n,o){if((t=i.from(t.toArray())).length0&&n.ishrn(i),n}function d(t,e,n){var o,a;do{for(o=i.alloc(0);8*o.length{"use strict";var i=n(9509).Buffer,r=n(3550),o=n(6266).ec,a=n(980),s=n(1308);function c(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,n,h,u){var l=a(n);if("ec"===l.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(t,e,n){var i=s[n.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var r=new o(i),a=n.data.subjectPrivateKey.data;return r.verify(e,t,a)}(t,e,l)}if("dsa"===l.type){if("dsa"!==h)throw new Error("wrong public key type");return function(t,e,n){var i=n.data.p,o=n.data.q,s=n.data.g,h=n.data.pub_key,u=a.signature.decode(t,"der"),l=u.s,d=u.r;c(l,o),c(d,o);var p=r.mont(i),f=l.invm(o);return 0===s.toRed(p).redPow(new r(e).mul(f).mod(o)).fromRed().mul(h.toRed(p).redPow(d.mul(f).mod(o)).fromRed()).mod(i).mod(o).cmp(d)}(t,e,l)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");e=i.concat([u,e]);for(var d=l.modulus.byteLength(),p=[1],f=0;e.length+p.length+2{var i=n(8764).Buffer;t.exports=function(t,e){for(var n=Math.min(t.length,e.length),r=new i(n),o=0;o{"use strict";const i=n(9742),r=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,n)}function h(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let i=s(n);const r=i.write(t,e);return r!==n&&(i=i.slice(0,r)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return c.from(i,e,n);const r=function(t){if(c.isBuffer(t)){const e=0|f(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?s(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(t.data):void 0}(t);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return u(t),s(t<0?0:0|f(t))}function d(t){const e=t.length<0?0:0|f(t.length),n=s(e);for(let i=0;i=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(t).length;default:if(r)return i?-1:K(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.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 j(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 C(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function v(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=c.from(e,i)),c.isBuffer(e))return 0===e.length?-1:b(t,e,n,i,r);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,i,r){let o,a=1,s=t.length,c=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,s/=2,c/=2,n/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(r){let i=-1;for(o=n;os&&(n=s-c),o=n;o>=0;o--){let n=!0;for(let i=0;ir&&(i=r):i=r;const o=e.length;let a;for(i>o/2&&(i=o/2),a=0;a>8,r=n%256,o.push(r),o.push(i);return o}(e,t.length-n),t,n,i)}function S(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);const i=[];let r=e;for(;r239?4:e>223?3:e>191?2:1;if(r+a<=n){let n,i,s,c;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[r+1],128==(192&n)&&(c=(31&e)<<6|63&n,c>127&&(o=c));break;case 3:n=t[r+1],i=t[r+2],128==(192&n)&&128==(192&i)&&(c=(15&e)<<12|(63&n)<<6|63&i,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=t[r+1],i=t[r+2],s=t[r+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(c=(15&e)<<18|(63&n)<<12|(63&i)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),r+=a}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let n="",i=0;for(;ii.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(i,r)):Uint8Array.prototype.set.call(i,e,r);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,r)}r+=e.length}return i},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,n,i,r){if(G(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(e>>>=0);const s=Math.min(o,a),h=this.slice(i,r),u=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return x(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function T(t,e,n){let i="";n=Math.min(t.length,n);for(let r=e;ri)&&(n=i);let r="";for(let i=e;in)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,i,r,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function $(t,e,n,i,r){z(e,i,r,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,i,r){z(e,i,r,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function L(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,o){return e=+e,n>>>=0,o||L(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function B(t,e,n,i,o){return e=+e,n>>>=0,o||L(t,0,n,8),r.write(t,e,n,i,52,8),n+8}c.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||P(t,e,this.length);let i=this[t],r=1,o=0;for(;++o>>=0,e>>>=0,n||P(t,e,this.length);let i=this[t+--e],r=1;for(;e>0&&(r*=256);)i+=this[t+--e]*r;return i},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,r=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],r=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<>>=0,e>>>=0,n||P(t,e,this.length);let i=this[t],r=1,o=0;for(;++o=r&&(i-=Math.pow(2,8*e)),i},c.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||P(t,e,this.length);let i=e,r=1,o=this[t+--i];for(;i>0&&(r*=256);)o+=this[t+--i]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=Y((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<>>=0,e||P(t,4,this.length),r.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),r.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),r.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),r.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||I(this,t,e,n,Math.pow(2,8*n)-1,0);let r=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,i||I(this,t,e,n,Math.pow(2,8*n)-1,0);let r=n-1,o=1;for(this[e+r]=255&t;--r>=0&&(o*=256);)this[e+r]=t/o&255;return e+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=Y((function(t,e=0){return $(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Y((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}let r=0,o=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}let r=n-1,o=1,a=0;for(this[e+r]=255&t;--r>=0&&(o*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/o>>0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=Y((function(t,e=0){return $(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Y((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,i){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function z(t,e,n,i,r,o){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(o+1)}${i}`:`>= -(2${i} ** ${8*(o+1)-1}${i}) and < 2 ** ${8*(o+1)-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new D.ERR_OUT_OF_RANGE("value",r,t)}!function(t,e,n){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||q(e,t.length-(n+1))}(i,r,o)}function H(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,n){if(Math.floor(t)!==t)throw H(t,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,n){let i=`The value of "${t}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=U(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=U(r)),r+="n"),i+=` It must be ${e}. Received ${r}`,i}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function K(t,e){let n;e=e||1/0;const i=t.length;let r=null;const o=[];for(let a=0;a55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=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 Z(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,i){let r;for(r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)e[i+r]=t[n]+t[r]}return e}();function Y(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},5456:t=>{"use strict";t.exports=function t(e){if("number"==typeof e&&isNaN(e))throw new Error("NaN is not allowed");if("number"==typeof e&&!isFinite(e))throw new Error("Infinity is not allowed");return null===e||"object"!=typeof e?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce(((e,n,i)=>`${e}${0===i?"":","}${t(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(e).sort().reduce(((n,i)=>void 0===e[i]||"symbol"==typeof e[i]?n:`${n}${0===n.length?"":","}${t(i)}:${t(e[i])}`),"")}}`}},1027:(t,e,n)=>{var i=n(9509).Buffer,r=n(2830).Transform,o=n(2553).s;function a(t){r.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(5717)(a,r),a.prototype.update=function(t,e,n){"string"==typeof t&&(t=i.from(t,e));var r=this._update(t);return this.hashMode?this:(n&&(r=this._toString(r,n)),r)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,n){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){i=t}finally{n(i)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return n&&(i+=this._decoder.end()),i},t.exports=a},6393:(t,e,n)=>{var i=n(8764).Buffer,r=n(6266),o=n(6426);t.exports=function(t){return new s(t)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function c(t,e,n){Array.isArray(t)||(t=t.toArray());var r=new i(t);if(n&&r.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},3482:(t,e,n)=>{"use strict";var i=n(5717),r=n(2318),o=n(9785),a=n(9072),s=n(1027);function c(t){s.call(this,"digest"),this._hash=t}i(c,s),c.prototype._update=function(t){this._hash.update(t)},c.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new r:"rmd160"===t||"ripemd160"===t?new o:new c(a(t))}},8028:(t,e,n)=>{var i=n(2318);t.exports=function(t){return(new i).update(t).digest()}},8355:(t,e,n)=>{"use strict";var i=n(5717),r=n(1031),o=n(1027),a=n(9509).Buffer,s=n(8028),c=n(9785),h=n(9072),u=a.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var n="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>n?e=("rmd160"===t?new c:h(t)).update(e).digest():e.length{"use strict";var i=n(5717),r=n(9509).Buffer,o=n(1027),a=r.alloc(128),s=64;function c(t,e){o.call(this,"digest"),"string"==typeof e&&(e=r.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(1798),e.createHash=e.Hash=n(3482),e.createHmac=e.Hmac=n(8355);var i=n(6042),r=Object.keys(i),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);e.getHashes=function(){return o};var a=n(5632);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var s=n(3614);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var c=n(2607);e.DiffieHellmanGroup=c.DiffieHellmanGroup,e.createDiffieHellmanGroup=c.createDiffieHellmanGroup,e.getDiffieHellman=c.getDiffieHellman,e.createDiffieHellman=c.createDiffieHellman,e.DiffieHellman=c.DiffieHellman;var h=n(4743);e.createSign=h.createSign,e.Sign=h.Sign,e.createVerify=h.createVerify,e.Verify=h.Verify,e.createECDH=n(6393);var u=n(7900);e.publicEncrypt=u.publicEncrypt,e.privateEncrypt=u.privateEncrypt,e.publicDecrypt=u.publicDecrypt,e.privateDecrypt=u.privateDecrypt;var l=n(7963);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},6183:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(8014),n.b),u=new URL(n(7119),n.b),l=new URL(n(8832),n.b),d=new URL(n(5426),n.b),p=new URL(n(6033),n.b),f=a()(r()),m=c()(h),y=c()(h,{hash:"#iefix"}),g=c()(u),v=c()(l),b=c()(d),_=c()(p,{hash:"#bpmn"});f.push([t.id,`@charset "utf-8";\n@font-face {\n font-family: 'bpmn';\n src: url(${m});\n src: url(${y}) format('embedded-opentype'),\n url(${g}) format('woff2'),\n url(${v}) format('woff'),\n url(${b}) format('truetype'),\n url(${_}) format('svg');\n font-weight: normal;\n font-style: normal;\n}\n/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */\n/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */\n/*\n@media screen and (-webkit-min-device-pixel-ratio:0) {\n @font-face {\n font-family: 'bpmn';\n src: url('../font/bpmn.svg?21877404#bpmn') format('svg');\n }\n}\n*/\n[class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before {\n font-family: "bpmn";\n font-style: normal;\n font-weight: normal;\n speak: never;\n\n display: inline-block;\n text-decoration: inherit;\n width: 1em;\n /* margin-right: .2em; */\n text-align: center;\n /* opacity: .8; */\n\n /* For safety - reset parent styles, that can break glyph codes*/\n font-variant: normal;\n text-transform: none;\n\n /* fix buttons height, for twitter bootstrap */\n line-height: 1em;\n\n /* Animation center compensation - margins should be symmetric */\n /* remove if not needed */\n /* margin-left: .2em; */\n\n /* you can be more comfortable with increased icons size */\n /* font-size: 120%; */\n\n /* Font smoothing. That was taken from TWBS */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Uncomment for 3D effect */\n /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */\n}\n\n.bpmn-icon-trash:before { content: '\\e801'; } /* '' */\n.bpmn-icon-gateway-parallel:before { content: '\\e804'; } /* '' */\n.bpmn-icon-intermediate-event-catch-cancel:before { content: '\\e805'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\\e806'; } /* '' */\n.bpmn-icon-start-event-compensation:before { content: '\\e807'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\\e808'; } /* '' */\n.bpmn-icon-loop-marker:before { content: '\\e809'; } /* '' */\n.bpmn-icon-parallel-mi-marker:before { content: '\\e80a'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-signal:before { content: '\\e80b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\\e80c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\\e80d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-compensation:before { content: '\\e80e'; } /* '' */\n.bpmn-icon-gateway-xor:before { content: '\\e80f'; } /* '' */\n.bpmn-icon-end-event-cancel:before { content: '\\e811'; } /* '' */\n.bpmn-icon-intermediate-event-catch-condition:before { content: '\\e812'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\\e813'; } /* '' */\n.bpmn-icon-start-event-condition:before { content: '\\e814'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-timer:before { content: '\\e815'; } /* '' */\n.bpmn-icon-sequential-mi-marker:before { content: '\\e816'; } /* '' */\n.bpmn-icon-user-task:before { content: '\\e817'; } /* '' */\n.bpmn-icon-business-rule:before { content: '\\e818'; } /* '' */\n.bpmn-icon-sub-process-marker:before { content: '\\e819'; } /* '' */\n.bpmn-icon-start-event-parallel-multiple:before { content: '\\e81a'; } /* '' */\n.bpmn-icon-start-event-error:before { content: '\\e81b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-signal:before { content: '\\e81c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-error:before { content: '\\e81d'; } /* '' */\n.bpmn-icon-end-event-compensation:before { content: '\\e81e'; } /* '' */\n.bpmn-icon-subprocess-collapsed:before { content: '\\e81f'; } /* '' */\n.bpmn-icon-subprocess-expanded:before { content: '\\e820'; } /* '' */\n.bpmn-icon-task:before { content: '\\e821'; } /* '' */\n.bpmn-icon-end-event-error:before { content: '\\e822'; } /* '' */\n.bpmn-icon-intermediate-event-catch-escalation:before { content: '\\e823'; } /* '' */\n.bpmn-icon-intermediate-event-catch-timer:before { content: '\\e824'; } /* '' */\n.bpmn-icon-start-event-escalation:before { content: '\\e825'; } /* '' */\n.bpmn-icon-start-event-signal:before { content: '\\e826'; } /* '' */\n.bpmn-icon-business-rule-task:before { content: '\\e827'; } /* '' */\n.bpmn-icon-manual:before { content: '\\e828'; } /* '' */\n.bpmn-icon-receive:before { content: '\\e829'; } /* '' */\n.bpmn-icon-call-activity:before { content: '\\e82a'; } /* '' */\n.bpmn-icon-start-event-timer:before { content: '\\e82b'; } /* '' */\n.bpmn-icon-start-event-message:before { content: '\\e82c'; } /* '' */\n.bpmn-icon-intermediate-event-none:before { content: '\\e82d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-link:before { content: '\\e82e'; } /* '' */\n.bpmn-icon-end-event-escalation:before { content: '\\e82f'; } /* '' */\n.bpmn-icon-bpmn-io:before { content: '\\e831'; } /* '' */\n.bpmn-icon-gateway-complex:before { content: '\\e832'; } /* '' */\n.bpmn-icon-gateway-eventbased:before { content: '\\e833'; } /* '' */\n.bpmn-icon-gateway-none:before { content: '\\e834'; } /* '' */\n.bpmn-icon-gateway-or:before { content: '\\e835'; } /* '' */\n.bpmn-icon-end-event-terminate:before { content: '\\e836'; } /* '' */\n.bpmn-icon-end-event-signal:before { content: '\\e837'; } /* '' */\n.bpmn-icon-end-event-none:before { content: '\\e838'; } /* '' */\n.bpmn-icon-end-event-multiple:before { content: '\\e839'; } /* '' */\n.bpmn-icon-end-event-message:before { content: '\\e83a'; } /* '' */\n.bpmn-icon-end-event-link:before { content: '\\e83b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-message:before { content: '\\e83c'; } /* '' */\n.bpmn-icon-intermediate-event-throw-compensation:before { content: '\\e83d'; } /* '' */\n.bpmn-icon-start-event-multiple:before { content: '\\e83e'; } /* '' */\n.bpmn-icon-script:before { content: '\\e83f'; } /* '' */\n.bpmn-icon-manual-task:before { content: '\\e840'; } /* '' */\n.bpmn-icon-send:before { content: '\\e841'; } /* '' */\n.bpmn-icon-service:before { content: '\\e842'; } /* '' */\n.bpmn-icon-receive-task:before { content: '\\e843'; } /* '' */\n.bpmn-icon-user:before { content: '\\e844'; } /* '' */\n.bpmn-icon-start-event-none:before { content: '\\e845'; } /* '' */\n.bpmn-icon-intermediate-event-throw-escalation:before { content: '\\e846'; } /* '' */\n.bpmn-icon-intermediate-event-catch-multiple:before { content: '\\e847'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\\e848'; } /* '' */\n.bpmn-icon-intermediate-event-throw-link:before { content: '\\e849'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-condition:before { content: '\\e84a'; } /* '' */\n.bpmn-icon-data-object:before { content: '\\e84b'; } /* '' */\n.bpmn-icon-script-task:before { content: '\\e84c'; } /* '' */\n.bpmn-icon-send-task:before { content: '\\e84d'; } /* '' */\n.bpmn-icon-data-store:before { content: '\\e84e'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\\e84f'; } /* '' */\n.bpmn-icon-intermediate-event-throw-message:before { content: '\\e850'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\\e851'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\\e852'; } /* '' */\n.bpmn-icon-intermediate-event-throw-multiple:before { content: '\\e853'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-message:before { content: '\\e854'; } /* '' */\n.bpmn-icon-ad-hoc-marker:before { content: '\\e855'; } /* '' */\n.bpmn-icon-service-task:before { content: '\\e856'; } /* '' */\n.bpmn-icon-task-none:before { content: '\\e857'; } /* '' */\n.bpmn-icon-compensation-marker:before { content: '\\e858'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\\e859'; } /* '' */\n.bpmn-icon-intermediate-event-throw-signal:before { content: '\\e85a'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\\e85b'; } /* '' */\n.bpmn-icon-participant:before { content: '\\e85c'; } /* '' */\n.bpmn-icon-event-subprocess-expanded:before { content: '\\e85d'; } /* '' */\n.bpmn-icon-lane-insert-below:before { content: '\\e85e'; } /* '' */\n.bpmn-icon-space-tool:before { content: '\\e85f'; } /* '' */\n.bpmn-icon-connection-multi:before { content: '\\e860'; } /* '' */\n.bpmn-icon-lane:before { content: '\\e861'; } /* '' */\n.bpmn-icon-lasso-tool:before { content: '\\e862'; } /* '' */\n.bpmn-icon-lane-insert-above:before { content: '\\e863'; } /* '' */\n.bpmn-icon-lane-divide-three:before { content: '\\e864'; } /* '' */\n.bpmn-icon-lane-divide-two:before { content: '\\e865'; } /* '' */\n.bpmn-icon-data-input:before { content: '\\e866'; } /* '' */\n.bpmn-icon-data-output:before { content: '\\e867'; } /* '' */\n.bpmn-icon-hand-tool:before { content: '\\e868'; } /* '' */\n.bpmn-icon-group:before { content: '\\e869'; } /* '' */\n.bpmn-icon-text-annotation:before { content: '\\e86b'; } /* '' */\n.bpmn-icon-transaction:before { content: '\\e8c4'; } /* '' */\n.bpmn-icon-screw-wrench:before { content: '\\e8db'; } /* '' */\n.bpmn-icon-connection:before { content: '\\e8dc'; } /* '' */\n.bpmn-icon-conditional-flow:before { content: '\\e8e0'; } /* '' */\n.bpmn-icon-default-flow:before { content: '\\e8e1'; } /* '' */\n`,""]);const w=f},3625:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,".djs-minimap {\n position: absolute;\n top: 20px;\n right: 20px;\n overflow: hidden;\n background-color: rgba(255, 255, 255, 0.9);\n border: solid 1px #CCC;\n border-radius: 2px;\n box-sizing: border-box;\n user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n}\n\n.djs-minimap:not(.open) {\n overflow: hidden;\n}\n\n.djs-minimap .map {\n display: none;\n}\n\n.djs-minimap.open .map {\n display: block;\n}\n\n.djs-minimap .map {\n width: 320px;\n height: 180px;\n}\n\n.djs-minimap:not(.open) .toggle {\n padding: 10px;\n text-align: center;\n}\n\n.djs-minimap .toggle:before {\n content: attr(title);\n}\n\n.djs-minimap.open .toggle {\n position: absolute;\n right: 0;\n padding: 6px;\n z-index: 1;\n}\n\n.djs-minimap .map {\n cursor: crosshair;\n}\n\n.djs-minimap .viewport {\n /* fill: rgba(255, 116, 0, 0.25); */\n fill: none;\n stroke: none;\n}\n\n.djs-minimap .viewport-dom {\n position: absolute;\n border: solid 2px orange;\n border-radius: 2px;\n box-sizing: border-box;\n cursor: move;\n}\n\n.djs-minimap:not(.open) .viewport-dom {\n display: none;\n}\n\n.djs-minimap.open .overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: rgba(255, 255, 255, 0.2);\n pointer-events: none;\n}\n\n.djs-minimap .cursor-crosshair {\n cursor: crosshair;\n}\n\n.djs-minimap .cursor-move {\n cursor: move;\n}\n",""]);const s=a},2805:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,'/**\n * color definitions\n */\n.djs-parent {\n --color-grey-225-10-15: hsl(225, 10%, 15%);\n --color-grey-225-10-35: hsl(225, 10%, 35%);\n --color-grey-225-10-55: hsl(225, 10%, 55%);\n --color-grey-225-10-75: hsl(225, 10%, 75%);\n --color-grey-225-10-80: hsl(225, 10%, 80%);\n --color-grey-225-10-85: hsl(225, 10%, 85%);\n --color-grey-225-10-90: hsl(225, 10%, 90%);\n --color-grey-225-10-95: hsl(225, 10%, 95%);\n --color-grey-225-10-97: hsl(225, 10%, 97%);\n\n --color-blue-205-100-45: hsl(205, 100%, 45%);\n --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);\n --color-blue-205-100-50: hsl(205, 100%, 50%);\n --color-blue-205-100-50-opacity-15: hsla(205, 100%, 50%, 15%);\n --color-blue-205-100-70: hsl(205, 100%, 75%);\n --color-blue-205-100-95: hsl(205, 100%, 95%);\n\n --color-green-150-86-44: hsl(150, 86%, 44%);\n\n --color-red-360-100-40: hsl(360, 100%, 40%);\n --color-red-360-100-45: hsl(360, 100%, 45%);\n --color-red-360-100-92: hsl(360, 100%, 92%);\n --color-red-360-100-97: hsl(360, 100%, 97%);\n\n --color-white: hsl(0, 0%, 100%);\n --color-black: hsl(0, 0%, 0%);\n --color-black-opacity-10: hsla(0, 0%, 0%, 10%);\n --color-black-opacity-30: hsla(0, 0%, 0%, 30%);\n\n --canvas-fill-color: var(--color-white);\n\n --bendpoint-fill-color: var(--color-blue-205-100-45);\n --bendpoint-stroke-color: var(--canvas-fill-color);\n\n --context-pad-entry-background-color: var(--color-white);\n --context-pad-entry-hover-background-color: var(--color-grey-225-10-95);\n\n --element-dragger-color: var(--color-blue-205-100-50);\n --element-hover-outline-fill-color: var(--color-blue-205-100-45);\n --element-selected-outline-stroke-color: var(--color-blue-205-100-50);\n --element-selected-outline-secondary-stroke-color: var(--color-blue-205-100-70);\n\n --lasso-fill-color: var(--color-blue-205-100-50-opacity-15);\n --lasso-stroke-color: var(--element-selected-outline-stroke-color);\n\n --palette-entry-color: var(--color-grey-225-10-15);\n --palette-entry-hover-color: var(--color-blue-205-100-45);\n --palette-entry-selected-color: var(--color-blue-205-100-50);\n --palette-separator-color: var(--color-grey-225-10-75);\n --palette-toggle-hover-background-color: var(--color-grey-225-10-55);\n --palette-background-color: var(--color-grey-225-10-97);\n --palette-border-color: var(--color-grey-225-10-75);\n\n --popup-font-size: 14px;\n --popup-header-entry-selected-color: var(--color-blue-205-100-50);\n --popup-header-font-weight: bolder;\n --popup-background-color: var(--color-white);\n --popup-border-color: transparent;\n --popup-shadow-color: var(--color-black-opacity-30);\n --popup-description-color: var(--color-grey-225-10-55);\n --popup-no-results-color: var(--color-grey-225-10-55);\n --popup-entry-title-color: var(--color-grey-225-10-55);\n --popup-entry-hover-color: var(--color-grey-225-10-95);\n --popup-search-border-color: var(--color-grey-225-10-75);\n --popup-search-focus-border-color: var(--color-blue-205-100-50);\n --popup-search-focus-background-color: var(--color-blue-205-100-95);\n\n --resizer-fill-color: var(--color-blue-205-100-45);\n --resizer-stroke-color: var(--canvas-fill-color);\n\n --search-container-background-color: var(--color-grey-225-10-97);\n --search-container-border-color: var(--color-blue-205-100-50);\n --search-container-box-shadow-color: var(--color-blue-205-100-95);\n --search-container-box-shadow-inset-color: var(--color-grey-225-10-80);\n --search-input-border-color: var(--color-grey-225-10-75);\n --search-result-border-color: var(--color-grey-225-10-75);\n --search-result-highlight-color: var(--color-black);\n --search-result-selected-color: var(--color-blue-205-100-45-opacity-30);\n\n --shape-attach-allowed-stroke-color: var(--color-blue-205-100-50);\n --shape-connect-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-not-allowed-fill-color: var(--color-red-360-100-97);\n --shape-resize-preview-stroke-color: var(--color-blue-205-100-50);\n\n --snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30);\n\n --space-tool-crosshair-stroke-color: var(--color-black);\n\n --tooltip-error-background-color: var(--color-red-360-100-97);\n --tooltip-error-border-color: var(--color-red-360-100-45);\n --tooltip-error-color: var(--color-red-360-100-45);\n}\n\n/**\n * outline styles\n */\n\n.djs-outline,\n.djs-selection-outline {\n fill: none;\n shape-rendering: geometricPrecision;\n stroke-width: 2px;\n}\n\n.djs-outline {\n visibility: hidden;\n}\n\n.djs-selection-outline {\n stroke: var(--element-selected-outline-stroke-color);\n}\n\n.djs-element.selected .djs-outline {\n visibility: visible;\n\n stroke: var(--element-selected-outline-stroke-color);\n}\n\n.djs-multi-select .djs-element.selected .djs-outline {\n stroke: var(--element-selected-outline-secondary-stroke-color);\n}\n\n.djs-shape.connect-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-connect-allowed-fill-color) !important;\n}\n\n.djs-shape.connect-not-ok .djs-visual > :nth-child(1),\n.djs-shape.drop-not-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\n.djs-shape.new-parent .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-allowed-fill-color) !important;\n}\n\nsvg.drop-not-ok {\n background: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\nsvg.new-parent {\n background: var(--shape-drop-allowed-fill-color) !important;\n}\n\n\n/* Override move cursor during drop and connect */\n.drop-not-ok,\n.connect-not-ok,\n.drop-not-ok *,\n.connect-not-ok * {\n cursor: not-allowed !important;\n}\n\n.drop-ok,\n.connect-ok,\n.drop-ok *,\n.connect-ok * {\n cursor: default !important;\n}\n\n.djs-element.attach-ok .djs-visual > :nth-child(1) {\n stroke-width: 5px !important;\n stroke: var(--shape-attach-allowed-stroke-color) !important;\n}\n\n.djs-frame.connect-not-ok .djs-visual > :nth-child(1),\n.djs-frame.drop-not-ok .djs-visual > :nth-child(1) {\n stroke-width: 3px !important;\n stroke: var(--shape-drop-not-allowed-fill-color) !important;\n fill: none !important;\n}\n\n/**\n* Selection box style\n*\n*/\n.djs-lasso-overlay {\n fill: var(--lasso-fill-color);\n stroke: var(--lasso-stroke-color);\n stroke-width: 2px;\n shape-rendering: geometricPrecision;\n pointer-events: none;\n}\n\n/**\n * Resize styles\n */\n.djs-resize-overlay {\n fill: none;\n\n stroke-dasharray: 5 1 3 1;\n stroke: var(--shape-resize-preview-stroke-color);\n\n pointer-events: none;\n}\n\n.djs-resizer-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-resizer-visual {\n fill: var(--resizer-fill-color);\n stroke-width: 1px;\n stroke: var(--resizer-stroke-color);\n shape-rendering: geometricPrecision;\n}\n\n.djs-resizer:hover .djs-resizer-visual {\n stroke: var(--resizer-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-cursor-resize-ns,\n.djs-resizer-n,\n.djs-resizer-s {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew,\n.djs-resizer-e,\n.djs-resizer-w {\n cursor: ew-resize;\n}\n\n.djs-cursor-resize-nwse,\n.djs-resizer-nw,\n.djs-resizer-se {\n cursor: nwse-resize;\n}\n\n.djs-cursor-resize-nesw,\n.djs-resizer-ne,\n.djs-resizer-sw {\n cursor: nesw-resize;\n}\n\n.djs-shape.djs-resizing > .djs-outline {\n visibility: hidden !important;\n}\n\n.djs-shape.djs-resizing > .djs-resizer {\n visibility: hidden;\n}\n\n.djs-dragger > .djs-resizer {\n visibility: hidden;\n}\n\n/**\n * drag styles\n */\n.djs-dragger * {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragger tspan,\n.djs-dragger text {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger circle,\nmarker.djs-dragger path,\nmarker.djs-dragger polygon,\nmarker.djs-dragger polyline,\nmarker.djs-dragger rect {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger text,\nmarker.djs-dragger tspan {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragging {\n opacity: 0.3;\n}\n\n.djs-dragging,\n.djs-dragging > * {\n pointer-events: none !important;\n}\n\n.djs-dragging .djs-context-pad,\n.djs-dragging .djs-outline {\n display: none !important;\n}\n\n/**\n * no pointer events for visual\n */\n.djs-visual,\n.djs-outline {\n pointer-events: none;\n}\n\n.djs-element.attach-ok .djs-hit {\n stroke-width: 60px !important;\n}\n\n/**\n * all pointer events for hit shape\n */\n.djs-element > .djs-hit-all,\n.djs-element > .djs-hit-no-move {\n pointer-events: all;\n}\n\n.djs-element > .djs-hit-stroke,\n.djs-element > .djs-hit-click-stroke {\n pointer-events: stroke;\n}\n\n/**\n * shape / connection basic styles\n */\n.djs-connection .djs-visual {\n stroke-width: 2px;\n fill: none;\n}\n\n.djs-cursor-grab {\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.djs-cursor-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.djs-cursor-crosshair {\n cursor: crosshair;\n}\n\n.djs-cursor-move {\n cursor: move;\n}\n\n.djs-cursor-resize-ns {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew {\n cursor: ew-resize;\n}\n\n\n/**\n * snapping\n */\n.djs-snap-line {\n stroke: var(--snap-line-stroke-color);\n stroke-linecap: round;\n stroke-width: 2px;\n pointer-events: none;\n}\n\n/**\n * snapping\n */\n.djs-crosshair {\n stroke: var(--space-tool-crosshair-stroke-color);\n stroke-linecap: round;\n stroke-width: 1px;\n pointer-events: none;\n shape-rendering: geometricPrecision;\n stroke-dasharray: 5, 5;\n}\n\n/**\n * palette\n */\n\n.djs-palette {\n position: absolute;\n left: 20px;\n top: 20px;\n\n box-sizing: border-box;\n width: 48px;\n}\n\n.djs-palette .separator {\n margin: 5px;\n padding-top: 5px;\n\n border: none;\n border-bottom: solid 1px var(--palette-separator-color);\n\n clear: both;\n}\n\n.djs-palette .entry:before {\n vertical-align: initial;\n}\n\n.djs-palette .djs-palette-toggle {\n cursor: pointer;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n color: var(--palette-entry-color);\n font-size: 30px;\n\n text-align: center;\n}\n\n.djs-palette .entry {\n float: left;\n}\n\n.djs-palette .entry img {\n max-width: 100%;\n}\n\n.djs-palette .djs-palette-entries:after {\n content: \'\';\n display: table;\n clear: both;\n}\n\n.djs-palette .djs-palette-toggle:hover {\n background: var(--palette-toggle-hover-background-color);\n}\n\n.djs-palette .entry:hover {\n color: var(--palette-entry-hover-color);\n}\n\n.djs-palette .highlighted-entry {\n color: var(--palette-entry-selected-color) !important;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n width: 46px;\n height: 46px;\n line-height: 46px;\n cursor: default;\n}\n\n/**\n * Palette open / two-column layout is controlled via\n * classes on the palette. Events to hook into palette\n * changed life-cycle are available in addition.\n */\n.djs-palette.two-column.open {\n width: 94px;\n}\n\n.djs-palette:not(.open) .djs-palette-entries {\n display: none;\n}\n\n.djs-palette:not(.open) {\n overflow: hidden;\n}\n\n.djs-palette.open .djs-palette-toggle {\n display: none;\n}\n\n/**\n * context-pad\n */\n.djs-overlay-context-pad {\n width: 72px;\n z-index: 100;\n}\n\n.djs-context-pad {\n position: absolute;\n display: none;\n pointer-events: none;\n line-height: 1;\n}\n\n.djs-context-pad .entry {\n width: 22px;\n height: 22px;\n text-align: center;\n display: inline-block;\n font-size: 22px;\n margin: 0 2px 2px 0;\n\n border-radius: 3px;\n\n cursor: default;\n\n background-color: var(--context-pad-entry-background-color);\n box-shadow: 0 0 2px 1px var(--context-pad-entry-background-color);\n pointer-events: all;\n vertical-align: middle;\n}\n\n.djs-context-pad .entry:hover {\n background: var(--context-pad-entry-hover-background-color);\n}\n\n.djs-context-pad.open {\n display: block;\n}\n\n/**\n * popup styles\n */\n.djs-popup-backdrop {\n position: fixed;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 200;\n line-height: 1;\n font-family: "IBM Plex Sans", sans-serif;\n}\n\n.djs-popup {\n box-sizing: border-box;\n width: min-content;\n background: var(--popup-background-color);\n overflow: hidden;\n position: absolute;\n\n box-shadow: 0px 2px 6px var(--popup-shadow-color);\n border: solid 1px var(--popup-border-color);\n min-width: 120px;\n outline: none;\n font-size: var(--popup-font-size);\n}\n\n.djs-popup-search input {\n width: 100%;\n box-sizing: border-box;\n font-size: var(--popup-font-size);\n padding: 3px 6px;\n border-radius: 2px;\n border: solid 1px var(--popup-search-border-color);\n line-height: 21px;\n}\n\n.djs-popup-search input:focus {\n background-color: var(--popup-search-focus-background-color);\n border: solid 1px var(--popup-search-focus-border-color);\n outline: none;\n}\n\n.djs-popup-header {\n display: flex;\n align-items: stretch;\n line-height: 20px;\n margin: 10px 12px 10px 12px;\n}\n\n.djs-popup-header .entry {\n border-radius: 2px;\n}\n\n.djs-popup-header .entry.active {\n color: var(--popup-header-entry-selected-color);\n}\n\n.djs-popup-header .entry.disabled {\n color: inherit;\n}\n\n.djs-popup-search {\n margin: 10px 12px;\n}\n\n.djs-popup-title {\n font-size: var(--popup-font-size);\n font-weight: var(--popup-header-font-weight);\n flex: 1;\n margin: 0;\n}\n\n.djs-popup-search {\n position: relative;\n width: auto;\n}\n\n.djs-popup-search-icon {\n position: absolute;\n left: 8px;\n top: 7px;\n}\n\n.djs-popup-search input {\n padding-left: 25px;\n}\n\n.djs-popup-results {\n margin: 7px 3px 7px 12px;\n list-style: none;\n max-height: 280px;\n overflow: auto;\n padding-right: 9px;\n}\n\n.djs-popup-group {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.djs-popup-body .entry,\n.djs-popup-body .entry-header {\n padding: 5px 7px;\n cursor: default;\n border-radius: 4px;\n}\n\n.djs-popup-body .entry-header {\n font-weight: var(--popup-header-font-weight);\n color: var(--popup-entry-title-color);\n padding-left: 0;\n}\n\n.djs-popup [class*="icon"] .djs-popup-label,\n.djs-popup-label:not(:first-child) {\n margin-left: .5em;\n}\n\n.djs-popup [class*="icon"]:before,\n.djs-popup-entry-icon {\n width: 1em;\n height: 1em;\n display: inline-block;\n font-size: 1.4em;\n vertical-align: middle;\n}\n\n.djs-popup-body .entry-header:not(:first-child) {\n margin-top: 8px;\n margin-bottom: 2px;\n}\n\n.djs-popup-body .entry {\n display: flex;\n flex-direction: row;\n align-items: stretch;\n height: min-content;\n}\n\n.djs-popup .entry.selected {\n background-color: var(--popup-entry-hover-color);\n}\n\n.djs-popup-body .entry:not(:first-child) {\n margin-top: 2px;\n}\n\n.djs-popup-entry-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n}\n\n.djs-popup-entry-description {\n color: var(--popup-description-color);\n}\n\n.djs-popup-label,\n.djs-popup-entry-description {\n line-height: 1.4em;\n}\n\n.djs-popup-title,\n.djs-popup-label,\n.djs-popup-entry-description,\n.djs-popup .entry-header {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.djs-popup-entry-name {\n display: flex;\n}\n\n.entry-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n overflow: hidden;\n}\n\n.djs-popup-body {\n flex-direction: column;\n width: auto;\n}\n\n.djs-popup *::-webkit-scrollbar {\n width: 6px;\n}\n\n.djs-popup *::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background-color: rgba(0, 0, 0, 0.2);\n}\n\n.djs-popup *::-webkit-scrollbar-track {\n box-shadow: none;\n background: transparent;\n margin: 0;\n padding: 5px;\n}\n\n.djs-popup-no-results {\n padding: 0 12px 12px 12px;\n color: var(--popup-no-results-color);\n}\n\n.djs-popup-entry-docs {\n flex: 0;\n flex-direction: row;\n align-items: center;\n padding-left: 5px;\n display: none;\n}\n\n.djs-popup-body .entry:hover .djs-popup-entry-docs {\n display: flex;\n}\n\n.djs-popup-entry-docs svg {\n vertical-align: middle;\n margin: auto 2px auto 5px;\n}\n\n/**\n * palette styles\n */\n.djs-palette {\n background: var(--palette-background-color);\n border: solid 1px var(--palette-border-color);\n border-radius: 2px;\n}\n\n/**\n * touch\n */\n\n.djs-shape,\n.djs-connection {\n touch-action: none;\n}\n\n.djs-segment-dragger,\n.djs-bendpoint {\n display: none;\n}\n\n/**\n * bendpoints\n */\n.djs-segment-dragger .djs-visual {\n display: none;\n\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n stroke-opacity: 1;\n}\n\n.djs-segment-dragger:hover .djs-visual {\n display: block;\n}\n\n.djs-bendpoint .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n}\n\n.djs-segment-dragger:hover,\n.djs-bendpoints.hover .djs-segment-dragger,\n.djs-bendpoints.selected .djs-segment-dragger,\n.djs-bendpoint:hover,\n.djs-bendpoints.hover .djs-bendpoint,\n.djs-bendpoints.selected .djs-bendpoint {\n display: block;\n}\n\n.djs-drag-active .djs-bendpoints * {\n display: none;\n}\n\n.djs-bendpoints:not(.hover) .floating {\n display: none;\n}\n\n.djs-segment-dragger:hover .djs-visual,\n.djs-segment-dragger.djs-dragging .djs-visual,\n.djs-bendpoint:hover .djs-visual,\n.djs-bendpoint.floating .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-bendpoint.floating .djs-hit {\n pointer-events: none;\n}\n\n.djs-segment-dragger .djs-hit,\n.djs-bendpoint .djs-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-segment-dragger.horizontal .djs-hit {\n cursor: ns-resize;\n}\n\n.djs-segment-dragger.vertical .djs-hit {\n cursor: ew-resize;\n}\n\n.djs-segment-dragger.djs-dragging .djs-hit {\n pointer-events: none;\n}\n\n.djs-updating,\n.djs-updating > * {\n pointer-events: none !important;\n}\n\n.djs-updating .djs-context-pad,\n.djs-updating .djs-outline,\n.djs-updating .djs-bendpoint,\n.djs-multi-select .djs-bendpoint,\n.djs-multi-select .djs-segment-dragger,\n.connect-ok .djs-bendpoint,\n.connect-not-ok .djs-bendpoint,\n.drop-ok .djs-bendpoint,\n.drop-not-ok .djs-bendpoint {\n display: none !important;\n}\n\n.djs-segment-dragger.djs-dragging,\n.djs-bendpoint.djs-dragging {\n display: block;\n opacity: 1.0;\n}\n\n\n/**\n * tooltips\n */\n.djs-tooltip-error {\n width: 160px;\n padding: 6px;\n\n background: var(--tooltip-error-background-color);\n border: solid 1px var(--tooltip-error-border-color);\n border-radius: 2px;\n color: var(--tooltip-error-color);\n font-size: 12px;\n line-height: 16px;\n\n opacity: 0.75;\n}\n\n.djs-tooltip-error:hover {\n opacity: 1;\n}\n\n\n/**\n * search pad\n */\n.djs-search-container {\n position: absolute;\n top: 20px;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n\n width: 25%;\n min-width: 300px;\n max-width: 400px;\n z-index: 10;\n\n font-size: 1.05em;\n opacity: 0.9;\n background: var(--search-container-background-color);\n border: solid 1px var(--search-container-border-color);\n border-radius: 2px;\n box-shadow: 0 0 0 2px var(--search-container-box-shadow-color), 0 0 0 1px var(--search-container-box-shadow-inset-color) inset;\n}\n\n.djs-search-container:not(.open) {\n display: none;\n}\n\n.djs-search-input input {\n font-size: 1.05em;\n width: 100%;\n padding: 6px 10px;\n border: 1px solid var(--search-input-border-color);\n box-sizing: border-box;\n}\n\n.djs-search-input input:focus {\n outline: none;\n border-color: var(--search-input-border-color);\n}\n\n.djs-search-results {\n position: relative;\n overflow-y: auto;\n max-height: 200px;\n}\n\n.djs-search-results:hover {\n cursor: pointer;\n}\n\n.djs-search-result {\n width: 100%;\n padding: 6px 10px;\n background: white;\n border-bottom: solid 1px var(--search-result-border-color);\n border-radius: 1px;\n}\n\n.djs-search-highlight {\n color: var(--search-result-highlight-color);\n}\n\n.djs-search-result-primary {\n margin: 0 0 10px;\n}\n\n.djs-search-result-secondary {\n font-family: monospace;\n margin: 0;\n}\n\n.djs-search-result:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-overlay {\n background: var(--search-result-selected-color);\n}\n\n/**\n * hidden styles\n */\n.djs-element-hidden,\n.djs-element-hidden .djs-hit,\n.djs-element-hidden .djs-outline,\n.djs-label-hidden .djs-label {\n display: none !important;\n}\n\n.djs-element .djs-hit-stroke,\n.djs-element .djs-hit-click-stroke,\n.djs-element .djs-hit-all {\n cursor: move;\n}',""]);const s=a},9029:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,"#cacao-application {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n#app-tab-container {\n height: 30px;\n display: flex;\n flex-direction: row;\n background-color: var(--header-tab-not-selected);\n}\n\n#app-body {\n flex-grow: 1;\n}\n\n#cacaoWindow {\n height: 100%;\n width: 100%;\n\n overflow: hidden;\n\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.canvas {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: var(--canvas-background);\n}\n\n.blurred {\n filter: blur(5px);\n}\n\n.djs-element.selected .djs-outline {\n visibility: visible;\n stroke: var(--canvas-select-stroke);\n\n rx: 10px;\n ry: 10px;\n}\n\n.djs-selection-outline {\n stroke: var(--canvas-select-stroke);\n\n rx: 10px;\n ry: 10px;\n}\n\n.djs-multi-select .djs-element.selected .djs-outline {\n visibility: visible;\n stroke: var(--canvas-select-fill);\n\n rx: 10px;\n ry: 10px;\n}\n",""]);const s=a},1709:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,":root {\n --primary: #ffffff;\n --secondary: #f4f6fc;\n --tertiary: #e6e8ec;\n --quaternary: #a8a8a8;\n\n --header-tab-not-selected: #1c1c27;\n --header-background: #28293e;\n --header-button-background: #353750;\n --header-button-hover: #73759a;\n --header-button-text: white;\n --header-text: white;\n --header-border: #595b7d;\n\n --border: #d9d9d9;\n --hover: #e6e8ec;\n --select: #b8b2fa;\n --canvas-select-stroke: #8f87e6;\n --canvas-select-fill: #d7d4ff;\n --scrollbar: #8f87e6;\n\n --canvas-background: white;\n --canvas-overlay-background: white;\n\n --object-color: rgb(127 147 186);\n --object-color-strong: rgb(76, 91, 120);\n}\n\n.action--color {\n --object-color: #6bb8d0 !important;\n --object-color-strong: #006080 !important;\n}\n\n.end--color {\n --object-color: #db6c6c !important;\n --object-color-strong: #7d0001 !important;\n}\n\n.if-condition--color {\n --object-color: #a063dd !important;\n --object-color-strong: #6504c1 !important;\n}\n\n.parallel--color {\n --object-color: #c7ae6f !important;\n --object-color-strong: #ac7f0c !important;\n}\n\n.playbook-action--color {\n --object-color: #777777 !important;\n --object-color-strong: #000000 !important;\n}\n\n.start--color {\n --object-color: #6fc78d !important;\n --object-color-strong: #008127 !important;\n}\n\n.switch-condition--color {\n --object-color: #a063dd !important;\n --object-color-strong: #6504c1 !important;\n}\n\n.while-condition--color {\n --object-color: #a063dd !important;\n --object-color-strong: #6504c1 !important;\n}\n",""]);const s=a},8423:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,"html,\nbody {\n margin: 0;\n padding: 0;\n height: 100%;\n width: 100%;\n transition-duration: 100ms;\n\n --scrollbar-width: 3px;\n background-color: var(--header-background);\n\n overflow: hidden;\n}\n\n/* scroll container */\n::-webkit-scrollbar {\n background-color: transparent;\n width: var(--scrollbar-width);\n}\n\n::-webkit-scrollbar-track {\n background: transparent;\n}\n\n/* scroll cursor */\n::-webkit-scrollbar-thumb {\n background: var(--scrollbar);\n border-radius: 5px;\n}\n",""]);const s=a},3467:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,".cacaoDialog {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: visible;\n\n max-width: 350px;\n width: 100%;\n max-height: 70%;\n padding: 0px;\n\n font-family: poppins, sans-serif;\n color: black;\n\n background: rgba(243, 243, 243, 1);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border: 1px solid rgba(214, 214, 214, 0.83);\n}\n\n.cacaoDialog--scrollable {\n overflow-y: auto;\n flex-grow: 1;\n height: 100%;\n padding: 10px 10px 100px 10px;\n}\n\n.cacaoDialog__title {\n padding: 15px 20px;\n font-family: sans-serif;\n font-weight: 700;\n font-size: 18px;\n}\n\n.cacaoDialog__body {\n position: relative;\n overflow: visible;\n}\n\n.cacaoDialog__errormessage {\n color: red;\n font-size: 10px;\n flex-grow: 1;\n}\n\n.cacaoDialog__description {\n padding: 10px 20px 20px 20px;\n font-family: sans-serif;\n font-weight: 200;\n font-size: 15px;\n line-height: 25px;\n}\n\n.cacaoDialog__buttonList {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n flex-shrink: 0;\n align-items: flex-end;\n padding: 0 10px 10px 10px;\n margin-top: 10px;\n}\n\n.buttonList__button {\n border-radius: 5px;\n padding: 5px 10px;\n text-decoration: none;\n font-weight: 500;\n}\n\n.button--primary {\n background: var(--select);\n border: 0;\n}\n\n.button--secondary {\n background: transparent;\n border: 0;\n color: black;\n}\n\n.cacaoDialog__message {\n font-size: 15px;\n margin: 10px;\n text-align: center;\n font-weight: 200;\n}\n\n.cacaoDialog__labels > .property--simple {\n display: flex;\n}\n\n.cacaoDialog__labels > .property--simple label {\n text-transform: initial;\n}\n",""]);const s=a},1378:(t,e,n)=>{"use strict";n.d(e,{Z:()=>K});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(1098),n.b),u=new URL(n(8689),n.b),l=new URL(n(8073),n.b),d=new URL(n(3933),n.b),p=new URL(n(8718),n.b),f=new URL(n(2586),n.b),m=new URL(n(2981),n.b),y=new URL(n(1407),n.b),g=new URL(n(8809),n.b),v=new URL(n(1848),n.b),b=new URL(n(6156),n.b),_=new URL(n(3433),n.b),w=new URL(n(9993),n.b),x=new URL(n(738),n.b),M=new URL(n(1317),n.b),k=new URL(n(69),n.b),S=new URL(n(3601),n.b),E=new URL(n(2769),n.b),A=a()(r()),T=c()(h),C=c()(u),j=c()(l),O=c()(d),P=c()(p),I=c()(f),$=c()(m),R=c()(y),L=c()(g),N=c()(v),B=c()(b),D=c()(_),F=c()(w),U=c()(x),z=c()(M),H=c()(k),q=c()(S),V=c()(E);A.push([t.id,`@font-face {\n font-family: Poppins;\n src: url(${T});\n font-style: normal;\n font-weight: 100;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${C});\n font-style: italic;\n font-weight: 100;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${j});\n font-style: normal;\n font-weight: 200;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${O});\n font-style: italic;\n font-weight: 200;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${P});\n font-style: normal;\n font-weight: 300;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${I});\n font-style: italic;\n font-weight: 300;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${$});\n font-style: normal;\n font-weight: 400;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${R});\n font-style: italic;\n font-weight: 400;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${L});\n font-style: normal;\n font-weight: 500;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${N});\n font-style: italic;\n font-weight: 500;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${B});\n font-style: normal;\n font-weight: 600;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${D});\n font-style: italic;\n font-weight: 600;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${F});\n font-style: normal;\n font-weight: 700;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${U});\n font-style: italic;\n font-weight: 700;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${z});\n font-style: normal;\n font-weight: 800;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${H});\n font-style: italic;\n font-weight: 800;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${q});\n font-style: normal;\n font-weight: 900;\n}\n\n@font-face {\n font-family: Poppins;\n src: url(${V});\n font-style: italic;\n font-weight: 900;\n}\n`,""]);const K=A},377:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(9819),n.b),u=new URL(n(6524),n.b),l=new URL(n(9007),n.b),d=new URL(n(8377),n.b),p=new URL(n(6303),n.b),f=new URL(n(5340),n.b),m=a()(r()),y=c()(h),g=c()(u),v=c()(l),b=c()(d),_=c()(p),w=c()(f);m.push([t.id,`.header {\n width: calc(100% - 2px);\n background: var(--header-background);\n border: solid 1px var(--header-border);\n color: var(--header-text);\n\n font-family: Poppins;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n\n.header > .header__title {\n margin: 10px;\n width: calc(100% - 500px);\n\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n flex-grow: 1;\n}\n\n.header__title > div {\n margin-right: 10px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n}\n\n.title__name {\n margin: 0 0 5px 0;\n display: block !important;\n height: 25px;\n font-weight: 600;\n font-size: 20px;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.title__description {\n --maxLineNumber: 3;\n margin: 0 0 5px 0;\n font-weight: 200;\n font-size: 13px;\n text-align: justify;\n line-height: 15px;\n width: 80ch !important;\n max-height: calc(20px * var(--maxLineNumber));\n\n white-space: wrap;\n overflow: hidden;\n text-overflow: initial;\n\n display: -webkit-box !important;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n}\n\n.title__labels {\n flex-wrap: nowrap;\n overflow: hidden;\n position: relative;\n}\n\n.title__tags {\n margin: 0 0 2px 0;\n}\n\n.labels__entry {\n padding: 0 5px;\n background-color: var(--select);\n margin-right: 5px;\n font-size: 10px;\n border-radius: 5px;\n color: var(--header-background);\n}\n\n.labels__moreindicator {\n height: 18px;\n background-color: transparent;\n border: 1px solid var(--select);\n color: var(--select);\n}\n\n.moreindicator--show {\n display: block;\n}\n\n.moreindicator--hide {\n display: none;\n}\n\n.expanded {\n width: 100%;\n}\n\n.header__logo {\n margin-left: 10px;\n min-height: 45px;\n min-width: 45px;\n background-image: url(${y}) !important;\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.header__options {\n margin-right: 10px;\n display: flex;\n flex-flow: row-reverse;\n flex-direction: row;\n align-items: flex-end;\n align-items: center;\n}\n\n.options__entry:hover {\n background-color: var(--header-button-background);\n}\n\n.options__entry {\n margin: 5px;\n padding: 5px;\n width: 50px;\n\n border-radius: 5px;\n text-align: center;\n\n cursor: pointer;\n transition-duration: 100ms;\n\n -webkit-user-select: none;\n /* Safari */\n -ms-user-select: none;\n /* IE 10 and IE 11 */\n user-select: none;\n /* Standard syntax */\n}\n\n.options__entry:hover .entry__icon {\n background-color: var(--select);\n}\n\n.entry__label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n height: 20px;\n line-height: 10px;\n margin: 0;\n font-weight: 400;\n font-size: 10px;\n color: var(--header-text);\n}\n\n.options__entry:hover .entry__label {\n color: var(--select);\n}\n\n.entry__icon {\n -webkit-mask: var(--svg);\n mask: var(--svg);\n\n margin: 0 5px;\n width: 40px;\n height: 30px;\n\n background-color: var(--header-text);\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n}\n\n.import {\n --svg: url(${g});\n}\n\n.export {\n --svg: url(${v});\n}\n\n.metadata {\n --svg: url(${b});\n}\n\n.sign {\n --svg: url(${_});\n}\n\n.verify {\n --svg: url(${w});\n}\n\n.expander .entry__icon {\n position: relative;\n background-color: transparent !important;\n transition-duration: 200ms;\n}\n\n.expander .entry__icon::before {\n content: '.';\n color: transparent;\n position: absolute;\n left: 0px;\n top: 3px;\n\n padding: 10px 20px;\n border-radius: 10px;\n font-size: 0;\n\n transition-duration: 200ms;\n\n background-color: var(--header-button-hover) !important;\n}\n\n.expander.expanded .entry__icon::before {\n transition-duration: 200ms;\n background-color: var(--select) !important;\n}\n\n.expander .entry__icon::after {\n content: '.';\n color: transparent;\n position: absolute;\n left: 2px;\n top: 5px;\n\n padding: 8px;\n border-radius: 10px;\n font-size: 0;\n\n transition-duration: 200ms;\n\n background-color: var(--header-background) !important;\n}\n\n.expander.expanded .entry__icon::after {\n left: 22px;\n top: 5px;\n\n transition-duration: 200ms;\n\n background-color: var(--header-background) !important;\n}\n`,""]);const x=m},821:(t,e,n)=>{"use strict";n.d(e,{Z:()=>M});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1378),c=n(1709),h=n(9029),u=n(1281),l=n(2089),d=n(8322),p=n(5253),f=n(2722),m=n(90),y=n(377),g=n(8423),v=n(3467),b=n(4207),_=n(7954),w=n(9362),x=a()(r());x.i(s.Z),x.i(c.Z),x.i(h.Z),x.i(u.Z),x.i(l.Z),x.i(d.Z),x.i(p.Z),x.i(f.Z),x.i(m.Z),x.i(y.Z),x.i(g.Z),x.i(v.Z),x.i(b.Z),x.i(_.Z),x.i(w.Z),x.push([t.id,"\n",""]);const M=x},4207:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,".djs-minimap {\n top: 10px;\n right: 10px;\n\n background: rgba(244, 244, 244, 0.55);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n border: 1px solid rgba(214, 214, 214, 0.83);\n\n transition-duration: 200ms;\n}\n\n.minimap--move {\n right: 360px !important;\n}\n\n.djs-minimap .map {\n width: 240px !important;\n height: 120px !important;\n}\n\n.djs-minimap .viewport-dom {\n border: solid 1px var(--select) !important;\n border-radius: 5px;\n}\n\n.djs-minimap:not(.open) .toggle:before {\n content: '' !important;\n}\n\n.djs-minimap.open .toggle:before {\n content: '' !important;\n}\n\n.djs-minimap .toggle {\n padding: 0px !important;\n margin: 0px !important;\n background-color: var(--select);\n}\n",""]);const s=a},5253:(t,e,n)=>{"use strict";n.d(e,{Z:()=>q});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(951),n.b),u=new URL(n(394),n.b),l=new URL(n(5067),n.b),d=new URL(n(3739),n.b),p=new URL(n(6098),n.b),f=new URL(n(1998),n.b),m=new URL(n(1924),n.b),y=new URL(n(9053),n.b),g=new URL(n(393),n.b),v=new URL(n(1392),n.b),b=new URL(n(5795),n.b),_=new URL(n(8380),n.b),w=new URL(n(9580),n.b),x=new URL(n(4240),n.b),M=new URL(n(4370),n.b),k=new URL(n(5199),n.b),S=new URL(n(8648),n.b),E=a()(r()),A=c()(h),T=c()(u),C=c()(l),j=c()(d),O=c()(p),P=c()(f),I=c()(m),$=c()(y),R=c()(g),L=c()(v),N=c()(b),B=c()(_),D=c()(w),F=c()(x),U=c()(M),z=c()(k),H=c()(S);E.push([t.id,`.djs-palette {\n position: absolute;\n left: 10px !important;\n top: 10px !important;\n transform: translateY(0%);\n width: auto !important;\n display: flex;\n flex-direction: column;\n\n background: rgba(244, 244, 244, 0.55);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border: 1px solid rgba(214, 214, 214, 0.83);\n}\n\n.djs-palette::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: -1;\n\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n border-radius: 16px;\n}\n\n.djs-palette .group {\n display: flex;\n flex-direction: column;\n align-items: end;\n overflow: hidden;\n}\n\n.entry {\n transition:\n width 300ms ease,\n background-color 200ms ease;\n background-color: transparent !important;\n background-repeat: no-repeat;\n background-size: contain;\n background-position: left !important;\n background-image: var(--image-url);\n margin: 8px 8px 4px 8px;\n width: 40px !important;\n height: 40px !important;\n border-radius: 5px;\n box-shadow: none !important;\n}\n\n.entry:hover {\n transition: background-color 100ms ease;\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-image: var(--image-url) !important;\n border-radius: 5px;\n box-sizing: border-box;\n background-color: var(--canvas-select-fill) !important;\n color: black !important;\n}\n\n.highlighted-entry {\n transition: background-color 100ms ease;\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-image: var(--image-url) !important;\n border-radius: 5px;\n box-sizing: border-box;\n background-color: var(--canvas-select-fill) !important;\n color: black !important;\n}\n\n.entry-expanded {\n margin: 8px 8px 4px 8px;\n box-shadow: none !important;\n width: 150px !important;\n height: 40px !important;\n text-align: left !important;\n font-size: 14px !important;\n}\n\n.entry--disable {\n background-color: rgba(175, 175, 175, 0.205) !important;\n opacity: 0.5;\n cursor: not-allowed !important;\n opacity: 0.5;\n}\n\n.entry--disable:hover {\n background-color: transparent !important;\n background-color: rgb(230, 230, 230) !important;\n}\n\n.djs-context-pad {\n padding: 2px;\n text-align: center;\n\n background: rgba(244, 244, 244, 0.55);\n border-radius: 10px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n border: 1px solid rgba(214, 214, 214, 0.83);\n}\n\n.djs-context-pad .entry {\n margin: 1px !important;\n width: 30px !important;\n height: 30px !important;\n}\n\n.entry .entry-label {\n padding: 0;\n padding-left: 45px;\n width: 0px;\n height: 100%;\n margin: 0;\n opacity: 0;\n\n font-family: Poppins;\n font-weight: 400;\n font-style: normal;\n font-size: 12px;\n\n transition: opacity 300ms ease 100ms;\n\n display: flex;\n flex-direction: row;\n justify-content: start;\n align-items: center;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.entry-expanded .entry-label {\n opacity: 1;\n width: 100%;\n}\n\n.entry.switcher {\n --image-url: url(${A});\n\n width: 40px !important;\n height: 40px !important;\n\n transform: rotate(-90deg);\n\n border-radius: 50% !important;\n\n background-position: center !important;\n background-repeat: no-repeat !important;\n background-size: 25px 25px !important;\n}\n\n.entry-expanded.switcher {\n transform: rotate(90deg);\n}\n\n.start-step {\n --image-url: url(${T});\n}\n\n.end-step {\n --image-url: url(${C});\n}\n\n.action-step {\n --image-url: url(${j});\n}\n\n.parallel-step {\n --image-url: url(${O});\n}\n\n.playbook-action-step {\n --image-url: url(${P});\n}\n\n.switch-condition {\n --image-url: url(${I});\n}\n\n.while-condition {\n --image-url: url(${$});\n}\n\n.if-condition {\n --image-url: url(${R});\n}\n\n.on-completion {\n --image-url: url(${L});\n}\n\n.on-success {\n --image-url: url(${N});\n}\n\n.on-failure {\n --image-url: url(${B});\n}\n\n.on-true-condition {\n --image-url: url(${D});\n}\n\n.on-false-condition {\n --image-url: url(${F});\n}\n\n.on-condition {\n --image-url: url(${U});\n}\n\n.on-parallel {\n --image-url: url(${z});\n}\n\n.bin {\n --image-url: url(${H});\n}\n`,""]);const q=E},8322:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(3945),n.b),u=new URL(n(653),n.b),l=new URL(n(5377),n.b),d=new URL(n(677),n.b),p=a()(r()),f=c()(h),m=c()(u),y=c()(l),g=c()(d);p.push([t.id,`.picker-window {\n border-top: solid 1px var(--header-border);\n height: calc(100% - 1px) !important;\n background-color: var(--header-background) !important;\n\n display: flex;\n flex-direction: column !important;\n justify-content: space-evenly !important;\n align-items: center !important;\n}\n\n.window__logo {\n max-width: 400px;\n width: 60vmin;\n height: 20vmin;\n\n background-image: url(${f}) !important;\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;\n}\n\n.window__buttoncontainer {\n width: 100%;\n\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n align-items: center;\n}\n\n/* button's container */\n\n.window__button {\n width: 10vmin;\n height: 10vmin;\n\n position: relative;\n margin: 1px;\n border: 1px solid var(--header-border);\n border-radius: 5px;\n background-color: var(--header-button-background);\n color: var(--header-text);\n}\n\n.window__button.button--big {\n width: 35vmin;\n height: 35vmin;\n}\n\n.window__button.button--small {\n width: 160px;\n height: 50px;\n}\n\n.window__button:hover {\n margin: 0px;\n border: 2px solid var(--select);\n color: var(--select) !important;\n}\n\n/* button's icon */\n\n.window__button .button__icon {\n margin: 0 1.5vh;\n width: 7vmin;\n height: 7vmin;\n\n -webkit-mask: var(--svg);\n mask: var(--svg);\n background-color: var(--header-text);\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n}\n\n.window__button.button--big .button__icon {\n margin: 0 2.5vh;\n width: 30vmin;\n height: 30vmin;\n}\n\n.window__button.button--small .button__icon {\n margin: 10px 10px;\n width: 30px;\n height: 30px;\n}\n\n.window__button:hover .button__icon {\n background-color: var(--select);\n}\n\n.window__button.button--new .button__icon {\n --svg: url(${m});\n}\n\n.window__button.button--open .button__icon {\n --svg: url(${y});\n}\n\n.window__button.button--settings .button__icon {\n --svg: url(${g});\n}\n\n/* button's label */\n\n.window__button .button__label {\n position: absolute;\n bottom: 7px;\n right: 10px;\n left: 10px;\n margin: 0;\n\n text-align: center;\n font-family: Poppins;\n font-weight: 300;\n font-size: 13px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.window__button.button--big .button__label {\n bottom: 10px;\n right: 10px;\n left: 10px;\n margin: 0;\n\n font-weight: 400;\n font-size: 26px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.window__button.button--small .button__label {\n bottom: 0px;\n right: 10px;\n left: 10px;\n margin-left: 40px;\n\n font-weight: 400;\n font-size: 15px;\n height: 100%;\n\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n\n/* User dialog */\n\n.usersettings__dialog {\n display: flex;\n flex-direction: column;\n\n max-width: 800px;\n width: 90%;\n max-height: 70%;\n padding: 0px;\n\n font-family: Poppins;\n color: white;\n\n background: rgb(43, 44, 63);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border: 1px solid rgb(115, 117, 154);\n}\n\n.dialog__title {\n padding: 10px 15px;\n letter-spacing: 2px;\n font-family: Poppins;\n font-weight: 500;\n font-size: 25px;\n font-weight: 700;\n}\n\n.dialog__property {\n margin-bottom: 10px;\n padding: 0px 5px;\n width: calc(100% - 10px);\n}\n\n.dialog__property > .property__label {\n margin-left: 5px;\n font-size: 12px;\n font-weight: 300;\n}\n\n.dialog__property > input {\n height: 30px;\n resize: vertical;\n}\n\n.dialog__property > textarea {\n min-height: 18px;\n height: 130px;\n resize: vertical;\n}\n\n.dialog__property > .property__input {\n padding: 0px 5px;\n width: calc(100% - 12px);\n font-size: 13px;\n font-weight: 200;\n color: white;\n\n background: rgb(60, 61, 92);\n border-radius: 7px;\n border: 1px solid rgba(34, 36, 81, 0.84);\n}\n\n.dialog__property > input.input--incorrect {\n border: 1px solid rgba(255, 0, 0, 0.601);\n}\n\n.dialog__buttonList {\n display: flex;\n justify-content: flex-end;\n flex-direction: row;\n padding: 10px;\n}\n\n.dialog__buttonList > button {\n padding: 5px;\n margin-left: 10px;\n border-radius: 5px;\n color: white;\n}\n\n.dialog__buttonList > button.button--primary {\n color: black;\n}\n`,""]);const v=p},90:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(951),n.b),u=new URL(n(4780),n.b),l=new URL(n(9804),n.b),d=new URL(n(7093),n.b),p=a()(r()),f=c()(h),m=c()(u),y=c()(l),g=c()(d);p.push([t.id,`input[type='number']::-webkit-inner-spin-button,\ninput[type='number']::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* sidepanel */\n\n.sidepanel--close {\n transform: translateX(100%);\n}\n\n.sidepanel {\n z-index: 100;\n position: absolute;\n top: 0px;\n right: 0px;\n width: 350px;\n height: calc(100%);\n\n background: var(--canvas-overlay-background) !important;\n border-left: solid 1px var(--border) !important;\n\n box-sizing: border-box;\n\n overflow: visible;\n\n font-family: Poppins;\n\n --object-color: rgb(160, 179, 217);\n\n display: flex;\n flex-direction: column;\n\n transition-duration: 200ms;\n}\n\n.sidepanel__sub {\n flex-grow: 1;\n\n position: relative;\n right: 100%;\n width: 100%;\n padding-left: 100%;\n\n pointer-events: none;\n\n overflow-y: overlay;\n overflow-x: hidden;\n}\n\n.sidepanel__wrapper {\n height: 100%;\n width: 100%;\n position: relative;\n scrollbar-gutter: stable;\n pointer-events: auto;\n\n display: flex;\n flex-direction: column;\n}\n\n/* section */\n\n.sidepanel__section {\n width: calc(100%);\n margin-bottom: 10px;\n}\n\n/* switcher */\n.sidepanel__switcher {\n z-index: 201;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n padding: 7px 0;\n border-radius: 0 0 5px 5px;\n border-bottom: 1px solid #cfcfcf;\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);\n}\n\n.switcher__entry {\n padding: 4px 10px;\n margin: 0 2px;\n\n border-radius: 5px;\n\n font-size: 12px;\n cursor: pointer;\n}\n\n.switcher__entry.entry--selected {\n color: white;\n background-color: var(--object-color);\n padding: 3px 9px;\n border: 1px solid var(--border);\n}\n\n/* JSON field */\n\n.sidepanel__container {\n position: relative;\n width: calc(100%);\n overflow: visible;\n flex: 1;\n border-top: 1px #f4f4f4 solid;\n}\n\n.container--json {\n margin: 30px 10px 10px 10px !important;\n height: calc(100vh - 500px) !important;\n width: calc(100% - 30px) !important;\n cursor: text !important;\n color: black !important;\n resize: none !important;\n}\n\n/* section title */\n\n.section--header {\n margin-bottom: 0 !important;\n background-color: var(--object-color);\n border-bottom: 1px solid var(--border);\n border-top: 0;\n border-radius: 0 0 5px 5px;\n padding: 5px 0;\n}\n\ndialog .section--header {\n border-radius: 5px;\n left: 0;\n right: 0;\n}\n\n.section--header > .header__title {\n margin: 0 !important;\n padding: 5px 0 0 0;\n\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n\n text-transform: capitalize;\n color: white;\n font-weight: 400;\n font-size: 20px;\n}\n\n.section--header > .header__id {\n margin: 0 !important;\n padding: 0 10px 5px 10px;\n\n text-align: center;\n\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n\n font-weight: 400;\n font-size: 12px;\n color: white;\n}\n\n/* property */\n\n.sidepanel__section > .section__property {\n margin: 10px 10px 5px 10px;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n position: relative;\n}\n\n/* property's label */\n\n.property__label {\n height: 20px;\n\n position: relative;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.label--complexe {\n width: 100%;\n}\n\n.label__b64 label::after {\n content: ' (displayed in plaintext)';\n font-size: 10px;\n font-weight: 300;\n margin-left: 5px;\n text-transform: lowercase;\n}\n\n.label__time label::after {\n content: ' (in your own timezone)';\n font-size: 10px;\n font-weight: 300;\n margin-left: 5px;\n text-transform: lowercase;\n}\n\n.property__label label {\n margin-left: 5px;\n margin-right: 5px;\n\n color: black;\n font-size: 12px;\n font-weight: 500;\n\n text-transform: capitalize;\n}\n\n.label__indicator {\n position: absolute;\n width: 4px;\n height: 4px;\n margin: auto 3px;\n left: -9px;\n background-color: black;\n border-radius: 50%;\n}\n\n.indicator--required {\n background-color: red;\n}\n\n.property--right {\n justify-content: end !important;\n margin-right: 20px !important;\n display: flex;\n}\n\n.indicator--optional {\n background-color: transparent;\n}\n\n.label__expander {\n width: 20px;\n height: 20px;\n\n --svg: url(${f});\n\n -webkit-mask: var(--svg);\n mask: var(--svg);\n\n color: transparent;\n background-color: grey;\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n\n transition-duration: 200ms;\n cursor: pointer;\n}\n\n.label__expander:hover {\n background-color: black;\n}\n\n.expander--open {\n transform: rotate(0deg);\n}\n\n.expander--close {\n transform: rotate(-180deg);\n}\n\n.label__adder {\n margin-left: auto;\n\n width: 20px;\n height: 20px;\n\n --svg: url(${m});\n\n -webkit-mask: var(--svg);\n mask: var(--svg);\n\n color: transparent;\n background-color: grey;\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n\n transition-duration: 200ms;\n cursor: pointer;\n}\n\n.label__adder:hover {\n background-color: black;\n}\n\n.label__removeselection {\n margin-left: auto;\n\n width: 20px;\n height: 20px;\n\n --svg: url(${y});\n\n -webkit-mask: var(--svg);\n mask: var(--svg);\n\n color: transparent;\n background-color: grey;\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n\n transition-duration: 200ms;\n cursor: pointer;\n}\n\n/* property's input */\n\n.property__container {\n width: 100%;\n margin: 0;\n font-family: Poppins;\n font-size: 12px;\n}\n\n.container--simple,\n.property__list > .list-input input {\n padding: 2px 5px;\n width: calc(100%);\n border-radius: 5px;\n\n color: black;\n border: 1px solid #c9d0e6;\n background-color: white;\n\n font-size: 12px;\n font-weight: 300;\n font-family: Poppins;\n}\n\nbutton.container--simple,\n.property__list > .list-input input {\n transition: background-color 0.2s ease;\n background: linear-gradient(180deg, #fff 30%, #ddd 220%);\n /* Blue to light blue gradient */\n color: black !important;\n text-align: center;\n}\n\nbutton.container--simple:hover {\n background-color: #f0f0f0;\n /* Change the background color on hover */\n border-color: #b9c6f2;\n /* Change the border color on hover */\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n cursor: pointer;\n}\n\n.container--disabled,\n.container--simple:disabled,\n.container--simple[disabled] {\n cursor: default;\n background-color: rgb(241, 241, 241);\n color: grey;\n}\n\n.container--shorted {\n width: 60px !important;\n height: 20px;\n padding: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* property's list */\n\n.property__list {\n width: calc(100% - 5px);\n padding: 0 0 0 5px;\n overflow-y: scroll;\n overflow-x: hidden;\n transition: max-height 200ms ease;\n\n position: relative;\n}\n\n.property__list:not(:has(div)) {\n height: 20px;\n}\n\n.property__list:not(:has(div))::after {\n content: 'The list is empty';\n display: block;\n color: #575757;\n width: 100%;\n font-size: 12px;\n text-align: center;\n}\n\n.property__dict {\n width: calc(100% - 5px);\n padding: 0 0 0 5px;\n overflow-y: scroll;\n overflow-x: hidden;\n transition: max-height 200ms ease;\n\n position: relative;\n}\n\n.property__dict:not(:has(div)) {\n height: 20px;\n}\n\n.property__dict:not(:has(div))::after {\n content: 'The dictionary is empty';\n display: block;\n color: #575757;\n width: 100%;\n font-size: 12px;\n text-align: center;\n}\n\n.property__show--button {\n width: 100%;\n padding: 0 0 0 5px;\n position: relative;\n}\n\n.property__show--button button {\n position: flex;\n width: 100%;\n height: 100%;\n}\n\n.list--collapse {\n max-height: 0px;\n}\n\n.list--expanded {\n max-height: 160px;\n overflow: visible;\n display: flex;\n flex-direction: column;\n}\n\n.lisContainer--expanded {\n background-color: #f4f4f4;\n border-radius: 5px;\n}\n\n/* property's list item */\n\n.list__contactitem > input {\n width: 45%;\n}\n\n.list__item,\n.property__list > .list-input {\n margin-bottom: 5px;\n padding-right: 5px;\n display: flex;\n align-items: center;\n}\n\n.remove-item {\n background-color: transparent;\n border: transparent;\n color: transparent;\n\n padding: 0;\n width: 15px;\n height: 20px;\n\n background-color: #757c94;\n transition-duration: 100ms;\n\n --svg: url(${g});\n -webkit-mask: var(--svg);\n mask: var(--svg);\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 10px 10px;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: 10px 10px;\n mask-position: center;\n cursor: pointer;\n}\n\n.display__item {\n margin-left: 5px;\n}\n\n.list__item > .remove-item:hover {\n border: transparent;\n background-color: red;\n}\n\n/* common input field */\n\n.container--textarea {\n resize: vertical;\n min-height: 20px;\n}\n\ninput[type='text']:focus {\n border-color: var(--select);\n}\n\n/* checkbox */\n\ninput[type='checkbox'].propertiesElements {\n width: 20px;\n}\n\n/* sub list of checkbox */\n\n.sidepanel--sub .section__property {\n margin: 0;\n}\n\n.section__property.property--reversed {\n margin: 0;\n flex-direction: row-reverse;\n justify-content: flex-end;\n align-items: center;\n}\n\n.sidepanel--sub .property__label {\n margin-top: 2px;\n margin-left: 5px;\n\n display: flex;\n justify-content: flex-end;\n}\n\n.sidepanel--sub .property__label > label {\n font-weight: normal;\n margin-left: 0;\n font-weight: 300;\n}\n\n/* list-input */\n\ndiv.list-input {\n display: flex;\n}\n\n/* list-dialog */\n\ndialog.list-dialog {\n max-width: 80%;\n width: 350px;\n max-height: 80%;\n padding: 0 0 20px 0;\n\n display: flex;\n flex-direction: column;\n\n font-family: Poppins;\n\n border-radius: 5px;\n\n background: var(--canvas-overlay-background) !important;\n border: 0;\n outline: rgba(214, 214, 214, 0.83) solid 1px;\n box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.15);\n\n overflow: visible;\n scrollbar-gutter: stable;\n -ms-overflow-style: none;\n}\n\ndialog:not([open]) {\n display: none;\n}\n\ndialog.agent-dialog {\n padding: 0;\n border-radius: 5px;\n\n background: var(--canvas-overlay-background) !important;\n border: solid 1px var(--border) !important;\n box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.15);\n\n overflow: auto;\n -ms-overflow-style: none;\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n}\n\n/* General buttons */\n\n.sidepanel__action {\n z-index: 201;\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-evenly;\n align-items: flex-end;\n background-color: white;\n\n border-radius: 5px 5px 0 0;\n border-top: 1px solid #b4b4b4;\n box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);\n}\n\n.action__btn:nth-child(2) {\n background-color: var(--object-color);\n color: white;\n}\n\n.action__btn {\n width: 100px;\n margin: 10px;\n\n padding: 4px 8px;\n border-radius: 5px;\n\n border: 1px solid #c9d0e6;\n\n font-size: 12px;\n font-weight: 400;\n font-family: Poppins;\n\n color: black;\n}\n\n/* sortable Table */\n\ntable.sortable {\n table-layout: fixed;\n width: auto;\n border-collapse: collapse;\n border-spacing: 0;\n border: none;\n font-family: Poppins;\n margin-bottom: 20px;\n}\n\ntable.sortable td,\ntable.sortable th {\n padding: 0.125em 0.25em;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 20px;\n}\n\ntable.sortable th {\n position: relative;\n}\n\ntable.sortable th.no-sort {\n padding-top: 0.35em;\n}\n\ntable.sortable .sortable__header {\n padding: 2px;\n margin: 0px;\n font-size: 100%;\n background: transparent;\n border: none;\n display: inline;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n text-align: left;\n outline: none;\n cursor: pointer;\n font-family: Poppins;\n}\n\ntable.sortable th button span {\n position: absolute;\n right: 4px;\n}\n\ntable.sortable th[aria-sort='descending'] span::after {\n content: '▲';\n color: currentcolor;\n font-size: 100%;\n top: 0;\n}\n\ntable.sortable th[aria-sort='ascending'] span::after {\n content: '▼';\n color: currentcolor;\n font-size: 100%;\n top: 0;\n}\n\ntable.show-unsorted-icon th:not([aria-sort]) button span::after {\n content: '♢';\n color: currentcolor;\n font-size: 100%;\n position: relative;\n top: -3px;\n left: -4px;\n}\n\ntable.sortable td.num {\n text-align: right;\n}\n\ntable.sortable th:first-child,\ntable.sortable td:first-child,\ntable.sortable th:last-child,\ntable.sortable td:last-child {\n min-width: 24px;\n max-width: 24px;\n}\n\ntable.sortable th:nth-child(2),\ntable.sortable td:nth-child(2) {\n min-width: 15ch;\n max-width: 15ch;\n}\n\ntable.sortable th:nth-child(3),\ntable.sortable td:nth-child(3) {\n min-width: 20ch;\n max-width: 20ch;\n}\n\ntable.sortable th:nth-child(4),\ntable.sortable td:nth-child(4) {\n min-width: 30ch;\n max-width: 30ch;\n}\n\ntable.sortable tbody tr:nth-child(odd) {\n background-color: #f4f4f4;\n}\n\n/* Focus and hover styling */\n\ntable.sortable .sortable__header:focus,\ntable.sortable .sortable__header:hover {\n background-color: #f4f4f4;\n}\n\ntable.sortable th:not([aria-sort]) button:focus span::after,\ntable.sortable th:not([aria-sort]) button:hover span::after {\n content: '▲';\n color: currentcolor;\n font-size: 100%;\n top: 0;\n}\n\n.toggleswitch {\n position: relative;\n display: inline-block;\n width: 30px;\n height: 16px;\n margin-top: 2px;\n}\n\n/* Hide default HTML checkbox */\n.toggleswitch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n/* The toggleslider */\n.toggleslider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: 200ms;\n transition: 200ms;\n}\n\n.toggleslider:before {\n position: absolute;\n content: '';\n height: 12px;\n width: 12px;\n left: 2px;\n bottom: 2px;\n background-color: white;\n -webkit-transition: 200ms;\n transition: 200ms;\n}\n\ninput:checked + .toggleslider {\n background-color: #dc4848;\n}\n\ninput:focus + .toggleslider {\n box-shadow: 0 0 1px #dc4848;\n}\n\ninput:checked + .toggleslider:before {\n -webkit-transform: translateX(14px);\n -ms-transform: translateX(14px);\n transform: translateX(14px);\n}\n\n/* Rounded togglesliders */\n.toggleslider.round {\n border-radius: 34px;\n}\n\n.toggleslider.round:before {\n border-radius: 50%;\n}\n\n/* tooltip */\n\n.label__tooltip {\n position: relative;\n}\n\n.label__tooltip::before:hover {\n opacity: 0;\n}\n\n.label__tooltip::after {\n content: attr(data-tooltip);\n position: absolute;\n opacity: 0;\n z-index: -1;\n width: 400px;\n left: -25px;\n cursor: default;\n}\n\n.label__tooltip::before {\n content: attr(data-tooltip);\n\n position: absolute;\n padding: 7px 10px;\n right: calc(100% + 20px);\n z-index: 200;\n width: 270px;\n\n white-space: normal;\n overflow: initial;\n font-weight: 300;\n font-size: 10px;\n text-transform: initial;\n text-align: justify;\n\n pointer-events: none;\n\n opacity: 0;\n\n background: rgba(244, 244, 244, 0.55);\n border-radius: 10px;\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n border: 1px solid rgba(203, 203, 203, 0.83);\n}\n\n.label__tooltip:hover::before {\n opacity: 1;\n pointer-events: auto;\n transition-duration: 100ms;\n}\n\n/* executed by from status */\n\n.adder__executionStatus {\n display: flex;\n}\n\n.executionstatus__container {\n margin: 10px 10px 5px 10px;\n}\n\n.property__status__element--button {\n display: block;\n position: relative;\n overflow: hidden;\n padding: 0%;\n\n --backgroundcolor: white;\n background-color: white;\n}\n\n.executionstatus__title {\n text-align: left;\n padding-left: 10px;\n font-weight: 500;\n letter-spacing: 0.5px;\n text-transform: capitalize;\n}\n\n.executionstatus__content {\n text-align: left;\n padding-left: 10px;\n font-weight: 200;\n text-transform: capitalize;\n}\n\n.executionstatus__content > b {\n font-weight: 400;\n}\n\n.property__status__element--button--textcontainer--inside {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n background-color: var(--backgroundcolor);\n}\n\n.property__executed__status--display__agent > button,\n.property__executed__status--display__stix > input {\n display: block;\n}\n\n.property__executed__status--display__agent > input,\n.property__executed__status--display__stix > button {\n display: none;\n}\n\n.status__label {\n display: flex;\n width: 100%;\n}\n\n.status__label > .label__tooltip,\n.status__label > .property--right {\n flex: 1;\n}\n\n.status__label input:checked + .toggleslider {\n background-color: #369adc;\n}\n\n.status__label .toggleswitch {\n margin: 0px;\n transform: scale(0.8);\n}\n\n/* disanle properties */\n\n.property--disable input,\n.property--disable .label__adder,\n.property--disable .toggleswitch {\n pointer-events: none;\n}\n`,""]);const v=p},9362:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(2532),n.b),u=new URL(n(9800),n.b),l=new URL(n(6807),n.b),d=a()(r()),p=c()(h),f=c()(u),m=c()(l);d.push([t.id,`.signatureContainer {\n margin: 5px;\n padding: 5px;\n\n width: calc(100% - 22px);\n\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n\n background: var(--color-fill);\n border-radius: 10px;\n border: 1px solid var(--color-stroke);\n\n cursor: pointer;\n}\n\n.signatureContainer .signatureContainer__title {\n font-size: 13px;\n color: var(--color);\n}\n\n.signatureContainer .signatureContainer__indicator {\n width: 30px;\n height: 30px;\n\n -webkit-mask: var(--svg);\n mask: var(--svg);\n background-color: var(--color-stroke);\n\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: contain;\n -webkit-mask-position: center;\n\n mask-repeat: no-repeat;\n mask-size: contain;\n mask-position: center;\n}\n\n.signatureContainer.indicator--passed {\n --color-fill: rgba(160, 242, 160, 0.244);\n --color-stroke: rgb(62, 131, 62);\n --svg: url(${p});\n}\n\n.signatureContainer.indicator--failed {\n --color-fill: rgb(255, 250, 196, 0.244);\n --color-stroke: rgb(206, 206, 70);\n --svg: url(${f});\n}\n\n.signatureContainer.indicator--notimplemented {\n --color-fill: rgb(255, 250, 196, 0.244);\n --color-stroke: rgb(144, 144, 57);\n --svg: url(${f});\n}\n\n.signatureContainer.indicator--incorrect {\n --color-fill: rgb(255, 215, 215, 0.244);\n --color-stroke: rgb(177, 72, 72);\n --svg: url(${m});\n}\n`,""]);const y=d},1281:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(9819),n.b),u=new URL(n(6234),n.b),l=new URL(n(765),n.b),d=a()(r()),p=c()(h),f=c()(u),m=c()(l);d.push([t.id,`#app-logo {\n height: calc(100% - 4px);\n width: 28px;\n background-image: url(${p});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n margin: 2px;\n}\n\n#header-tab-container {\n border-left: 1px solid var(--header-border);\n display: flex;\n flex-direction: row;\n}\n\n#header-new-tab-button {\n margin: 5px;\n height: calc(100% - 10px);\n width: 20px;\n background-image: url(${f});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n transition-duration: 100ms;\n}\n\n#header-new-tab-button:hover {\n background-color: var(--header-button-background);\n border-radius: 2px;\n transform: scale(1.1);\n}\n\n#header-new-tab-button:active {\n transform: scale(0.9);\n}\n\n.header-tab-entry {\n border-right: 1px solid var(--header-border);\n color: var(--header-text);\n height: calc(100%);\n width: 120px;\n padding: 0 5px;\n vertical-align: middle;\n\n font-family: Poppins;\n font-weight: 300;\n font-size: 12px;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n position: relative;\n\n display: flex;\n align-items: center;\n}\n\n.header-tab-entry-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.header-tab-entry-remove-button {\n height: 20px;\n width: 20px;\n position: absolute;\n top: 5px;\n right: 5px;\n z-index: 10;\n\n background-image: url(${m});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n\n display: none;\n}\n\n.tab-open:hover > .header-tab-entry-remove-button {\n display: block;\n background-color: var(--header-background);\n box-shadow: -10px 0px 10px 2px var(--header-background);\n}\n\n.header-tab-entry-remove-button:hover {\n background-color: var(--header-button-background) !important;\n border-radius: 2px;\n}\n\n.tab-open {\n background-color: var(--header-background);\n border-bottom: 1px solid var(--header-background);\n z-index: 10;\n}\n`,""]);const y=d},2089:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(200),n.b),u=new URL(n(6397),n.b),l=new URL(n(7996),n.b),d=new URL(n(330),n.b),p=a()(r()),f=c()(h),m=c()(u),y=c()(l),g=c()(d);p.push([t.id,`.tlp-icon {\n height: 20px;\n width: 20px;\n background-color: var(--header-button-background);\n margin-right: 5px;\n border-radius: 3px;\n}\n\n.tlp-red {\n background: url(${f});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.tlp-amber-strict {\n background: url(${m});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.tlp-amber {\n background: url(${m});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.tlp-green {\n background: url(${y});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.tlp-clear {\n background: url(${g});\n background-repeat: no-repeat !important;\n background-size: contain !important;\n background-position: center !important;\n}\n\n.tag {\n margin-right: 5px;\n display: flex;\n align-items: center;\n padding: 1px 4px;\n border-radius: 4px;\n font-size: 12px;\n text-align: center;\n vertical-align: middle;\n font-weight: 700;\n}\n\n.tlp-red-tag {\n border: 1px solid #ff2b2b;\n color: #ff2b2b;\n}\n\n.tlp-amber-tag {\n border: 1px solid #ffc000;\n color: #ffc000;\n}\n\n.tlp-amber-strict-tag {\n border: 1px solid #ffc000;\n color: #ffc000;\n}\n\n.tlp-green-tag {\n border: 1px solid #33f000;\n color: #33ff00;\n}\n\n.tlp-clear-tag {\n border: 1px solid white;\n color: white;\n}\n\n.revoked-tag {\n color: #dc4848;\n border: 1px solid #dc4848;\n}\n\n.cacao-spec-version {\n --color: rgb(218 109 233);\n color: var(--color);\n border: 1px solid var(--color);\n}\n`,""]);const v=p},7954:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o)()(r());a.push([t.id,".djs-palette-entries .group[data-group='tools'] {\n padding-bottom: 5px;\n position: absolute;\n top: 0px;\n left: 60px;\n z-index: -1;\n\n display: flex;\n flex-direction: column;\n\n background: rgba(244, 244, 244, 0.55);\n border-radius: 15px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5.1px);\n -webkit-backdrop-filter: blur(5.1px);\n border: 1px solid rgba(214, 214, 214, 0.83);\n\n transition: 300ms ease;\n}\n\n.djs-palette.palette--expanded .group[data-group='tools'] {\n left: 170px;\n}\n\n.toolsentry {\n border-radius: 9px !important;\n position: relative;\n height: 30px !important;\n width: 30px !important;\n margin: 5px 5px 0 5px;\n}\n\n.toolsentry::before {\n font-size: 20px;\n height: 30px !important;\n width: 30px !important;\n position: absolute;\n top: 0;\n left: 0;\n color: black;\n\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.djs-lasso-overlay {\n fill: var(--canvas-select-fill);\n stroke: var(--canvas-select-stroke);\n fill-opacity: 0.5;\n rx: 10px;\n ry: 10px;\n stroke-width: 2px;\n shape-rendering: geometricPrecision;\n pointer-events: none;\n}\n",""]);const s=a},2722:(t,e,n)=>{"use strict";n.d(e,{Z:()=>f});var i=n(8081),r=n.n(i),o=n(3645),a=n.n(o),s=n(1667),c=n.n(s),h=new URL(n(4695),n.b),u=new URL(n(9687),n.b),l=a()(r()),d=c()(h),p=c()(u);l.push([t.id,`.validator-container {\n position: fixed;\n bottom: 5px;\n left: 5px;\n padding: 5px;\n\n font-size: 12px;\n color: #000000;\n font-weight: 500;\n font-family: Poppins;\n letter-spacing: 0.5px;\n\n border: solid 1px rgb(185, 188, 197);\n\n border-radius: 5px;\n\n display: flex;\n justify-content: center;\n}\n\n.validator-icon {\n height: 15px;\n width: 15px;\n\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;\n}\n\n.validator-icon-correct {\n background-image: url(${d});\n}\n\n.validator-icon-error {\n background-image: url(${p});\n}\n\n.validator-correct {\n background: #dbffd6 !important;\n color: #278811 !important;\n}\n\n.validator-error {\n background: #ffcbc8 !important;\n color: #a50f0f !important;\n}\n\n.validator-message {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-left: 10px;\n}\n\n.validator-container__title {\n font-size: 20px;\n margin-top: 0px;\n margin-bottom: 10px;\n}\n\n.validator-dialog-error-container {\n width: calc(100% - 20px);\n margin: 0 0 20px 0;\n padding: 5px 10px;\n background-color: rgb(231, 231, 231);\n border-radius: 5px;\n}\n\n.validator-dialog-error-title {\n font-size: 15px;\n font-weight: 500;\n margin: 0;\n}\n\n.validator-dialog-error-path {\n font-size: 12px;\n font-weight: 500;\n color: var(--select);\n margin: 0;\n}\n\n.validator-dialog-error-message {\n font-size: 12px;\n font-weight: 300;\n}\n`,""]);const f=l},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},1667:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},8081:t=>{"use strict";t.exports=function(t){return t[1]}},5251:(t,e,n)=>{"use strict";e.utils=n(1278),e.Cipher=n(5756),e.DES=n(778),e.CBC=n(9051),e.EDE=n(651)},9051:(t,e,n)=>{"use strict";var i=n(9746),r=n(5717),o={};function a(t){i.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e{"use strict";var i=n(9746);function r(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=r,r.prototype._init=function(){},r.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},r.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),i=0;i0;i--)e+=this._buffer(t,e),n+=this._flushBuffer(r,n);return e+=this._buffer(t,e),r},r.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},r.prototype._pad=function(t,e){if(0===e)return!1;for(;e{"use strict";var i=n(9746),r=n(5717),o=n(1278),a=n(5756);function s(){this.tmp=new Array(2),this.keys=null}function c(t){a.call(this,t);var e=new s;this._desState=e,this.deriveKeys(e,t.key)}r(c,a),t.exports=c,c.create=function(t){return new c(t)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function(t,e){t.keys=new Array(32),i.equal(e.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(e,0),r=o.readUInt32BE(e,4);o.pc1(n,r,t.tmp,0),n=t.tmp[0],r=t.tmp[1];for(var a=0;a>>1];n=o.r28shl(n,s),r=o.r28shl(r,s),o.pc2(n,r,t.keys,a)}},c.prototype._update=function(t,e,n,i){var r=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,r.tmp,0),a=r.tmp[0],s=r.tmp[1],"encrypt"===this.type?this._encrypt(r,a,s,r.tmp,0):this._decrypt(r,a,s,r.tmp,0),a=r.tmp[0],s=r.tmp[1],o.writeUInt32BE(n,a,i),o.writeUInt32BE(n,s,i+4)},c.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var n=t.length-e,i=e;i>>0,a=d}o.rip(s,a,i,r)},c.prototype._decrypt=function(t,e,n,i,r){for(var a=n,s=e,c=t.keys.length-2;c>=0;c-=2){var h=t.keys[c],u=t.keys[c+1];o.expand(a,t.tmp,0),h^=t.tmp[0],u^=t.tmp[1];var l=o.substitute(h,u),d=a;a=(s^o.permute(l))>>>0,s=d}o.rip(a,s,i,r)}},651:(t,e,n)=>{"use strict";var i=n(9746),r=n(5717),o=n(5756),a=n(778);function s(t,e){i.equal(e.length,24,"Invalid key length");var n=e.slice(0,8),r=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:r}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:n})]}function c(t){o.call(this,t);var e=new s(this.type,this.options.key);this._edeState=e}r(c,o),t.exports=c,c.create=function(t){return new c(t)},c.prototype._update=function(t,e,n,i){var r=this._edeState;r.ciphers[0]._update(t,e,n,i),r.ciphers[1]._update(n,i,n,i),r.ciphers[2]._update(n,i,n,i)},c.prototype._pad=a.prototype._pad,c.prototype._unpad=a.prototype._unpad},1278:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,i){for(var r=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)r<<=1,r|=e>>>s+a&1;for(s=0;s<=24;s+=8)r<<=1,r|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}n[i+0]=r>>>0,n[i+1]=o>>>0},e.rip=function(t,e,n,i){for(var r=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)r<<=1,r|=e>>>s+a&1,r<<=1,r|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;n[i+0]=r>>>0,n[i+1]=o>>>0},e.pc1=function(t,e,n,i){for(var r=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)r<<=1,r|=e>>s+a&1;for(s=0;s<=24;s+=8)r<<=1,r|=t>>s+a&1}for(s=0;s<=24;s+=8)r<<=1,r|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;n[i+0]=r>>>0,n[i+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,i,r){for(var o=0,a=0,s=n.length>>>1,c=0;c>>n[c]&1;for(c=s;c>>n[c]&1;i[r+0]=o>>>0,i[r+1]=a>>>0},e.expand=function(t,e,n){var i=0,r=0;i=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(o=11;o>=3;o-=4)r|=t>>>o&63,r<<=6;r|=(31&t)<<1|t>>>31,e[n+0]=i>>>0,e[n+1]=r>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++)n<<=4,n|=i[64*r+(t>>>18-6*r&63)];for(r=0;r<4;r++)n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)];return n>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n>>r[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var i=t.toString(2);i.length{var i=n(8764).Buffer,r=n(3590),o=n(9799),a=n(3249),s={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new i(o[t].prime,"hex"),n=new i(o[t].gen,"hex");return new a(e,n)},e.createDiffieHellman=e.DiffieHellman=function t(e,n,o,c){return i.isBuffer(n)||void 0===s[n]?t(e,"binary",n,o):(n=n||"binary",c=c||"binary",o=o||new i([2]),i.isBuffer(o)||(o=new i(o,c)),"number"==typeof e?new a(r(e,o),o,!0):(i.isBuffer(e)||(e=new i(e,n)),new a(e,o,!0)))}},3249:(t,e,n)=>{var i=n(8764).Buffer,r=n(3620),o=new(n(3047)),a=new r(24),s=new r(11),c=new r(10),h=new r(3),u=new r(7),l=n(3590),d=n(1798);function p(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._pub=new r(t),this}function f(t,e){return e=e||"utf8",i.isBuffer(t)||(t=new i(t,e)),this._priv=new r(t),this}t.exports=y;var m={};function y(t,e,n){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=p,this.setPrivateKey=f):this._primeCode=8}function g(t,e){var n=new i(t.toArray());return e?n.toString(e):n}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),i=[n,t.toString(16)].join("_");if(i in m)return m[i];var r,d=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!o.test(t))return d+=1,d+="02"===n||"05"===n?8:4,m[i]=d,d;switch(o.test(t.shrn(1))||(d+=2),n){case"02":t.mod(a).cmp(s)&&(d+=8);break;case"05":(r=t.mod(c)).cmp(h)&&r.cmp(u)&&(d+=8);break;default:d+=4}return m[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new r(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(t){var e=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new i(e.toArray()),o=this.getPrime();if(n.length{var i=n(1798);t.exports=v,v.simpleSieve=y,v.fermatTest=g;var r=n(3620),o=new r(24),a=new(n(3047)),s=new r(1),c=new r(2),h=new r(5),u=(new r(16),new r(8),new r(10)),l=new r(3),d=(new r(7),new r(11)),p=new r(4),f=(new r(12),null);function m(){if(null!==f)return f;var t=[];t[0]=2;for(var e=1,n=3;n<1048576;n+=2){for(var i=Math.ceil(Math.sqrt(n)),r=0;rt;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(c),e.cmp(c)){if(!e.cmp(h))for(;n.mod(u).cmp(l);)n.iadd(p)}else for(;n.mod(o).cmp(d);)n.iadd(p);if(y(f=n.shrn(1))&&y(n)&&g(f)&&g(n)&&a.test(f)&&a.test(n))return n}}},3620:function(t,e,n){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(7748).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},6266:(t,e,n)=>{"use strict";var i=e;i.version=n(8597).i8,i.utils=n(953),i.rand=n(9931),i.curve=n(8254),i.curves=n(5427),i.ec=n(8863),i.eddsa=n(5980)},4918:(t,e,n)=>{"use strict";var i=n(3785),r=n(953),o=r.getNAF,a=r.getJSF,s=r.assert;function c(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),i=o(e,1,this._bitLength),r=(1<=a;u--)c=(c<<1)+i[u];h.push(c)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),p=r;p>0;p--){for(a=0;a=0;h--){for(var u=0;h>=0&&0===a[h];h--)u++;if(h>=0&&u++,c=c.dblp(u),h<0)break;var l=a[h];s(0!==l),c="affine"===t.type?l>0?c.mixedAdd(r[l-1>>1]):c.mixedAdd(r[-l-1>>1].neg()):l>0?c.add(r[l-1>>1]):c.add(r[-l-1>>1].neg())}return"affine"===t.type?c.toP():c},c.prototype._wnafMulAdd=function(t,e,n,i,r){var s,c,h,u=this._wnafT1,l=this._wnafT2,d=this._wnafT3,p=0;for(s=0;s=1;s-=2){var m=s-1,y=s;if(1===u[m]&&1===u[y]){var g=[e[m],null,null,e[y]];0===e[m].y.cmp(e[y].y)?(g[1]=e[m].add(e[y]),g[2]=e[m].toJ().mixedAdd(e[y].neg())):0===e[m].y.cmp(e[y].y.redNeg())?(g[1]=e[m].toJ().mixedAdd(e[y]),g[2]=e[m].add(e[y].neg())):(g[1]=e[m].toJ().mixedAdd(e[y]),g[2]=e[m].toJ().mixedAdd(e[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[m],n[y]);for(p=Math.max(b[0].length,p),d[m]=new Array(p),d[y]=new Array(p),c=0;c=0;s--){for(var k=0;s>=0;){var S=!0;for(c=0;c=0&&k++,x=x.dblp(k),s<0)break;for(c=0;c0?h=l[c][E-1>>1]:E<0&&(h=l[c][-E-1>>1].neg()),x="affine"===h.type?x.mixedAdd(h):x.add(h))}}for(s=0;s=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r{"use strict";var i=n(953),r=n(3785),o=n(5717),a=n(4918),s=i.assert;function c(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new r(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function h(t,e,n,i,o){a.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new r(e,16),this.y=new r(n,16),this.z=i?new r(i,16):this.curve.one,this.t=o&&new r(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),t.exports=c,c.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},c.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},c.prototype.jpoint=function(t,e,n,i){return this.point(t,e,n,i)},c.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),i=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=i.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(e&&!c||!e&&c)&&(s=s.redNeg()),this.point(t,s)},c.prototype.pointFromY=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),i=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=i.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},c.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),i=e.redMul(this.a).redAdd(n),r=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===i.cmp(r)},o(h,a.BasePoint),c.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},c.prototype.point=function(t,e,n,i){return new h(this,t,e,n,i)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(t),r=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=i.redAdd(e),a=o.redSub(n),s=i.redSub(e),c=r.redMul(a),h=o.redMul(s),u=r.redMul(s),l=a.redMul(o);return this.curve.point(c,h,l,u)},h.prototype._projDbl=function(){var t,e,n,i,r,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var h=(i=this.curve._mulA(s)).redAdd(c);this.zOne?(t=a.redSub(s).redSub(c).redMul(h.redSub(this.curve.two)),e=h.redMul(i.redSub(c)),n=h.redSqr().redSub(h).redSub(h)):(r=this.z.redSqr(),o=h.redSub(r).redISub(r),t=a.redSub(s).redISub(c).redMul(o),e=h.redMul(i.redSub(c)),n=h.redMul(o))}else i=s.redAdd(c),r=this.curve._mulC(this.z).redSqr(),o=i.redSub(r).redSub(r),t=this.curve._mulC(a.redISub(i)).redMul(o),e=this.curve._mulC(i).redMul(s.redISub(c)),n=i.redMul(o);return this.curve.point(t,e,n)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),r=this.z.redMul(t.z.redAdd(t.z)),o=n.redSub(e),a=r.redSub(i),s=r.redAdd(i),c=n.redAdd(e),h=o.redMul(a),u=s.redMul(c),l=o.redMul(c),d=a.redMul(s);return this.curve.point(h,u,d,l)},h.prototype._projAdd=function(t){var e,n,i=this.z.redMul(t.z),r=i.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),c=r.redSub(s),h=r.redAdd(s),u=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),l=i.redMul(c).redMul(u);return this.curve.twisted?(e=i.redMul(h).redMul(a.redSub(this.curve._mulA(o))),n=c.redMul(h)):(e=i.redMul(h).redMul(a.redSub(o)),n=this.curve._mulC(c).redMul(h)),this.curve.point(l,e,n)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},h.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},8254:(t,e,n)=>{"use strict";var i=e;i.base=n(4918),i.short=n(6673),i.mont=n(2881),i.edwards=n(1138)},2881:(t,e,n)=>{"use strict";var i=n(3785),r=n(5717),o=n(4918),a=n(953);function s(t){o.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(t,e,n){o.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),i=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},r(c,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new c(this,t,e)},s.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(t,e){return new c(t,e[0],e[1]||t.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),i=t.redMul(e),r=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(i,r)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),r=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(n),a=r.redMul(i),s=e.z.redMul(o.redAdd(a).redSqr()),c=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(t){for(var e=t.clone(),n=this,i=this.curve.point(null,null),r=[];0!==e.cmpn(0);e.iushrn(1))r.push(e.andln(1));for(var o=r.length-1;o>=0;o--)0===r[o]?(n=n.diffAdd(i,this),i=i.dbl()):(i=n.diffAdd(i,this),n=n.dbl());return i},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(t,e,n)=>{"use strict";var i=n(953),r=n(3785),o=n(5717),a=n(4918),s=i.assert;function c(t){a.call(this,"short",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(t,e,n,i){a.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(e,16),this.y=new r(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(t,e,n,i){a.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(e,16),this.y=new r(n,16),this.z=new r(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),t.exports=c,c.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,n;if(t.beta)e=new r(t.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);e=(e=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(t.lambda)n=new r(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?n=o[0]:(n=o[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new r(t.a,16),b:new r(t.b,16)}})):this._getEndoBasis(n)}}},c.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:r.mont(t),n=new r(2).toRed(e).redInvm(),i=n.redNeg(),o=new r(3).toRed(e).redNeg().redSqrt().redMul(n);return[i.redAdd(o).fromRed(),i.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(t){for(var e,n,i,o,a,s,c,h,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,p=this.n.clone(),f=new r(1),m=new r(0),y=new r(0),g=new r(1),v=0;0!==d.cmpn(0);){var b=p.div(d);h=p.sub(b.mul(d)),u=y.sub(b.mul(f));var _=g.sub(b.mul(m));if(!i&&h.cmp(l)<0)e=c.neg(),n=f,i=h.neg(),o=u;else if(i&&2==++v)break;c=h,p=d,d=h,y=f,f=u,g=m,m=_}a=h.neg(),s=u;var w=i.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=e,s=n),i.negative&&(i=i.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:i,b:o},{a,b:s}]},c.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],i=e[1],r=i.b.mul(t).divRound(this.n),o=n.b.neg().mul(t).divRound(this.n),a=r.mul(n.a),s=o.mul(i.a),c=r.mul(n.b),h=o.mul(i.b);return{k1:t.sub(a).sub(s),k2:c.add(h).neg()}},c.prototype.pointFromX=function(t,e){(t=new r(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=i.fromRed().isOdd();return(e&&!o||!e&&o)&&(i=i.redNeg()),this.point(t,i)},c.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,i=this.a.redMul(e),r=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},c.prototype._endoWnafMulAdd=function(t,e,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,o=0;o":""},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),i=t.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(i),o=r.redSqr().redISub(this.x.redAdd(this.x)),a=r.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new r(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,n){var i=[this,e],r=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)},h.prototype.jmulAdd=function(t,e,n){var i=[this,e],r=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),c.prototype.jpoint=function(t,e,n){return new u(this,t,e,n)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(n,i)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(e),r=t.x.redMul(n),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(n.redMul(this.z)),s=i.redSub(r),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),l=i.redMul(h),d=c.redSqr().redIAdd(u).redISub(l).redISub(l),p=c.redMul(l.redISub(d)).redISub(o.redMul(u)),f=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(d,p,f)},u.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,i=t.x.redMul(e),r=this.y,o=t.y.redMul(e).redMul(this.z),a=n.redSub(i),s=r.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),h=c.redMul(a),u=n.redMul(c),l=s.redSqr().redIAdd(h).redISub(u).redISub(u),d=s.redMul(u.redISub(l)).redISub(r.redMul(h)),p=this.z.redMul(a);return this.curve.jpoint(l,d,p)},u.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var n=this;for(e=0;e=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(t,e,n)=>{"use strict";var i,r=e,o=n(3715),a=n(8254),s=n(953).assert;function c(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){var n=new c(e);return Object.defineProperty(r,t,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=c,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=n(1037)}catch(t){i=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},8863:(t,e,n)=>{"use strict";var i=n(3785),r=n(2156),o=n(953),a=n(5427),s=n(9931),c=o.assert,h=n(1251),u=n(611);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new h(this,t)},l.prototype.keyFromPrivate=function(t,e){return h.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return h.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new r({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new i(2));;){var a=new i(e.generate(n));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new i(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),c=t.toArray("be",a),h=new r({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new i(1)),d=0;;d++){var p=o.k?o.k(d):new i(h.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var f=this.g.mul(p);if(!f.isInfinity()){var m=f.getX(),y=m.umod(this.n);if(0!==y.cmpn(0)){var g=p.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(g=g.umod(this.n)).cmpn(0)){var v=(f.getY().isOdd()?1:0)|(0!==m.cmp(y)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),v^=1),new u({r:y,s:g,recoveryParam:v})}}}}}},l.prototype.verify=function(t,e,n,r){t=this._truncateToN(new i(t,16)),n=this.keyFromPublic(n,r);var o=(e=new u(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),h=c.mul(t).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(h,n.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(h,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,n,r){c((3&n)===n,"The recovery param is more than two bits"),e=new u(e,r);var o=this.n,a=new i(t),s=e.r,h=e.s,l=1&n,d=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var p=e.r.invm(o),f=o.sub(a).mul(p).umod(o),m=h.mul(p).umod(o);return this.g.mulAdd(f,s,m)},l.prototype.getKeyRecoveryParam=function(t,e,n,i){if(null!==(e=new u(e,i)).recoveryParam)return e.recoveryParam;for(var r=0;r<4;r++){var o;try{o=this.recoverPubKey(t,e,r)}catch(t){continue}if(o.eq(n))return r}throw new Error("Unable to find valid recovery factor")}},1251:(t,e,n)=>{"use strict";var i=n(3785),r=n(953).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,n){return e instanceof o?e:new o(t,{pub:e,pubEnc:n})},o.fromPrivate=function(t,e,n){return e instanceof o?e:new o(t,{priv:e,privEnc:n})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new i(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?r(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||r(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return""}},611:(t,e,n)=>{"use strict";var i=n(3785),r=n(953),o=r.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function c(t,e){var n=t[e.place++];if(!(128&n))return n;var i=15&n;if(0===i||i>4)return!1;for(var r=0,o=0,a=e.place;o>>=0;return!(r<=127)&&(e.place=a,r)}function h(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=r.toArray(t,e);var n=new s;if(48!==t[n.place++])return!1;var o=c(t,n);if(!1===o)return!1;if(o+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var a=c(t,n);if(!1===a)return!1;var h=t.slice(n.place,a+n.place);if(n.place+=a,2!==t[n.place++])return!1;var u=c(t,n);if(!1===u)return!1;if(t.length!==u+n.place)return!1;var l=t.slice(n.place,u+n.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new i(h),this.s=new i(l),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=h(e),n=h(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];u(i,e.length),(i=i.concat(e)).push(2),u(i,n.length);var o=i.concat(n),a=[48];return u(a,o.length),a=a.concat(o),r.encode(a,t)}},5980:(t,e,n)=>{"use strict";var i=n(3715),r=n(5427),o=n(953),a=o.assert,s=o.parseBytes,c=n(9087),h=n(3622);function u(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof u))return new u(t);t=r[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=i.sha512}t.exports=u,u.prototype.sign=function(t,e){t=s(t);var n=this.keyFromSecret(e),i=this.hashInt(n.messagePrefix(),t),r=this.g.mul(i),o=this.encodePoint(r),a=this.hashInt(o,n.pubBytes(),t).mul(n.priv()),c=i.add(a).umod(this.curve.n);return this.makeSignature({R:r,S:c,Rencoded:o})},u.prototype.verify=function(t,e,n){t=s(t),e=this.makeSignature(e);var i=this.keyFromPublic(n),r=this.hashInt(e.Rencoded(),i.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(i.pub().mul(r)).eq(o)},u.prototype.hashInt=function(){for(var t=this.hash(),e=0;e{"use strict";var i=n(953),r=i.assert,o=i.parseBytes,a=i.cachedProperty;function s(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var t=this.eddsa,e=this.hash(),n=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(t){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return r(this._secret,"KeyPair is public only"),i.encode(this.secret(),t)},s.prototype.getPublic=function(t){return i.encode(this.pubBytes(),t)},t.exports=s},3622:(t,e,n)=>{"use strict";var i=n(3785),r=n(953),o=r.assert,a=r.cachedProperty,s=r.parseBytes;function c(t,e){this.eddsa=t,"object"!=typeof e&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},1037:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(t,e,n)=>{"use strict";var i=e,r=n(3785),o=n(9746),a=n(4504);i.assert=o,i.toArray=a.toArray,i.zero2=a.zero2,i.toHex=a.toHex,i.encode=a.encode,i.getNAF=function(t,e,n){var i=new Array(Math.max(t.bitLength(),n)+1);i.fill(0);for(var r=1<(r>>1)-1?(r>>1)-c:c,o.isubn(s)):s=0,i[a]=s,o.iushrn(1)}return i},i.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var i,r=0,o=0;t.cmpn(-r)>0||e.cmpn(-o)>0;){var a,s,c=t.andln(3)+r&3,h=e.andln(3)+o&3;3===c&&(c=-1),3===h&&(h=-1),a=0==(1&c)?0:3!=(i=t.andln(7)+r&7)&&5!==i||2!==h?c:-c,n[0].push(a),s=0==(1&h)?0:3!=(i=e.andln(7)+o&7)&&5!==i||2!==c?h:-h,n[1].push(s),2*r===a+1&&(r=1-r),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return n},i.cachedProperty=function(t,e,n){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}},i.parseBytes=function(t){return"string"==typeof t?i.toArray(t,"hex"):t},i.intFromLE=function(t){return new r(t,"hex","le")}},3785:function(t,e,n){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(5568).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},7187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,i){function r(n){t.removeListener(e,o),i(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",r),n([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function h(t,e,n,i){var r,o,a,h;if(s(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"==typeof a?a=o[e]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(r=c(t))>0&&a.length>r&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,h=u,console&&console.warn&&console.warn(h)}return t}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},r=u.bind(i);return r.listener=n,i.wrapFn=r,r}function d(t,e,n){var i=t._events;if(void 0===i)return[];var r=i[e];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[t];if(void 0===c)return!1;if("function"==typeof c)i(c,this,e);else{var h=c.length,u=f(c,h);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3048:(t,e,n)=>{var i=n(9509).Buffer,r=n(2318);t.exports=function(t,e,n,o){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=i.alloc(a),c=i.alloc(o||0),h=i.alloc(0);a>0||o>0;){var u=new r;u.update(h),u.update(t),e&&u.update(e),h=u.digest();var l=0;if(a>0){var d=s.length-a;l=Math.min(a,h.length),h.copy(s,d,0,l),a-=l}if(l0){var p=c.length-o,f=Math.min(o,h.length-l);h.copy(c,p,l,l+f),o-=f}}return h.fill(0),{key:s,iv:c}}},4063:t=>{"use strict";t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(e)){if((i=e.length)!=n.length)return!1;for(r=i;0!=r--;)if(!t(e[r],n[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((i=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;0!=r--;){var a=o[r];if(!t(e[a],n[a]))return!1}return!0}return e!=e&&n!=n}},840:(t,e,n)=>{var i;!function(r,o,a,s){"use strict";var c,h=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),l="function",d=Math.round,p=Math.abs,f=Date.now;function m(t,e,n){return setTimeout(x(t,n),e)}function y(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function C(t){return t.trim().split(/\s+/g)}function j(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]})):i.sort()),i}function I(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=it(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,c=a?a.center:o.center,h=e.center=rt(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=ct(c,h),e.distance=st(c,h),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==z&&o.eventType!==H||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=at(e.deltaX,e.deltaY);var u,l,d=ot(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=p(d.x)>p(d.y)?d.x:d.y,e.scale=a?(u=a.pointers,st((l=i)[0],l[1],tt)/st(u[0],u[1],tt)):1,e.rotation=a?function(t,e){return ct(e[1],e[0],tt)+ct(t[1],t[0],tt)}(a.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(e.eventType!=q&&(c>U||a.velocity===s)){var h=e.deltaX-a.deltaX,u=e.deltaY-a.deltaY,l=ot(c,h,u);i=l.x,r=l.y,n=p(l.x)>p(l.y)?l.x:l.y,o=at(h,u),t.lastInterval=e}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var m=t.element;A(e.srcEvent.target,m)&&(m=e.srcEvent.target),e.target=m}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function it(t){for(var e=[],n=0;n=p(e)?t<0?K:Z:e<0?W:G}function st(t,e,n){n||(n=Q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function ct(t,e,n){n||(n=Q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}et.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(R(this.element),this.evWin,this.domHandler)}};var ht={mousedown:z,mousemove:2,mouseup:H},ut="mousedown",lt="mousemove mouseup";function dt(){this.evEl=ut,this.evWin=lt,this.pressed=!1,et.apply(this,arguments)}w(dt,et,{handler:function(t){var e=ht[t.type];e&z&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=H),this.pressed&&(e&H&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:F,srcEvent:t}))}});var pt={pointerdown:z,pointermove:2,pointerup:H,pointercancel:q,pointerout:q},ft={2:D,3:"pen",4:F,5:"kinect"},mt="pointerdown",yt="pointermove pointerup pointercancel";function gt(){this.evEl=mt,this.evWin=yt,et.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(mt="MSPointerDown",yt="MSPointerMove MSPointerUp MSPointerCancel"),w(gt,et,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=pt[i],o=ft[t.pointerType]||t.pointerType,a=o==D,s=j(e,t.pointerId,"pointerId");r&z&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):r&(H|q)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var vt={touchstart:z,touchmove:2,touchend:H,touchcancel:q};function bt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,et.apply(this,arguments)}function _t(t,e){var n=O(t.touches),i=O(t.changedTouches);return e&(H|q)&&(n=P(n.concat(i),"identifier",!0)),[n,i]}w(bt,et,{handler:function(t){var e=vt[t.type];if(e===z&&(this.started=!0),this.started){var n=_t.call(this,t,e);e&(H|q)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:D,srcEvent:t})}}});var wt={touchstart:z,touchmove:2,touchend:H,touchcancel:q},xt="touchstart touchmove touchend touchcancel";function Mt(){this.evTarget=xt,this.targetIds={},et.apply(this,arguments)}function kt(t,e){var n=O(t.touches),i=this.targetIds;if(e&(2|z)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=O(t.changedTouches),s=[],c=this.target;if(o=n.filter((function(t){return A(t.target,c)})),e===z)for(r=0;r-1&&i.splice(t,1)}),St)}}function Ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Ht(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Ht(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ut},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Kt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=qt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(Wt,Kt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Rt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(Gt,zt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[It]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(H|q)&&!r)this.reset();else if(t.eventType&z)this.reset(),this._timer=m((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&H)return 8;return Ut},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&H?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(Jt,Kt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Rt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),w(Xt,Kt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:J|X,pointers:1},getTouchAction:function(){return Zt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(J|X)?e=t.overallVelocity:n&J?e=t.overallVelocityX:n&X&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&p(e)>this.options.velocity&&t.eventType&H},emit:function(t){var e=qt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(Yt,zt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[$t]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance{"use strict";var i=n(9509).Buffer,r=n(8473).Transform;function o(t){r.call(this),this._block=i.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(5717)(o,r),o.prototype._transform=function(t,e,n){var i=null;try{this.update(t,e)}catch(t){i=t}n(i)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!i.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");i.isBuffer(t)||(t=i.from(t,e));for(var n=this._block,r=0;this._blockOffset+t.length-r>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},3715:(t,e,n)=>{var i=e;i.utils=n(6436),i.common=n(5772),i.sha=n(9041),i.ripemd=n(2949),i.hmac=n(2344),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},5772:(t,e,n)=>{"use strict";var i=n(6436),r=n(9746);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=i.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=i.join32(t,0,t.length-n,this.endian);for(var r=0;r>>24&255,i[r++]=t>>>16&255,i[r++]=t>>>8&255,i[r++]=255&t}else for(i[r++]=255&t,i[r++]=t>>>8&255,i[r++]=t>>>16&255,i[r++]=t>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,o=8;o{"use strict";var i=n(6436),r=n(9746);function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(e,n))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),r(t.length<=this.blockSize);for(var e=t.length;e{"use strict";var i=n(6436),r=n(5772),o=i.rotl32,a=i.sum32,s=i.sum32_3,c=i.sum32_4,h=r.BlockHash;function u(){if(!(this instanceof u))return new u;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,n,i){return t<=15?e^n^i:t<=31?e&n|~e&i:t<=47?(e|~n)^i:t<=63?e&i|n&~i:e^(n|~i)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}i.inherits(u,h),e.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(t,e){for(var n=this.h[0],i=this.h[1],r=this.h[2],h=this.h[3],u=this.h[4],v=n,b=i,_=r,w=h,x=u,M=0;M<80;M++){var k=a(o(c(n,l(M,i,r,h),t[f[M]+e],d(M)),y[M]),u);n=u,u=h,h=o(r,10),r=i,i=k,k=a(o(c(v,l(79-M,b,_,w),t[m[M]+e],p(M)),g[M]),x),v=x,x=w,w=o(_,10),_=b,b=k}k=s(this.h[1],r,w),this.h[1]=s(this.h[2],h,x),this.h[2]=s(this.h[3],u,v),this.h[3]=s(this.h[4],n,b),this.h[4]=s(this.h[0],i,_),this.h[0]=k},u.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(t,e,n)=>{"use strict";e.sha1=n(4761),e.sha224=n(799),e.sha256=n(9344),e.sha384=n(772),e.sha512=n(5900)},4761:(t,e,n)=>{"use strict";var i=n(6436),r=n(5772),o=n(7038),a=i.rotl32,s=i.sum32,c=i.sum32_5,h=o.ft_1,u=r.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,u),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var n=this.W,i=0;i<16;i++)n[i]=t[e+i];for(;i{"use strict";var i=n(6436),r=n(9344);function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(o,r),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},9344:(t,e,n)=>{"use strict";var i=n(6436),r=n(5772),o=n(7038),a=n(9746),s=i.sum32,c=i.sum32_4,h=i.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,p=o.s1_256,f=o.g0_256,m=o.g1_256,y=r.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}i.inherits(v,y),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var n=this.W,i=0;i<16;i++)n[i]=t[e+i];for(;i{"use strict";var i=n(6436),r=n(5900);function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(o,r),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},5900:(t,e,n)=>{"use strict";var i=n(6436),r=n(5772),o=n(9746),a=i.rotr64_hi,s=i.rotr64_lo,c=i.shr64_hi,h=i.shr64_lo,u=i.sum64,l=i.sum64_hi,d=i.sum64_lo,p=i.sum64_4_hi,f=i.sum64_4_lo,m=i.sum64_5_hi,y=i.sum64_5_lo,g=r.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function _(t,e,n,i,r){var o=t&n^~t&r;return o<0&&(o+=4294967296),o}function w(t,e,n,i,r,o){var a=e&i^~e&o;return a<0&&(a+=4294967296),a}function x(t,e,n,i,r){var o=t&n^t&r^n&r;return o<0&&(o+=4294967296),o}function M(t,e,n,i,r,o){var a=e&i^e&o^i&o;return a<0&&(a+=4294967296),a}function k(t,e){var n=a(t,e,28)^a(e,t,2)^a(e,t,7);return n<0&&(n+=4294967296),n}function S(t,e){var n=s(t,e,28)^s(e,t,2)^s(e,t,7);return n<0&&(n+=4294967296),n}function E(t,e){var n=s(t,e,14)^s(t,e,18)^s(e,t,9);return n<0&&(n+=4294967296),n}function A(t,e){var n=a(t,e,1)^a(t,e,8)^c(t,e,7);return n<0&&(n+=4294967296),n}function T(t,e){var n=s(t,e,1)^s(t,e,8)^h(t,e,7);return n<0&&(n+=4294967296),n}function C(t,e){var n=s(t,e,19)^s(e,t,29)^h(t,e,6);return n<0&&(n+=4294967296),n}i.inherits(b,g),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var n=this.W,i=0;i<32;i++)n[i]=t[e+i];for(;i{"use strict";var i=n(6436).rotr32;function r(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function a(t,e,n){return t^e^n}e.ft_1=function(t,e,n,i){return 0===t?r(e,n,i):1===t||3===t?a(e,n,i):2===t?o(e,n,i):void 0},e.ch32=r,e.maj32=o,e.p32=a,e.s0_256=function(t){return i(t,2)^i(t,13)^i(t,22)},e.s1_256=function(t){return i(t,6)^i(t,11)^i(t,25)},e.g0_256=function(t){return i(t,7)^i(t,18)^t>>>3},e.g1_256=function(t){return i(t,17)^i(t,19)^t>>>10}},6436:(t,e,n)=>{"use strict";var i=n(9746),r=n(5717);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function c(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=r,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r>6|192,n[i++]=63&a|128):o(t,r)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++r)),n[i++]=a>>18|240,n[i++]=a>>12&63|128,n[i++]=a>>6&63|128,n[i++]=63&a|128):(n[i++]=a>>12|224,n[i++]=a>>6&63|128,n[i++]=63&a|128)}else for(r=0;r>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),i=0,r=0;i>>24,n[r+1]=o>>>16&255,n[r+2]=o>>>8&255,n[r+3]=255&o):(n[r+3]=o>>>24,n[r+2]=o>>>16&255,n[r+1]=o>>>8&255,n[r]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,i){return t+e+n+i>>>0},e.sum32_5=function(t,e,n,i,r){return t+e+n+i+r>>>0},e.sum64=function(t,e,n,i){var r=t[e],o=i+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,i){return(e+i>>>0>>0},e.sum64_lo=function(t,e,n,i){return e+i>>>0},e.sum64_4_hi=function(t,e,n,i,r,o,a,s){var c=0,h=e;return c+=(h=h+i>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,i,r,o,a,s){return e+i+o+s>>>0},e.sum64_5_hi=function(t,e,n,i,r,o,a,s,c,h){var u=0,l=e;return u+=(l=l+i>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,i,r,o,a,s,c,h){return e+i+o+s+h>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},2156:(t,e,n)=>{"use strict";var i=n(3715),r=n(4504),o=n(9746);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=r.toArray(t.entropy,t.entropyEnc||"hex"),n=r.toArray(t.nonce,t.nonceEnc||"hex"),i=r.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,i)}t.exports=a,a.prototype._init=function(t,e,n){var i=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},a.prototype.generate=function(t,e,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=n,n=e,e=null),n&&(n=r.toArray(n,i||"hex"),this._update(n));for(var o=[];o.length{e.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,c=(1<>1,u=-7,l=n?r-1:0,d=n?-1:1,p=t[e+l];for(l+=d,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+t[e+l],l+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+t[e+l],l+=d,u-=8);if(0===o)o=1-h;else{if(o===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),o-=h}return(p?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var a,s,c,h=8*o-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:o-1,f=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=u?(s=0,a=u):a+l>=1?(s=(e*c-1)*Math.pow(2,r),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,r),a=0));r>=8;t[n+p]=255&s,p+=f,s/=256,r-=8);for(a=a<0;t[n+p]=255&a,p+=f,a/=256,h-=8);t[n+p-f]|=128*m}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},9461:t=>{"use strict";var e=t.exports=function(t,e,i){"function"==typeof e&&(i=e,e={}),n(e,"function"==typeof(i=e.cb||i)?i:i.pre||function(){},i.post||function(){},t,"",t)};function n(t,i,r,o,a,s,c,h,u,l){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var d in i(o,a,s,c,h,u,l),o){var p=o[d];if(Array.isArray(p)){if(d in e.arrayKeywords)for(var f=0;f{t=n.nmd(t);var i="__lodash_hash_undefined__",r=1,o=2,a=9007199254740991,s="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",y="[object Number]",g="[object Null]",v="[object Object]",b="[object Promise]",_="[object Proxy]",w="[object RegExp]",x="[object Set]",M="[object String]",k="[object Undefined]",S="[object WeakMap]",E="[object ArrayBuffer]",A="[object DataView]",T=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j[s]=j[c]=j[E]=j[u]=j[A]=j[l]=j[d]=j[p]=j[m]=j[y]=j[v]=j[w]=j[x]=j[M]=j[S]=!1;var O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,P="object"==typeof self&&self&&self.Object===Object&&self,I=O||P||Function("return this")(),$=e&&!e.nodeType&&e,R=$&&t&&!t.nodeType&&t,L=R&&R.exports===$,N=L&&O.process,B=function(){try{return N&&N.binding&&N.binding("util")}catch(t){}}(),D=B&&B.isTypedArray;function F(t,e){for(var n=-1,i=null==t?0:t.length;++nh))return!1;var l=s.get(t);if(l&&s.get(e))return l==e;var d=-1,p=!0,f=n&o?new Et:void 0;for(s.set(t,e),s.set(e,t);++d-1},kt.prototype.set=function(t,e){var n=this.__data__,i=Tt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},St.prototype.clear=function(){this.size=0,this.__data__={hash:new Mt,map:new(lt||kt),string:new Mt}},St.prototype.delete=function(t){var e=$t(this,t).delete(t);return this.size-=e?1:0,e},St.prototype.get=function(t){return $t(this,t).get(t)},St.prototype.has=function(t){return $t(this,t).has(t)},St.prototype.set=function(t,e){var n=$t(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Et.prototype.add=Et.prototype.push=function(t){return this.__data__.set(t,i),this},Et.prototype.has=function(t){return this.__data__.has(t)},At.prototype.clear=function(){this.__data__=new kt,this.size=0},At.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},At.prototype.get=function(t){return this.__data__.get(t)},At.prototype.has=function(t){return this.__data__.has(t)},At.prototype.set=function(t,e){var n=this.__data__;if(n instanceof kt){var i=n.__data__;if(!lt||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new St(i)}return n.set(t,e),this.size=n.size,this};var Lt=st?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var i=-1,r=null==e?0:e.length,o=0,a=[];++i-1&&t%1==0&&t-1&&t%1==0&&t<=a}function Kt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Zt(t){return null!=t&&"object"==typeof t}var Wt=D?function(t){return function(e){return t(e)}}(D):function(t){return Zt(t)&&Vt(t.length)&&!!j[Ct(t)]};function Gt(t){return null!=(e=t)&&Vt(e.length)&&!qt(e)?function(t,e){var n=zt(t),i=!n&&Ut(t),r=!n&&!i&&Ht(t),o=!n&&!i&&!r&&Wt(t),a=n||i||r||o,s=a?function(t,e){for(var n=-1,i=Array(t);++n{"use strict";var i=n(5717),r=n(3349),o=n(9509).Buffer,a=new Array(16);function s(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function c(t,e){return t<>>32-e}function h(t,e,n,i,r,o,a){return c(t+(e&n|~e&i)+r+o|0,a)+e|0}function u(t,e,n,i,r,o,a){return c(t+(e&i|n&~i)+r+o|0,a)+e|0}function l(t,e,n,i,r,o,a){return c(t+(e^n^i)+r+o|0,a)+e|0}function d(t,e,n,i,r,o,a){return c(t+(n^(e|~i))+r+o|0,a)+e|0}i(s,r),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,i=this._b,r=this._c,o=this._d;n=h(n,i,r,o,t[0],3614090360,7),o=h(o,n,i,r,t[1],3905402710,12),r=h(r,o,n,i,t[2],606105819,17),i=h(i,r,o,n,t[3],3250441966,22),n=h(n,i,r,o,t[4],4118548399,7),o=h(o,n,i,r,t[5],1200080426,12),r=h(r,o,n,i,t[6],2821735955,17),i=h(i,r,o,n,t[7],4249261313,22),n=h(n,i,r,o,t[8],1770035416,7),o=h(o,n,i,r,t[9],2336552879,12),r=h(r,o,n,i,t[10],4294925233,17),i=h(i,r,o,n,t[11],2304563134,22),n=h(n,i,r,o,t[12],1804603682,7),o=h(o,n,i,r,t[13],4254626195,12),r=h(r,o,n,i,t[14],2792965006,17),n=u(n,i=h(i,r,o,n,t[15],1236535329,22),r,o,t[1],4129170786,5),o=u(o,n,i,r,t[6],3225465664,9),r=u(r,o,n,i,t[11],643717713,14),i=u(i,r,o,n,t[0],3921069994,20),n=u(n,i,r,o,t[5],3593408605,5),o=u(o,n,i,r,t[10],38016083,9),r=u(r,o,n,i,t[15],3634488961,14),i=u(i,r,o,n,t[4],3889429448,20),n=u(n,i,r,o,t[9],568446438,5),o=u(o,n,i,r,t[14],3275163606,9),r=u(r,o,n,i,t[3],4107603335,14),i=u(i,r,o,n,t[8],1163531501,20),n=u(n,i,r,o,t[13],2850285829,5),o=u(o,n,i,r,t[2],4243563512,9),r=u(r,o,n,i,t[7],1735328473,14),n=l(n,i=u(i,r,o,n,t[12],2368359562,20),r,o,t[5],4294588738,4),o=l(o,n,i,r,t[8],2272392833,11),r=l(r,o,n,i,t[11],1839030562,16),i=l(i,r,o,n,t[14],4259657740,23),n=l(n,i,r,o,t[1],2763975236,4),o=l(o,n,i,r,t[4],1272893353,11),r=l(r,o,n,i,t[7],4139469664,16),i=l(i,r,o,n,t[10],3200236656,23),n=l(n,i,r,o,t[13],681279174,4),o=l(o,n,i,r,t[0],3936430074,11),r=l(r,o,n,i,t[3],3572445317,16),i=l(i,r,o,n,t[6],76029189,23),n=l(n,i,r,o,t[9],3654602809,4),o=l(o,n,i,r,t[12],3873151461,11),r=l(r,o,n,i,t[15],530742520,16),n=d(n,i=l(i,r,o,n,t[2],3299628645,23),r,o,t[0],4096336452,6),o=d(o,n,i,r,t[7],1126891415,10),r=d(r,o,n,i,t[14],2878612391,15),i=d(i,r,o,n,t[5],4237533241,21),n=d(n,i,r,o,t[12],1700485571,6),o=d(o,n,i,r,t[3],2399980690,10),r=d(r,o,n,i,t[10],4293915773,15),i=d(i,r,o,n,t[1],2240044497,21),n=d(n,i,r,o,t[8],1873313359,6),o=d(o,n,i,r,t[15],4264355552,10),r=d(r,o,n,i,t[6],2734768916,15),i=d(i,r,o,n,t[13],1309151649,21),n=d(n,i,r,o,t[4],4149444226,6),o=d(o,n,i,r,t[11],3174756917,10),r=d(r,o,n,i,t[2],718787259,15),i=d(i,r,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+r|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},3047:(t,e,n)=>{var i=n(6240),r=n(9931);function o(t){this.rand=t||new r.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var r=new i(this.rand.generate(n))}while(r.cmp(t)>=0);return r},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var r=t.bitLength(),o=i.mont(t),a=new i(1).toRed(o);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),c=0;!s.testn(c);c++);for(var h=t.shrn(c),u=s.toRed(o);e>0;e--){var l=this._randrange(new i(2),s);n&&n(l);var d=l.toRed(o).redPow(h);if(0!==d.cmp(a)&&0!==d.cmp(u)){for(var p=1;p0;e--){var u=this._randrange(new i(2),a),l=t.gcd(u);if(0!==l.cmpn(1))return l;var d=u.toRed(r).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(h)){for(var p=1;p=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9746:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},4504:(t,e)=>{"use strict";var n=e;function i(t){return 1===t.length?"0"+t:t}function r(t){for(var e="",n=0;n>8,a=255&r;o?n.push(o,a):n.push(a)}return n},n.zero2=i,n.toHex=r,n.encode=function(t,e){return"hex"===e?r(t):t}},1235:(t,e,n)=>{t.exports=n(8302),t.exports.Collection=n(5048)},5048:t=>{"use strict";t.exports.extend=function(t,e,n,i){var r=n.inverse;return Object.defineProperty(t,"remove",{value:function(t){var n=this.indexOf(t);return-1!==n&&(this.splice(n,1),e.unset(t,r,i)),t}}),Object.defineProperty(t,"contains",{value:function(t){return-1!==this.indexOf(t)}}),Object.defineProperty(t,"add",{value:function(t,n){var o=this.indexOf(t);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,t),-1===o&&e.set(t,r,i)}}),Object.defineProperty(t,"__refs_collection",{value:!0}),t},t.exports.isExtended=function(t){return!0===t.__refs_collection}},8302:(t,e,n)=>{"use strict";var i=n(5048);function r(t,e,n){var r=i.extend(n[e.name]||[],t,e,n);Object.defineProperty(n,e.name,{enumerable:e.enumerable,value:r}),r.length&&r.forEach((function(i){t.set(i,e.inverse,n)}))}function o(t,e){if(!(this instanceof o))return new o(t,e);t.inverse=e,e.inverse=t,this.props={},this.props[t.name]=t,this.props[e.name]=e}o.prototype.bind=function(t,e){if("string"==typeof e){if(!this.props[e])throw new Error("no property <"+e+"> in ref");e=this.props[e]}e.collection?r(this,e,t):function(t,e,n){var i=e.inverse,r=n[e.name];Object.defineProperty(n,e.name,{configurable:e.configurable,enumerable:e.enumerable,get:function(){return r},set:function(e){if(e!==r){var o=r;r=null,o&&t.unset(o,i,n),r=e,t.set(r,i,n)}}})}(this,e,t)},o.prototype.ensureRefsCollection=function(t,e){var n=t[e.name];return i.isExtended(n)||r(this,e,t),n},o.prototype.ensureBound=function(t,e){(function(t,e){return Object.prototype.hasOwnProperty.call(t,e.name||e)})(t,e)||this.bind(t,e)},o.prototype.unset=function(t,e,n){t&&(this.ensureBound(t,e),e.collection?this.ensureRefsCollection(t,e).remove(n):t[e.name]=void 0)},o.prototype.set=function(t,e,n){t&&(this.ensureBound(t,e),e.collection?this.ensureRefsCollection(t,e).add(n):t[e.name]=n)},t.exports=o},2818:(t,e,n)=>{"use strict";var i=n(9809);e.certificate=n(1934);var r=i.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=r;var o=i.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var a=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var s=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=i.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=c;var h=i.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=h;var u=i.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=u,e.DSAparam=i.define("DSAparam",(function(){this.int()}));var l=i.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l;var d=i.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=i.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(t,e,n)=>{"use strict";var i=n(9809),r=i.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=i.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=i.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=i.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),c=i.define("RelativeDistinguishedName",(function(){this.setof(o)})),h=i.define("RDNSequence",(function(){this.seqof(c)})),u=i.define("Name",(function(){this.choice({rdnSequence:this.use(h)})})),l=i.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),d=i.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=i.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(u),this.key("validity").use(l),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())})),f=i.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));t.exports=f},7631:(t,e,n)=>{var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=n(3048),s=n(4696),c=n(9509).Buffer;t.exports=function(t,e){var n,h=t.toString(),u=h.match(i);if(u){var l="aes"+u[1],d=c.from(u[2],"hex"),p=c.from(u[3].replace(/[\r\n]/g,""),"base64"),f=a(e,d.slice(0,8),parseInt(u[1],10)).key,m=[],y=s.createDecipheriv(l,f,d);m.push(y.update(p)),m.push(y.final()),n=c.concat(m)}else{var g=h.match(o);n=c.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:h.match(r)[1],data:n}}},980:(t,e,n)=>{var i=n(2818),r=n(2562),o=n(7631),a=n(4696),s=n(5632),c=n(9509).Buffer;function h(t){var e;"object"!=typeof t||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=c.from(t));var n,h,u=o(t,e),l=u.tag,d=u.data;switch(l){case"CERTIFICATE":h=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(h||(h=i.PublicKey.decode(d,"der")),n=h.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return h.subjectPrivateKey=h.subjectPublicKey,{type:"ec",data:h};case"1.2.840.10040.4.1":return h.algorithm.params.pub_key=i.DSAparam.decode(h.subjectPublicKey.data,"der"),{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=r[t.algorithm.decrypt.cipher.algo.join(".")],h=t.algorithm.decrypt.cipher.iv,u=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(e,n,i,l,"sha1"),p=a.createDecipheriv(o,d,h),f=[];return f.push(p.update(u)),f.push(p.final()),c.concat(f)}(d=i.EncryptedPrivateKey.decode(d,"der"),e);case"PRIVATE KEY":switch(n=(h=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:i.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return h.algorithm.params.priv_key=i.DSAparam.decode(h.subjectPrivateKey,"der"),{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+l)}}t.exports=h,h.signature=i.signature},2720:t=>{"use strict";var e=/,?([a-z]),?/gi,n=parseFloat,i=Math,r=i.PI,o=i.min,a=i.max,s=i.pow,c=i.abs,h=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,u=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,l=Array.isArray||function(t){return t instanceof Array};function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function p(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)d(t,n)&&(e[n]=p(t[n]));return e}function f(t){var e=f.ps=f.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout((function(){for(var n in e)d(e,n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])})),e[t]}function m(t,e,n,i){return 1===arguments.length&&(e=t.y,n=t.width,i=t.height,t=t.x),{x:t,y:e,width:n,height:i,x2:t+n,y2:e+i}}function y(){return this.join(",").replace(e,"$1")}function g(t){var e=p(t);return e.toString=y,e}function v(t,e,n,i,r,o,a,c,h){var u=1-h,l=s(u,3),d=s(u,2),p=h*h*h,f=l*e+3*d*h*i+3*u*h*h*o+p*c;return{x:k(l*t+3*d*h*n+3*u*h*h*r+p*a),y:k(f)}}function b(t){var e=O.apply(null,t);return m(e.x0,e.y0,e.x1-e.x0,e.y1-e.y0)}function _(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height}function w(t,e,n,i,r){return t*(t*(-3*e+9*n-9*i+3*r)+6*e-12*n+6*i)-3*e+3*n}function x(t,e,n,r,o,a,s,c,h){null==h&&(h=1);for(var u=(h=h>1?1:h<0?0:h)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var m=u*l[f]+u,y=w(m,t,n,o,s),g=w(m,e,r,a,c),v=y*y+g*g;p+=d[f]*i.sqrt(v)}return u*p}function M(t,e,n,i,r,s,c,h){if(!(a(t,n)a(r,c)||a(e,i)a(s,h))){var u=(t*i-e*n)*(s-h)-(e-i)*(r*h-s*c),l=(t-n)*(s-h)-(e-i)*(r-c);if(l){var d=k(((t*i-e*n)*(r-c)-(t-n)*(r*h-s*c))/l),p=k(u/l),f=+d.toFixed(2),m=+p.toFixed(2);if(!(f<+o(t,n).toFixed(2)||f>+a(t,n).toFixed(2)||f<+o(r,c).toFixed(2)||f>+a(r,c).toFixed(2)||m<+o(e,i).toFixed(2)||m>+a(e,i).toFixed(2)||m<+o(s,h).toFixed(2)||m>+a(s,h).toFixed(2)))return{x:d,y:p}}}}function k(t){return Math.round(1e11*t)/1e11}function S(t,e,n){if(i=b(t),r=b(e),i=m(i),!(_(r=m(r),i.x,i.y)||_(r,i.x2,i.y)||_(r,i.x,i.y2)||_(r,i.x2,i.y2)||_(i,r.x,r.y)||_(i,r.x2,r.y)||_(i,r.x,r.y2)||_(i,r.x2,r.y2)||(i.xr.x||r.xi.x)&&(i.yr.y||r.yi.y)))return n?0:[];for(var i,r,o=x.apply(0,t),a=x.apply(0,e),s=A(t)?1:~~(o/5)||1,h=A(e)?1:~~(a/5)||1,u=[],l=[],d={},p=n?0:[],f=0;f=0&&P<=1&&I>=0&&I<=1&&(n?p++:p.push({x:O.x,y:O.y,t1:P,t2:I}))}}return p}function E(t){var e=f(t);if(e.abs)return g(e.abs);if(l(t)&&l(t&&t[0])||(t=function(t){if(!t)return null;var e=f(t);if(e.arr)return p(e.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return l(t)&&l(t[0])&&(i=p(t)),i.length||String(t).replace(h,(function(t,e,r){var o=[],a=e.toLowerCase();for(r.replace(u,(function(t,e){e&&o.push(+e)})),"m"==a&&o.length>2&&(i.push([e].concat(o.splice(0,2))),a="l",e="m"==e?"l":"L");o.length>=n[a]&&(i.push([e].concat(o.splice(0,n[a]))),n[a]););})),i.toString=f.toString,e.arr=p(i),i}(t)),!t||!t.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],c++,i[0]=["M",r,o]);for(var d,m,v=c,b=t.length;v=1e3&&delete i[r.shift()],r.push(n),i[n]=m.apply(0,e),i[n])});if(p)T=p[0],C=p[1],E=p[2],A=p[3];else{t=(f=b(t,e,-g)).x,e=f.y;var _=(t-(u=(f=b(u,l,-g)).x))/2,w=(e-(l=f.y))/2,x=_*_/(n*n)+w*w/(o*o);x>1&&(n*=x=i.sqrt(x),o*=x);var M=n*n,k=o*o,S=(s==h?-1:1)*i.sqrt(c((M*k-M*w*w-k*_*_)/(M*w*w+k*_*_))),E=S*n*w/o+(t+u)/2,A=S*-o*_/n+(e+l)/2,T=i.asin(((e-A)/o).toFixed(9)),C=i.asin(((l-A)/o).toFixed(9));(T=tC&&(T-=2*r),!h&&C>T&&(C-=2*r)}var O=C-T;if(c(O)>y){var P=C,I=u,$=l;C=T+y*(h&&C>T?1:-1),v=j(u=E+n*i.cos(C),l=A+o*i.sin(C),n,o,a,0,h,I,$,[C,P,E,A])}O=C-T;var R=i.cos(T),L=i.sin(T),N=i.cos(C),B=i.sin(C),D=i.tan(O/4),F=4/3*n*D,U=4/3*o*D,z=[t,e],H=[t+F*L,e-U*R],q=[u+F*B,l-U*N],V=[u,l];if(H[0]=2*z[0]-H[0],H[1]=2*z[1]-H[1],p)return[H,q,V].concat(v);for(var K=[],Z=0,W=(v=[H,q,V].concat(v).join().split(",")).length;Z7){t[e].shift();for(var n=t[e];n.length;)s[e]="A",t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),l=i.length}},s=[],c="",h="",u=0,l=i.length;u{e.pbkdf2=n(8638),e.pbkdf2Sync=n(1257)},8638:(t,e,n)=>{var i,r,o=n(9509).Buffer,a=n(7357),s=n(2368),c=n(1257),h=n(7777),u=n.g.crypto&&n.g.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function p(){return r||(r=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function f(t,e,n,i,r){return u.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return u.deriveBits({name:"PBKDF2",salt:e,iterations:n,hash:{name:r}},t,i<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,r,m,y,g){"function"==typeof y&&(g=y,y=void 0);var v=l[(y=y||"sha1").toLowerCase()];if(v&&"function"==typeof n.g.Promise){if(a(r,m),t=h(t,s,"Password"),e=h(e,s,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){p()((function(){e(null,t)}))}),(function(t){p()((function(){e(t)}))}))}(function(t){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];var e=f(i=i||o.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return d[t]=e,e}(v).then((function(n){return n?f(t,e,r,m,v):c(t,e,r,m,y)})),g)}else p()((function(){var n;try{n=c(t,e,r,m,y)}catch(t){return g(t)}g(null,n)}))}},2368:(t,e,n)=>{var i;i=n.g.process&&n.g.process.browser?"utf-8":n.g.process&&n.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=i},7357:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,n){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>e||n!=n)throw new TypeError("Bad key length")}},1257:(t,e,n)=>{var i=n(8028),r=n(9785),o=n(9072),a=n(9509).Buffer,s=n(7357),c=n(2368),h=n(7777),u=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(t,e,n){var s=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new r).update(t).digest()}:"md5"===t?i:function(e){return o(t).update(e).digest()}}(t),c="sha512"===t||"sha384"===t?128:64;e.length>c?e=s(e):e.length{var i=n(9509).Buffer;t.exports=function(t,e,n){if(i.isBuffer(t))return t;if("string"==typeof t)return i.from(t,e);if(ArrayBuffer.isView(t))return i.from(t.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},7900:(t,e,n)=>{e.publicEncrypt=n(6559),e.privateDecrypt=n(6138),e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}},9199:(t,e,n)=>{var i=n(3482),r=n(9509).Buffer;function o(t){var e=r.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var n,a=r.alloc(0),s=0;a.length=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function c(t,e,n){var i=s(t,n);return n-1>=e&&(i|=s(t,n-1)<<4),i}function h(t,e,n,i){for(var r=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return r}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)a=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)r=c(t,e,i)<=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,a+=1,this.words[a]|=r>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var o=t.length-n,a=o%i,s=Math.min(o,o-a)+n,c=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],o=0|e.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var h=1;h>>26,l=67108863&c,d=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=d;p++){var f=h-p|0;u+=(a=(r=0|t.words[f])*(o=0|e.words[p])+l)/67108864|0,l=67108863&a}n.words[h]=0|l,c=0|u}return 0!==c?n.words[h]=0|c:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=d[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(p).toString(t);n=(f=f.idivn(p)).isZero()?m+n:u[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===e,h=new t(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),h[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,i=t):(n=t,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,p=0|a[1],f=8191&p,m=p>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],_=8191&b,w=b>>>13,x=0|a[4],M=8191&x,k=x>>>13,S=0|a[5],E=8191&S,A=S>>>13,T=0|a[6],C=8191&T,j=T>>>13,O=0|a[7],P=8191&O,I=O>>>13,$=0|a[8],R=8191&$,L=$>>>13,N=0|a[9],B=8191&N,D=N>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],q=8191&H,V=H>>>13,K=0|s[2],Z=8191&K,W=K>>>13,G=0|s[3],J=8191&G,X=G>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],ot=8191&rt,at=rt>>>13,st=0|s[7],ct=8191&st,ht=st>>>13,ut=0|s[8],lt=8191&ut,dt=ut>>>13,pt=0|s[9],ft=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(h+(i=Math.imul(l,U))|0)+((8191&(r=(r=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;h=((o=Math.imul(d,z))+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(f,U),r=(r=Math.imul(f,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(h+(i=i+Math.imul(l,q)|0)|0)+((8191&(r=(r=r+Math.imul(l,V)|0)+Math.imul(d,q)|0))<<13)|0;h=((o=o+Math.imul(d,V)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,U),r=(r=Math.imul(g,z))+Math.imul(v,U)|0,o=Math.imul(v,z),i=i+Math.imul(f,q)|0,r=(r=r+Math.imul(f,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var vt=(h+(i=i+Math.imul(l,Z)|0)|0)+((8191&(r=(r=r+Math.imul(l,W)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(_,U),r=(r=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),i=i+Math.imul(g,q)|0,r=(r=r+Math.imul(g,V)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,V)|0,i=i+Math.imul(f,Z)|0,r=(r=r+Math.imul(f,W)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,W)|0;var bt=(h+(i=i+Math.imul(l,J)|0)|0)+((8191&(r=(r=r+Math.imul(l,X)|0)+Math.imul(d,J)|0))<<13)|0;h=((o=o+Math.imul(d,X)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(M,U),r=(r=Math.imul(M,z))+Math.imul(k,U)|0,o=Math.imul(k,z),i=i+Math.imul(_,q)|0,r=(r=r+Math.imul(_,V)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,V)|0,i=i+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,W)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,W)|0,i=i+Math.imul(f,J)|0,r=(r=r+Math.imul(f,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0;var _t=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(r=(r=r+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(E,U),r=(r=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),i=i+Math.imul(M,q)|0,r=(r=r+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,W)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,W)|0,i=i+Math.imul(g,J)|0,r=(r=r+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,i=i+Math.imul(f,Q)|0,r=(r=r+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var wt=(h+(i=i+Math.imul(l,nt)|0)|0)+((8191&(r=(r=r+Math.imul(l,it)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,it)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(C,U),r=(r=Math.imul(C,z))+Math.imul(j,U)|0,o=Math.imul(j,z),i=i+Math.imul(E,q)|0,r=(r=r+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,W)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,W)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,i=i+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(f,nt)|0,r=(r=r+Math.imul(f,it)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,it)|0;var xt=(h+(i=i+Math.imul(l,ot)|0)|0)+((8191&(r=(r=r+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,at)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(P,U),r=(r=Math.imul(P,z))+Math.imul(I,U)|0,o=Math.imul(I,z),i=i+Math.imul(C,q)|0,r=(r=r+Math.imul(C,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,W)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,X)|0,i=i+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,i=i+Math.imul(g,nt)|0,r=(r=r+Math.imul(g,it)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(f,ot)|0,r=(r=r+Math.imul(f,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(h+(i=i+Math.imul(l,ct)|0)|0)+((8191&(r=(r=r+Math.imul(l,ht)|0)+Math.imul(d,ct)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(R,U),r=(r=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),i=i+Math.imul(P,q)|0,r=(r=r+Math.imul(P,V)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,W)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,W)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(_,nt)|0,r=(r=r+Math.imul(_,it)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,it)|0,i=i+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,i=i+Math.imul(f,ct)|0,r=(r=r+Math.imul(f,ht)|0)+Math.imul(m,ct)|0,o=o+Math.imul(m,ht)|0;var kt=(h+(i=i+Math.imul(l,lt)|0)|0)+((8191&(r=(r=r+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(B,U),r=(r=Math.imul(B,z))+Math.imul(D,U)|0,o=Math.imul(D,z),i=i+Math.imul(R,q)|0,r=(r=r+Math.imul(R,V)|0)+Math.imul(L,q)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,Z)|0,r=(r=r+Math.imul(P,W)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,W)|0,i=i+Math.imul(C,J)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,X)|0,i=i+Math.imul(E,Q)|0,r=(r=r+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(_,ot)|0,r=(r=r+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,i=i+Math.imul(g,ct)|0,r=(r=r+Math.imul(g,ht)|0)+Math.imul(v,ct)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(f,lt)|0,r=(r=r+Math.imul(f,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var St=(h+(i=i+Math.imul(l,ft)|0)|0)+((8191&(r=(r=r+Math.imul(l,mt)|0)+Math.imul(d,ft)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,q),r=(r=Math.imul(B,V))+Math.imul(D,q)|0,o=Math.imul(D,V),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,W)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,W)|0,i=i+Math.imul(P,J)|0,r=(r=r+Math.imul(P,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,i=i+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(E,nt)|0,r=(r=r+Math.imul(E,it)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(M,ot)|0,r=(r=r+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,i=i+Math.imul(_,ct)|0,r=(r=r+Math.imul(_,ht)|0)+Math.imul(w,ct)|0,o=o+Math.imul(w,ht)|0,i=i+Math.imul(g,lt)|0,r=(r=r+Math.imul(g,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Et=(h+(i=i+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(B,Z),r=(r=Math.imul(B,W))+Math.imul(D,Z)|0,o=Math.imul(D,W),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,i=i+Math.imul(P,Q)|0,r=(r=r+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,i=i+Math.imul(C,nt)|0,r=(r=r+Math.imul(C,it)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(E,ot)|0,r=(r=r+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,i=i+Math.imul(M,ct)|0,r=(r=r+Math.imul(M,ht)|0)+Math.imul(k,ct)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(_,lt)|0,r=(r=r+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var At=(h+(i=i+Math.imul(g,ft)|0)|0)+((8191&(r=(r=r+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;h=((o=o+Math.imul(v,mt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(B,J),r=(r=Math.imul(B,X))+Math.imul(D,J)|0,o=Math.imul(D,X),i=i+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,nt)|0,r=(r=r+Math.imul(P,it)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,it)|0,i=i+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,i=i+Math.imul(E,ct)|0,r=(r=r+Math.imul(E,ht)|0)+Math.imul(A,ct)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var Tt=(h+(i=i+Math.imul(_,ft)|0)|0)+((8191&(r=(r=r+Math.imul(_,mt)|0)+Math.imul(w,ft)|0))<<13)|0;h=((o=o+Math.imul(w,mt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(B,Q),r=(r=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),i=i+Math.imul(R,nt)|0,r=(r=r+Math.imul(R,it)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,r=(r=r+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,i=i+Math.imul(C,ct)|0,r=(r=r+Math.imul(C,ht)|0)+Math.imul(j,ct)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(E,lt)|0,r=(r=r+Math.imul(E,dt)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,dt)|0;var Ct=(h+(i=i+Math.imul(M,ft)|0)|0)+((8191&(r=(r=r+Math.imul(M,mt)|0)+Math.imul(k,ft)|0))<<13)|0;h=((o=o+Math.imul(k,mt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(B,nt),r=(r=Math.imul(B,it))+Math.imul(D,nt)|0,o=Math.imul(D,it),i=i+Math.imul(R,ot)|0,r=(r=r+Math.imul(R,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,i=i+Math.imul(P,ct)|0,r=(r=r+Math.imul(P,ht)|0)+Math.imul(I,ct)|0,o=o+Math.imul(I,ht)|0,i=i+Math.imul(C,lt)|0,r=(r=r+Math.imul(C,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var jt=(h+(i=i+Math.imul(E,ft)|0)|0)+((8191&(r=(r=r+Math.imul(E,mt)|0)+Math.imul(A,ft)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(r>>>13)|0)+(jt>>>26)|0,jt&=67108863,i=Math.imul(B,ot),r=(r=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),i=i+Math.imul(R,ct)|0,r=(r=r+Math.imul(R,ht)|0)+Math.imul(L,ct)|0,o=o+Math.imul(L,ht)|0,i=i+Math.imul(P,lt)|0,r=(r=r+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,dt)|0;var Ot=(h+(i=i+Math.imul(C,ft)|0)|0)+((8191&(r=(r=r+Math.imul(C,mt)|0)+Math.imul(j,ft)|0))<<13)|0;h=((o=o+Math.imul(j,mt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(B,ct),r=(r=Math.imul(B,ht))+Math.imul(D,ct)|0,o=Math.imul(D,ht),i=i+Math.imul(R,lt)|0,r=(r=r+Math.imul(R,dt)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,dt)|0;var Pt=(h+(i=i+Math.imul(P,ft)|0)|0)+((8191&(r=(r=r+Math.imul(P,mt)|0)+Math.imul(I,ft)|0))<<13)|0;h=((o=o+Math.imul(I,mt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(B,lt),r=(r=Math.imul(B,dt))+Math.imul(D,lt)|0,o=Math.imul(D,dt);var It=(h+(i=i+Math.imul(R,ft)|0)|0)+((8191&(r=(r=r+Math.imul(R,mt)|0)+Math.imul(L,ft)|0))<<13)|0;h=((o=o+Math.imul(L,mt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863;var $t=(h+(i=Math.imul(B,ft))|0)+((8191&(r=(r=Math.imul(B,mt))+Math.imul(D,ft)|0))<<13)|0;return h=((o=Math.imul(D,mt))+(r>>>13)|0)+($t>>>26)|0,$t&=67108863,c[0]=yt,c[1]=gt,c[2]=vt,c[3]=bt,c[4]=_t,c[5]=wt,c[6]=xt,c[7]=Mt,c[8]=kt,c[9]=St,c[10]=Et,c[11]=At,c[12]=Tt,c[13]=Ct,c[14]=jt,c[15]=Ot,c[16]=Pt,c[17]=It,c[18]=$t,0!==h&&(c[19]=h,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=p),o.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):i<63?p(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,i=0;i>=1;return i},y.prototype.permute=function(t,e,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=r/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>r}return e}(t);if(0===e.length)return new o(1);for(var n=this,i=0;i=0);var e,n=t%26,r=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,h=0;h=0&&(0!==u||h>=r);h--){var l=0|this.words[h];this.words[h]=u<<26-o|l>>>o,u=l&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,a=0|r.words[r.length-1];0!=(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==e){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var h=0;h=0;l--){var d=67108864*(0|i.words[r.length+l])+(0|i.words[r.length+l-1]);for(d=Math.min(d/a|0,67108863),i._ishlnsubmul(r,d,l);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(r,1,l),i.isZero()||(i.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var u=n.clone(),l=e.clone();!e.isZero();){for(var d=0,p=1;0==(e.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(u),a.isub(l)),r.iushrn(1),a.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(l)),s.iushrn(1),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),a.isub(c)):(n.isub(e),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new o(1),s=new o(0),c=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,u=1;0==(e.words[0]&u)&&h<26;++h,u<<=1);if(h>0)for(e.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(r=0===e.cmpn(1)?a:s).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var o=e;e=n,n=o}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){ir&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},r(b,v),b.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r>>22,o=a}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),h=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,h).cmp(c);)u.redIAdd(c);for(var l=this.pow(u,r),d=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),f=a;0!==p.cmp(s);){for(var m=p,y=0;0!==m.cmp(s);y++)m=m.redSqr();i(y=0;i--){for(var h=e.words[i],u=c-1;u>=0;u--){var l=h>>u&1;r!==n[0]&&(r=this.sqr(r)),0!==l||0!==a?(a<<=1,a|=l,(4==++s||0===i&&0===u)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},r(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},6138:(t,e,n)=>{var i=n(980),r=n(9199),o=n(7859),a=n(2144),s=n(3663),c=n(3482),h=n(4818),u=n(9509).Buffer;t.exports=function(t,e,n){var l;l=t.padding?t.padding:n?1:4;var d,p=i(t),f=p.modulus.byteLength();if(e.length>f||new a(e).cmp(p.modulus)>=0)throw new Error("decryption error");d=n?h(new a(e),p):s(e,p);var m=u.alloc(f-d.length);if(d=u.concat([m,d],f),4===l)return function(t,e){var n=t.modulus.byteLength(),i=c("sha1").update(u.alloc(0)).digest(),a=i.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),h=e.slice(a+1),l=o(s,r(h,a)),d=o(h,r(l,n-a-1));if(function(t,e){t=u.from(t),e=u.from(e);var n=0,i=t.length;t.length!==e.length&&(n++,i=Math.min(t.length,e.length));for(var r=-1;++r=e.length){o++;break}var a=e.slice(2,r-1);if(("0002"!==i.toString("hex")&&!n||"0001"!==i.toString("hex")&&n)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return e.slice(r)}(0,d,n);if(3===l)return d;throw new Error("unknown padding")}},6559:(t,e,n)=>{var i=n(980),r=n(1798),o=n(3482),a=n(9199),s=n(7859),c=n(2144),h=n(4818),u=n(3663),l=n(9509).Buffer;t.exports=function(t,e,n){var d;d=t.padding?t.padding:n?1:4;var p,f=i(t);if(4===d)p=function(t,e){var n=t.modulus.byteLength(),i=e.length,h=o("sha1").update(l.alloc(0)).digest(),u=h.length,d=2*u;if(i>n-d-2)throw new Error("message too long");var p=l.alloc(n-i-d-2),f=n-u-1,m=r(u),y=s(l.concat([h,p,l.alloc(1,1),e],f),a(m,f)),g=s(m,a(y,u));return new c(l.concat([l.alloc(1),g,y],n))}(f,e);else if(1===d)p=function(t,e,n){var i,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");return i=n?l.alloc(a-o-3,255):function(t){for(var e,n=l.allocUnsafe(t),i=0,o=r(2*t),a=0;i=0)throw new Error("data too long for modulus")}return n?u(p,f):h(p,f)}},4818:(t,e,n)=>{var i=n(2144),r=n(9509).Buffer;t.exports=function(t,e){return r.from(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray())}},7859:t=>{t.exports=function(t,e){for(var n=t.length,i=-1;++i{"use strict";var i=65536,r=n(9509).Buffer,o=n.g.crypto||n.g.msCrypto;o&&o.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=r.allocUnsafe(t);if(t>0)if(t>i)for(var a=0;a{"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var r=n(9509),o=n(1798),a=r.Buffer,s=r.kMaxLength,c=n.g.crypto||n.g.msCrypto,h=Math.pow(2,32)-1;function u(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>h||t<0)throw new TypeError("offset must be a uint32");if(t>s||t>e)throw new RangeError("offset out of range")}function l(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>h||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>s)throw new RangeError("buffer too small")}function d(t,e,n,i){if(process.browser){var r=t.buffer,a=new Uint8Array(r,e,n);return c.getRandomValues(a),i?void process.nextTick((function(){i(null,t)})):t}if(!i)return o(n).copy(t,e),t;o(n,(function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!process.browser?(e.randomFill=function(t,e,i,r){if(!(a.isBuffer(t)||t instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)r=e,e=0,i=t.length;else if("function"==typeof i)r=i,i=t.length-e;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return u(e,t.length),l(i,e,t.length),d(t,e,i,r)},e.randomFillSync=function(t,e,i){if(void 0===e&&(e=0),!(a.isBuffer(t)||t instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return u(e,t.length),void 0===i&&(i=t.length-e),l(i,e,t.length),d(t,e,i)}):(e.randomFill=i,e.randomFillSync=i)},4281:t=>{"use strict";var e={};function n(t,n,i){i||(i=Error);var r=function(t){var e,i;function r(e,i,r){return t.call(this,function(t,e,i){return"string"==typeof n?n:n(t,e,i)}(e,i,r))||this}return i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,r}(i);r.prototype.name=i.name,r.prototype.code=t,e[t]=r}function i(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,o,a,s,c;if("string"==typeof e&&(o="not ",e.substr(0,4)===o)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-9,n)===e}(t," argument"))a="The ".concat(t," ").concat(r," ").concat(i(e,"type"));else{var h=("number"!=typeof c&&(c=0),c+1>(s=t).length||-1===s.indexOf(".",c)?"argument":"property");a='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(i(e,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,n)=>{"use strict";var i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var r=n(9481),o=n(4229);n(5717)(h,r);for(var a=i(o.prototype),s=0;s{"use strict";t.exports=r;var i=n(4605);function r(t){if(!(this instanceof r))return new r(t);i.call(this,t)}n(5717)(r,i),r.prototype._transform=function(t,e,n){n(null,t)}},9481:(t,e,n)=>{"use strict";var i;t.exports=k,k.ReadableState=M,n(7187).EventEmitter;var r,o=function(t,e){return t.listeners(e).length},a=n(2503),s=n(8764).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=n(4616);r=h&&h.debuglog?h.debuglog("stream"):function(){};var u,l,d,p=n(7327),f=n(1195),m=n(2457).getHighWaterMark,y=n(4281).q,g=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(k,a);var w=f.errorOrDestroy,x=["error","close","destroy","pause","resume"];function M(t,e,r){i=i||n(6753),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",r),this.buffer=new p,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.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(u||(u=n(2553).s),this.decoder=new u(t.encoding),this.encoding=t.encoding)}function k(t){if(i=i||n(6753),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new M(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function S(t,e,n,i,o){r("readableAddChunk",e);var a,h=t._readableState;if(null===e)h.reading=!1,function(t,e){if(r("onEofChunk"),!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,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,j(t)))}}(t,h);else if(o||(a=function(t,e){var n,i;return i=e,s.isBuffer(i)||i instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new g("chunk",["string","Buffer","Uint8Array"],e)),n}(h,e)),a)w(t,a);else if(h.objectMode||e&&e.length>0)if("string"==typeof e||h.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),i)h.endEmitted?w(t,new _):E(t,h,e,!0);else if(h.ended)w(t,new v);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!n?(e=h.decoder.write(e),h.objectMode||0!==e.length?E(t,h,e,!1):O(t,h)):E(t,h,e,!1)}else i||(h.reading=!1,O(t,h));return!h.ended&&(h.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=A?t=A:(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;r("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(r("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(j,t))}function j(t){var e=t._readableState;r("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function O(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(P,t,e))}function P(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function $(t){r("readable nexttick read 0"),t.read(0)}function R(t,e){r("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(r("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;r("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(D,e,t))}function D(t,e){if(r("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function F(t,e){for(var n=0,i=t.length;n=e.highWaterMark:e.length>0)||e.ended))return r("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):C(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&B(this),null;var i,o=e.needReadable;return r("need readable",o),(0===e.length||e.length-t0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==i&&this.emit("data",i),i},k.prototype._read=function(t){w(this,new b("_read()"))},k.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,r("pipe count=%d opts=%j",i.pipesCount,e);var a=e&&!1===e.end||t===process.stdout||t===process.stderr?f:s;function s(){r("onend"),t.end()}i.endEmitted?process.nextTick(a):n.once("end",a),t.on("unpipe",(function e(o,a){r("onunpipe"),o===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,r("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",e),n.removeListener("end",s),n.removeListener("end",f),n.removeListener("data",u),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;r("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(n);t.on("drain",c);var h=!1;function u(e){r("ondata");var o=t.write(e);r("dest.write",o),!1===o&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(r("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function l(e){r("onerror",e),f(),t.removeListener("error",l),0===o(t,"error")&&w(t,e)}function d(){t.removeListener("finish",p),f()}function p(){r("onfinish"),t.removeListener("close",d),f()}function f(){r("unpipe"),n.unpipe(t)}return n.on("data",u),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",l),t.once("close",d),t.once("finish",p),t.emit("pipe",n),i.flowing||(r("pipe resume"),n.resume()),t},k.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||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,r("on readable",i.length,i.reading),i.length?C(this):i.reading||process.nextTick($,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(I,this),n},k.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(I,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(r("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(R,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,n=this._readableState,i=!1;for(var o in t.on("end",(function(){if(r("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(o){r("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(e.push(o)||(i=!0,t.pause()))})),t)void 0===this[o]&&"function"==typeof t[o]&&(this[o]=function(e){return function(){return t[e].apply(t,arguments)}}(o));for(var a=0;a{"use strict";t.exports=u;var i=n(4281).q,r=i.ERR_METHOD_NOT_IMPLEMENTED,o=i.ERR_MULTIPLE_CALLBACK,a=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=i.ERR_TRANSFORM_WITH_LENGTH_0,c=n(6753);function h(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length{"use strict";function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var i=t.entry;for(t.entry=null;i;){var r=i.callback;e.pendingcb--,r(undefined),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}var r;t.exports=k,k.WritableState=M;var o,a={deprecate:n(4927)},s=n(2503),c=n(8764).Buffer,h=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=n(1195),l=n(2457).getHighWaterMark,d=n(4281).q,p=d.ERR_INVALID_ARG_TYPE,f=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,g=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,b=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,w=u.errorOrDestroy;function x(){}function M(t,e,o){r=r||n(6753),t=t||{},"boolean"!=typeof o&&(o=e instanceof r),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,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,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,r){--e.pendingcb,n?(process.nextTick(r,i),process.nextTick(j,t,e),t._writableState.errorEmitted=!0,w(t,i)):(r(i),t._writableState.errorEmitted=!0,w(t,i),j(t,e))}(t,n,i,e,r);else{var o=T(n)||t.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||A(t,n),i?process.nextTick(E,t,n,o,r):E(t,n,o,r)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function k(t){var e=this instanceof(r=r||n(6753));if(!e&&!o.call(k,this))return new k(t);this._writableState=new M(t,this,e),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)),s.call(this)}function S(t,e,n,i,r,o,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new g("write")):n?t._writev(r,e.onwrite):t._write(r,o,e.onwrite),e.sync=!1}function E(t,e,n,i){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),j(t,e)}function A(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,S(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,u=n.encoding,l=n.callback;if(S(t,e,!1,e.objectMode?1:h.length,h,u,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final((function(n){e.pendingcb--,n&&w(t,n),e.prefinished=!0,t.emit("prefinish"),j(t,e)}))}function j(t,e){var n=T(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}n(5717)(k,s),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:a.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]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return!!o.call(this,t)||this===k&&t&&t._writableState instanceof M}})):o=function(t){return t instanceof this},k.prototype.pipe=function(){w(this,new y)},k.prototype.write=function(t,e,n){var i,r=this._writableState,o=!1,a=!r.objectMode&&(i=t,c.isBuffer(i)||i instanceof h);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=x),r.ending?function(t,e){var n=new b;w(t,n),process.nextTick(e,n)}(this,n):(a||function(t,e,n,i){var r;return null===n?r=new v:"string"==typeof n||e.objectMode||(r=new p("chunk",["string","Buffer"],n)),!r||(w(t,r),process.nextTick(i,r),!1)}(this,r,t,n))&&(r.pendingcb++,o=function(t,e,n,i,r,o){if(!n){var a=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,n)),e}(e,i,r);i!==a&&(n=!0,r="buffer",i=a)}var s=e.objectMode?1:i.length;e.length+=s;var h=e.length-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,n){n(new f("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,j(t,e),n&&(e.finished?process.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=u.destroy,k.prototype._undestroy=u.undestroy,k.prototype._destroy=function(t,e){e(t)}},5850:(t,e,n)=>{"use strict";var i;function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o=n(8610),a=Symbol("lastResolve"),s=Symbol("lastReject"),c=Symbol("error"),h=Symbol("ended"),u=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function f(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[u]=null,t[a]=null,t[s]=null,e(p(n,!1)))}}function m(t){process.nextTick(f,t)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((r(i={get stream(){return this[d]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[h])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,n){process.nextTick((function(){t[c]?n(t[c]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(n,i){t.then((function(){e[h]?n(p(void 0,!0)):e[l](n,i)}),i)}}(i,this));else{var r=this[d].read();if(null!==r)return Promise.resolve(p(r,!1));n=new Promise(this[l])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),r(i,"return",(function(){var t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(p(void 0,!0))}))}))})),i),y);t.exports=function(t){var e,n=Object.create(g,(r(e={},d,{value:t,writable:!0}),r(e,a,{value:null,writable:!0}),r(e,s,{value:null,writable:!0}),r(e,c,{value:null,writable:!0}),r(e,h,{value:t._readableState.endEmitted,writable:!0}),r(e,l,{value:function(t,e){var i=n[d].read();i?(n[u]=null,n[a]=null,n[s]=null,t(p(i,!1))):(n[a]=t,n[s]=e)},writable:!0}),e));return n[u]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[s];return null!==e&&(n[u]=null,n[a]=null,n[s]=null,e(t)),void(n[c]=t)}var i=n[a];null!==i&&(n[u]=null,n[a]=null,n[s]=null,i(p(void 0,!0))),n[h]=!0})),t.on("readable",m.bind(null,n)),n}},7327:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return c.alloc(0);for(var e,n,i,r=c.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,n=r,i=a,c.prototype.copy.call(e,n,i),a+=o.data.length,o=o.next;return r}},{key:"consume",value:function(t,e){var n;return tr.length?r.length:t;if(o===r.length?i+=r:i+=r.slice(0,t),0==(t-=o)){o===r.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(t){var e=c.allocUnsafe(t),n=this.head,i=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var r=n.data,o=t>r.length?r.length:t;if(r.copy(e,e.length-t,0,o),0==(t-=o)){o===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(o));break}++i}return this.length-=i,e}},{key:u,value:function(t,e){return h(this,r(r({},e),{},{depth:0,customInspect:!1}))}}])&&a(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},1195:t=>{"use strict";function e(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,r){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(r?r(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,t)):process.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!r&&t?o._writableState?o._writableState.errorEmitted?process.nextTick(n,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,t)):process.nextTick(e,o,t):r?(process.nextTick(n,o),r(t)):process.nextTick(n,o)})),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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,i=t._writableState;n&&n.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,n)=>{"use strict";var i=n(4281).q.ERR_STREAM_PREMATURE_CLOSE;function r(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,i=new Array(n),r=0;r{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,n)=>{"use strict";var i,r=n(4281).q,o=r.ERR_MISSING_ARGS,a=r.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function c(t){t()}function h(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r0,(function(t){u||(u=t),t&&d.forEach(c),o||(d.forEach(c),l(u))}))}));return e.reduce(h)}},2457:(t,e,n)=>{"use strict";var i=n(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,r){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,r,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new i(r?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:(t,e,n)=>{t.exports=n(7187).EventEmitter},8473:(t,e,n)=>{(e=t.exports=n(9481)).Stream=e,e.Readable=e,e.Writable=n(4229),e.Duplex=n(6753),e.Transform=n(4605),e.PassThrough=n(2725),e.finished=n(8610),e.pipeline=n(9946)},9785:(t,e,n)=>{"use strict";var i=n(8764).Buffer,r=n(5717),o=n(3349),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function f(t,e){return t<>>32-e}function m(t,e,n,i,r,o,a,s){return f(t+(e^n^i)+o+a|0,s)+r|0}function y(t,e,n,i,r,o,a,s){return f(t+(e&n|~e&i)+o+a|0,s)+r|0}function g(t,e,n,i,r,o,a,s){return f(t+((e|~n)^i)+o+a|0,s)+r|0}function v(t,e,n,i,r,o,a,s){return f(t+(e&i|n&~i)+o+a|0,s)+r|0}function b(t,e,n,i,r,o,a,s){return f(t+(e^(n|~i))+o+a|0,s)+r|0}r(p,o),p.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,i=0|this._b,r=0|this._c,o=0|this._d,p=0|this._e,_=0|this._a,w=0|this._b,x=0|this._c,M=0|this._d,k=0|this._e,S=0;S<80;S+=1){var E,A;S<16?(E=m(n,i,r,o,p,t[s[S]],l[0],h[S]),A=b(_,w,x,M,k,t[c[S]],d[0],u[S])):S<32?(E=y(n,i,r,o,p,t[s[S]],l[1],h[S]),A=v(_,w,x,M,k,t[c[S]],d[1],u[S])):S<48?(E=g(n,i,r,o,p,t[s[S]],l[2],h[S]),A=g(_,w,x,M,k,t[c[S]],d[2],u[S])):S<64?(E=v(n,i,r,o,p,t[s[S]],l[3],h[S]),A=y(_,w,x,M,k,t[c[S]],d[3],u[S])):(E=b(n,i,r,o,p,t[s[S]],l[4],h[S]),A=m(_,w,x,M,k,t[c[S]],d[4],u[S])),n=p,p=o,o=f(r,10),r=i,i=E,_=k,k=M,M=f(x,10),x=w,w=A}var T=this._b+r+M|0;this._b=this._c+o+k|0,this._c=this._d+p+_|0,this._d=this._e+n+w|0,this._e=this._a+i+x|0,this._a=T},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=i.alloc?i.alloc(20):new i(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},9509:(t,e,n)=>{var i=n(8764),r=i.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return r(t,e,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=a),a.prototype=Object.create(r.prototype),o(r,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=r(t);return void 0!==e?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},2399:(t,e,n)=>{"use strict";var i,r=n(8764),o=r.Buffer,a={};for(i in r)r.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(a[i]=r[i]);var s=a.Buffer={};for(i in o)o.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(s[i]=o[i]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,n){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return o(t,e,n)}),s.alloc||(s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=o(t);return e&&0!==e.length?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i}),!a.kStringMaxLength)try{a.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(t){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a},4189:(t,e,n)=>{var i=n(9509).Buffer;function r(t,e){this._block=i.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}r.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=i.from(t,e));for(var n=this._block,r=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var i=(4294967295&n)>>>0,r=(n-i)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},9072:(t,e,n)=>{var i=t.exports=function(t){t=t.toLowerCase();var e=i[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};i.sha=n(4448),i.sha1=n(8336),i.sha224=n(8432),i.sha256=n(7499),i.sha384=n(1686),i.sha512=n(7816)},4448:(t,e,n)=>{var i=n(5717),r=n(4189),o=n(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,r.call(this,64,56)}function h(t){return t<<30|t>>>2}function u(t,e,n,i){return 0===t?e&n|~e&i:2===t?e&n|e&i|n&i:e^n^i}i(c,r),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,n=this._w,i=0|this._a,r=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,l=0;l<16;++l)n[l]=t.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var d=0;d<80;++d){var p=~~(d/20),f=0|((e=i)<<5|e>>>27)+u(p,r,o,s)+c+n[d]+a[p];c=s,s=o,o=h(r),r=i,i=f}this._a=i+this._a|0,this._b=r+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},8336:(t,e,n)=>{var i=n(5717),r=n(4189),o=n(9509).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,r.call(this,64,56)}function h(t){return t<<5|t>>>27}function u(t){return t<<30|t>>>2}function l(t,e,n,i){return 0===t?e&n|~e&i:2===t?e&n|e&i|n&i:e^n^i}i(c,r),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(t){for(var e,n=this._w,i=0|this._a,r=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var p=0;p<80;++p){var f=~~(p/20),m=h(i)+l(f,r,o,s)+c+n[p]+a[f]|0;c=s,s=o,o=u(r),r=i,i=m}this._a=i+this._a|0,this._b=r+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=c},8432:(t,e,n)=>{var i=n(5717),r=n(7499),o=n(4189),a=n(9509).Buffer,s=new Array(64);function c(){this.init(),this._w=s,o.call(this,64,56)}i(c,r),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=c},7499:(t,e,n)=>{var i=n(5717),r=n(4189),o=n(9509).Buffer,a=[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],s=new Array(64);function c(){this.init(),this._w=s,r.call(this,64,56)}function h(t,e,n){return n^t&(e^n)}function u(t,e,n){return t&e|n&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}i(c,r),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(t){for(var e,n=this._w,i=0|this._a,r=0|this._b,o=0|this._c,s=0|this._d,c=0|this._e,f=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=t.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((e=n[g-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[g-7]+p(n[g-15])+n[g-16];for(var v=0;v<64;++v){var b=y+d(c)+h(c,f,m)+a[v]+n[v]|0,_=l(i)+u(i,r,o)|0;y=m,m=f,f=c,c=s+b|0,s=o,o=r,r=i,i=b+_|0}this._a=i+this._a|0,this._b=r+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=f+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=c},1686:(t,e,n)=>{var i=n(5717),r=n(7816),o=n(4189),a=n(9509).Buffer,s=new Array(160);function c(){this.init(),this._w=s,o.call(this,128,112)}i(c,r),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=c},7816:(t,e,n)=>{var i=n(5717),r=n(4189),o=n(9509).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function c(){this.init(),this._w=s,r.call(this,128,112)}function h(t,e,n){return n^t&(e^n)}function u(t,e,n){return t&e|n&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0>>0?1:0}i(c,r),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(t){for(var e=this._w,n=0|this._ah,i=0|this._bh,r=0|this._ch,o=0|this._dh,s=0|this._eh,c=0|this._fh,v=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,x=0|this._cl,M=0|this._dl,k=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var C=e[T-30],j=e[T-30+1],O=p(C,j),P=f(j,C),I=m(C=e[T-4],j=e[T-4+1]),$=y(j,C),R=e[T-14],L=e[T-14+1],N=e[T-32],B=e[T-32+1],D=P+L|0,F=O+R+g(D,P)|0;F=(F=F+I+g(D=D+$|0,$)|0)+N+g(D=D+B|0,B)|0,e[T]=F,e[T+1]=D}for(var U=0;U<160;U+=2){F=e[U],D=e[U+1];var z=u(n,i,r),H=u(_,w,x),q=l(n,_),V=l(_,n),K=d(s,k),Z=d(k,s),W=a[U],G=a[U+1],J=h(s,c,v),X=h(k,S,E),Y=A+Z|0,Q=b+K+g(Y,A)|0;Q=(Q=(Q=Q+J+g(Y=Y+X|0,X)|0)+W+g(Y=Y+G|0,G)|0)+F+g(Y=Y+D|0,D)|0;var tt=V+H|0,et=q+z+g(tt,V)|0;b=v,A=E,v=c,E=S,c=s,S=k,s=o+Q+g(k=M+Y|0,M)|0,o=r,M=x,r=i,x=w,i=n,w=_,n=Q+et+g(_=Y+tt|0,Y)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+M|0,this._el=this._el+k|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+n+g(this._al,_)|0,this._bh=this._bh+i+g(this._bl,w)|0,this._ch=this._ch+r+g(this._cl,x)|0,this._dh=this._dh+o+g(this._dl,M)|0,this._eh=this._eh+s+g(this._el,k)|0,this._fh=this._fh+c+g(this._fl,S)|0,this._gh=this._gh+v+g(this._gl,E)|0,this._hh=this._hh+b+g(this._hl,A)|0},c.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=c},2830:(t,e,n)=>{t.exports=r;var i=n(7187).EventEmitter;function r(){i.call(this)}n(5717)(r,i),r.Readable=n(9481),r.Writable=n(4229),r.Duplex=n(6753),r.Transform=n(4605),r.PassThrough=n(2725),r.finished=n(8610),r.pipeline=n(9946),r.Stream=r,r.prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",c));var a=!1;function s(){a||(a=!0,t.end())}function c(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){n.removeListener("data",r),t.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",c),n.removeListener("error",h),t.removeListener("error",h),n.removeListener("end",u),n.removeListener("close",u),t.removeListener("close",u)}return n.on("error",h),t.on("error",h),n.on("end",u),n.on("close",u),t.on("close",u),t.emit("pipe",n),t}},2553:(t,e,n)=>{"use strict";var i=n(9509).Buffer,r=i.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&&(i.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=c,this.end=h,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=u,this.end=l,e=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(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 c(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=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 h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function u(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 l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=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?(r>0&&(t.lastNeed=r-1),r):--i=0?(r>0&&(t.lastNeed=r-2),r):--i=0?(r>0&&(2===r?r=0:t.lastNeed=r-3),r):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},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}},3379:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},9216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},3565:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},7795:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},4589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},540:function(t,e){!function(t){"use strict";function e(){for(var t=arguments.length,e=Array(t),n=0;n1){e[0]=e[0].slice(0,-1);for(var i=e.length-1,r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function g(t){throw new RangeError(f[t])}function v(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+function(t,e){for(var n=[],i=t.length;i--;)n[i]=e(t[i]);return n}((t=t.replace(p,".")).split("."),e).join(".")}function b(t){for(var e=[],n=0,i=t.length;n=55296&&r<=56319&&n>1,t+=m(t/e);t>455;i+=u)t=m(t/35);return m(i+36*t/(t+38))},x=function(t){var e,n=[],i=t.length,r=0,o=128,a=72,s=t.lastIndexOf("-");s<0&&(s=0);for(var c=0;c=128&&g("not-basic"),n.push(t.charCodeAt(c));for(var l=s>0?s+1:0;l=i&&g("invalid-input");var y=(e=t.charCodeAt(l++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:u;(y>=u||y>m((h-r)/p))&&g("overflow"),r+=y*p;var v=f<=a?1:f>=a+26?26:f-a;if(ym(h/b)&&g("overflow"),p*=b}var _=n.length+1;a=w(r-d,_,0==d),m(r/_)>h-o&&g("overflow"),o+=m(r/_),r%=_,n.splice(r++,0,o)}return String.fromCodePoint.apply(String,n)},M=function(t){var e=[],n=(t=b(t)).length,i=128,r=0,o=72,a=!0,s=!1,c=void 0;try{for(var l,d=t[Symbol.iterator]();!(a=(l=d.next()).done);a=!0){var p=l.value;p<128&&e.push(y(p))}}catch(t){s=!0,c=t}finally{try{!a&&d.return&&d.return()}finally{if(s)throw c}}var f=e.length,v=f;for(f&&e.push("-");v=i&&Tm((h-r)/C)&&g("overflow"),r+=(x-i)*C,i=x;var j=!0,O=!1,P=void 0;try{for(var I,$=t[Symbol.iterator]();!(j=(I=$.next()).done);j=!0){var R=I.value;if(Rh&&g("overflow"),R==i){for(var L=r,N=u;;N+=u){var B=N<=o?1:N>=o+26?26:N-o;if(L>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function A(t){for(var e="",n=0,i=t.length;n=194&&r<224){if(i-n>=6){var o=parseInt(t.substr(n+4,2),16);e+=String.fromCharCode((31&r)<<6|63&o)}else e+=t.substr(n,6);n+=6}else if(r>=224){if(i-n>=9){var a=parseInt(t.substr(n+4,2),16),s=parseInt(t.substr(n+7,2),16);e+=String.fromCharCode((15&r)<<12|(63&a)<<6|63&s)}else e+=t.substr(n,9);n+=9}else e+=t.substr(n,3),n+=3}return e}function T(t,e){function n(t){var n=A(t);return n.match(e.UNRESERVED)?n:t}return t.scheme&&(t.scheme=String(t.scheme).replace(e.PCT_ENCODED,n).toLowerCase().replace(e.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(e.PCT_ENCODED,n).replace(e.NOT_USERINFO,E).replace(e.PCT_ENCODED,r)),void 0!==t.host&&(t.host=String(t.host).replace(e.PCT_ENCODED,n).toLowerCase().replace(e.NOT_HOST,E).replace(e.PCT_ENCODED,r)),void 0!==t.path&&(t.path=String(t.path).replace(e.PCT_ENCODED,n).replace(t.scheme?e.NOT_PATH:e.NOT_PATH_NOSCHEME,E).replace(e.PCT_ENCODED,r)),void 0!==t.query&&(t.query=String(t.query).replace(e.PCT_ENCODED,n).replace(e.NOT_QUERY,E).replace(e.PCT_ENCODED,r)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(e.PCT_ENCODED,n).replace(e.NOT_FRAGMENT,E).replace(e.PCT_ENCODED,r)),t}function C(t){return t.replace(/^0*(.*)/,"$1")||"0"}function j(t,e){var n=t.match(e.IPV4ADDRESS)||[],i=c(n,2)[1];return i?i.split(".").map(C).join("."):t}function O(t,e){var n=t.match(e.IPV6ADDRESS)||[],i=c(n,3),r=i[1],o=i[2];if(r){for(var a=r.toLowerCase().split("::").reverse(),s=c(a,2),h=s[0],u=s[1],l=u?u.split(":").map(C):[],d=h.split(":").map(C),p=e.IPV4ADDRESS.test(d[d.length-1]),f=p?7:8,m=d.length-f,y=Array(f),g=0;g1){var _=y.slice(0,v.index),w=y.slice(v.index+v.length);b=_.join(":")+"::"+w.join(":")}else b=y.join(":");return o&&(b+="%"+o),b}return t}var P=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,I=void 0==="".match(/(){0}/)[1];function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},i=!1!==e.iri?s:a;"suffix"===e.reference&&(t=(e.scheme?e.scheme+":":"")+"//"+t);var r=t.match(P);if(r){I?(n.scheme=r[1],n.userinfo=r[3],n.host=r[4],n.port=parseInt(r[5],10),n.path=r[6]||"",n.query=r[7],n.fragment=r[8],isNaN(n.port)&&(n.port=r[5])):(n.scheme=r[1]||void 0,n.userinfo=-1!==t.indexOf("@")?r[3]:void 0,n.host=-1!==t.indexOf("//")?r[4]:void 0,n.port=parseInt(r[5],10),n.path=r[6]||"",n.query=-1!==t.indexOf("?")?r[7]:void 0,n.fragment=-1!==t.indexOf("#")?r[8]:void 0,isNaN(n.port)&&(n.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),n.host&&(n.host=O(j(n.host,i),i)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",e.reference&&"suffix"!==e.reference&&e.reference!==n.reference&&(n.error=n.error||"URI is not a "+e.reference+" reference.");var o=S[(e.scheme||n.scheme||"").toLowerCase()];if(e.unicodeSupport||o&&o.unicodeSupport)T(n,i);else{if(n.host&&(e.domainHost||o&&o.domainHost))try{n.host=k.toASCII(n.host.replace(i.PCT_ENCODED,A).toLowerCase())}catch(t){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+t}T(n,a)}o&&o.parse&&o.parse(n,e)}else n.error=n.error||"URI can not be parsed.";return n}var R=/^\.\.?\//,L=/^\/\.(\/|$)/,N=/^\/\.\.(\/|$)/,B=/^\/?(?:.|\n)*?(?=\/|$)/;function D(t){for(var e=[];t.length;)if(t.match(R))t=t.replace(R,"");else if(t.match(L))t=t.replace(L,"/");else if(t.match(N))t=t.replace(N,"/"),e.pop();else if("."===t||".."===t)t="";else{var n=t.match(B);if(!n)throw new Error("Unexpected dot segment condition");var i=n[0];t=t.slice(i.length),e.push(i)}return e.join("")}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.iri?s:a,i=[],r=S[(e.scheme||t.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(t,e),t.host)if(n.IPV6ADDRESS.test(t.host));else if(e.domainHost||r&&r.domainHost)try{t.host=e.iri?k.toUnicode(t.host):k.toASCII(t.host.replace(n.PCT_ENCODED,A).toLowerCase())}catch(n){t.error=t.error||"Host's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+n}T(t,n),"suffix"!==e.reference&&t.scheme&&(i.push(t.scheme),i.push(":"));var o=function(t,e){var n=!1!==e.iri?s:a,i=[];return void 0!==t.userinfo&&(i.push(t.userinfo),i.push("@")),void 0!==t.host&&i.push(O(j(String(t.host),n),n).replace(n.IPV6ADDRESS,(function(t,e,n){return"["+e+(n?"%25"+n:"")+"]"}))),"number"!=typeof t.port&&"string"!=typeof t.port||(i.push(":"),i.push(String(t.port))),i.length?i.join(""):void 0}(t,e);if(void 0!==o&&("suffix"!==e.reference&&i.push("//"),i.push(o),t.path&&"/"!==t.path.charAt(0)&&i.push("/")),void 0!==t.path){var c=t.path;e.absolutePath||r&&r.absolutePath||(c=D(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),i.push(c)}return void 0!==t.query&&(i.push("?"),i.push(t.query)),void 0!==t.fragment&&(i.push("#"),i.push(t.fragment)),i.join("")}function U(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(t=$(F(t,n),n),e=$(F(e,n),n)),!(n=n||{}).tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=D(e.path||""),i.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=D(e.path||""),i.query=e.query):(e.path?("/"===e.path.charAt(0)?i.path=D(e.path):(void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path:i.path="/"+e.path,i.path=D(i.path)),i.query=e.query):(i.path=t.path,void 0!==e.query?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function z(t,e){return t&&t.toString().replace(e&&e.iri?s.PCT_ENCODED:a.PCT_ENCODED,A)}var H={scheme:"http",domainHost:!0,parse:function(t,e){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function(t,e){var n="https"===String(t.scheme).toLowerCase();return t.port!==(n?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},q={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize};function V(t){return"boolean"==typeof t.secure?t.secure:"wss"===String(t.scheme).toLowerCase()}var K={scheme:"ws",domainHost:!0,parse:function(t,e){var n=t;return n.secure=V(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(t,e){if(t.port!==(V(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){var n=t.resourceName.split("?"),i=c(n,2),r=i[0],o=i[1];t.path=r&&"/"!==r?r:void 0,t.query=o,t.resourceName=void 0}return t.fragment=void 0,t}},Z={scheme:"wss",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},W={},G="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",J="[0-9A-Fa-f]",X=n(n("%[EFef]"+J+"%"+J+J+"%"+J+J)+"|"+n("%[89A-Fa-f]"+J+"%"+J+J)+"|"+n("%"+J+J)),Y=e("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Q=new RegExp(G,"g"),tt=new RegExp(X,"g"),et=new RegExp(e("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),nt=new RegExp(e("[^]",G,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),it=nt;function rt(t){var e=A(t);return e.match(Q)?e:t}var ot={scheme:"mailto",parse:function(t,e){var n=t,i=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var r=!1,o={},a=n.query.split("&"),s=0,c=a.length;s{function i(t){try{if(!n.g.localStorage)return!1}catch(t){return!1}var e=n.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}},8014:(t,e,n)=>{"use strict";t.exports=n.p+"1e08c7f04f4855050724.eot?21877404"},6033:(t,e,n)=>{"use strict";t.exports=n.p+"cb4be0230caf509ac475.svg?21877404"},5426:(t,e,n)=>{"use strict";t.exports=n.p+"2185c437d9db32386425.ttf?21877404"},7119:(t,e,n)=>{"use strict";t.exports=n.p+"9c989372615cb2cfbaa6.woff2?21877404"},8832:(t,e,n)=>{"use strict";t.exports=n.p+"8809b45a3f0566911799.woff?21877404"},1392:(t,e,n)=>{"use strict";t.exports=n.p+"e0293c064077dfc2f559.png"},4370:(t,e,n)=>{"use strict";t.exports=n.p+"57531072a966f65a2305.png"},8380:(t,e,n)=>{"use strict";t.exports=n.p+"b8dbe7c879da3b9be4ca.png"},4240:(t,e,n)=>{"use strict";t.exports=n.p+"35c26b06df90f45f6c0e.png"},5199:(t,e,n)=>{"use strict";t.exports=n.p+"c63dd9761798b5898871.png"},5795:(t,e,n)=>{"use strict";t.exports=n.p+"f59f2def9081b883f0a4.png"},9580:(t,e,n)=>{"use strict";t.exports=n.p+"2318786d81923a2a0398.png"},3739:(t,e,n)=>{"use strict";t.exports=n.p+"65cf2841f6551c4233c9.png"},5067:(t,e,n)=>{"use strict";t.exports=n.p+"b53376cd3ae8f3c426ab.png"},393:(t,e,n)=>{"use strict";t.exports=n.p+"caf5c42be05bd6cf8b9d.png"},6098:(t,e,n)=>{"use strict";t.exports=n.p+"6a0bf4e5c677b095e328.png"},1998:(t,e,n)=>{"use strict";t.exports=n.p+"3c622a812a32e90d9a9b.png"},394:(t,e,n)=>{"use strict";t.exports=n.p+"52672ddfc0b2472f8310.png"},1924:(t,e,n)=>{"use strict";t.exports=n.p+"2a71880a5d8c0edcd943.png"},9053:(t,e,n)=>{"use strict";t.exports=n.p+"a3add48e0c2437e3b88d.png"},6234:(t,e,n)=>{"use strict";t.exports=n.p+"daa3452a70dd56a63c71.png"},4780:(t,e,n)=>{"use strict";t.exports=n.p+"0d90cac54350b3631a2b.svg"},8648:(t,e,n)=>{"use strict";t.exports=n.p+"eaae1aaf139b806c50b4.png"},4695:(t,e,n)=>{"use strict";t.exports=n.p+"be027ddaf24e9820054a.svg"},765:(t,e,n)=>{"use strict";t.exports=n.p+"556d108e74d43f559161.png"},7093:(t,e,n)=>{"use strict";t.exports=n.p+"7547ed76b90d5776991c.svg"},9007:(t,e,n)=>{"use strict";t.exports=n.p+"6c8297b1515dcd712777.svg"},5377:(t,e,n)=>{"use strict";t.exports=n.p+"5d29fd86fba153c1025d.svg"},8377:(t,e,n)=>{"use strict";t.exports=n.p+"41a9daeb541338b469fa.svg"},9687:(t,e,n)=>{"use strict";t.exports=n.p+"b8844d260be87e87ad10.svg"},951:(t,e,n)=>{"use strict";t.exports=n.p+"324a9a105daaf65a97ce.svg"},653:(t,e,n)=>{"use strict";t.exports=n.p+"3ebfb41b2f65bd2855c2.svg"},9804:(t,e,n)=>{"use strict";t.exports=n.p+"4131672cef0cfa987695.svg"},677:(t,e,n)=>{"use strict";t.exports=n.p+"86b906ee82b391bdc09a.svg"},6303:(t,e,n)=>{"use strict";t.exports=n.p+"fdbe145397e352ee5d0d.svg"},6524:(t,e,n)=>{"use strict";t.exports=n.p+"f51e3f550c03ff7022be.svg"},2532:(t,e,n)=>{"use strict";t.exports=n.p+"e4c59c4a5aa75d3a3df3.svg"},5340:(t,e,n)=>{"use strict";t.exports=n.p+"26b129ebbf99cd63da7a.svg"},9800:(t,e,n)=>{"use strict";t.exports=n.p+"fdbaab3de35b6d845655.svg"},6807:(t,e,n)=>{"use strict";t.exports=n.p+"007a14b8b2bbc6a854c5.svg"},9819:(t,e,n)=>{"use strict";t.exports=n.p+"faa872cc78c010c0f063.png"},3945:(t,e,n)=>{"use strict";t.exports=n.p+"9a37b4e9b7769fb9e083.png"},6397:(t,e,n)=>{"use strict";t.exports=n.p+"247c7159ff708fcea332.png"},330:(t,e,n)=>{"use strict";t.exports=n.p+"2de41d37b7115877d5b6.png"},7996:(t,e,n)=>{"use strict";t.exports=n.p+"58cc2e4dfa1880e72951.png"},200:(t,e,n)=>{"use strict";t.exports=n.p+"f15f43137be3a22ce0b2.png"},3601:(t,e,n)=>{"use strict";t.exports=n.p+"d8b850b920a5ef49d752.ttf"},2769:(t,e,n)=>{"use strict";t.exports=n.p+"563eda3d3407af0fb581.ttf"},9993:(t,e,n)=>{"use strict";t.exports=n.p+"cdb29a5d7ccf57ff05a3.ttf"},738:(t,e,n)=>{"use strict";t.exports=n.p+"cfb635a5111b545f5598.ttf"},1317:(t,e,n)=>{"use strict";t.exports=n.p+"01849ee091e1762a5dd5.ttf"},69:(t,e,n)=>{"use strict";t.exports=n.p+"73d4495be63ad83b25cc.ttf"},8073:(t,e,n)=>{"use strict";t.exports=n.p+"333cb30c20e31999802a.ttf"},3933:(t,e,n)=>{"use strict";t.exports=n.p+"dbdfd398abcbbafc022b.ttf"},1407:(t,e,n)=>{"use strict";t.exports=n.p+"e373f6163127e2d469af.ttf"},8718:(t,e,n)=>{"use strict";t.exports=n.p+"7641a0f76ca9ef6c252c.ttf"},2586:(t,e,n)=>{"use strict";t.exports=n.p+"4a7d59f898225cc2f2e7.ttf"},8809:(t,e,n)=>{"use strict";t.exports=n.p+"673ed42382ab264e0bf5.ttf"},1848:(t,e,n)=>{"use strict";t.exports=n.p+"89e040c6a64d18f620dc.ttf"},2981:(t,e,n)=>{"use strict";t.exports=n.p+"35d26b781dc5fda684cc.ttf"},6156:(t,e,n)=>{"use strict";t.exports=n.p+"ac8d04b620e54be9b0f0.ttf"},3433:(t,e,n)=>{"use strict";t.exports=n.p+"3524ffc3226f4578e5c5.ttf"},1098:(t,e,n)=>{"use strict";t.exports=n.p+"59ff6a729e30c99b478e.ttf"},8689:(t,e,n)=>{"use strict";t.exports=n.p+"9d5e661e645ce9a32fe6.ttf"},950:()=>{},6601:()=>{},9214:()=>{},8623:()=>{},7748:()=>{},5568:()=>{},6619:()=>{},7108:()=>{},2361:()=>{},4616:()=>{},4775:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8161:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/applicator":true},"$recursiveAnchor":true,"title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"additionalItems":{"$recursiveRef":"#"},"unevaluatedItems":{"$recursiveRef":"#"},"items":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"#/$defs/schemaArray"}]},"contains":{"$recursiveRef":"#"},"additionalProperties":{"$recursiveRef":"#"},"unevaluatedProperties":{"$recursiveRef":"#"},"properties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$recursiveRef":"#"}},"propertyNames":{"$recursiveRef":"#"},"if":{"$recursiveRef":"#"},"then":{"$recursiveRef":"#"},"else":{"$recursiveRef":"#"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$recursiveRef":"#"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$recursiveRef":"#"}}}}')},7114:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/content","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"contentSchema":{"$recursiveRef":"#"}}}')},484:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/core","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true},"$recursiveAnchor":true,"title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"type":"string","format":"uri"},"$anchor":{"type":"string","pattern":"^[A-Za-z][-A-Za-z0-9.:_]*$"},"$ref":{"type":"string","format":"uri-reference"},"$recursiveRef":{"type":"string","format":"uri-reference"},"$recursiveAnchor":{"type":"boolean","default":false},"$vocabulary":{"type":"object","propertyNames":{"type":"string","format":"uri"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}}}}')},877:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/format","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/format":true},"$recursiveAnchor":true,"title":"Format vocabulary meta-schema","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},5032:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/meta-data":true},"$recursiveAnchor":true,"title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},2374:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/validation","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/validation":true},"$recursiveAnchor":true,"title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}},"const":true,"enum":{"type":"array","items":true},"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},3329:t=>{"use strict";t.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/schema","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true,"https://json-schema.org/draft/2019-09/vocab/applicator":true,"https://json-schema.org/draft/2019-09/vocab/validation":true,"https://json-schema.org/draft/2019-09/vocab/meta-data":true,"https://json-schema.org/draft/2019-09/vocab/format":false,"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format"},{"$ref":"meta/content"}],"type":["object","boolean"],"properties":{"definitions":{"$comment":"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.","type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"dependencies":{"$comment":"\\"dependencies\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\"dependentSchemas\\" and \\"dependentRequired\\"","type":"object","additionalProperties":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"meta/validation#/$defs/stringArray"}]}}}}')},4946:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},5207:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},9799:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},8597:t=>{"use strict";t.exports={i8:"6.5.4"}},2562:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&!t;)t=i[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href,n.nc=void 0,(()=>{"use strict";var t=n(3379),e=n.n(t),i=n(7795),r=n.n(i),o=n(569),a=n.n(o),s=n(3565),c=n.n(s),h=n(9216),u=n.n(h),l=n(4589),d=n.n(l),p=n(6183),f={};f.styleTagTransform=d(),f.setAttributes=c(),f.insert=a().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=u(),e()(p.Z,f),p.Z&&p.Z.locals&&p.Z.locals;var m=n(2805),y={};y.styleTagTransform=d(),y.setAttributes=c(),y.insert=a().bind(null,"head"),y.domAPI=r(),y.insertStyleElement=u(),e()(m.Z,y),m.Z&&m.Z.locals&&m.Z.locals;var g=n(3625),v={};v.styleTagTransform=d(),v.setAttributes=c(),v.insert=a().bind(null,"head"),v.domAPI=r(),v.insertStyleElement=u(),e()(g.Z,v),g.Z&&g.Z.locals&&g.Z.locals;var b=n(821),_={};_.styleTagTransform=d(),_.setAttributes=c(),_.insert=a().bind(null,"head"),_.domAPI=r(),_.insertStyleElement=u(),e()(b.Z,_),b.Z&&b.Z.locals&&b.Z.locals;var w=function(t){void 0===t&&(t={});var e=t;this.name=e.name,this.description=e.description,this.source=e.source,this.url=e.url,this.external_id=e.external_id,this.reference_id=e.reference_id},x=function(t){void 0===t&&(t={});var e=t;this.manual_playbook=e.manual_playbook,this.external_playbooks=e.external_playbooks,this.parallel_processing=e.parallel_processing,this.if_logic=e.if_logic,this.while_logic=e.while_logic,this.switch_logic=e.switch_logic,this.temporal_logic=e.temporal_logic,this.data_markings=e.data_markings,this.digital_signatures=e.digital_signatures,this.countersigned_signature=e.countersigned_signature,this.extensions=e.extensions};const M={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let k;const S=new Uint8Array(16);function E(){if(!k&&(k="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!k))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return k(S)}const A=[];for(let t=0;t<256;++t)A.push((t+256).toString(16).slice(1));const T=function(t,e,n){if(M.randomUUID&&!e&&!t)return M.randomUUID();const i=(t=t||{}).random||(t.rng||E)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=i[t];return e}return function(t,e=0){return(A[t[e+0]]+A[t[e+1]]+A[t[e+2]]+A[t[e+3]]+"-"+A[t[e+4]]+A[t[e+5]]+"-"+A[t[e+6]]+A[t[e+7]]+"-"+A[t[e+8]]+A[t[e+9]]+"-"+A[t[e+10]]+A[t[e+11]]+A[t[e+12]]+A[t[e+13]]+A[t[e+14]]+A[t[e+15]]).toLowerCase()}(i)};var C,j,O=function t(e){void 0===e&&(e={});var n=e;this.type="jss",null==n.id||""==n.id?this.id="jss--"+T():this.id=n.id,this.created_by=n.created_by,this.created=n.created,this.modified=n.modified,this.revoked=n.revoked,this.signee=n.signee,this.valid_from=n.valid_from,this.valid_until=n.valid_until,this.related_to=n.related_to,this.related_version=n.related_version,this.hash_algorithm=n.hash_algorithm,this.algorithm=n.algorithm,this.public_key=n.public_key,this.public_cert_chain=[],n.public_cert_chain&&(this.public_cert_chain=Array.from(n.public_cert_chain)),this.cert_url=n.cert_url,this.thumbprint=n.thumbprint,this.value=n.value,n.signature&&(this.signature=new t(n.signature))},P=function(t){void 0===t&&(t={});var e=t;this.type=e.type,this.description=e.description,this.value=e.value,this.constant=e.constant,this.external=e.external},I=function(){function t(t){void 0===t&&(t={});var e=t;this.type="extension-definition",this.name=e.name,this.description=e.description,this.created_by=e.created_by,this.schema=e.schema,this.version=e.version,this.external_references=[],e.external_references&&(this.external_references=e.external_references.map((function(t){return new w(t)})))}return t.prototype.update=function(t){for(var e in t)t.hasOwnProperty(e)&&void 0!==t[e]&&""!==t[e]&&e in this&&(this[e]=t[e])},t}(),$=function(t){void 0===t&&(t={});var e=t;this.type=e.type,this.description=e.description,this.version=e.version,this.playbook_activity=e.playbook_activity,this.external_references=[],e.external_references&&(this.external_references=e.external_references.map((function(t){return new w(t)})))},R=(C=function(t,e){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},C(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),L=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="bash",n.command=i.command,n.command_b64=i.command_b64,n}return R(e,t),e}($),N=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),B=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="caldera-cmd",n.command=i.command,n.command_b64=i.command_b64,n}return N(e,t),e}($),D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),F=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="elastic",n.command_b64=i.command_b64,n}return D(e,t),e}($),U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),z=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;for(var r in(n=t.call(this,i)||this).type="http-api",n.command=i.command,n.content=i.content,n.content_b64=i.content_b64,n.headers={},i.headers)n.headers[r]=Array.from(i.headers[r]);return n}return U(e,t),e}($),H=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),q=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="jupyter",n.command_b64=i.command_b64,n}return H(e,t),e}($),V=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),K=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="kestrel",n.command_b64=i.command_b64,n}return V(e,t),e}($),Z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),W=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="manual",n.command=i.command,n.command_b64=i.command_b64,n}return Z(e,t),e}($),G=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),J=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;for(var r in(n=t.call(this,i)||this).type="openc2-http",n.command=i.command,n.content_b64=i.content_b64,n.headers={},i.headers)n.headers[r]=Array.from(i.headers[r]);return n}return G(e,t),e}($),X=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Y=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="powershell",n.command=i.command,n.command_b64=i.command_b64,n}return X(e,t),e}($),Q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="sigma",n.command_b64=i.command_b64,n}return Q(e,t),e}($),et=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),nt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="ssh",n.command=i.command,n.command_b64=i.command_b64,n}return et(e,t),e}($),it=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="yara",n.command_b64=i.command_b64,n}return it(e,t),e}($),ot=function(){function t(){}return t.create=function(t){switch(t.type){case"bash":return new L(t);case"caldera":return new B(t);case"elastic":return new F(t);case"http-api":return new z(t);case"jupyter":return new q(t);case"kestrel":return new K(t);case"manual":return new W(t);case"openc2-http":return new J(t);case"powershell":return new Y(t);case"sigma":return new tt(t);case"ssh":return new nt(t);case"yara":return new rt(t);default:return new $(t)}},t}(),at=function(){function t(t){void 0===t&&(t={});var e=t;for(var n in this.name=e.name,this.description=e.description,this.external_references=[],e.external_references&&(this.external_references=e.external_references.map((function(t){return new w(t)}))),this.delay=e.delay,this.timeout=e.timeout,this.step_variables={},e.step_variables){var i=e.step_variables[n];this.step_variables[n]=new P(i)}this.owner=e.owner,this.on_completion=e.on_completion,this.on_success=e.on_success,this.on_failure=e.on_failure,this.step_extensions=Object.assign({},e.step_extensions)}return t.prototype.updateObjectProperty=function(t,e){return"external_references"===e&&t.external_references?(this.external_references=t.external_references.map((function(t){return new w(t)})),!0):!("step_extensions"!==e||!t.step_extensions||(this.step_extensions=Object.assign({},t.step_extensions),0))},t.prototype.update=function(t){for(var e in t)t.hasOwnProperty(e)&&void 0!==t[e]&&e in this&&(this.updateObjectProperty(t,e)||(Array.isArray(t[e])?this[e]=Array.from(t[e]):this[e]=t[e]))},t}(),st=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ct=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="action",n.commands=[],i.commands&&(n.commands=i.commands.map((function(t){return ot.create(t)}))),n.agent=i.agent,n.targets=[],i.targets&&(n.targets=Array.from(i.targets)),n.in_args=[],i.in_args&&(n.in_args=Array.from(i.in_args)),n.out_args=[],i.out_args&&(n.out_args=Array.from(i.out_args)),n}return st(e,t),e.prototype.updateObjectProperty=function(e,n){return"commands"===n&&e.commands?(this.commands=e.commands.map((function(t){return ot.create(t)})),!0):t.prototype.updateObjectProperty.call(this,e,n)},e}(at),ht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ut=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="end",n}return ht(e,t),e}(at),lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="if-condition",n.condition=i.condition,n.on_true=i.on_true,n.on_false=i.on_false,n}return lt(e,t),e}(at),pt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ft=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="parallel",n.next_steps=[],i.next_steps&&(n.next_steps=Array.from(i.next_steps)),n}return pt(e,t),e.prototype.updateObjectProperty=function(e,n){return"next_steps"===n&&e.next_steps?(this.next_steps=Array.from(e.next_steps),!0):t.prototype.updateObjectProperty.call(this,e,n)},e}(at),mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="playbook-action",n.playbook_id=i.playbook_id,n.playbook_version=i.playbook_version,n.in_args=[],i.in_args&&(n.in_args=Array.from(i.in_args)),n.out_args=[],i.out_args&&(n.out_args=Array.from(i.out_args)),n}return mt(e,t),e}(at),gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="start",n}return gt(e,t),e}(at),bt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),_t=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="switch-condition",n.switch=i.switch,n.cases=Object.assign({},i.cases),n}return bt(e,t),e.prototype.updateObjectProperty=function(e,n){return"cases"===n&&e.cases?(this.cases=Object.assign({},e.cases),!0):t.prototype.updateObjectProperty.call(this,e,n)},e}(at),wt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="while-condition",n.condition=i.condition,n.on_true=i.on_true,n}return wt(e,t),e}(at),Mt=function(){function t(){}return t.create=function(t){switch(t.type){case"start":return new vt(t);case"end":return new ut(t);case"action":return new ct(t);case"playbook-action":return new yt(t);case"parallel":return new ft(t);case"if-condition":return new dt(t);case"while-condition":return new xt(t);case"switch-condition":return new _t(t);default:throw new Error("Unknown step type: ".concat(t.type))}},t}(),kt=function(t){void 0===t&&(t={});var e=t;this.name=e.name,this.description=e.description,this.building_details=e.building_details,this.network_details=e.network_details,this.region=e.region,this.country=e.country,this.administrative_area=e.administrative_area,this.city=e.city,this.street_address=e.street_address,this.postal_code=e.postal_code,this.latitude=e.latitude,this.longitude=e.longitude,this.precision=e.precision},St=function(t){void 0===t&&(t={});var e=t;this.type=e.type,this.name=e.name,this.description=e.description,e.location&&(this.location=new kt(e.location)),this.agent_target_extensions=Object.assign({},e.agent_target_extensions)},Et=function(t){void 0===t&&(t={});var e=t;this.email=e.email,this.phone=e.phone,this.contact_details=e.contact_details},At=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="group",i.contact&&(n.contact=new Et(i.contact)),n}return At(e,t),e}(St),Ct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){t.dname="dname",t.ipv4="ipv4",t.ipv6="ipv6",t.l2mac="l2mac",t.vlan="vlan",t.url="url"}(j||(j={}));var jt,Ot=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="http-api",n.address=Object.assign({},i.address),n.authentication_info=i.authentication_info,n.port=i.port,n.category=[],i.category&&(n.category=Array.from(i.category)),n}return Ct(e,t),e}(St),Pt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),It=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="individual",i.contact&&(n.contact=new Et(i.contact)),n}return Pt(e,t),e}(St),$t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){t.dname="dname",t.ipv4="ipv4",t.ipv6="ipv6",t.l2mac="l2mac",t.vlan="vlan",t.url="url"}(jt||(jt={}));var Rt,Lt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="linux",n.address=Object.assign({},i.address),n.authentication_info=i.authentication_info,n.port=i.port,n.category=[],i.category&&(n.category=Array.from(i.category)),n}return $t(e,t),e}(St),Nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Bt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="location",n.logical=[],i.logical&&(n.logical=Array.from(i.logical)),n}return Nt(e,t),e}(St),Dt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){t.dname="dname",t.ipv4="ipv4",t.ipv6="ipv6",t.l2mac="l2mac",t.vlan="vlan",t.url="url"}(Rt||(Rt={}));var Ft,Ut=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="net-address",n.address=Object.assign({},i.address),n.authentication_info=i.authentication_info,n.category=[],i.category&&(n.category=Array.from(i.category)),n}return Dt(e,t),e}(St),zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ht=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="organization",i.contact&&(n.contact=new Et(i.contact)),n}return zt(e,t),e}(St),qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="sector",n.sector=n.sector,n}return qt(e,t),e}(St),Kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="security-category",n.category=[],i.category&&(n.category=Array.from(i.category)),n}return Kt(e,t),e}(St),Wt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){t.dname="dname",t.ipv4="ipv4",t.ipv6="ipv6",t.l2mac="l2mac",t.vlan="vlan",t.url="url"}(Ft||(Ft={}));var Gt=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="ssh",n.address=Object.assign({},i.address),n.authentication_info=i.authentication_info,n.port=i.port,n.category=[],i.category&&(n.category=Array.from(i.category)),n}return Wt(e,t),e}(St),Jt=function(){function t(){}return t.create=function(t){switch(t.type){case"group":return new Tt(t);case"http-api":return new Ot(t);case"individual":return new It(t);case"linux":return new Lt(t);case"location":return new Bt(t);case"net-address":return new Ut(t);case"organization":return new Ht(t);case"sector":return new Vt(t);case"security-category":return new Zt(t);case"ssh":return new Gt(t);default:return new St(t)}},t}(),Xt=function(t){void 0===t&&(t={});var e=t;this.type="marking-iep",this.name=e.name,this.description=e.description,this.tlp_level=e.tlp_level,this.iep_version=e.iep_version,this.start_date=e.start_date,this.end_date=e.end_date,this.encrypt_in_transit=e.encrypt_in_transit,this.permitted_actions=e.permitted_actions,this.attribution=e.attribution,this.unmodified_resale=e.unmodified_resale,this.external_references=[],e.external_references&&(this.external_references=Array.from(e.external_references))},Yt=function(t){void 0===t&&(t={});var e=t;this.type=e.type,this.id=e.id,this.name=e.name,this.description=e.description,this.created_by=e.created_by,this.created=e.created,this.revoked=e.revoked,this.valid_from=e.valid_from,this.valid_until=e.valid_until,this.labels=[],e.labels&&(this.labels=Array.from(e.labels)),this.external_references=[],e.external_references&&(this.external_references=e.external_references.map((function(t){return new w(t)})))},Qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),te=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="marking-statement",n.statement=i.statement,n}return Qt(e,t),e}(Yt),ee=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ne=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="marking-tlp",n.tlpv2_level=i.tlpv2_level,n.setStandardTLPData(),n}return ee(e,t),e.prototype.setStandardTLPData=function(){switch(this.tlpv2_level){case"TLP:CLEAR":this.type="marking-tlp",this.id="marking-tlp--94868c89-83c2-464b-929b-a1a8aa3c8487",this.created_by="identity--5abe695c-7bd5-4c31-8824-2528696cdbf1",this.created="2022-10-01T00:00:00.000Z",this.tlpv2_level="TLP:CLEAR";break;case"TLP:GREEN":this.type="marking-tlp",this.id="marking-tlp--bab4a63c-aed9-4cf5-a766-dfca5abac2bb",this.created_by="identity--5abe695c-7bd5-4c31-8824-2528696cdbf1",this.created="2022-10-01T00:00:00.000Z",this.tlpv2_level="TLP:GREEN";break;case"TLP:AMBER":this.type="marking-tlp",this.id="marking-tlp--55d920b0-5e8b-4f79-9ee9-91f868d9b421",this.created_by="identity--5abe695c-7bd5-4c31-8824-2528696cdbf1",this.created="2022-10-01T00:00:00.000Z",this.tlpv2_level="TLP:AMBER";break;case"TLP:AMBER+STRICT":this.type="marking-tlp",this.id="marking-tlp--939a9414-2ddd-4d32-a0cd-375ea402b003",this.created_by="identity--5abe695c-7bd5-4c31-8824-2528696cdbf1",this.created="2022-10-01T00:00:00.000Z",this.tlpv2_level="TLP:AMBER+STRICT";break;case"TLP:RED":this.type="marking-tlp",this.id="marking-tlp--e828b379-4e03-4974-9ac4-e53a884c97c1",this.created_by="identity--5abe695c-7bd5-4c31-8824-2528696cdbf1",this.created="2022-10-01T00:00:00.000Z",this.tlpv2_level="TLP:RED";break;default:throw new Error("Unknown TLP level : ".concat(this.tlpv2_level,". Valid TLP levels are : TLP:CLEAR, TLP:GREEN, TLP:AMBER, TLP:AMBER+STRICT, TLP:RED"))}},e}(Yt),ie=function(){function t(){}return t.create=function(t){switch(t.type){case"marking-statement":return new te(t);case"marking-tlp":return new ne(t);case"marking-iep":return new Xt(t);default:throw new Error("Unknown data marking type: ".concat(t.type))}},t}(),re=function(t){void 0===t&&(t={});var e=t;this.type=e.type,this.name=e.name,this.description=e.description,this.authentication_info_extensions=Object.assign({},e.authentication_info_extensions)},oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ae=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="http-basic",n.user_id=i.user_id,n.password=i.password,n.kms=i.kms,n.kms_key_identifier=i.kms_key_identifier,n}return oe(e,t),e}(re),se=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ce=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="oauth2",n.oauth_header=i.oauth_header,n.token=i.token,n.kms=i.kms,n.kms_key_identifier=i.kms_key_identifier,n}return se(e,t),e}(re),he=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ue=function(t){function e(e){void 0===e&&(e={});var n=this,i=e;return(n=t.call(this,i)||this).type="user-auth",n.username=i.username,n.password=i.password,n.kms=i.kms,n.kms_key_identifier=i.kms_key_identifier,n}return he(e,t),e}(re),le=function(){function t(){}return t.create=function(t){switch(t.type){case"http-basic":return new ae(t);case"oauth2":return new ce(t);case"user-auth":return new ue(t);default:return new re(t)}},t}(),de=function(){function t(t){void 0===t&&(t={});var e=t;for(var n in this.type="playbook",this.spec_version="cacao-2.0",this.id=e.id,this.name=e.name,this.description=e.description,this.playbook_types=[],e.playbook_types&&(this.playbook_types=Array.from(e.playbook_types)),this.playbook_activities=[],e.playbook_activities&&(this.playbook_activities=Array.from(e.playbook_activities)),this.playbook_processing_summary={},e.playbook_processing_summary&&(this.playbook_processing_summary=new x(e.playbook_processing_summary)),this.created_by=e.created_by,this.created=e.created,this.modified=e.modified,this.revoked=e.revoked,this.valid_from=e.valid_from,this.valid_until=e.valid_until,this.derived_from=[],this.related_to=[],e.derived_from&&(this.derived_from=Array.from(e.derived_from)),this.priority=e.priority,this.severity=e.severity,this.impact=e.impact,this.industry_sectors=[],e.industry_sectors&&(this.industry_sectors=Array.from(e.industry_sectors)),this.labels=[],e.labels&&(this.labels=Array.from(e.labels)),this.external_references=[],e.external_references&&(this.external_references=e.external_references.map((function(t){return new w(t)}))),this.markings=[],e.markings&&(this.markings=Array.from(e.markings)),this.playbook_variables={},e.playbook_variables){var i=e.playbook_variables[n];this.playbook_variables[n]=new P(i)}for(var n in this.workflow_start=e.workflow_start,this.workflow_exception=e.workflow_exception,this.workflow={},e.workflow){var r=e.workflow[n];this.workflow[n]=Mt.create(r)}for(var n in this.playbook_extensions={},e.playbook_extensions){var o=e.playbook_extensions[n];this.playbook_extensions[n]=o}for(var n in this.authentication_info_definitions={},e.authentication_info_definitions){var a=e.authentication_info_definitions[n];this.authentication_info_definitions[n]=le.create(a)}for(var n in this.agent_definitions={},e.agent_definitions){var s=e.agent_definitions[n];this.agent_definitions[n]=Jt.create(s)}for(var n in this.target_definitions={},e.target_definitions){var c=e.target_definitions[n];this.target_definitions[n]=Jt.create(c)}for(var n in this.extension_definitions={},e.extension_definitions)o=e.extension_definitions[n],this.extension_definitions[n]=new I(o);for(var n in this.data_marking_definitions={},e.data_marking_definitions){var h=e.data_marking_definitions[n];(h=ie.create(h))&&h.id&&(this.data_marking_definitions[h.id]=h)}this.signatures=[],e.signatures&&(this.signatures=e.signatures.map((function(t){return new O(t)})))}return t.prototype.updateObjectProperty=function(t,e){if("external_references"===e&&t.external_references)return this.external_references=t.external_references.map((function(t){return new w(t)})),!0;if("workflow"===e&&t.workflow){for(var n in this.workflow={},t.workflow){var i=t.workflow[n];this.workflow[n]=Mt.create(i)}return!0}if("agent_definitions"===e&&t.agent_definitions){for(var n in this.agent_definitions={},t.agent_definitions){var r=t.agent_definitions[n];this.agent_definitions[n]=Jt.create(r)}return!0}if("target_definitions"===e&&t.target_definitions){for(var n in this.target_definitions={},t.target_definitions){var o=t.target_definitions[n];this.target_definitions[n]=Jt.create(o)}return!0}if("extension_definitions"===e&&t.extension_definitions){for(var n in this.extension_definitions={},t.extension_definitions){var a=t.extension_definitions[n];this.extension_definitions[n]=new I(a)}return!0}if("data_marking_definitions"===e&&t.data_marking_definitions){for(var n in this.data_marking_definitions={},t.data_marking_definitions){var s=t.data_marking_definitions[n];(s=ie.create(s)).id=n,this.data_marking_definitions[s.id]=s}return!0}if("playbook_extensions"===e&&t.playbook_extensions)for(var n in this.playbook_extensions={},t.playbook_extensions)a=t.playbook_extensions[n],this.playbook_extensions[n]=a;else if("authentication_info_definitions"===e&&t.authentication_info_definitions)for(var n in this.authentication_info_definitions={},t.authentication_info_definitions){var c=t.authentication_info_definitions[n];this.authentication_info_definitions[n]=c}return!1},t.prototype.update=function(t){for(var e in t)t.hasOwnProperty(e)&&void 0!==t[e]&&e in this&&(this.updateObjectProperty(t,e)||(Array.isArray(t[e])?this[e]=Array.from(t[e]):this[e]=t[e]))},t}();const pe=function(){function t(){this.identifier="identity--"+T(),this.identifierPattern="^[a-z][a-z0-9-]+[a-z0-9]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",this.secretKey="-----BEGIN RSA PRIVATE KEY-----MIICWwIBAAKBgQDRhGF7X4A0ZVlEg594WmODVVUIiiPQs04aLmvfg8SborHss5gQXu0aIdUT6nb5rTh5hD2yfpF2WIW6M8z0WxRhwicgXwi80H1aLPf6lEPPLvN29EhQNjBpkFkAJUbS8uuhJEeKw0cE49g80eBBF4BCqSL6PFQbP9/rByxdxEoAIQIDAQABAoGAA9/q3Zk6ib2GFRpKDLO/O2KMnAfR+b4XJ6zMGeoZ7Lbpi3MW0Nawk9ckVaX0ZVGqxbSIX5Cvp/yjHHpww+QbUFrw/gCjLiiYjM9E8C3uAF5AKJ0r4GBPl4u8K4bpbXeSxSB60/wPQFiQAJVcA5xhZVzqNuF3EjuKdHsw+dk+dPECQQDubX/lVGFgD/xYuchz56Yc7VHX+58BUkNSewSzwJRbcueqknXRWwj97SXqpnYfKqZq78dnEF10SWsr/NMKi+7XAkEA4PVqDv/OZAbWr4syXZNv/Mpl4r5suzYMMUD9U8B2JIRnrhmGZPzLx23N9J4hEJ+Xh8tSKVc80jOkrvGlSv+BxwJAaTOtjA3YTV+gU7Hdza53sCnSw/8FYLrgc6NOJtYhX9xqdevbyn1lkU0zPr8mPYg/F84m6MXixm2iuSz8HZoyzwJARi2paYZ5/5B2lwroqnKdZBJMGKFpUDn7Mb5hiSgocxnvMkv6NjT66Xsi3iYakJII9q8CMa1qZvT/cigmdbAh7wJAQNXyoizuGEltiSaBXx4H29EdXNYWDJ9SS5f070BRbAIldqRh3rcNvpY6BKJqFapda1DjdcncZECMizT/GMrc1w==-----END RSA PRIVATE KEY-----",this.secretKeyPattern="^-----BEGIN PRIVATE KEY-----(.*)-----END PRIVATE KEY-----$",this.publicKey="-----BEGIN CERTIFICATE-----MIIBvTCCASYCCQD55fNzc0WF7TANBgkqhkiG9w0BAQUFADAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwHhcNMTAwNTI4MDIwODUxWhcNMjAwNTI1MDIwODUxWjAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANGEYXtfgDRlWUSDn3haY4NVVQiKI9CzThoua9+DxJuiseyzmBBe7Roh1RPqdvmtOHmEPbJ+kXZYhbozzPRbFGHCJyBfCLzQfVos9/qUQ88u83b0SFA2MGmQWQAlRtLy66EkR4rDRwTj2DzR4EEXgEKpIvo8VBs/3+sHLF3ESgAhAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAEZ6mXFFq3AzfaqWHmCy1ARjlauYAa8ZmUFnLm0emg9dkVBJ63aEqARhtok6bDQDzSJxiLpCEF6G4b/Nv/M/MLyhP+OoOTmETMegAVQMq71choVJyOFE5BtQa6M/lCHEOya5QUfoRF2HF9EjRF44K3OK+u3ivTSj3zwjtpudY5Xo=-----END CERTIFICATE-----",this.publicKeyPattern="^-----BEGIN PUBLIC KEY-----(.*)-----END PUBLIC KEY-----$"}return t.prototype.UserSettingsProps=function(){},Object.defineProperty(t.prototype,"isFulfil",{get:function(){return""!=this.identifier&&""!=this.secretKey&&""!=this.publicKey},enumerable:!1,configurable:!0}),t.prototype.showDialog=function(){var t,e=this,n=document.createElement("dialog");n.className="usersettings__dialog",n.addEventListener("keydown",(function(t){"escape"===t.code.toLowerCase()&&t.preventDefault()})),document.body.appendChild(n),n.appendChild(((t=document.createElement("div")).innerHTML="Settings",t.className="dialog__title",t));var i=fe("User identifier","identifier","input",this.identifier);n.appendChild(i);var r=fe("Secret key (Beta)","secretKey","textarea",this.secretKey);n.appendChild(r);var o=fe("Public key (Beta)","publicKey","textarea",this.publicKey);n.appendChild(o);var a=document.createElement("div");a.className="dialog__buttonList";var s=me("Confirm",!0),c=me("Cancel",!1);return a.appendChild(c),a.appendChild(s),n.appendChild(a),document.body.classList.add("blurred"),n.showModal(),new Promise((function(t){s.addEventListener("click",(function(){var a,s,c,h=i.getElementsByClassName("property__input")[0],u=o.getElementsByClassName("property__input")[0],l=r.getElementsByClassName("property__input")[0],d=!0;a=h.value,s=e.identifierPattern,c=RegExp(s),""==a||c.test(a)?h.classList.remove("input--incorrect"):(d=!1,h.classList.add("input--incorrect")),d&&(e.identifier=h.value,e.publicKey=u.value,e.secretKey=l.value,n.close(),n.remove(),document.body.classList.remove("blurred"),t(!0))})),c.addEventListener("click",(function(){n.close(),n.remove(),document.body.classList.remove("blurred"),t(!1)}))}))},t.instance=new t,t}();function fe(t,e,n,i){void 0===i&&(i="");var r=document.createElement("div");r.className="dialog__property",r.id=e;var o=document.createElement("div");o.innerHTML=t,o.className="property__label";var a=document.createElement(n);return a.className="property__input",a.value=i,r.appendChild(o),r.appendChild(a),r}function me(t,e){void 0===e&&(e=!0);var n=document.createElement("button");return n.className="dialog__button",n.innerText=t,e?n.classList.add("button--primary"):n.classList.add("button--secondary"),n}const ye=/^class[ {]/;function ge(t){return Array.isArray(t)}function ve(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function be(...t){1===t.length&&ge(t[0])&&(t=t[0]);const e=(t=[...t]).pop();return e.$inject=t,e}const _e=/constructor\s*[^(]*\(\s*([^)]*)\)/m,we=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,xe=/\/\*([^*]*)\*\//m;function Me(t){if("function"!=typeof t)throw new Error(`Cannot annotate "${t}". Expected a function!`);const e=t.toString().match(function(t){return ye.test(t.toString())}(t)?_e:we);if(!e)return[];const n=e[1]||e[2];return n&&n.split(",").map((t=>{const e=t.match(xe);return(e&&e[1]||t).trim()}))||[]}function ke(t,e){e=e||{get:function(t,e){if(n.push(t),!1===e)return null;throw a(`No provider for "${t}"!`)}};const n=[],i=this._providers=Object.create(e._providers||null),r=this._instances=Object.create(null),o=r.injector=this,a=function(t){const e=n.join(" -> ");return n.length=0,new Error(e?`${t} (Resolving: ${e})`:t)};function s(t,o){if(!i[t]&&-1!==t.indexOf(".")){const e=t.split(".");let n=s(e.shift());for(;e.length;)n=n[e.shift()];return n}if(ve(r,t))return r[t];if(ve(i,t)){if(-1!==n.indexOf(t))throw n.push(t),a("Cannot resolve circular dependency!");return n.push(t),r[t]=i[t][0](i[t][1]),n.pop(),r[t]}return e.get(t,o)}function c(t,e){if(void 0===e&&(e={}),"function"!=typeof t){if(!ge(t))throw a(`Cannot invoke "${t}". Expected a function!`);t=be(t.slice())}return{fn:t,dependencies:(t.$inject||Me(t)).map((t=>ve(e,t)?e[t]:s(t)))}}function h(t){const{fn:e,dependencies:n}=c(t);return new(Function.prototype.bind.apply(e,[null].concat(n)))}function u(t,e,n){const{fn:i,dependencies:r}=c(t,n);return i.apply(e,r)}function l(t){return be((e=>t.get(e)))}function d(t,e){if(e&&e.length){const n=Object.create(null),r=Object.create(null),o=[],a=[],s=[];let c,h,u,d;for(let t in i)c=i[t],-1!==e.indexOf(t)&&("private"===c[2]?(h=o.indexOf(c[3]),-1===h?(u=c[3].createChild([],e),d=l(u),o.push(c[3]),a.push(u),s.push(d),n[t]=[d,t,"private",u]):n[t]=[s[h],t,"private",a[h]]):n[t]=[c[2],c[1]],r[t]=!0),"factory"!==c[2]&&"type"!==c[2]||!c[1].$scope||e.forEach((e=>{-1!==c[1].$scope.indexOf(e)&&(n[t]=[c[2],c[1]],r[e]=!0)}));e.forEach((t=>{if(!r[t])throw new Error('No provider for "'+t+'". Cannot use provider from the parent!')})),t.unshift(n)}return new ke(t,o)}const p={factory:u,type:h,value:function(t){return t}};function f(t,e){const n=t.__init__||[];return function(){n.forEach((t=>{"string"==typeof t?e.get(t):e.invoke(t)}))}}function m(t){const e=t.__exports__;if(e){const n=t.__modules__,r=Object.keys(t).reduce(((e,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(e[n]=t[n]),e)),Object.create(null)),o=d((n||[]).concat(r)),a=be((function(t){return o.get(t)}));e.forEach((function(t){i[t]=[a,t,"private",o]}));const s=(t.__init__||[]).slice();return s.unshift((function(){o.init()})),f(t=Object.assign({},t,{__init__:s}),o)}return Object.keys(t).forEach((function(e){if("__init__"===e||"__depends__"===e)return;if("private"===t[e][2])return void(i[e]=t[e]);const n=t[e][0],r=t[e][1];i[e]=[p[n],Se(n,r),n]})),f(t,o)}function y(t,e){return-1!==t.indexOf(e)||-1!==(t=(e.__depends__||[]).reduce(y,t)).indexOf(e)?t:t.concat(e)}this.get=s,this.invoke=u,this.instantiate=h,this.createChild=d,this.init=function(t){const e=t.reduce(y,[]).map(m);let n=!1;return function(){n||(n=!0,e.forEach((t=>t())))}}(t)}function Se(t,e){return"value"!==t&&ge(e)&&(e=be(e.slice())),e}function Ee(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}var Ae=1e3;function Te(t,e){var n=this;e=e||Ae,t.on(["render.shape","render.connection"],e,(function(t,e){var i=t.type,r=e.element,o=e.gfx,a=e.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),t.on(["render.getShapePath","render.getConnectionPath"],e,(function(t,e){if(n.canRender(e))return"render.getShapePath"===t.type?n.getShapePath(e):n.getConnectionPath(e)}))}function Ce(t){return Array.prototype.concat.apply([],t)}Te.prototype.canRender=function(t){},Te.prototype.drawShape=function(t,e){},Te.prototype.drawConnection=function(t,e){},Te.prototype.getShapePath=function(t){},Te.prototype.getConnectionPath=function(t){};const je=Object.prototype.toString,Oe=Object.prototype.hasOwnProperty;function Pe(t){return void 0===t}function Ie(t){return void 0!==t}function $e(t){return null==t}function Re(t){return"[object Array]"===je.call(t)}function Le(t){return"[object Object]"===je.call(t)}function Ne(t){return"[object Number]"===je.call(t)}function Be(t){const e=je.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object AsyncGeneratorFunction]"===e||"[object Proxy]"===e}function De(t){return"[object String]"===je.call(t)}function Fe(t,e){return Oe.call(t,e)}function Ue(t,e){const n=tn(e);let i;return He(t,(function(t,e){if(n(t,e))return i=t,!1})),i}function ze(t,e){const n=tn(e);let i=[];return He(t,(function(t,e){n(t,e)&&i.push(t)})),i}function He(t,e){let n,i;if(Pe(t))return;const r=Re(t)?nn:en;for(let o in t)if(Fe(t,o)&&(n=t[o],i=e(n,r(o)),!1===i))return n}function qe(t,e,n){return He(t,(function(t,i){n=e(n,t,i)})),n}function Ve(t,e){return!!qe(t,(function(t,n,i){return t&&e(n,i)}),!0)}function Ke(t,e){return!!Ue(t,e)}function Ze(t,e){let n=[];return He(t,(function(t,i){n.push(e(t,i))})),n}function We(t){return Ze(t,(t=>t))}function Ge(t,e,n={}){return e=Qe(e),He(t,(function(t){let i=e(t)||"_",r=n[i];r||(r=n[i]=[]),r.push(t)})),n}function Je(t,...e){t=Qe(t);let n={};return He(e,(e=>Ge(e,t,n))),Ze(n,(function(t,e){return t[0]}))}function Xe(t,e){e=Qe(e);let n=[];return He(t,(function(t,i){let r=e(t,i),o={d:r,v:t};for(var a=0;at.v))}function Ye(t){return function(e){return Ve(t,(function(t,n){return e[n]===t}))}}function Qe(t){return Be(t)?t:e=>e[t]}function tn(t){return Be(t)?t:e=>e===t}function en(t){return t}function nn(t){return Number(t)}function rn(t,e){let n,i,r,o;function a(n){let a=Date.now(),h=n?0:o+e-a;if(h>0)return s(h);t.apply(r,i),c()}function s(t){n=setTimeout(a,t)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function h(...t){o=Date.now(),i=t,r=this,n||s(e)}return h.flush=function(){n&&a(!0),c()},h.cancel=c,h}function on(t,e){return t.bind(e)}function an(t,...e){return Object.assign(t,...e)}function sn(t,e){let n={},i=Object(t);return He(e,(function(e){e in i&&(n[e]=t[e])})),n}function cn(t,e){return e.appendChild(function(t,e){if(t.ownerDocument!==e.ownerDocument)try{return e.ownerDocument.importNode(t,!0)}catch(t){}return t}(t,e))}function hn(t,e){return cn(e,t),t}var un=2,ln={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":un,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":un,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function dn(t,e,n){var i=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=ln[i];r?(r===un&&"number"==typeof n&&(n=String(n)+"px"),t.style[i]=n):t.setAttributeNS(null,e,n)}function pn(t,e,n){if("string"==typeof e){if(void 0===n)return function(t,e){return ln[e]?t.style[e]:t.getAttributeNS(null,e)}(t,e);dn(t,e,n)}else!function(t,e){var n,i,r=Object.keys(e);for(n=0;i=r[n];n++)dn(t,i,e[i])}(t,e);return t}const fn=Object.prototype.toString;function mn(t){return new yn(t)}function yn(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}function gn(t){var e=t.parentNode;return e&&e.removeChild(t),t}function vn(t){for(var e;e=t.firstChild;)gn(e);return t}function bn(t){return t.cloneNode(!0)}yn.prototype.add=function(t){return this.list.add(t),this},yn.prototype.remove=function(t){return"[object RegExp]"==fn.call(t)?this.removeMatching(t):(this.list.remove(t),this)},yn.prototype.removeMatching=function(t){const e=this.array();for(let n=0;n"+t+"",e=!0);var n=function(t){var e;return(e=new DOMParser).async=!1,e.parseFromString(t,"text/xml")}(t);if(!e)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Mn(t,e){var n;return"<"===t.charAt(0)?(n=xn(t).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(_n.svg,t),e&&pn(n,e),n}var kn=null;function Sn(){return null===kn&&(kn=Mn("svg")),kn}function En(t,e){var n,i,r=Object.keys(e);for(n=0;i=r[n];n++)t[i]=e[i];return t}function An(t){return t?Sn().createSVGTransformFromMatrix(t):Sn().createSVGTransform()}var Tn=/([&<>]{1})/g,Cn=/([\n\r"]{1})/g,jn={"&":"&","<":"<",">":">",'"':"'"};function On(t,e){return t.replace(e,(function(t,e){return jn[e]||e}))}function Pn(t,e){var n,i,r,o,a;switch(t.nodeType){case 3:e.push(On(t.textContent,Tn));break;case 1:if(e.push("<",t.tagName),t.hasAttributes())for(n=0,i=(r=t.attributes).length;n"),n=0,i=(a=t.childNodes).length;n")}else e.push("/>");break;case 8:e.push("\x3c!--",On(t.nodeValue,Tn),"--\x3e");break;case 4:e.push("");break;default:throw new Error("unable to handle node "+t.nodeType)}return e}function In(t,e){if(void 0!==e){try{!function(t,e){var n=xn(e);if(vn(t),e){(function(t){return"#document-fragment"===t.nodeName})(n)||(n=n.documentElement);for(var i,r=(i=n.childNodes,Array.prototype.slice.call(i)),o=0;or||void 0===r)&&(r=s+u),(c+h>o||void 0===o)&&(o=c+h)})),{x:n,y:i,height:o-i,width:r-n}}function Gn(t){return"waypoints"in t?"connection":"x"in t?"shape":"root"}function Jn(t){return!(!t||!t.isFrame)}function Xn(t,e){return an({},t||{},e||{})}function Yn(t,e){Te.call(this,t,1),this.CONNECTION_STYLE=e.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=e.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=e.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}Ee(Yn,Te),Yn.prototype.canRender=function(){return!0},Yn.prototype.drawShape=function(t,e,n){var i=Mn("rect");return pn(i,{x:0,y:0,width:e.width||0,height:e.height||0}),Jn(e)?pn(i,an({},this.FRAME_STYLE,n||{})):pn(i,an({},this.SHAPE_STYLE,n||{})),hn(t,i),i},Yn.prototype.drawConnection=function(t,e,n){var i=Un(e.waypoints,an({},this.CONNECTION_STYLE,n||{}));return hn(t,i),i},Yn.prototype.getShapePath=function(t){var e=t.x,n=t.y,i=t.width;return Ln([["M",e,n],["l",i,0],["l",0,t.height],["l",-i,0],["z"]])},Yn.prototype.getConnectionPath=function(t){var e,n,i=t.waypoints,r=[];for(e=0;n=i[e];e++)n=n.original||n,r.push([0===e?"M":"L",n.x,n.y]);return Ln(r)},Yn.$inject=["eventBus","styles"];const Qn={__init__:["defaultRenderer"],defaultRenderer:["type",Yn],styles:["type",function(){var t={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},e=this;this.cls=function(t,e,n){return an(this.style(e,n),{class:t})},this.style=function(e,n){Re(e)||n||(n=e,e=[]);var i=qe(e,(function(e,n){return an(e,t[n]||{})}),{});return n?an(i,n):i},this.computeStyle=function(t,n,i){return Re(n)||(i=n,n=[]),e.style(n||[],an({},i,t||{}))}}]};function ti(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}const ei=Object.prototype.toString,ni=Object.prototype.hasOwnProperty;function ii(t,e){return ni.call(t,e)}function ri(t,e){let n,i;if(void 0===t)return;const r=(o=t,"[object Array]"===ei.call(o)?ai:oi);var o;for(let o in t)if(ii(t,o)&&(n=t[o],i=e(n,r(o)),!1===i))return n}function oi(t){return t}function ai(t){return Number(t)}function si(t,...e){const n=t.style;return ri(e,(function(t){t&&ri(t,(function(t,e){n[e]=t}))})),t}function ci(t,e,n){return 2==arguments.length?t.getAttribute(e):null===n?t.removeAttribute(e):(t.setAttribute(e,n),t)}const hi=Object.prototype.toString;function ui(t){return new li(t)}function li(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}function di(t){for(var e;t.childNodes.length;)e=t.childNodes[0],t.removeChild(e);return t}function pi(t,e){return t&&"function"==typeof t.matches&&t.matches(e)}function fi(t,e,n){for(var i=n?t:t.parentNode;i&&i.nodeType!==document.DOCUMENT_NODE&&i.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(pi(i,e))return i;i=i.parentNode}return pi(i,e)?i:null}li.prototype.add=function(t){return this.list.add(t),this},li.prototype.remove=function(t){return"[object RegExp]"==hi.call(t)?this.removeMatching(t):(this.list.remove(t),this)},li.prototype.removeMatching=function(t){const e=this.array();for(let n=0;n
a',Si=!_i.getElementsByTagName("link").length,_i=void 0);var Ei={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:Si?[1,"X
","
"]:[0,"",""]};Ei.td=Ei.th=[3,"","
"],Ei.option=Ei.optgroup=[1,'"],Ei.thead=Ei.tbody=Ei.colgroup=Ei.caption=Ei.tfoot=[1,"","
"],Ei.polyline=Ei.ellipse=Ei.polygon=Ei.circle=Ei.text=Ei.line=Ei.path=Ei.rect=Ei.g=[1,'',""];var Ai=function(t,e){if("string"!=typeof t)throw new TypeError("String expected");e||(e=document);var n=/<([\w:]+)/.exec(t);if(!n)return e.createTextNode(t);t=t.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i)return(r=e.createElement("html")).innerHTML=t,r.removeChild(r.lastChild);var r,o=Object.prototype.hasOwnProperty.call(Ei,i)?Ei[i]:Ei._default,a=o[0],s=o[1],c=o[2];for((r=e.createElement("div")).innerHTML=s+t+c;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);for(var h=e.createDocumentFragment();r.firstChild;)h.appendChild(r.removeChild(r.firstChild));return h};function Ti(t,e){return(e=e||document).querySelector(t)}function Ci(t,e){return(e=e||document).querySelectorAll(t)}function ji(t){t.parentNode&&t.parentNode.removeChild(t)}function Oi(t,e){if(!t||!e)return-1;var n=t.indexOf(e);return-1!==n&&t.splice(n,1),n}function Pi(t,e,n){if(t&&e){"number"!=typeof n&&(n=-1);var i=t.indexOf(e);if(-1!==i){if(i===n)return;if(-1===n)return;t.splice(i,1)}-1!==n?t.splice(n,0,e):t.push(e)}}function Ii(t,e){return t&&e?t.indexOf(e):-1}function $i(t,e){return t&&e?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):-1}function Ri(t,e,n,i){if(void 0===i&&(i=5),!t||!e||!n)return!1;var r=(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),o=$i(t,e);return Math.abs(r/o)<=i}var Li=2;function Ni(t,e){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[t,e]of Object.entries(i))if(Bi(t,n))return e;return!1}function Bi(t,e){const n=e[0];return Ve(e,(function(e){return Math.abs(n[t]-e[t])<=Li}))}function Di(t,e,n){return n=n||0,t.x>e.x-n&&t.y>e.y-n&&t.x=r.right,s=i.top-n.y>=r.bottom,c=o?"top":s?"bottom":null,h=i.right+n.x<=r.left?"left":a?"right":null;return h&&c?c+"-"+h:h||c||"intersect"}function Ji(t,e,n){var i,r,o=(i=t,r=e,zi()(i,r));return 1===o.length||2===o.length&&$i(o[0],o[1])<1?Vi(o[0]):o.length>1?Vi((o=Xe(o,(function(t){var e=Math.floor(100*t.t2)||1;return e=((e=100-e)<10?"0":"")+e,t.segment2+"#"+e})))[n?0:o.length-1]):null}function Xi(t,e){return Math.round(t*e)/e}function Yi(t){return Ne(t)?t+"px":t}function Qi(t,e,n){const i=Mn("g");mn(i).add(e);const r=void 0!==n?n:t.childNodes.length-1;return t.insertBefore(i,t.childNodes[r]||null),i}const tr={shape:["x","y","width","height"],connection:["waypoints"]};function er(t,e,n,i){this._eventBus=e,this._elementRegistry=i,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(t||{})}function nr(t,e){const n="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")";t.setAttribute("transform",n)}er.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],er.prototype._init=function(t){const e=this._eventBus,n=this._container=function(t){const e=(t=an({},{width:"100%",height:"100%"},t)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),si(n,{position:"relative",overflow:"hidden",width:Yi(t.width),height:Yi(t.height)}),e.appendChild(n),n}(t),i=this._svg=Mn("svg");pn(i,{width:"100%",height:"100%"}),hn(n,i);const r=this._viewport=Qi(i,"viewport");!1!==t.deferUpdate&&(this._viewboxChanged=rn(on(this._viewboxChanged,this),300)),e.on("diagram.init",(()=>{e.fire("canvas.init",{svg:i,viewport:r})})),e.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],(()=>{delete this._cachedViewbox})),e.on("diagram.destroy",500,this._destroy,this),e.on("diagram.clear",500,this._clear,this)},er.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport},er.prototype._clear=function(){this._elementRegistry.getAll().forEach((t=>{const e=Gn(t);"root"===e?this.removeRootElement(t):this._removeElement(t,e)})),this._planes=[],this._rootElement=null,delete this._cachedViewbox},er.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},er.prototype.getLayer=function(t,e){if(!t)throw new Error("must specify a name");let n=this._layers[t];if(n||(n=this._layers[t]=this._createLayer(t,e)),void 0!==e&&n.index!==e)throw new Error("layer <"+t+"> already created at index <"+e+">");return n.group},er.prototype._getChildIndex=function(t){return qe(this._layers,(function(e,n){return n.visible&&t>=n.index&&e++,e}),0)},er.prototype._createLayer=function(t,e){void 0===e&&(e=1);const n=this._getChildIndex(e);return{group:Qi(this._viewport,"layer-"+t,n),index:e,visible:!0}},er.prototype.showLayer=function(t){if(!t)throw new Error("must specify a name");const e=this._layers[t];if(!e)throw new Error("layer <"+t+"> does not exist");const n=this._viewport,i=e.group,r=e.index;if(e.visible)return i;const o=this._getChildIndex(r);return n.insertBefore(i,n.childNodes[o]||null),e.visible=!0,i},er.prototype.hideLayer=function(t){if(!t)throw new Error("must specify a name");const e=this._layers[t];if(!e)throw new Error("layer <"+t+"> does not exist");const n=e.group;return e.visible?(gn(n),e.visible=!1,n):n},er.prototype._removeLayer=function(t){const e=this._layers[t];e&&(delete this._layers[t],gn(e.group))},er.prototype.getActiveLayer=function(){const t=this._findPlaneForRoot(this.getRootElement());return t?t.layer:null},er.prototype.findRoot=function(t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),!t)return;const e=this._findPlaneForRoot(function(t){for(;t.parent;)t=t.parent;return t}(t))||{};return e.rootElement},er.prototype.getRootElements=function(){return this._planes.map((function(t){return t.rootElement}))},er.prototype._findPlaneForRoot=function(t){return Ue(this._planes,(function(e){return e.rootElement===t}))},er.prototype.getContainer=function(){return this._container},er.prototype._updateMarker=function(t,e,n){let i;t.id||(t=this._elementRegistry.get(t)),i=this._elementRegistry._elements[t.id],i&&(He([i.gfx,i.secondaryGfx],(function(t){t&&(n?mn(t).add(e):mn(t).remove(e))})),this._eventBus.fire("element.marker.update",{element:t,gfx:i.gfx,marker:e,add:!!n}))},er.prototype.addMarker=function(t,e){this._updateMarker(t,e,!0)},er.prototype.removeMarker=function(t,e){this._updateMarker(t,e,!1)},er.prototype.hasMarker=function(t,e){return t.id||(t=this._elementRegistry.get(t)),mn(this.getGraphics(t)).has(e)},er.prototype.toggleMarker=function(t,e){this.hasMarker(t,e)?this.removeMarker(t,e):this.addMarker(t,e)},er.prototype.getRootElement=function(){const t=this._rootElement;return t||this._planes.length?t:this.setRootElement(this.addRootElement(null))},er.prototype.addRootElement=function(t){const e=this._rootsIdx++;t||(t={id:"__implicitroot_"+e,children:[],isImplicit:!0});const n=t.layer="root-"+e;this._ensureValid("root",t);const i=this.getLayer(n,0);return this.hideLayer(n),this._addRoot(t,i),this._planes.push({rootElement:t,layer:i}),t},er.prototype.removeRootElement=function(t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),this._findPlaneForRoot(t))return this._removeRoot(t),this._removeLayer(t.layer),this._planes=this._planes.filter((function(e){return e.rootElement!==t})),this._rootElement===t&&(this._rootElement=null),t},er.prototype.setRootElement=function(t){if(t===this._rootElement)return;let e;if(!t)throw new Error("rootElement required");return e=this._findPlaneForRoot(t),e||(t=this.addRootElement(t)),this._setRoot(t),t},er.prototype._removeRoot=function(t){const e=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:t}),n.fire("root.removed",{element:t}),e.remove(t)},er.prototype._addRoot=function(t,e){const n=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:t}),n.add(t,e),i.fire("root.added",{element:t,gfx:e})},er.prototype._setRoot=function(t,e){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),t&&(e||(e=this._findPlaneForRoot(t).layer),this._elementRegistry.updateGraphics(t,this._svg,!0),this.showLayer(t.layer)),this._rootElement=t,this._eventBus.fire("root.set",{element:t})},er.prototype._ensureValid=function(t,e){if(!e.id)throw new Error("element must have an id");if(this._elementRegistry.get(e.id))throw new Error("element <"+e.id+"> already exists");const n=tr[t],i=Ve(n,(function(t){return void 0!==e[t]}));if(!i)throw new Error("must supply { "+n.join(", ")+" } with "+t)},er.prototype._setParent=function(t,e,n){Pi(e.children,t,n),t.parent=e},er.prototype._addElement=function(t,e,n,i){n=n||this.getRootElement();const r=this._eventBus,o=this._graphicsFactory;this._ensureValid(t,e),r.fire(t+".add",{element:e,parent:n}),this._setParent(e,n,i);const a=o.create(t,e,i);return this._elementRegistry.add(e,a),o.update(t,e,a),r.fire(t+".added",{element:e,gfx:a}),e},er.prototype.addShape=function(t,e,n){return this._addElement("shape",t,e,n)},er.prototype.addConnection=function(t,e,n){return this._addElement("connection",t,e,n)},er.prototype._removeElement=function(t,e){const n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(t=n.get(t.id||t))return r.fire(e+".remove",{element:t}),i.remove(t),Oi(t.parent&&t.parent.children,t),t.parent=null,r.fire(e+".removed",{element:t}),n.remove(t),t},er.prototype.removeShape=function(t){return this._removeElement(t,"shape")},er.prototype.removeConnection=function(t){return this._removeElement(t,"connection")},er.prototype.getGraphics=function(t,e){return this._elementRegistry.getGraphics(t,e)},er.prototype._changeViewbox=function(t){this._eventBus.fire("canvas.viewbox.changing"),t.apply(this),this._cachedViewbox=null,this._viewboxChanged()},er.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},er.prototype.viewbox=function(t){if(void 0===t&&this._cachedViewbox)return this._cachedViewbox;const e=this._viewport,n=this.getSize();let i,r,o,a,s,c,h;return t?(this._changeViewbox((function(){s=Math.min(n.width/t.width,n.height/t.height);const i=this._svg.createSVGMatrix().scale(s).translate(-t.x,-t.y);Rn(e,i)})),t):(o=this._rootElement?this.getActiveLayer():null,i=o&&o.getBBox()||{},a=Rn(e),r=a?a.matrix:function(t,e,n,i,r,o){var a=Sn().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return En(a,t);case 6:return En(a,{a:t,b:e,c:n,d:i,e:r,f:o})}}(),s=Xi(r.a,1e3),c=Xi(-r.e||0,1e3),h=Xi(-r.f||0,1e3),t=this._cachedViewbox={x:c?c/s:0,y:h?h/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:n})},er.prototype.scroll=function(t){const e=this._viewport;let n=e.getCTM();return t&&this._changeViewbox((function(){t=an({dx:0,dy:0},t||{}),n=this._svg.createSVGMatrix().translate(t.dx,t.dy).multiply(n),nr(e,n)})),{x:n.e,y:n.f}},er.prototype.scrollToElement=function(t,e){let n=100;"string"==typeof t&&(t=this._elementRegistry.get(t));const i=this.findRoot(t);i!==this.getRootElement()&&this.setRootElement(i),e||(e={}),"number"==typeof e&&(n=e),e={top:e.top||n,right:e.right||n,bottom:e.bottom||n,left:e.left||n};const r=Wn(t),o=Ki(r),a=this.viewbox(),s=this.zoom();let c,h;a.y+=e.top/s,a.x+=e.left/s,a.width-=(e.right+e.left)/s,a.height-=(e.bottom+e.top)/s;const u=Ki(a);if(r.width=0&&i.y>=0&&i.x+i.width<=n.width&&i.y+i.height<=n.height&&!t?o={x:0,y:0,width:Math.max(i.width+i.x,n.width),height:Math.max(i.height+i.y,n.height)}:(r=Math.min(1,n.width/i.width,n.height/i.height),o={x:i.x+(t?i.width/2-n.width/r/2:0),y:i.y+(t?i.height/2-n.height/r/2:0),width:n.width/r,height:n.height/r}),this.viewbox(o),this.viewbox(!1).scale},er.prototype._setZoom=function(t,e){const n=this._svg,i=this._viewport,r=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,h,u;c=i.getCTM();const l=c.a;return e?(a=an(o,e),s=a.matrixTransform(c.inverse()),h=r.translate(s.x,s.y).scale(1/l*t).translate(-s.x,-s.y),u=c.multiply(h)):u=r.scale(t),nr(this._viewport,u),u},er.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},er.prototype.getAbsoluteBBox=function(t){const e=this.viewbox();let n;return n=t.waypoints?this.getGraphics(t).getBBox():t,{x:n.x*e.scale-e.x*e.scale,y:n.y*e.scale-e.y*e.scale,width:n.width*e.scale,height:n.height*e.scale}},er.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var ir="data-element-id";function rr(t){this._elements={},this._eventBus=t}rr.$inject=["eventBus"],rr.prototype.add=function(t,e,n){var i=t.id;this._validateId(i),pn(e,ir,i),n&&pn(n,ir,i),this._elements[i]={element:t,gfx:e,secondaryGfx:n}},rr.prototype.remove=function(t){var e=this._elements,n=t.id||t,i=n&&e[n];i&&(pn(i.gfx,ir,""),i.secondaryGfx&&pn(i.secondaryGfx,ir,""),delete e[n])},rr.prototype.updateId=function(t,e){this._validateId(e),"string"==typeof t&&(t=this.get(t)),this._eventBus.fire("element.updateId",{element:t,newId:e});var n=this.getGraphics(t),i=this.getGraphics(t,!0);this.remove(t),t.id=e,this.add(t,n,i)},rr.prototype.updateGraphics=function(t,e,n){var i=t.id||t,r=this._elements[i];return n?r.secondaryGfx=e:r.gfx=e,e&&pn(e,ir,i),e},rr.prototype.get=function(t){var e;e="string"==typeof t?t:t&&pn(t,ir);var n=this._elements[e];return n&&n.element},rr.prototype.filter=function(t){var e=[];return this.forEach((function(n,i){t(n,i)&&e.push(n)})),e},rr.prototype.find=function(t){for(var e=this._elements,n=Object.keys(e),i=0;i");return an(new n,e)}(t,e)};var br="__fn",_r=Array.prototype.slice;function wr(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function xr(){}function Mr(t){return t.childNodes[0]}function kr(t,e,n,i,r){var o=An();o.setTranslate(e,n);var a=An();a.setRotate(i||0,0,0);var s=An();s.setScale(r||1,r||1),Rn(t,[o,a,s])}function Sr(t,e,n){var i=An();i.setTranslate(e,n),Rn(t,i)}function Er(t,e){this._eventBus=t,this._elementRegistry=e}function Ar(t,e,n){var i=n||e.firstChild;t!==i&&e.insertBefore(t,i)}wr.prototype.on=function(t,e,n,i){if(t=Re(t)?t:[t],Be(e)&&(i=n,n=e,e=1e3),!Ne(e))throw new Error("priority must be a number");var r=n;i&&((r=on(n,i))[br]=n[br]||n);var o=this;t.forEach((function(t){o._addListener(t,{priority:e,callback:r,next:null})}))},wr.prototype.once=function(t,e,n,i){var r=this;if(Be(e)&&(i=n,n=e,e=1e3),!Ne(e))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var e=n.apply(i,arguments);return r.off(t,o),e}o[br]=n,this.on(t,e,o)},wr.prototype.off=function(t,e){t=Re(t)?t:[t];var n=this;t.forEach((function(t){n._removeListener(t,e)}))},wr.prototype.createEvent=function(t){var e=new xr;return e.init(t),e},wr.prototype.fire=function(t,e){var n,i,r,o;if(o=_r.call(arguments),"object"==typeof t&&(t=(e=t).type),!t)throw new Error("no event type specified");if(i=this._listeners[t]){n=e instanceof xr?e:this.createEvent(e),o[0]=n;var a=n.type;t!==a&&(n.type=t);try{r=this._invokeListeners(n,o,i)}finally{t!==a&&(n.type=a)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},wr.prototype.handleError=function(t){return!1===this.fire("error",{error:t})},wr.prototype._destroy=function(){this._listeners={}},wr.prototype._invokeListeners=function(t,e,n){for(var i;n&&!t.cancelBubble;)i=this._invokeListener(t,e,n),n=n.next;return i},wr.prototype._invokeListener=function(t,e,n){var i;if(n.callback.__isTomb)return i;try{i=function(t,e){return t.apply(null,e)}(n.callback,e),void 0!==i&&(t.returnValue=i,t.stopPropagation()),!1===i&&t.preventDefault()}catch(t){if(!this.handleError(t))throw console.error("unhandled error in event listener",t),t}return i},wr.prototype._addListener=function(t,e){var n,i=this._getListeners(t);if(i){for(;i;){if(i.priority{this._fire(e,"revert",t),i.revert&&this._markDirty(i.revert(n)),this._revertedAction(t),this._fire(e,"reverted",t)}))},jr.prototype._fire=function(t,e,n){arguments.length<3&&(n=e,e=null);const i=e?[t+"."+e,e]:[t];let r;n=this._eventBus.createEvent(n);for(const t of i)if(r=this._eventBus.fire("commandStack."+t,n),n.cancelBubble)break;return r},jr.prototype._createId=function(){return this._uid++},jr.prototype._atomicDo=function(t){const e=this._currentExecution;e.atomic=!0;try{t()}finally{e.atomic=!1}},jr.prototype._internalExecute=function(t,e){const n=t.command,i=t.context,r=this._getHandler(n);if(!r)throw new Error("no command handler registered for <"+n+">");this._pushAction(t),e||(this._fire(n,"preExecute",t),r.preExecute&&r.preExecute(i),this._fire(n,"preExecuted",t)),this._atomicDo((()=>{this._fire(n,"execute",t),r.execute&&this._markDirty(r.execute(i)),this._executedAction(t,e),this._fire(n,"executed",t)})),e||(this._fire(n,"postExecute",t),r.postExecute&&r.postExecute(i),this._fire(n,"postExecuted",t)),this._popAction()},jr.prototype._pushAction=function(t){const e=this._currentExecution,n=e.actions,i=n[0];if(e.atomic)throw new Error("illegal invocation in or phase (action: "+t.command+")");t.id||(t.id=i&&i.id||this._createId()),n.push(t)},jr.prototype._popAction=function(){const t=this._currentExecution,e=t.trigger,n=t.actions,i=t.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:Je("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:e}),t.trigger=null)},jr.prototype._markDirty=function(t){const e=this._currentExecution;t&&(t=Re(t)?t:[t],e.dirty=e.dirty.concat(t))},jr.prototype._executedAction=function(t,e){const n=++this._stackIdx;e||this._stack.splice(n,this._stack.length,t)},jr.prototype._revertedAction=function(t){this._stackIdx--},jr.prototype._getHandler=function(t){return this._handlerMap[t]},jr.prototype._setHandler=function(t,e){if(!t||!e)throw new Error("command and handler required");if(this._handlerMap[t])throw new Error("overriding handler for command <"+t+">");this._handlerMap[t]=e};const Or={commandStack:["type",jr]};function Pr(t,e,n,i){t.on("element.changed",(function(i){var r=i.element;(r.parent||r===e.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&t.fire(Gn(r)+".changed",i)})),t.on("elements.changed",(function(e){var n=e.elements;n.forEach((function(e){t.fire("element.changed",{element:e})})),i.updateContainments(n)})),t.on("shape.changed",(function(t){i.update("shape",t.element,t.gfx)})),t.on("connection.changed",(function(t){i.update("connection",t.element,t.gfx)}))}Pr.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const Ir={__init__:["changeSupport"],changeSupport:["type",Pr]};function $r(t){t&&"function"==typeof t.stopPropagation&&t.stopPropagation()}function Rr(t){return t.originalEvent||t.srcEvent}function Lr(t){$r(t),$r(Rr(t))}function Nr(t){return t.pointers&&t.pointers.length&&(t=t.pointers[0]),t.touches&&t.touches.length&&(t=t.touches[0]),t?{x:t.clientX,y:t.clientY}:null}function Br(t,e){return(Rr(t)||t).button===e}function Dr(t){return Br(t,0)}function Fr(t){var e=Rr(t)||t;return!!Dr(t)&&(/mac/i.test(navigator.platform)?e.metaKey:e.ctrlKey)}function Ur(t){var e=Rr(t)||t;return Dr(t)&&e.shiftKey}function zr(t){return!0}function Hr(t){return Dr(t)||function(t){return Br(t,1)}(t)}function qr(t,e,n){var i=this;function r(n,i,r){var o,a;(function(t,e){return!(c[t]||Dr)(e)})(n,i)||(r?a=e.getGraphics(r):(o=i.delegateTarget||i.target)&&(a=o,r=e.get(a)),a&&r&&!1===t.fire(n,{element:r,gfx:a,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var o={};function a(t){return o[t]}var s={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":zr,"element.mousedown":Hr,"element.mouseup":Hr,"element.click":Hr,"element.dblclick":Hr};function h(t,e,n,i){var a=o[n]=function(t){r(n,t)};i&&(c[n]=i),a.$delegate=Mi(t,"svg, .djs-element",e,a)}function u(t,e,n){var i=a(n);i&&ki(t,e,i.$delegate)}t.on("canvas.destroy",(function(t){var e;e=t.svg,He(s,(function(t,n){u(e,n,t)}))})),t.on("canvas.init",(function(t){var e;e=t.svg,He(s,(function(t,n){h(e,n,t)}))})),t.on(["shape.added","connection.added"],(function(e){var n=e.element,i=e.gfx;t.fire("interactionEvents.createHit",{element:n,gfx:i})})),t.on(["shape.changed","connection.changed"],500,(function(e){var n=e.element,i=e.gfx;t.fire("interactionEvents.updateHit",{element:n,gfx:i})})),t.on("interactionEvents.createHit",500,(function(t){var e=t.element,n=t.gfx;i.createDefaultHit(e,n)})),t.on("interactionEvents.updateHit",(function(t){var e=t.element,n=t.gfx;i.updateDefaultHit(e,n)}));var l=f("djs-hit djs-hit-stroke"),d=f("djs-hit djs-hit-click-stroke"),p={all:f("djs-hit djs-hit-all"),"click-stroke":d,stroke:l,"no-move":f("djs-hit djs-hit-no-move")};function f(t,e){return e=an({stroke:"white",strokeWidth:15},e||{}),n.cls(t,["no-fill","no-border"],e)}function m(t,e){var n=p[e];if(!n)throw new Error("invalid hit type <"+e+">");return pn(t,n),t}function y(t,e){hn(t,e)}this.removeHits=function(t){He(Ci(".djs-hit",t),gn)},this.createDefaultHit=function(t,e){var n,i=t.waypoints,r=t.isFrame;return i?this.createWaypointsHit(e,i):(n=r?"stroke":"all",this.createBoxHit(e,n,{width:t.width,height:t.height}))},this.createWaypointsHit=function(t,e){var n=Un(e);return m(n,"stroke"),y(t,n),n},this.createBoxHit=function(t,e,n){n=an({x:0,y:0},n);var i=Mn("rect");return m(i,e),pn(i,n),y(t,i),i},this.updateDefaultHit=function(t,e){var n=Ti(".djs-hit",e);if(n)return t.waypoints?zn(n,t.waypoints):pn(n,{width:t.width,height:t.height}),n},this.fire=r,this.triggerMouseEvent=function(t,e,n){var i=s[t];if(!i)throw new Error("unmapped DOM event name <"+t+">");return r(i,e,n)},this.mouseHandler=a,this.registerEvent=h,this.unregisterEvent=u}qr.$inject=["eventBus","elementRegistry","styles"];const Vr={__init__:["interactionEvents"],interactionEvents:["type",qr]};function Kr(t,e){this.offset=6;var n=e.cls("djs-outline",["no-fill"]),i=this;function r(t,e){var i=Mn("rect");return pn(i,an({x:10,y:10,rx:4,width:100,height:100},n)),hn(t,i),i}t.on(["shape.added","shape.changed"],500,(function(t){var e=t.element,n=t.gfx,o=Ti(".djs-outline",n);o||(o=r(n)),i.updateShapeOutline(o,e)})),t.on(["connection.added","connection.changed"],(function(t){var e=t.element,n=t.gfx,o=Ti(".djs-outline",n);o||(o=r(n)),i.updateConnectionOutline(o,e)}))}Kr.prototype.updateShapeOutline=function(t,e){pn(t,{x:-this.offset,y:-this.offset,width:e.width+2*this.offset,height:e.height+2*this.offset})},Kr.prototype.updateConnectionOutline=function(t,e){var n=Wn(e);pn(t,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Kr.$inject=["eventBus","styles","elementRegistry"];const Zr={__init__:["outline"],outline:["type",Kr]};function Wr(t,e){this._eventBus=t,this._canvas=e,this._selectedElements=[];var n=this;t.on(["shape.remove","connection.remove"],(function(t){var e=t.element;n.deselect(e)})),t.on(["diagram.clear","root.set"],(function(t){n.select(null)}))}Wr.$inject=["eventBus","canvas"],Wr.prototype.deselect=function(t){var e=this._selectedElements,n=e.indexOf(t);if(-1!==n){var i=e.slice();e.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:e})}},Wr.prototype.get=function(){return this._selectedElements},Wr.prototype.isSelected=function(t){return-1!==this._selectedElements.indexOf(t)},Wr.prototype.select=function(t,e){var n=this._selectedElements,i=n.slice();Re(t)||(t=t?[t]:[]);var r=this._canvas,o=r.getRootElement();t=t.filter((function(t){var e=r.findRoot(t);return o===e})),e?He(t,(function(t){-1===n.indexOf(t)&&n.push(t)})):this._selectedElements=n=t.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};var Gr="hover",Jr="selected";function Xr(t,e,n){this._canvas=t;var i=this;function r(e,n){t.addMarker(e,n)}function o(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",(function(t){r(t.element,Gr)})),e.on("element.out",(function(t){o(t.element,Gr)})),e.on("selection.changed",(function(t){var e=t.oldSelection,n=t.newSelection;He(e,(function(t){-1===n.indexOf(t)&&o(t,Jr)})),He(n,(function(t){-1===e.indexOf(t)&&r(t,Jr)})),i._updateSelectionOutline(n)})),e.on("element.changed",(function(t){n.isSelected(t.element)&&i._updateSelectionOutline(n.get())}))}function Yr(t,e,n,i){t.on("create.end",500,(function(t){var n=t.context,i=n.canExecute,r=n.elements,o=(n.hints||{}).autoSelect;if(i){if(!1===o)return;Re(o)?e.select(o):e.select(r.filter(Qr))}})),t.on("connect.end",500,(function(t){var n=t.context.connection;n&&e.select(n)})),t.on("shape.move.end",500,(function(t){var n=t.previousSelection||[],r=i.get(t.context.shape.id);Ue(n,(function(t){return r.id===t.id}))||e.select(r)})),t.on("element.click",(function(t){if(Dr(t)){var i=t.element;i===n.getRootElement()&&(i=null);var r=e.isSelected(i),o=e.get().length>1,a=Fr(t)||Ur(t);if(r&&o)return a?e.deselect(i):e.select(i);r?e.deselect(i):e.select(i,a)}}))}function Qr(t){return!t.hidden}Xr.$inject=["canvas","eventBus","selection"],Xr.prototype._updateSelectionOutline=function(t){var e=this._canvas.getLayer("selectionOutline");vn(e);var n=t.length>1;if(mn(this._canvas.getContainer())[n?"add":"remove"]("djs-multi-select"),n){var i=function(t){return{x:t.x-6,y:t.y-6,width:t.width+12,height:t.height+12}}(Wn(t)),r=Mn("rect");pn(r,an({rx:3},i)),mn(r).add("djs-selection-outline"),hn(e,r)}},Yr.$inject=["eventBus","selection","canvas","elementRegistry"];const to={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Vr,Zr],selection:["type",Wr],selectionVisuals:["type",Xr],selectionBehavior:["type",Yr]};function eo(t){this._commandStack=t.get("commandStack",!1)}eo.$inject=["injector"],eo.prototype.allowed=function(t,e){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(t,e)),void 0===n||n};const no={__init__:["rules"],rules:["type",eo]};function io(t,e){this._modeling=t,this._canvas=e}function ro(t){this._modeling=t}function oo(t,e){this._canvas=t,this._layouter=e}io.$inject=["modeling","canvas"],io.prototype.preExecute=function(t){var e=this._modeling,n=t.elements,i=t.alignment;He(n,(function(t){var n={x:0,y:0};Ie(i.left)?n.x=i.left-t.x:Ie(i.right)?n.x=i.right-t.width-t.x:Ie(i.center)?n.x=i.center-Math.round(t.width/2)-t.x:Ie(i.top)?n.y=i.top-t.y:Ie(i.bottom)?n.y=i.bottom-t.height-t.y:Ie(i.middle)&&(n.y=i.middle-Math.round(t.height/2)-t.y),e.moveElements([t],n,t.parent)}))},io.prototype.postExecute=function(t){},ro.$inject=["modeling"],ro.prototype.preExecute=function(t){var e=t.source;if(!e)throw new Error("source required");var n=t.target||e.parent,i=t.shape,r=t.hints||{};i=t.shape=this._modeling.createShape(i,t.position,n,{attach:r.attach}),t.shape=i},ro.prototype.postExecute=function(t){var e,n,i=t.hints||{};e=t.source,n=t.shape,Ke(e.outgoing,(function(t){return t.target===n}))||(i.connectionTarget===t.source?this._modeling.connect(t.shape,t.source,t.connection):this._modeling.connect(t.source,t.shape,t.connection))},oo.$inject=["canvas","layouter"],oo.prototype.execute=function(t){var e=t.connection,n=t.source,i=t.target,r=t.parent,o=t.parentIndex,a=t.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return e.source=n,e.target=i,e.waypoints||(e.waypoints=this._layouter.layoutConnection(e,a)),this._canvas.addConnection(e,r,o),e},oo.prototype.revert=function(t){var e=t.connection;return this._canvas.removeConnection(e),e.source=null,e.target=null,e};var ao=Math.round;function so(t){this._modeling=t}so.$inject=["modeling"],so.prototype.preExecute=function(t){var e=t.elements,n=t.parent,i=t.parentIndex,r=t.position,o=t.hints,a=this._modeling;He(e,(function(t){Ne(t.x)||(t.x=0),Ne(t.y)||(t.y=0)}));var s=Wn(ze(e,(function(t){return!t.hidden})));He(e,(function(t){Hi(t)&&(t.waypoints=Ze(t.waypoints,(function(t){return{x:ao(t.x-s.x-s.width/2+r.x),y:ao(t.y-s.y-s.height/2+r.y)}}))),an(t,{x:ao(t.x-s.x-s.width/2+r.x),y:ao(t.y-s.y-s.height/2+r.y)})}));var c=Hn(e),h={};He(e,(function(t){if(Hi(t))h[t.id]=Ne(i)?a.createConnection(h[t.source.id],h[t.target.id],i,t,t.parent||n,o):a.createConnection(h[t.source.id],h[t.target.id],t,t.parent||n,o);else{var e=an({},o);-1===c.indexOf(t)&&(e.autoResize=!1),qi(t)&&(e=function(t,e){let n={};return He(Object(t),(function(t,i){-1===e.indexOf(i)&&(n[i]=t)})),n}(e,["attach"])),h[t.id]=Ne(i)?a.createShape(t,sn(t,["x","y","width","height"]),t.parent||n,i,e):a.createShape(t,sn(t,["x","y","width","height"]),t.parent||n,e)}})),t.elements=We(h)};var co=Math.round;function ho(t){this._canvas=t}function uo(t){ho.call(this,t)}ho.$inject=["canvas"],ho.prototype.execute=function(t){var e=t.shape,n=t.position,i=t.parent,r=t.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?an(e,n):an(e,{x:n.x-co(e.width/2),y:n.y-co(e.height/2)}),this._canvas.addShape(e,i,r),e},ho.prototype.revert=function(t){var e=t.shape;return this._canvas.removeShape(e),e},Ee(uo,ho),uo.$inject=["canvas"];var lo=ho.prototype.execute;uo.prototype.execute=function(t){var e=t.shape;return function(t){["width","height"].forEach((function(e){void 0===t[e]&&(t[e]=0)}))}(e),e.labelTarget=t.labelTarget,lo.call(this,t)};var po=ho.prototype.revert;function fo(t,e){if("function"!=typeof e)throw new Error("removeFn iterator must be a function");if(t){for(var n;n=t[0];)e(n);return t}}function mo(t,e){this._canvas=t,this._modeling=e}function yo(t,e){this._modeling=t,this._elementRegistry=e}function go(t,e){this._canvas=t,this._modeling=e}function vo(t){this._modeling=t}uo.prototype.revert=function(t){return t.shape.labelTarget=null,po.call(this,t)},mo.$inject=["canvas","modeling"],mo.prototype.preExecute=function(t){var e=this._modeling,n=t.connection;fo(n.incoming,(function(t){e.removeConnection(t,{nested:!0})})),fo(n.outgoing,(function(t){e.removeConnection(t,{nested:!0})}))},mo.prototype.execute=function(t){var e=t.connection,n=e.parent;return t.parent=n,t.parentIndex=Ii(n.children,e),t.source=e.source,t.target=e.target,this._canvas.removeConnection(e),e.source=null,e.target=null,e},mo.prototype.revert=function(t){var e=t.connection,n=t.parent,i=t.parentIndex;return e.source=t.source,e.target=t.target,Pi(n.children,e,i),this._canvas.addConnection(e,n),e},yo.$inject=["modeling","elementRegistry"],yo.prototype.postExecute=function(t){var e=this._modeling,n=this._elementRegistry;He(t.elements,(function(t){n.get(t.id)&&(t.waypoints?e.removeConnection(t):e.removeShape(t))}))},go.$inject=["canvas","modeling"],go.prototype.preExecute=function(t){var e=this._modeling,n=t.shape;fo(n.incoming,(function(t){e.removeConnection(t,{nested:!0})})),fo(n.outgoing,(function(t){e.removeConnection(t,{nested:!0})})),fo(n.children,(function(t){Hi(t)?e.removeConnection(t,{nested:!0}):e.removeShape(t,{nested:!0})}))},go.prototype.execute=function(t){var e=this._canvas,n=t.shape,i=n.parent;return t.oldParent=i,t.oldParentIndex=Ii(i.children,n),e.removeShape(n),n},go.prototype.revert=function(t){var e=this._canvas,n=t.shape,i=t.oldParent,r=t.oldParentIndex;return Pi(i.children,n,r),e.addShape(n,i),n},vo.$inject=["modeling"];var bo={x:"y",y:"x"};function _o(t,e){this._layouter=t,this._canvas=e}function wo(){}function xo(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function Mo(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ko(t,e,n){var i=xo(e),r=xo(n),o=Mo(t,i),a=o.x*(n.width/e.width),s=o.y*(n.height/e.height);return Vi({x:r.x+a,y:r.y+s})}function So(t,e,n){var i=jo(t),r=Oo(i,e),o=i[0];return r.length?r[r.length-1]:ko(o.original||o,n,e)}function Eo(t,e,n){var i=jo(t),r=Oo(i,e),o=i[i.length-1];return r.length?r[0]:ko(o.original||o,n,e)}function Ao(t,e,n){var i=jo(t),r=Co(e,n),o=i[0];return ko(o.original||o,r,e)}function To(t,e,n){var i=jo(t),r=Co(e,n),o=i[i.length-1];return ko(o.original||o,r,e)}function Co(t,e){return{x:t.x-e.x,y:t.y-e.y,width:t.width,height:t.height}}function jo(t){var e=t.waypoints;if(!e.length)throw new Error("connection#"+t.id+": no waypoints");return e}function Oo(t,e){return ze(Ze(t,Po),(function(t){return function(t,e){return"intersect"===Gi(e,t,1)}(t,e)}))}function Po(t){return t.original||t}function Io(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function $o(t){this._modeling=t}function Ro(t){this._helper=new $o(t)}function Lo(t){this._modeling=t,this._helper=new $o(t)}function No(t){this._modeling=t}function Bo(t){return t.original||t}function Do(t,e){this._modeling=t,this._rules=e}function Fo(t){this._modeling=t}function Uo(t,e){return-1!==t.indexOf(e)}function zo(t){this._modeling=t}function Ho(t){return an({},t)}function qo(t){switch(t){case"n":case"s":return"y";case"w":case"e":return"x"}}function Vo(t,e,n){var i=qo(n);return/e|s/.test(n)?t[i]>e:/n|w/.test(n)?t[i]r.threshold))){if(an(c,{x:va(p.x+h.x),y:va(p.y+h.y),dx:0,dy:0},{originalEvent:t}),!1===s("start"))return m();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&sa(r.cursor),e.addMarker(e.getRootElement(),ba)}Lr(t),r.active&&(an(c,{x:va(f.x+h.x),y:va(f.y+h.y),dx:va(y.x),dy:va(y.y)},{originalEvent:t}),s("move"))}function h(t){var e=!0;r.active&&(t&&(r.payload.originalEvent=t,Lr(t)),e=s("end")),!1===e&&s("rejected"),s("ended",y(!0!==e))}function u(t){ya("Escape",t)&&(_a(t),m())}function l(e){var n;r.active&&(n=ua(t),setTimeout(n,400),_a(e)),h(e)}function d(t){c(t)}function p(t){var e=r.payload;e.hoverGfx=t.gfx,e.hover=t.element,s("hover")}function f(t){s("out");var e=r.payload;e.hoverGfx=null,e.hover=null}function m(t){var e;if(r){var n=r.active;n&&s("cancel"),e=y(t),n&&s("canceled",e)}}function y(o){var a,y;s("cleanup"),ca(),y=r.trapClick?l:h,wi.unbind(document,"mousemove",c),wi.unbind(document,"dragstart",_a),wi.unbind(document,"selectstart",_a),wi.unbind(document,"mousedown",y,!0),wi.unbind(document,"mouseup",y,!0),wi.unbind(document,"keyup",u),wi.unbind(document,"touchstart",d,!0),wi.unbind(document,"touchcancel",m,!0),wi.unbind(document,"touchmove",c,!0),wi.unbind(document,"touchend",h,!0),t.off("element.hover",p),t.off("element.out",f),e.removeMarker(e.getRootElement(),ba);var g=r.payload.previousSelection;return!1!==o&&g&&!n.get().length&&function(t){var e=t.filter((function(t){return i.get(t.id)}));e.length&&n.select(e)}(g),a=r,r=null,a}t.on("diagram.destroy",m),this.init=function(e,n,i,y){r&&m(!1),"string"==typeof n&&(y=i,i=n,n=null);var g,v,b,_,w,x=(y=an({},o,y||{})).data||{};_=y.trapClick?l:h,e?(g=Rr(e)||e,v=Nr(e),Lr(e),"dragstart"===g.type&&_a(g)):(g=null,v={x:0,y:0}),b=a(v),n||(n=b),w=function(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}(g),r=an({prefix:i,data:x,payload:{},globalStart:v,displacement:Mo(n,b),localStart:b,isTouch:w},y),y.manual||(w?(wi.bind(document,"touchstart",d,!0),wi.bind(document,"touchcancel",m,!0),wi.bind(document,"touchmove",c,!0),wi.bind(document,"touchend",h,!0)):(wi.bind(document,"mousemove",c),wi.bind(document,"dragstart",_a),wi.bind(document,"selectstart",_a),wi.bind(document,"mousedown",_,!0),wi.bind(document,"mouseup",_,!0)),wi.bind(document,"keyup",u),t.on("element.hover",p),t.on("element.out",f)),s("init"),y.autoActivate&&c(e,!0)},this.move=c,this.hover=p,this.out=f,this.end=h,this.cancel=m,this.context=function(){return r},this.setOptions=function(t){an(o,t)}}wa.$inject=["eventBus","canvas","selection","elementRegistry"];const xa={__depends__:[oa,to],dragging:["type",wa]};var Ma=["marker-start","marker-mid","marker-end"],ka=["circle","ellipse","line","path","polygon","polyline","path","rect"];function Sa(t,e,n,i){this._elementRegistry=t,this._canvas=n,this._styles=i,this._clonedMarkers={};var r=this;e.on("drag.cleanup",(function(){He(r._clonedMarkers,(function(t){gn(t)})),r._clonedMarkers={}}))}Sa.$inject=["elementRegistry","eventBus","canvas","styles"],Sa.prototype.getGfx=function(t){return this._elementRegistry.getGraphics(t)},Sa.prototype.addDragger=function(t,e,n){var i=bn(n=n||this.getGfx(t)),r=n.getBoundingClientRect();return this._cloneMarkers(Mr(i)),pn(i,this._styles.cls("djs-dragger",[],{x:r.top,y:r.left})),hn(e,i),i},Sa.prototype.addFrame=function(t,e){var n=Mn("rect",{class:"djs-resize-overlay",width:t.width,height:t.height,x:t.x,y:t.y});return hn(e,n),n},Sa.prototype._cloneMarkers=function(t){var e=this;if(t.childNodes)for(var n=0;n'),{position:"absolute",width:0,height:0}),r.insertBefore(o,r.firstChild),o),this._init()}function es(t,e,n){si(t,{left:e+"px",top:n+"px"})}function ns(t,e){t.style.display=!1===e?"none":""}function is(t,e){t.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){t.style[n+"transform"]=e}))}ts.$inject=["config.overlays","eventBus","canvas","elementRegistry"],ts.prototype.get=function(t){if(De(t)&&(t={id:t}),De(t.element)&&(t.element=this._elementRegistry.get(t.element)),t.element){var e=this._getOverlayContainer(t.element,!0);return e?t.type?ze(e.overlays,Ye({type:t.type})):e.overlays.slice():[]}return t.type?ze(this._overlays,Ye({type:t.type})):t.id?this._overlays[t.id]:null},ts.prototype.add=function(t,e,n){if(Le(e)&&(n=e,e=null),t.id||(t=this._elementRegistry.get(t)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!t)throw new Error("invalid element specified");var i=this._ids.next();return n=an({},this._overlayDefaults,n,{id:i,type:e,element:t,html:n.html}),this._addOverlay(n),i},ts.prototype.remove=function(t){var e=this.get(t)||[];Re(e)||(e=[e]);var n=this;He(e,(function(t){var e=n._getOverlayContainer(t.element,!0);if(t&&(ji(t.html),ji(t.htmlContainer),delete t.htmlContainer,delete t.element,delete n._overlays[t.id]),e){var i=e.overlays.indexOf(t);-1!==i&&e.overlays.splice(i,1)}}))},ts.prototype.isShown=function(){return"none"!==this._overlayRoot.style.display},ts.prototype.show=function(){ns(this._overlayRoot)},ts.prototype.hide=function(){ns(this._overlayRoot,!1)},ts.prototype.clear=function(){this._overlays={},this._overlayContainers=[],di(this._overlayRoot)},ts.prototype._updateOverlayContainer=function(t){var e=t.element,n=t.html,i=e.x,r=e.y;if(e.waypoints){var o=Wn(e);i=o.x,r=o.y}es(n,i,r),ci(t.html,"data-container-id",e.id)},ts.prototype._updateOverlay=function(t){var e,n,i=t.position,r=t.htmlContainer,o=t.element,a=i.left,s=i.top;void 0!==i.right&&(e=o.waypoints?Wn(o).width:o.width,a=-1*i.right+e),void 0!==i.bottom&&(n=o.waypoints?Wn(o).height:o.height,s=-1*i.bottom+n),es(r,a||0,s||0),this._updateOverlayVisibilty(t,this._canvas.viewbox())},ts.prototype._createOverlayContainer=function(t){var e=Ai('
');si(e,{position:"absolute"}),this._overlayRoot.appendChild(e);var n={html:e,element:t,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},ts.prototype._updateRoot=function(t){var e=t.scale||1,n="matrix("+[e,0,0,e,-1*t.x*e,-1*t.y*e].join(",")+")";is(this._overlayRoot,n)},ts.prototype._getOverlayContainer=function(t,e){var n=Ue(this._overlayContainers,(function(e){return e.element===t}));return n||e?n:this._createOverlayContainer(t)},ts.prototype._addOverlay=function(t){var e,n,i=t.id,r=t.element,o=t.html;o.get&&o.constructor.prototype.jquery&&(o=o.get(0)),De(o)&&(o=Ai(o)),n=this._getOverlayContainer(r),si(e=Ai('
'),{position:"absolute"}),e.appendChild(o),t.type&&ui(e).add("djs-overlay-"+t.type),ns(e,this._canvas.findRoot(r)===this._canvas.getRootElement()),t.htmlContainer=e,n.overlays.push(t),n.html.appendChild(e),this._overlays[i]=t,this._updateOverlay(t),this._updateOverlayVisibilty(t,this._canvas.viewbox())},ts.prototype._updateOverlayVisibilty=function(t,e){var n=t.show,i=this._canvas.findRoot(t.element),r=n&&n.minZoom,o=n&&n.maxZoom,a=t.htmlContainer,s=!0;(i!==this._canvas.getRootElement()||n&&(Ie(r)&&r>e.scale||Ie(o)&&oi&&(r=(1/e.scale||1)*i)),Ie(r)&&(s="scale("+r+","+r+")"),is(a,s)},ts.prototype._updateOverlaysVisibilty=function(t){var e=this;He(this._overlays,(function(n){e._updateOverlayVisibilty(n,t)}))},ts.prototype._init=function(){var t=this._eventBus,e=this;t.on("canvas.viewbox.changing",(function(t){e.hide()})),t.on("canvas.viewbox.changed",(function(t){var n;n=t.viewbox,e._updateRoot(n),e._updateOverlaysVisibilty(n),e.show()})),t.on(["shape.remove","connection.remove"],(function(t){var n=t.element;He(e.get({element:n}),(function(t){e.remove(t.id)}));var i=e._getOverlayContainer(n);if(i){ji(i.html);var r=e._overlayContainers.indexOf(i);-1!==r&&e._overlayContainers.splice(r,1)}})),t.on("element.changed",500,(function(t){var n=t.element,i=e._getOverlayContainer(n,!0);i&&(He(i.overlays,(function(t){e._updateOverlay(t)})),e._updateOverlayContainer(i))})),t.on("element.marker.update",(function(t){var n=e._getOverlayContainer(t.element,!0);n&&ui(n.html)[t.add?"add":"remove"](t.marker)})),t.on("root.set",(function(){e._updateOverlaysVisibilty(e._canvas.viewbox())})),t.on("diagram.clear",this.clear,this)};const rs={__init__:["overlays"],overlays:["type",ts]};var os=Math.abs,as=Math.round;function ss(t,e){return!t||isNaN(t.x)||isNaN(t.y)?e:{x:as(t.x+t.width/2),y:as(t.y+t.height/2)}}function cs(t,e){var n=t.snapped;return!!n&&("string"==typeof e?n[e]:n.x&&n.y)}function hs(t,e,n){if("string"!=typeof e)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=t[e],o=t.snapped=t.snapped||{};return!1===n?o[e]=!1:(o[e]=!0,i=n-r,t[e]+=i,t["d"+e]+=i),r}function us(t){return t.children||[]}var ls=10;function ds(t,e,n){return n||(n="round"),Math[n](t/e)*e}function ps(t,e,n){var i=!n||!1!==n.active;this._eventBus=e;var r=this;e.on("diagram.init",800,(function(){r.setActive(i)})),e.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(e){var n=e.originalEvent;if(!(!r.active||n&&ma(n))){var i=e.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(t,e,n){var i=t.context,r=t.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;return s&&Ne(s[e])?s[e]:(s||(s=o.snapOffset={}),Ne(s[e])||(s[e]=0),r?(n.get(r.id)||(fs(e)?s[e]+=r[e]+r.width/2:s[e]+=r[e]+r.height/2),a?("x"===e?/left/.test(a)?s[e]-=r.width/2:/right/.test(a)&&(s[e]+=r.width/2):/top/.test(a)?s[e]-=r.height/2:/bottom/.test(a)&&(s[e]+=r.height/2),s[e]):s[e]):s[e])}(e,n,t);o&&(i.offset=o);var a=function(t,e){var n=t.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[e])return a[e];a||(a=o.snapConstraints={}),a[e]||(a[e]={});var s=n.direction;i&&(fs(e)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,h=r.max;return c&&(fs(e)?ys(s)?a.x.max=c.left:a.x.min=c.right:ms(s)?a.y.max=c.top:a.y.min=c.bottom),h&&(fs(e)?ys(s)?a.x.min=h.left:a.x.max=h.right:ms(s)?a.y.min=h.top:a.y.max=h.bottom),a[e]}(e,n);a&&an(i,a),cs(e,n)||r.snapEvent(e,n,i)}))}}))}function fs(t){return"x"===t}function ms(t){return-1!==t.indexOf("n")}function ys(t){return-1!==t.indexOf("w")}function gs(t){this._eventBus=t}function vs(t){return function(e,n,i,r,o){(Be(e)||Ne(e))&&(o=r,r=i,i=n,n=e,e=null),this.on(e,t,n,i,r,o)}}function bs(t,e){gs.call(this,t),this._gridSnapping=e;var n=this;this.preExecute("shape.resize",(function(t){var e=t.context,i=(e.hints||{}).autoResize;if(i){var r=e.shape,o=e.newBounds;De(i)?e.newBounds=n.snapComplex(o,i):e.newBounds=n.snapSimple(r,o)}}))}function _s(t,e){t.on(["spaceTool.move","spaceTool.end"],2e3,(function(t){var n,i=t.context;i.initialized&&("x"===i.axis?(n=e.snapValue(t.dx),t.x=t.x+n-t.dx,t.dx=n):(n=e.snapValue(t.dy),t.y=t.y+n-t.dy,t.dy=n))}))}ps.prototype.snapEvent=function(t,e,n){hs(t,e,this.snapValue(t[e],n))},ps.prototype.getGridSpacing=function(){return ls},ps.prototype.snapValue=function(t,e){var n,i,r=0;return e&&e.offset&&(r=e.offset),t=ds(t+=r,ls),e&&e.min&&Ne(n=e.min)&&(n=ds(n+r,ls,"ceil"),t=Math.max(t,n)),e&&e.max&&Ne(i=e.max)&&(i=ds(i+r,ls,"floor"),t=Math.min(t,i)),t-r},ps.prototype.isActive=function(){return this.active},ps.prototype.setActive=function(t){this.active=t,this._eventBus.fire("gridSnapping.toggle",{active:t})},ps.prototype.toggleActive=function(){this.setActive(!this.active)},ps.$inject=["elementRegistry","eventBus","config.gridSnapping"],gs.$inject=["eventBus"],gs.prototype.on=function(t,e,n,i,r,o){if((Be(e)||Ne(e))&&(o=r,r=i,i=n,n=e,e=null),Be(n)&&(o=r,r=i,i=n,n=1e3),Le(r)&&(o=r,r=!1),!Be(i))throw new Error("handlerFn must be a function");Re(t)||(t=[t]);var a=this._eventBus;He(t,(function(t){var s=["commandStack",t,e].filter((function(t){return t})).join(".");a.on(s,n,r?function(t,e){return function(n){return t.call(e||null,n.context,n.command,n)}}(i,o):i,o)}))},gs.prototype.canExecute=vs("canExecute"),gs.prototype.preExecute=vs("preExecute"),gs.prototype.preExecuted=vs("preExecuted"),gs.prototype.execute=vs("execute"),gs.prototype.executed=vs("executed"),gs.prototype.postExecute=vs("postExecute"),gs.prototype.postExecuted=vs("postExecuted"),gs.prototype.revert=vs("revert"),gs.prototype.reverted=vs("reverted"),bs.$inject=["eventBus","gridSnapping","modeling"],Ee(bs,gs),bs.prototype.snapSimple=function(t,e){var n=this._gridSnapping;return e.width=n.snapValue(e.width,{min:e.width}),e.height=n.snapValue(e.height,{min:e.height}),e.x=t.x+t.width/2-e.width/2,e.y=t.y+t.height/2-e.height/2,e},bs.prototype.snapComplex=function(t,e){return/w|e/.test(e)&&(t=this.snapHorizontally(t,e)),/n|s/.test(e)&&(t=this.snapVertically(t,e)),t},bs.prototype.snapHorizontally=function(t,e){var n=this._gridSnapping,i=/w/.test(e),r=/e/.test(e),o={};return o.width=n.snapValue(t.width,{min:t.width}),r&&(i?(o.x=n.snapValue(t.x,{max:t.x}),o.width+=n.snapValue(t.x-o.x,{min:t.x-o.x})):t.x=t.x+t.width-o.width),an(t,o),t},bs.prototype.snapVertically=function(t,e){var n=this._gridSnapping,i=/n/.test(e),r=/s/.test(e),o={};return o.height=n.snapValue(t.height,{min:t.height}),i&&(r?(o.y=n.snapValue(t.y,{max:t.y}),o.height+=n.snapValue(t.y-o.y,{min:t.y-o.y})):t.y=t.y+t.height-o.height),an(t,o),t},_s.$inject=["eventBus","gridSnapping"];const ws={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",bs],gridSnappingSpaceToolBehavior:["type",_s]}],__init__:["gridSnapping"],gridSnapping:["type",ps]};var xs=Math.max,Ms=Math.min,ks=20;function Ss(t,e,n){var i=e[t],r=n.min&&n.min[t],o=n.max&&n.max[t];return Ne(r)&&(i=(/top|left/.test(t)?Ms:xs)(i,r)),Ne(o)&&(i=(/top|left/.test(t)?xs:Ms)(i,o)),i}function Es(t,e){return void 0!==t?t:ks}function As(t){return!t.waypoints&&"label"!==t.type}function Ts(t,e,n,i){this._dragging=i,this._rules=e;var r=this;t.on("resize.start",(function(t){var e,n,i;n=(e=t.context).resizeConstraints,i=e.minBounds,void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(e)),e.resizeConstraints={min:Ki(i)})})),t.on("resize.move",(function(t){var e={x:t.dx,y:t.dy};!function(t,e){var n,i=t.shape,o=t.direction,a=t.resizeConstraints;t.delta=e,n=function(t,e,n){var i=n.x,r=n.y,o={x:t.x,y:t.y,width:t.width,height:t.height};return-1!==e.indexOf("n")?(o.y=t.y+r,o.height=t.height-r):-1!==e.indexOf("s")&&(o.height=t.height+r),-1!==e.indexOf("e")?o.width=t.width+i:-1!==e.indexOf("w")&&(o.x=t.x+i,o.width=t.width-i),o}(i,o,e),t.newBounds=function(t,e){if(!e)return t;var n=Ki(t);return Zi({top:Ss("top",n,e),right:Ss("right",n,e),bottom:Ss("bottom",n,e),left:Ss("left",n,e)})}(n,a),t.canExecute=r.canResize(t)}(t.context,e)})),t.on("resize.end",(function(t){!function(t){var e,i=t.shape,r=t.canExecute,o=t.newBounds;if(r){if(e=o,!function(t,e){return t.x!==e.x||t.y!==e.y||t.width!==e.width||t.height!==e.height}(i,o={x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}))return;n.resizeShape(i,o)}}(t.context)}))}function Cs(t,e){var n=Wi(t),i=Ki(t),r={x:n.x,y:n.y};return-1!==e.indexOf("n")?r.y=i.top:-1!==e.indexOf("s")&&(r.y=i.bottom),-1!==e.indexOf("e")?r.x=i.right:-1!==e.indexOf("w")&&(r.x=i.left),r}function js(t){var e="resize-";return"n"===t||"s"===t?e+"ns":"e"===t||"w"===t?e+"ew":"nw"===t||"se"===t?e+"nwse":e+"nesw"}Ts.prototype.canResize=function(t){var e=this._rules,n=sn(t,["newBounds","shape","delta","direction"]);return e.allowed("shape.resize",n)},Ts.prototype.activate=function(t,e,n){var i,r,o=this._dragging;if("string"==typeof n&&(n={direction:n}),!(r=(i=an({shape:e},n)).direction))throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");o.init(t,Cs(e,r),"resize",{autoActivate:!0,cursor:js(r),data:{shape:e,context:i}})},Ts.prototype.computeMinResizeBox=function(t){var e,n,i,r,o,a,s,c=t.shape;return e=t.direction,n=c,i=t.minDimensions||{width:10,height:10},r=function(t,e){var n;if((n=void 0===t.length?ze(t.children,As):t).length)return function(t,e){var n,i,r,o;return"object"==typeof e?(n=Es(e.left),i=Es(e.right),r=Es(e.top),o=Es(e.bottom)):n=i=r=o=Es(e),{x:t.x-n,y:t.y-r,width:t.width+n+i,height:t.height+r+o}}(Wn(n),e)}(c,t.childrenBoxPadding),o=Ki(n),a={top:/n/.test(e)?o.bottom-i.height:o.top,left:/w/.test(e)?o.right-i.width:o.left,bottom:/s/.test(e)?o.top+i.height:o.bottom,right:/e/.test(e)?o.left+i.width:o.right},s=r?Ki(r):a,Zi({top:Ms(a.top,s.top),left:Ms(a.left,s.left),bottom:xs(a.bottom,s.bottom),right:xs(a.right,s.right)})},Ts.$inject=["eventBus","rules","modeling","dragging"];var Os="djs-resizing",Ps="resize-not-ok";function Is(t,e,n){t.on("resize.move",500,(function(t){var i,r,o,a;r=(i=t.context).shape,o=i.newBounds,(a=i.frame)||(a=i.frame=n.addFrame(r,e.getActiveLayer()),e.addMarker(r,Os)),o.width>5&&pn(a,{x:o.x,width:o.width}),o.height>5&&pn(a,{y:o.y,height:o.height}),i.canExecute?mn(a).remove(Ps):mn(a).add(Ps)})),t.on("resize.cleanup",(function(t){var n,i;i=(n=t.context).shape,n.frame&&gn(n.frame),e.removeMarker(i,Os)}))}Is.$inject=["eventBus","canvas","previewSupport"];var $s="djs-resizer",Rs=["n","w","s","e","nw","ne","se","sw"];function Ls(t,e,n,i){this._resize=i,this._canvas=e;var r=this;t.on("selection.changed",(function(t){var e=t.newSelection;r.removeResizers(),1===e.length&&He(e,on(r.addResizer,r))})),t.on("shape.changed",(function(t){var e=t.element;n.isSelected(e)&&(r.removeResizers(),r.addResizer(e))}))}Ls.prototype.makeDraggable=function(t,e,n){var i=this._resize;function r(e){Dr(e)&&i.activate(e,t,n)}wi.bind(e,"mousedown",r),wi.bind(e,"touchstart",r)},Ls.prototype._createResizer=function(t,e,n,i){var r=this._getResizersParent(),o=function(t){var e={x:0,y:0};return-1!==t.indexOf("e")?e.x=6:-1!==t.indexOf("w")&&(e.x=-6),-1!==t.indexOf("s")?e.y=6:-1!==t.indexOf("n")&&(e.y=-6),e}(i),a=Mn("g");mn(a).add($s),mn(a).add($s+"-"+t.id),mn(a).add($s+"-"+i),hn(r,a);var s=Mn("rect");pn(s,{x:-4+o.x,y:-4+o.y,width:8,height:8}),mn(s).add($s+"-visual"),hn(a,s);var c=Mn("rect");return pn(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),mn(c).add($s+"-hit"),hn(a,c),kr(a,e,n),a},Ls.prototype.createResizer=function(t,e){var n=Cs(t,e),i=this._createResizer(t,n.x,n.y,e);this.makeDraggable(t,i,e)},Ls.prototype.addResizer=function(t){var e=this;!Hi(t)&&this._resize.canResize({shape:t})&&He(Rs,(function(n){e.createResizer(t,n)}))},Ls.prototype.removeResizers=function(){vn(this._getResizersParent())},Ls.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},Ls.$inject=["eventBus","canvas","selection","resize"];const Ns={__depends__:[no,xa,Ea],__init__:["resize","resizePreview","resizeHandles"],resize:["type",Ts],resizePreview:["type",Is],resizeHandles:["type",Ls]};function Bs(t,e,n){this._canvas=n,this._opts=an({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},t);var i=this;e.on("drag.move",(function(t){var e=i._toBorderPoint(t);i.startScroll(e)})),e.on(["drag.cleanup"],(function(){i.stopScroll()}))}Bs.$inject=["config.autoScroll","eventBus","canvas"],Bs.prototype.startScroll=function(t){var e,n,i,r=this._canvas,o=this._opts,a=this,s=r.getContainer().getBoundingClientRect(),c=[t.x,t.y,s.width-t.x,s.height-t.y];this.stopScroll();for(var h=0,u=0,l=0;l<4;l++)e=c[l],n=o.scrollThresholdOut[l],i=o.scrollThresholdIn[l],nm-3&&(n=Gi(r.target,f),a===m-2?"intersect"===n&&(d.pop(),d[d.length-1]=f):"intersect"!==n&&d.push(u)),i.newWaypoints=r.waypoints=s(r,d),function(t,e,n){var i,r,o,a,s,c,h=t.newWaypoints,u=(i=n,r=h[t.segmentStartIndex+e],o=h[t.segmentEndIndex+e],a=yc(t.axis),s=Math.max(r[a],o[a]),c=Math.min(r[a],o[a]),mc(r,a,Math.min(Math.max(c+20,i[a]),s-20)));Sr(t.draggerGfx,u.x,u.y)}(i,y,t),i.newSegmentStartIndex=o+y,c(t)})),e.on("connectionSegment.move.hover",(function(t){t.context.hover=t.hover,n.addMarker(t.hover,dc)})),e.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(t){var e=t.context.hover;e&&n.removeMarker(e,dc)})),e.on("connectionSegment.move.cleanup",(function(t){var e=t.context,i=e.connection;e.draggerGfx&&gn(e.draggerGfx),n.removeMarker(i,pc)})),e.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(t){var e=t.context;e.connection.waypoints=e.originalWaypoints,c(t)})),e.on("connectionSegment.move.end",(function(t){var e=t.context,n=e.connection,i=e.newWaypoints,r=e.newSegmentStartIndex,a=function(t,e){var n=0;return{waypoints:t.filter((function(i,r){return!Ri(t[r-1],t[r+1],i)||(n=r<=e?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(t){return{original:t.original,x:Math.round(t.x),y:Math.round(t.y)}})),r),c=s(n,a.waypoints),h=a.segmentOffset,u={segmentMove:{segmentStartIndex:e.segmentStartIndex,newSegmentStartIndex:r+h}};o.updateWaypoints(n,c,u)}))}vc.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var bc=Math.abs,_c=Math.round;function wc(t){function e(t,e){if(Re(t)){for(var n=t.length;n--;)if(bc(t[n]-e)<=10)return t[n]}else{var i=e%(t=+t);if(i<10)return e-i;if(i>t-10)return e-i+t}return e}function n(t,e){return t.waypoints?(i=function(t,e){for(var n,i=e.waypoints,r=1/0,o=0;oo.length-3&&l.unshift(n(r.target,t)),e.snapPoints=i={horizontal:[],vertical:[]},He(l,(function(t){t&&(t=t.original||t,"y"===u&&i.horizontal.push(t.y),"x"===u&&i.vertical.push(t.x))})),i}(t),a=t.x,s=t.y;if(o){var c=a-(i=e(o.vertical,a)),h=s-(r=e(o.horizontal,s));an(t,{dx:t.dx-c,dy:t.dy-h,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&hs(t,"x",i),(h||-1!==o.horizontal.indexOf(s))&&hs(t,"y",r)}})),t.on(["connect.hover","connect.move","connect.end"],1500,(function(t){var e=t.context.hover,i=e&&n(e,t);Hi(e)&&i&&i.x&&i.y&&(hs(t,"x",i.x),hs(t,"y",i.y))})),t.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(t){var i,r,o=t.context,a=function(t){var e=t.snapPoints,n=t.connection.waypoints,i=t.bendpointIndex;if(e)return e;var r=[n[i-1],n[i+1]];return t.snapPoints=e={horizontal:[],vertical:[]},He(r,(function(t){t&&(t=t.original||t,e.horizontal.push(t.y),e.vertical.push(t.x))})),e}(o),s=o.hover,c=s&&n(s,t),h=t.x,u=t.y;if(a){var l=h-(i=e(c?a.vertical.concat([c.x]):a.vertical,h)),d=u-(r=e(c?a.horizontal.concat([c.y]):a.horizontal,u));an(t,{dx:t.dx-l,dy:t.dy-d,x:t.x-l,y:t.y-d}),(l||-1!==a.vertical.indexOf(h))&&hs(t,"x",i),(d||-1!==a.horizontal.indexOf(u))&&hs(t,"y",r)}}))}wc.$inject=["eventBus"];const xc={__depends__:[xa,no],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Ys],bendpointMove:["type",ic],bendpointMovePreview:["type",lc],connectionSegmentMove:["type",vc],bendpointSnapping:["type",wc]};var Mc="drop-ok",kc="drop-not-ok",Sc="attach-ok",Ec="new-parent",Ac="create";function Tc(t,e,n,i,r){function o(e,n){[Sc,Mc,kc,Ec].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}function a(){var t=e.context();t&&t.prefix===Ac&&e.cancel()}n.on(["create.move","create.hover"],(function(t){var e=t.context,n=e.elements,i=t.hover,a=e.source,s=e.hints||{};if(!i)return e.canExecute=!1,void(e.target=null);Cc(t);var c={x:t.x,y:t.y},h=e.canExecute=i&&function(t,e,n,i,o){if(!e)return!1;var a=Ue(t=ze(t,(function(e){var n=e.labelTarget;return!(e.parent||qi(e)&&-1!==t.indexOf(n))})),(function(t){return!Hi(t)})),s=!1,c=!1,h=!1;jc(t)&&(s=r.allowed("shape.attach",{position:n,shape:a,target:e})),s||(h=jc(t)?r.allowed("shape.create",{position:n,shape:a,source:i,target:e}):r.allowed("elements.create",{elements:t,position:n,target:e}));var u=o.connectionTarget;return h||s?(a&&i&&(c=r.allowed("connection.create",{source:u===i?a:i,target:u===i?i:a,hints:{targetParent:e,targetAttach:s}})),{attach:s,connect:c}):(null===h||null===s)&&null}(n,i,c,a,s);i&&null!==h&&(e.target=i,h&&h.attach?o(i,Sc):o(i,h?Ec:kc))})),n.on(["create.end","create.out","create.cleanup"],(function(t){var e=t.hover;e&&o(e,null)})),n.on("create.end",(function(t){var e=t.context,n=e.source,r=e.shape,o=e.elements,a=e.target,s=e.canExecute,c=s&&s.attach,h=s&&s.connect,u=e.hints||{};if(!1===s||!a)return!1;Cc(t);var l={x:t.x,y:t.y};r=h?i.appendShape(n,r,l,a,{attach:c,connection:!0===h?{}:h,connectionTarget:u.connectionTarget}):Ue(o=i.createElements(o,l,a,an({},u,{attach:c})),(function(t){return!Hi(t)})),an(e,{elements:o,shape:r}),an(t,{elements:o,shape:r})})),n.on("create.init",(function(){n.on("elements.changed",a),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",a)}))})),this.start=function(t,n,i){Re(n)||(n=[n]);var r=Ue(n,(function(t){return!Hi(t)}));if(r){i=an({elements:n,hints:{},shape:r},i||{}),He(n,(function(t){Ne(t.x)||(t.x=0),Ne(t.y)||(t.y=0)}));var o=Wn(ze(n,(function(t){return!t.hidden})));He(n,(function(t){Hi(t)&&(t.waypoints=Ze(t.waypoints,(function(t){return{x:t.x-o.x-o.width/2,y:t.y-o.y-o.height/2}}))),an(t,{x:t.x-o.x-o.width/2,y:t.y-o.y-o.height/2})})),e.init(t,Ac,{cursor:"grabbing",autoActivate:!0,data:{shape:r,elements:n,context:i}})}}}function Cc(t){var e=t.context.createConstraints;e&&(e.left&&(t.x=Math.max(t.x,e.left)),e.right&&(t.x=Math.min(t.x,e.right)),e.top&&(t.y=Math.max(t.y,e.top)),e.bottom&&(t.y=Math.min(t.y,e.bottom)))}function jc(t){return t&&1===t.length&&!Hi(t[0])}function Oc(t,e,n,i,r){e.on("create.move",750,(function(e){var o=e.hover,a=e.context,s=a.elements,c=a.dragGroup;c||(c=a.dragGroup=function(t){var e=Mn("g");pn(e,r.cls("djs-drag-group",["no-events"]));var o=Mn("g");return t.forEach((function(t){var r;t.hidden||(t.waypoints?(r=n._createContainer("connection",o),n.drawConnection(Mr(r),t)):(r=n._createContainer("shape",o),n.drawShape(Mr(r),t),Sr(r,t.x,t.y)),i.addDragger(t,e,r))})),e}(s)),o?(c.parentNode||hn(t.getActiveLayer(),c),Sr(c,e.x,e.y)):gn(c)})),e.on("create.cleanup",(function(t){var e=t.context.dragGroup;e&&gn(e)}))}Tc.$inject=["canvas","dragging","eventBus","modeling","rules"],Oc.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];const Pc={__depends__:[xa,Ea,no,to],__init__:["create","createPreview"],create:["type",Tc],createPreview:["type",Oc]};var Ic="keyboard.keydown",$c="input-handle-modified-keys";function Rc(t,e){var n=this;this._config=t||{},this._eventBus=e,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),e.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),e.on("diagram.init",(function(){n._fire("init")})),e.on("attach",(function(){t&&t.bindTo&&n.bind(t.bindTo)})),e.on("detach",(function(){n.unbind()}))}function Lc(t,e){var n=this;t.on("editorActions.init",500,(function(t){var i=t.editorActions;n.registerBindings(e,i)}))}Rc.$inject=["config.keyboard","eventBus"],Rc.prototype._keydownHandler=function(t){this._keyHandler(t,Ic)},Rc.prototype._keyupHandler=function(t){this._keyHandler(t,"keyboard.keyup")},Rc.prototype._keyHandler=function(t,e){if(!this._isEventIgnored(t)){var n={keyEvent:t};this._eventBus.fire(e||Ic,n)&&t.preventDefault()}},Rc.prototype._isEventIgnored=function(t){return!!t.defaultPrevented||(e=t.target)&&(pi(e,"input, textarea")||"true"===e.contentEditable)&&this._isModifiedKeyIgnored(t);var e},Rc.prototype._isModifiedKeyIgnored=function(t){return!ma(t)||-1===this._getAllowedModifiers(t.target).indexOf(t.key)},Rc.prototype._getAllowedModifiers=function(t){var e=fi(t,"["+$c+"]",!0);return!e||this._node&&!this._node.contains(e)?[]:e.getAttribute($c).split(",")},Rc.prototype.bind=function(t){this.unbind(),this._node=t,wi.bind(t,"keydown",this._keydownHandler),wi.bind(t,"keyup",this._keyupHandler),this._fire("bind")},Rc.prototype.getBinding=function(){return this._node},Rc.prototype.unbind=function(){var t=this._node;t&&(this._fire("unbind"),wi.unbind(t,"keydown",this._keydownHandler),wi.unbind(t,"keyup",this._keyupHandler)),this._node=null},Rc.prototype._fire=function(t){this._eventBus.fire("keyboard."+t,{node:this._node})},Rc.prototype.addListener=function(t,e,n){Be(t)&&(n=e,e=t,t=1e3),this._eventBus.on(n||Ic,t,e)},Rc.prototype.removeListener=function(t,e){this._eventBus.off(e||Ic,t)},Rc.prototype.hasModifier=function(t){return t.ctrlKey||t.metaKey||t.shiftKey||t.altKey},Rc.prototype.isCmd=ma,Rc.prototype.isShift=ga,Rc.prototype.isKey=ya,Lc.$inject=["eventBus","keyboard"],Lc.prototype.registerBindings=function(t,e){function n(n,i){e.isRegistered(n)&&t.addListener(i)}n("undo",(function(t){if(ma(n=t.keyEvent)&&!ga(n)&&ya(fa,n))return e.trigger("undo"),!0;var n})),n("redo",(function(t){if(ma(n=t.keyEvent)&&(ya(pa,n)||ya(fa,n)&&ga(n)))return e.trigger("redo"),!0;var n})),n("copy",(function(t){if(ma(n=t.keyEvent)&&ya(la,n))return e.trigger("copy"),!0;var n})),n("paste",(function(t){if(ma(n=t.keyEvent)&&ya(da,n))return e.trigger("paste"),!0;var n})),n("stepZoom",(function(t){var n=t.keyEvent;if(ya(["+","Add","="],n)&&ma(n))return e.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(t){var n=t.keyEvent;if(ya(["-","Subtract"],n)&&ma(n))return e.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(t){var n=t.keyEvent;if(ya("0",n)&&ma(n))return e.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(t){if(ya(["Backspace","Delete","Del"],t.keyEvent))return e.trigger("removeSelection"),!0}))};const Nc={__init__:["keyboard","keyboardBindings"],keyboard:["type",Rc],keyboardBindings:["type",Lc]};var Bc={moveSpeed:1,moveSpeedAccelerated:10},Dc="left",Fc="right",Uc="down",zc={ArrowLeft:Dc,Left:Dc,ArrowUp:"up",Up:"up",ArrowRight:Fc,Right:Fc,ArrowDown:Uc,Down:Uc},Hc={left:function(t){return{x:-t,y:0}},up:function(t){return{x:0,y:-t}},right:function(t){return{x:t,y:0}},down:function(t){return{x:0,y:t}}};function qc(t,e,n,i,r){var o=this;this._config=an({},Bc,t||{}),e.addListener(1500,(function(t){var n=t.keyEvent,i=zc[n.key];if(i&&!e.isCmd(n)){var r=e.isShift(n);return o.moveSelection(i,r),!0}})),this.moveSelection=function(t,e){var o=r.get();if(o.length){var a=this._config[e?"moveSpeedAccelerated":"moveSpeed"],s=Hc[t](a);i.allowed("elements.move",{shapes:o})&&n.moveElements(o,s)}}}qc.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];const Vc={__depends__:[Nc,to],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",qc]};var Kc={moveSpeed:50,moveSpeedAccelerated:200};function Zc(t,e,n){var i=this;this._config=an({},Kc,t||{}),e.addListener((function(t){var n=t.keyEvent,r=i._config;if(e.isCmd(n)&&e.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=e.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(t){var e=0,i=0,r=t.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(t.direction){case"left":e=r;break;case"up":i=r;break;case"right":e=-r;break;case"down":i=-r}n.scroll({dx:e,dy:i})}}Zc.$inject=["config.keyboardMove","keyboard","canvas"];const Wc={__depends__:[Nc],__init__:["keyboardMove"],keyboardMove:["type",Zc]};function Gc(t,e){var n;function i(i){var r,o=n.start,a=n.button,s=Nr(i),c=Mo(s,o);!n.dragging&&(r=c,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,0===a&&ua(t),sa("grab")),n.dragging&&(c=Mo(s,n.last||n.start),e.scroll({dx:c.x,dy:c.y}),n.last=s),i.preventDefault()}function r(t){wi.unbind(document,"mousemove",i),wi.unbind(document,"mouseup",r),n=null,ca()}t.on("element.mousedown",500,(function(t){return function(t){if(!fi(t.target,".djs-draggable")){var e=t.button;if(!(e>=2||t.ctrlKey||t.shiftKey||t.altKey))return n={button:e,start:Nr(t)},wi.bind(document,"mousemove",i),wi.bind(document,"mouseup",r),!0}}(t.originalEvent)})),this.isActive=function(){return!!n}}Gc.$inject=["eventBus","canvas"];const Jc={__init__:["moveCanvas"],moveCanvas:["type",Gc]};var Xc=n(840),Yc=n.n(Xc),Qc=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function th(t,e){return e.get(t,!1)}function eh(t){t.preventDefault(),"function"==typeof t.stopPropagation?t.stopPropagation():t.srcEvent&&"function"==typeof t.srcEvent.stopPropagation&&t.srcEvent.stopPropagation(),"function"==typeof t.stopImmediatePropagation&&t.stopImmediatePropagation()}function nh(t){function e(e){setTimeout((function(){He(Qc,(function(e){wi.unbind(t,e,eh,!0)}))}),500)}wi.bind(t,"touchstart",(function(e){He(Qc,(function(e){wi.bind(t,e,eh,!0)}))}),!0),wi.bind(t,"touchend",e,!0),wi.bind(t,"touchcancel",e,!0);var n=new(Yc().Manager)(t,{inputClass:Yc().TouchInput,recognizers:[],domEvents:!0}),i=new(Yc().Tap),r=new(Yc().Pan)({threshold:10}),o=new(Yc().Press),a=new(Yc().Pinch),s=new(Yc().Tap)({event:"doubletap",taps:2});return a.requireFailure(r),a.requireFailure(o),n.add([r,o,a,s,i]),n.reset=function(t){var e=this.recognizers,i=this.session;i.stopped||(n.stop(t),setTimeout((function(){var t,n;for(t=0;n=e[t];t++)n.reset(),n.state=8;i.curRecognizer=null}),0))},n.on("hammer.input",(function(t){t.srcEvent.defaultPrevented&&n.reset(!0)})),n}function ih(t,e,n,i,r){var o,a=th("dragging",t),s=th("move",t),c=th("contextPad",t),h=th("palette",t);function u(t,e){return function(n){var o=l(n.target),a=o&&i.get(o);return e&&(n.srcEvent.button=e),r.fire(t,n,a)}}function l(t){return fi(t,"svg, .djs-element",!0)}a&&n.on("drag.move",(function(t){var e=t.originalEvent;if(e&&!(e instanceof MouseEvent)){var n=Nr(e),r=l(document.elementFromPoint(n.x,n.y)),o=r&&i.get(r);o!==t.hover&&(t.hover&&a.out(t),o&&(a.hover({element:o,gfx:r}),t.hover=o,t.hoverGfx=r))}})),c&&n.on("contextPad.create",(function(t){var e=nh(t.pad.html);e.on("panstart",(function(t){c.trigger("dragstart",t,!0)})),e.on("press",(function(t){c.trigger("dragstart",t,!0)})),e.on("tap",(function(t){c.trigger("click",t)}))})),h&&n.on("palette.create",(function(t){var e=nh(t.container);e.on("panstart",(function(t){h.trigger("dragstart",t,!0)})),e.on("press",(function(t){h.trigger("dragstart",t,!0)})),e.on("tap",(function(t){h.trigger("click",t)}))})),n.on("canvas.init",(function(t){!function(t){function n(t){var n=l(t.target),r=n&&i.get(n);if(s&&e.getRootElement()!==r)return s.start(t,r,!0);!function(t){var n=0,i=0;function r(t){var r=t.deltaX-n,o=t.deltaY-i;e.scroll({dx:r,dy:o}),n=t.deltaX,i=t.deltaY}function a(t){o.off("panmove",r),o.off("panend",a),o.off("pancancel",a)}o.on("panmove",r),o.on("panend",a),o.on("pancancel",a)}()}(o=nh(t)).on("tap",u("element.click")),o.on("doubletap",u("element.dblclick",1)),o.on("panstart",n),o.on("press",n),o.on("pinchstart",(function(t){var n=e.zoom(),i=t.center;function r(t){var r=1-(1-t.scale)/1.5,o=Math.max(.2,Math.min(4,r*n));e.zoom(o,i),eh(t)}function a(t){o.off("pinchmove",r),o.off("pinchend",a),o.off("pinchcancel",a),o.reset(!0)}o.on("pinchmove",r),o.on("pinchend",a),o.on("pinchcancel",a)}))}(t.svg)}))}function rh(t){var e=this;t.on("canvas.init",(function(t){e.addBBoxMarker(t.svg)}))}ih.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],rh.$inject=["eventBus"],rh.prototype.addBBoxMarker=function(t){var e={fill:"none",class:"outer-bound-marker"},n=Mn("rect");pn(n,{x:-1e4,y:1e4,width:10,height:10}),pn(n,e),hn(t,n);var i=Mn("rect");pn(i,{x:1e4,y:1e4,width:10,height:10}),pn(i,e),hn(t,i)};const oh={__depends__:[{__depends__:[Vr],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",ih],touchFix:["type",rh]}]};function ah(t){return Math.log(t)/Math.log(10)}function sh(t,e){var n=ah(t.min),i=ah(t.max);return(Math.abs(n)+Math.abs(i))/e}var ch=Math.sign||function(t){return t>=0?1:-1},hh={min:.2,max:4};function uh(t,e,n){t=t||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=on(this._handleWheel,this),this._totalDelta=0,this._scale=t.scale||.75;var i=this;e.on("canvas.init",(function(e){i._init(!1!==t.enabled)}))}uh.$inject=["config.zoomScroll","eventBus","canvas"],uh.prototype.scroll=function(t){this._canvas.scroll(t)},uh.prototype.reset=function(){this._canvas.zoom("fit-viewport")},uh.prototype.zoom=function(t,e){var n=sh(hh,20);this._totalDelta+=t,Math.abs(this._totalDelta)>.1&&(this._zoom(t,e,n),this._totalDelta=0)},uh.prototype._handleWheel=function(t){if(!fi(t.target,".djs-scrollable",!0)){var e=this._container;t.preventDefault();var n,i=t.ctrlKey,r=t.shiftKey,o=-1*this._scale;if(o*=i?0===t.deltaMode?.02:.32:0===t.deltaMode?1:16,i){var a=e.getBoundingClientRect(),s={x:t.clientX-a.left,y:t.clientY-a.top};n=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*ch(t.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*t.deltaY,dy:0}:{dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(n)}},uh.prototype.stepZoom=function(t,e){var n=sh(hh,10);this._zoom(t,e,n)},uh.prototype._zoom=function(t,e,n){var i=this._canvas,r=t>0?1:-1,o=ah(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,h=Math.pow(10,a);i.zoom((s=hh,c=h,Math.max(s.min,Math.min(s.max,c))),e)},uh.prototype.toggle=function(t){var e=this._container,n=this._handleWheel,i=this._enabled;return void 0===t&&(t=!i),i!==t&&wi[t?"bind":"unbind"](e,"wheel",n,!1),this._enabled=t,t},uh.prototype._init=function(t){this.toggle(t)};const lh={__init__:["zoomScroll"],zoomScroll:["type",uh]};var dh=1500,ph="grab";function fh(t,e,n,i,r,o){this._dragging=n,this._mouse=o;var a=this,s=i.get("keyboard",!1);r.registerTool("hand",{tool:"hand",dragging:"hand.move"}),t.on("element.mousedown",dh,(function(t){if(Fr(t))return a.activateMove(t.originalEvent,!0),!1})),s&&s.addListener(dh,(function(t){if(mh(t.keyEvent)&&!a.isActive()){var e=a._mouse.getLastMoveEvent();a.activateMove(e,!!e)}}),"keyboard.keydown"),s&&s.addListener(dh,(function(t){mh(t.keyEvent)&&a.isActive()&&a.toggle()}),"keyboard.keyup"),t.on("hand.end",(function(e){var n=e.originalEvent.target;if(!(e.hover||n instanceof SVGElement))return!1;t.once("hand.ended",(function(){a.activateMove(e.originalEvent,{reactivate:!0})}))})),t.on("hand.move.move",(function(t){var n=e.viewbox().scale;e.scroll({dx:t.dx*n,dy:t.dy*n})})),t.on("hand.move.end",(function(e){var n=e.context.reactivate;return!Fr(e)&&n&&t.once("hand.move.ended",(function(t){a.activateHand(t.originalEvent,!0,!0)})),!1}))}function mh(t){return ya("Space",t)}fh.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],fh.prototype.activateMove=function(t,e,n){"object"==typeof e&&(n=e,e=!1),this._dragging.init(t,"hand.move",{autoActivate:e,cursor:ph,data:{context:n||{}}})},fh.prototype.activateHand=function(t,e,n){this._dragging.init(t,"hand",{trapClick:!1,autoActivate:e,cursor:ph,data:{context:{reactivate:n}}})},fh.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var t=this._mouse.getLastMoveEvent();this.activateHand(t,!!t)},fh.prototype.isActive=function(){var t=this._dragging.context();return!!t&&/^(hand|hand\.move)$/.test(t.prefix)};const yh={__depends__:[Va,Za],__init__:["handTool"],handTool:["type",fh]};var gh=Math.abs,vh=Math.round,bh={x:"width",y:"height"},_h="crosshair",wh={n:"top",w:"left",s:"bottom",e:"right"},xh={n:"s",w:"e",s:"n",e:"w"};function Mh(t,e,n,i,r,o,a){this._canvas=t,this._dragging=e,this._eventBus=n,this._modeling=i,this._rules=r,this._toolManager=o,this._mouse=a;var s=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(t){n.once("spaceTool.selection.ended",(function(){s.activateMakeSpace(t.originalEvent)}))})),n.on("spaceTool.move",1500,(function(t){var e=t.context,n=e.initialized;n||(n=e.initialized=s.init(t,e)),n&&Sh(t)})),n.on("spaceTool.end",(function(t){var e=t.context,i=e.axis,r=e.direction,o=e.movingShapes,a=e.resizingShapes,c=e.start;if(e.initialized){Sh(t);var h={x:0,y:0};h[i]=vh(t["d"+i]),s.makeSpace(o,a,h,r,c),n.once("spaceTool.ended",(function(t){s.activateSelection(t.originalEvent,!0,!0)}))}}))}function kh(t){return{top:t.top-20,right:t.right+20,bottom:t.bottom+20,left:t.left-20}}function Sh(t){var e,n,i=t.context.spaceToolConstraints;i&&(Ne(i.left)&&(e=Math.max(t.x,i.left),t.dx=t.dx+e-t.x,t.x=e),Ne(i.right)&&(e=Math.min(t.x,i.right),t.dx=t.dx+e-t.x,t.x=e),Ne(i.top)&&(n=Math.max(t.y,i.top),t.dy=t.dy+n-t.y,t.y=n),Ne(i.bottom)&&(n=Math.min(t.y,i.bottom),t.dy=t.dy+n-t.y,t.y=n))}function Eh(t,e){return-1!==t.indexOf(e)}Mh.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],Mh.prototype.activateSelection=function(t,e,n){this._dragging.init(t,"spaceTool.selection",{autoActivate:e,cursor:_h,data:{context:{reactivate:n}},trapClick:!1})},Mh.prototype.activateMakeSpace=function(t){this._dragging.init(t,"spaceTool",{autoActivate:!0,cursor:_h,data:{context:{}}})},Mh.prototype.makeSpace=function(t,e,n,i,r){return this._modeling.createSpace(t,e,n,i,r)},Mh.prototype.init=function(t,e){var n=gh(t.dx)>gh(t.dy)?"x":"y",i=t["d"+n],r=t[n]-i;if(gh(i)<5)return!1;i<0&&(i*=-1),Fr(t)&&(i*=-1);var o=function(t,e){if("x"===t){if(e>0)return"e";if(e<0)return"w"}if("y"===t){if(e>0)return"s";if(e<0)return"n"}return null}(n,i),a=Zn(this._canvas.getRootElement(),!0),s=this.calculateAdjustments(a,n,i,r),c=function(t,e,n,i,r){var o=t.movingShapes,a=t.resizingShapes;if(a.length){var s,c,h={};return He(a,(function(t){var u,l,d,p,f,m,y=t.attachers,g=t.children,v=Ki(t),b=ze(g,(function(t){return!(Hi(t)||qi(t)||Eh(o,t)||Eh(a,t))})),_=ze(g,(function(t){return!Hi(t)&&!qi(t)&&Eh(o,t)})),w=[],x=[];b.length&&(l=kh(Ki(Wn(b))),u=i-v[wh[n]]+l[wh[n]],"n"===n?h.bottom=c=Ne(c)?Math.min(c,u):u:"w"===n?h.right=c=Ne(c)?Math.min(c,u):u:"s"===n?h.top=s=Ne(s)?Math.max(s,u):u:"e"===n&&(h.left=s=Ne(s)?Math.max(s,u):u)),_.length&&(d=kh(Ki(Wn(_))),u=i-d[wh[xh[n]]]+v[wh[xh[n]]],"n"===n?h.bottom=c=Ne(c)?Math.min(c,u):u:"w"===n?h.right=c=Ne(c)?Math.min(c,u):u:"s"===n?h.top=s=Ne(s)?Math.max(s,u):u:"e"===n&&(h.left=s=Ne(s)?Math.max(s,u):u)),y&&y.length&&(y.forEach((function(t){Eh(o,t)?w.push(t):x.push(t)})),w.length&&(p=Ki(Wn(w.map(Wi))),f=v[wh[xh[n]]]-(p[wh[xh[n]]]-i)),x.length&&(m=Ki(Wn(x.map(Wi)))[wh[n]]-(v[wh[n]]-i)),"n"===n?(u=Math.min(f||1/0,m||1/0),h.bottom=c=Ne(c)?Math.min(c,u):u):"w"===n?(u=Math.min(f||1/0,m||1/0),h.right=c=Ne(c)?Math.min(c,u):u):"s"===n?(u=Math.max(f||-1/0,m||-1/0),h.top=s=Ne(s)?Math.max(s,u):u):"e"===n&&(u=Math.max(f||-1/0,m||-1/0),h.left=s=Ne(s)?Math.max(s,u):u));var M=r&&r[t.id];M&&("n"===n?(u=i+t[bh[e]]-M[bh[e]],h.bottom=c=Ne(c)?Math.min(c,u):u):"w"===n?(u=i+t[bh[e]]-M[bh[e]],h.right=c=Ne(c)?Math.min(c,u):u):"s"===n?(u=i-t[bh[e]]+M[bh[e]],h.top=s=Ne(s)?Math.max(s,u):u):"e"===n&&(u=i-t[bh[e]]+M[bh[e]],h.left=s=Ne(s)?Math.max(s,u):u))})),h}}(s,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:s.resizingShapes,start:r}));return an(e,s,{axis:n,direction:o,spaceToolConstraints:c,start:r}),sa("resize-"+("x"===n?"ew":"ns")),!0},Mh.prototype.calculateAdjustments=function(t,e,n,i){var r=this._rules,o=[],a=[],s=[],c=[];function h(t){o.includes(t)||o.push(t);var e=t.label;e&&!o.includes(e)&&o.push(e)}He(t,(function(t){if(t.parent&&!qi(t))if(Hi(t))c.push(t);else{var o=t[e],u=o+t[bh[e]];if(function(t){return!!t.host}(t)&&(n>0&&Wi(t)[e]>i||n<0&&Wi(t)[e]0&&o>i||n<0&&ui&&r.allowed("shape.resize",{shape:t})?(l=t,void(a.includes(l)||a.push(l))):void 0;h(t)}}})),He(o,(function(t){var e=t.attachers;e&&He(e,(function(t){h(t)}))}));var u=o.concat(a);return He(s,(function(t){var e=t.host;Eh(u,e)&&h(t)})),u=o.concat(a),He(c,(function(t){var e=t.source,n=t.target,i=t.label;Eh(u,e)&&Eh(u,n)&&i&&h(i)})),{movingShapes:o,resizingShapes:a}},Mh.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var t=this._mouse.getLastMoveEvent();this.activateSelection(t,!!t)},Mh.prototype.isActive=function(){var t=this._dragging.context();return!!t&&/^spaceTool/.test(t.prefix)};var Ah="djs-dragging",Th="djs-resizing",Ch=Math.max;function jh(t,e,n,i,r){function o(t,e){He(t,(function(t){r.addDragger(t,e),n.addMarker(t,Ah)}))}t.on("spaceTool.selection.start",(function(t){var e=n.getLayer("space"),r=t.context,o=Mn("g");pn(o,i.cls("djs-crosshair-group",["no-events"])),hn(e,o);var a=Mn("path");pn(a,"d","M 0,-10000 L 0,10000"),mn(a).add("djs-crosshair"),hn(o,a);var s=Mn("path");pn(s,"d","M -10000,0 L 10000,0"),mn(s).add("djs-crosshair"),hn(o,s),r.crosshairGroup=o})),t.on("spaceTool.selection.move",(function(t){Sr(t.context.crosshairGroup,t.x,t.y)})),t.on("spaceTool.selection.cleanup",(function(t){var e=t.context.crosshairGroup;e&&gn(e)})),t.on("spaceTool.move",250,(function(t){var a=t.context,s=a.line,c=a.axis,h=a.movingShapes,u=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var l=n.getLayer("space");pn(s=Mn("path"),"d","M0,0 L0,0"),mn(s).add("djs-crosshair"),hn(l,s),a.line=s;var d=Mn("g");pn(d,i.cls("djs-drag-group",["no-events"])),hn(n.getActiveLayer(),d),o(h,d),o(a.movingConnections=e.filter((function(t){var e=!1;He(h,(function(n){He(n.outgoing,(function(n){t===n&&(e=!0)}))}));var n=!1;He(h,(function(e){He(e.incoming,(function(e){t===e&&(n=!0)}))}));var i=!1;He(u,(function(e){He(e.outgoing,(function(e){t===e&&(i=!0)}))}));var r=!1;return He(u,(function(e){He(e.incoming,(function(e){t===e&&(r=!0)}))})),Hi(t)&&(e||i)&&(n||r)})),d),a.dragGroup=d}if(!a.frameGroup){var p=Mn("g");pn(p,i.cls("djs-frame-group",["no-events"])),hn(n.getActiveLayer(),p);var f=[];He(u,(function(t){var e=r.addFrame(t,p),i=e.getBBox();f.push({element:e,initialBounds:i}),n.addMarker(t,Th)})),a.frameGroup=p,a.frames=f}pn(s,{d:{x:"M"+t.x+", -10000 L"+t.x+", 10000",y:"M -10000, "+t.y+" L 10000, "+t.y}[c]});var m={x:t.dx,y:t.dy};m[{x:"y",y:"x"}[a.axis]]=0,Sr(a.dragGroup,m.x,m.y),He(a.frames,(function(t){var e,n,i=t.element,r=t.initialBounds;"e"===a.direction?pn(i,{width:Ch(r.width+m.x,5)}):pn(i,{width:e=Ch(r.width-m.x,5),x:r.x+r.width-e}),"s"===a.direction?pn(i,{height:Ch(r.height+m.y,5)}):pn(i,{height:n=Ch(r.height-m.y,5),y:r.y+r.height-n})}))}})),t.on("spaceTool.cleanup",(function(t){var e=t.context,i=e.movingShapes,r=e.movingConnections,o=e.resizingShapes,a=e.line,s=e.dragGroup,c=e.frameGroup;He(i,(function(t){n.removeMarker(t,Ah)})),He(r,(function(t){n.removeMarker(t,Ah)})),s&&(gn(a),gn(s)),He(o,(function(t){n.removeMarker(t,Th)})),c&&gn(c)}))}jh.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const Oh={__init__:["spaceToolPreview"],__depends__:[xa,no,Va,Ea,Za],spaceTool:["type",Mh],spaceToolPreview:["type",jh]};var Ph="crosshair";function Ih(t,e,n,i,r,o,a){this._selection=r,this._dragging=n,this._mouse=a;var s=this;o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),t.on("lasso.selection.end",(function(e){var n=e.originalEvent.target;(e.hover||n instanceof SVGElement)&&t.once("lasso.selection.ended",(function(){s.activateLasso(e.originalEvent,!0)}))})),t.on("lasso.end",(function(t){var e=$h(t),n=i.filter((function(t){return t}));s.select(n,e)})),t.on("lasso.start",(function(t){var n=t.context;n.bbox=$h(t),function(t){var n,i=e.getActiveLayer();pn(n=t.frame=Mn("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),hn(i,n)}(n)})),t.on("lasso.move",(function(t){var e=t.context;e.bbox=$h(t),function(t){var e=t.frame,n=t.bbox;pn(e,{x:n.x,y:n.y,width:n.width,height:n.height})}(e)})),t.on("lasso.cleanup",(function(t){!function(t){t.frame&&gn(t.frame)}(t.context)})),t.on("element.mousedown",1500,(function(t){if(Ur(t))return s.activateLasso(t.originalEvent),!0}))}function $h(t){var e={x:t.x-t.dx,y:t.y-t.dy},n={x:t.x,y:t.y};return e.x<=n.x&&e.y=n.x&&e.yn.x&&e.y<=n.y?{x:n.x,y:e.y,width:e.x-n.x,height:n.y-e.y}:e.x<=n.x&&e.y>n.y||e.x=n.y?{x:e.x,y:n.y,width:n.x-e.x,height:e.y-n.y}:e.x>=n.x&&e.y>n.y||e.x>n.x&&e.y>=n.y?{x:n.x,y:n.y,width:e.x-n.x,height:e.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}Ih.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],Ih.prototype.activateLasso=function(t,e){this._dragging.init(t,"lasso",{autoActivate:e,cursor:Ph,data:{context:{}}})},Ih.prototype.activateSelection=function(t,e){this._dragging.init(t,"lasso.selection",{trapClick:!1,autoActivate:e,cursor:Ph,data:{context:{}}})},Ih.prototype.select=function(t,e){var n=function(t,e){var n={};return He(t,(function(t){var i=t;i.waypoints&&(i=Wn(i)),!Ne(e.y)&&i.x>e.x&&(n[t.id]=t),!Ne(e.x)&&i.y>e.y&&(n[t.id]=t),i.x>e.x&&i.y>e.y&&(Ne(e.width)&&Ne(e.height)&&i.width+i.x1)for(;n=i.shift();){if(!(n.length+ot?e.width:t}),0),m=a.top;"middle"===o.vertical&&(m+=(i.height-p)/2),m-=(c||u[0].height)/4;var y=Mn("text");return pn(y,r),He(u,(function(t){var e;switch(m+=c||t.height,o.horizontal){case"left":e=a.left;break;case"right":e=(s?f:l)-a.right-t.width;break;default:e=Math.max(((s?f:l)-t.width)/2+a.left,0)}var n=Mn("tspan");pn(n,{x:e,y:m}),n.textContent=t.text,hn(y,n)})),gn(d),{dimensions:{width:f,height:p},element:y}};const qh=function(){function t(){}return t.defineLabelPosition=function(e,n,i){var r,o,a=n.waypoints;if(a||!(a.length>1)){var s,c,h=e.getBBox();switch(h.x-=5,h.y-=5,h.height+=10,h.width+=10,r=-h.x,o=-h.y,i){case"begin":s=a[0],c=t.getOrientation(a[0],a[1]);break;case"end":s=a[a.length-1],c=t.getOrientation(a[a.length-1],a[a.length-2])}if(r+=s.x,o+=s.y,c){switch(c){case"top":case"right":o-=h.height;break;case"bottom":break;case"left":o-=h.height,r-=h.width}kr(e,r,o,0)}}},t.getOrientation=function(t,e){return t.x==e.x?t.y= x > -90.0). \\n\\nIf the longitude property is present, this property MUST be present. \\n\\nNOTE: Some systems like Google Maps have the following rules. \'Latitude ranges between -90 and 90 degrees, inclusive. Values above or below this range will be clamped to the range [-90, 90]. This means that if the value specified is less than -90, it will be set to -90. And if the value is greater than 90, it will be set to 90.\' [Google Maps]"},"longitude":{"type":"string","description":"The GPS longitude of the location in decimal degrees. Positive numbers describe longitudes east of the prime meridian and negative numbers describe longitudes west of the prime meridian. The value of this property MUST be less than or equal to 180.0 and a value that is greater than -180.0 (i.e., 180.0 >= x > -180.0). \\n\\nIf the latitude property is present, this property MUST be present. \\n\\nNOTE: Some systems like Google Maps have the following rules. \'Longitude ranges between -180 and 180 degrees, inclusive. Values above or below this range will be wrapped so that they fall within the range. For example, a value of -190 will be converted to 170. A value of 190 will be converted to -170. This reflects the fact that longitudes wrap around the globe.\' [Google Maps]"},"precision":{"type":"string","description":"Defines the precision of the coordinates specified by the \'latitude\' and \'longitude\' properties. This is measured in meters. The actual agent may be anywhere up to precision meters from the defined point. \\n\\nIf this property is not present, then the precision is unspecified. \\n\\nIf this property is present, the \'latitude\' and \'longitude\' properties MUST be present."}},"unevaluatedProperties":false,"$defs":{"region-enum":{"type":"string","enum":["africa","eastern-africa","middle-africa","northern-africa","southern-africa","western-africa","americas","caribbean","central-america","latin-america-caribbean","northern-america","south-america","asia","central-asia","eastern-asia","southern-asia","south-eastern-asia","western-asia","europe","eastern-europe","northern-europe","southern-europe","western-europe","oceania","antarctica","australia-new-zealand","melanesia","micronesia","polynesia"]}}}'),xu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/contact.json","$schema":"http://json-schema.org/draft-07/schema#","title":"contact","description":"The \'contact\' information data type captures general contact information and uses the JSON object type [RFC8259] for serialization.","type":"object","properties":{"email":{"type":"object","unevaluatedProperties":false,"patternProperties":{"^[a-zA-Z0-9_-]{0,250}$":{"type":"string"}},"description":"An email address for this contact. \\n\\nThe key for each entry in the dictionary MUST be a \'string\' that uniquely identifies the contact type (e.g., the keys could be things like \'work\', \'home\', \'personal\', etc). The value for each key MUST be a \'string\'."},"phone":{"type":"object","unevaluatedProperties":false,"patternProperties":{"^[a-zA-Z0-9_-]{0,250}$":{"type":"string"}},"description":"A phone number for this contact. \\n\\nThe key for each entry in the dictionary MUST be a \'string\' that uniquely identifies the type (e.g., the keys could be things like \'work\', \'home\', \'personal\', etc). The value for each key MUST be a \'string\'."},"contact_details":{"type":"string","description":"Additional contact information."}},"unevaluatedProperties":false}'),Mu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/external-reference.json","$schema":"http://json-schema.org/draft-07/schema#","title":"external-reference","description":"The \'external-reference\' data type captures the location of information represented outside of a CACAO playbook and uses the JSON object type [RFC8259] for serialization. For example, a playbook could reference external documentation about a specific piece of malware that the playbook is trying to address. In addition to the name properties at least one of the following properties MUST be present: \'description\', \'source\', \'url\', \'external_id\', or \'reference_id\'.","type":"object","properties":{"name":{"type":"string","description":"The name of the author or title of the source of this external reference."},"description":{"type":"string","description":"A detailed description of this external reference."},"source":{"type":"string","description":"A textual citation of this source. The citation source MAY use a standard citation format like Chicago, MLA, APA, or similar style."},"url":{"type":"string","description":"A URL [RFC3986] for this external reference."},"external_id":{"type":"string","description":"An identifier used by the source to reference this content. Some organizations give names or numbers to content that they publish. This property would capture that information to help ensure that a consumer is being referred to the correct content."},"reference_id":{"type":"string","description":"An identifier that represents the data that this content is referring to. This property is especially useful when referencing content that already exists in a graph dataset or can be referenced via some ID. When referencing STIX content, this would be the STIX-based UUID."}},"required":["name"],"unevaluatedProperties":false}'),ku=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/identifier.json","$schema":"http://json-schema.org/draft-07/schema#","title":"identifier","description":"The identifier data type represents an RFC 4122-compliant UUID [RFC4122] and uses the JSON string type [RFC8259] for serialization. \\n\\nAn identifier uniquely identifies a CACAO object. All identifiers MUST follow the form object-type--UUID, where object-type is the exact value (all type names are lowercase strings by definition) from the type property of the object being identified and where the UUID MUST be an RFC 4122-compliant UUID [RFC4122]. \\n\\nThe UUID part of the identifier MUST be unique across all objects regardless of the type identified by the object-type prefix. Meaning, a producer MUST NOT reuse the UUID portion of the identifier for objects of different types. \\n\\nAll CACAO objects SHOULD use UUIDv4 for the UUID portion of the identifier. A CACAO playbook object MAY use UUIDv5 for the UUID portion of the identifier. All CACAO step objects MUST use UUIDv4. \\n\\nUsing a UUIDv5 for the playbook MAY allow producers and consumers using the same namespace and contributing properties to generate the same identifier for that playbook. When using UUIDv5 the UUID portion of the UUIDv5-based identifier SHOULD be generated according to the following rules: \\n\\nThe namespace SHOULD be \'aa7caf3a-d55a-4e9a-b34e-056215fba56a\'. \\n\\nThe value of the name portion SHOULD be a series of properties from the object that will ensure a globally unique identifier and those properties SHOULD be stringified according to the JSON Canonicalization Scheme [RFC8785] to ensure a canonical representation of the JSON data. \\n\\nThe contributing properties to the playbook object\'s UUIDv5 name portion SHOULD be the name and playbook_types properties. \\n\\nProducers not following these rules MUST NOT use a namespace of \'aa7caf3a-d55a-4e9a-b34e-056215fba56a\'","type":"string","pattern":"^[a-z][a-z0-9-]+[a-z0-9]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}'),Su=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/playbook-processing-summary.json","$schema":"http://json-schema.org/draft-07/schema#","title":"playbook-processing-summary","description":"The \'playbook-processing-summary\' data type represents the major processing features and functionality of a playbook and contains a summarized list of the processing features that can be implemented for a specific playbook and is defined at the playbook metadata level. This is done to help implementations identify the concepts and features used within a specific playbook without having to parse the entire playbook.","type":"object","properties":{"manual_playbook":{"type":"boolean","description":"This type of playbook contains only manual commands and simple text-based descriptions or tasks."},"external_playbooks":{"type":"boolean","description":"See section 4.6."},"parallel_processing":{"type":"boolean","description":"See section 4.7."},"if_logic":{"type":"boolean","description":"See section 4.8."},"while_logic":{"type":"boolean","description":"See section 4.9."},"switch_logic":{"type":"boolean","description":"See section 4.10."},"temporal_logic":{"type":"boolean","description":"See section 4.1 \'delay\' and \'timeout\' properties."},"data_markings":{"type":"boolean","description":"See section 2.4 and section 9."},"digital_signatures":{"type":"boolean","description":"See section 10.15."},"countersigned_signatures":{"type":"boolean","description":"See section 10.15."},"extensions":{"type":"boolean","description":"See section 8."}},"unevaluatedProperties":false}'),Eu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/signature.json","$schema":"http://json-schema.org/draft-07/schema#","title":"signature","description":"The \'signature\' data type captures the actual digital signature and meta-data about the signature and uses the JSON object type [RFC8259] for serialization. See section Appendix A for a detailed example. \\n\\n* One of the following properties MUST be populated, \'public_key\' (preferred), \'public_cert_chain\', \'cert_url\', or \'thumbprint\'.","type":"object","properties":{"type":{"type":"string","description":"The value of this property MUST be \'jss\'.","enum":["jss"]},"id":{"$ref":"identifier.json","description":"A value that uniquely identifies the signature. All signatures with the same ID are considered different versions of the same signature and the version of the signature is identified by its \'modified\' property."},"created_by":{"$ref":"identifier.json","description":"An ID that represents the entity that created this signature. The ID MUST represent a STIX 2.1+ identity object."},"created":{"$ref":"timestamp.json","description":"The time at which this signature was originally created. The creator can use any time it deems most appropriate as the time the signature was created, but it MUST be precise to the nearest millisecond (exactly three digits after the decimal place in seconds). The created property MUST NOT be changed when creating a new version of the signature."},"modified":{"$ref":"timestamp.json","description":"The time that this particular version of the signature was last modified. The creator can use any time it deems most appropriate as the time that this version of the signature was modified, but it MUST be precise to the nearest millisecond (exactly three digits after the decimal place in seconds). The modified property MUST be later than or equal to the value of the created property. If the created and \'modified\' properties are the same, then this is the first version of the signature."},"revoked":{"type":"boolean","description":"A boolean that identifies if the signature creator deems that this signature is no longer valid. The default value is \'false\'.","default":false},"signee":{"type":"string","description":"An unstructured string value for the name of the entity or organization that produced this signature."},"valid_from":{"$ref":"timestamp.json","description":"The time from which this signature is considered valid. \\n\\nIf omitted, the signature is valid at all times or until the timestamp defined by \'valid_until\'. If the revoked property is \'true\' then this property MUST be ignored."},"valid_until":{"$ref":"timestamp.json","description":"The time at which this signature should no longer be considered valid. \\n\\nIf the \'valid_until\' property is omitted, then there is no constraint on the latest time for which the signature is valid. \\n\\nThis property MUST be greater than the timestamp in the \'valid_from\' property if the \'valid_from\' property is defined. If the \'revoked\' property is true then this property MUST be ignored."},"related_to":{"$ref":"identifier.json","description":"A value that can identify the original playbook object that was signed with this signature. The value of this property MUST be a CACAO playbook id. If the signature is detached from the original playbook object then this property MUST be populated."},"related_version":{"$ref":"timestamp.json","description":"A value that can identify the version of the original playbook object that was signed with this signature. The value of this property MUST be the modified \'timestamp\' from the CACAO playbook that this signature is for."},"hash_algorithm":{"type":"string","description":"This property identifies the hashing algorithm, as defined by IANA, that was used to hash the JCS version of the full playbook object (Playbook Object + X.jss Signature) and is a case-sensitive ASCII string. As of this writing, implementations SHOULD use \'sha-256\' or \'sha-512\' but MAY use any current and widely accepted hashing algorithm that is defined in the IANA registry. \\n\\nThe actual signing process, defined in the \'algorithm\' property, sometimes uses an internal hashing algorithm inside the signing process itself, this property MAY identify the same hashing algorithm as the signing process or MAY identify a different hashing algorithm."},"algorithm":{"$ref":"#/$defs/signature-algorithm-type-ov","description":"This property identifies the algorithm that was used to sign the playbook and is a case-sensitive ASCII string. \\n\\nThe value for this property SHOULD come from the \'signature-algorithm-type-ov\' vocabulary and SHOULD be a current and widely accepted quantum safe algorithm, but MAY be any currently accepted safe algorithm. \\n\\nAt the time of this writing quantum safe algorithms could come from those defined in XMSS [RFC 8391] section 5.3 or LMS [RFC 8554] section 5.1 and other algorithms could come from those defined in JWA [RFC 7518] section 3.1 or [RFC 8037] section 3.1. \\n\\nWhile JWA [RFC7518] section 3.1 defines the following symmetric algorithms: \'HS256\', \'HS384\', and \'HS512\' these algorithms SHOULD NOT be used, as CACAO playbooks are intended to be shared across system and organizational boundaries. If one of these three symmetric algorithms or some other symmetric algorithm is used, then the sharing and transmission of those keys is out of scope for this specification."},"public_key":{"type":"string","description":"This property contains a PEM encoded public key without the header and footer for the algorithm selected in the \'algorithm\' property."},"public_cert_chain":{"type":"array","items":{"type":"string"},"minItems":1,"description":"This property contains a public key certificate for the algorithm selected in the algorithm property and MUST follow the requirements defined in section 4.7 of [RFC7517] as quoted here. This property \'contains a chain (X.509 certificate chain) of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64URL.encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. This MAY be followed by additional certificates, with each subsequent certificate being the one used to certify the previous one. The key in the first certificate MUST match the public key.\' This property is called \'x5c\' in section 4.7 of [RFC7517]."},"cert_url":{"type":"string","description":"This property contains a URI [RFC3986] that refers to a resource for an X.509 public key certificate or certificate chain [RFC5280] for the algorithm selected in the \'algorithm\' property and MUST follow the requirements defined in section 4.6 of [RFC7517] as quoted here. \'The identified resource MUST provide a representation of the certificate or certificate chain that conforms to RFC 5280 [RFC5280] in PEM-encoded form, with each certificate delimited as specified in section 7.1 of RFC 4945 [RFC4945]. The key in the first certificate MUST match the public key. The protocol used to acquire the resource MUST provide integrity protection; an HTTP GET request to retrieve the certificate MUST use TLS [RFC2818] [RFC5246]; the identity of the server MUST be validated, as per section 6 of RFC 6125 [RFC6125].\' This property is called \'x5u\' in section 4.6 of [RFC7517]."},"thumbprint":{"type":"string","description":"This property contains a fingerprint of a public key or public key certificate for the algorithm selected in the \'algorithm\' property and MUST follow the requirements defined in section 4.9 of [RFC7517] as quoted here. This property \'is a base64URL.encoded SHA-256 thumbprint (a.k.a. digest, X.509 certificate SHA-256 thumbprint) of the DER encoding of an X.509 certificate [RFC5280]. Note that certificate thumbprints are also sometimes known as certificate fingerprints. The key in the certificate MUST match the public key.\' This property is called \'x5t#S256\' in section 4.9 of [RFC7517]."},"value":{"type":"string","description":"A base64URL.encoded signature that was created using the signature algorithm defined in the \'algorithm\' property and a key. In pseudo code it is defined as: \\n\\nbase64URL.encode(sign(algorithm, key, hash(jcs())))."},"signature":{"$ref":"signature.json","description":"This property enables a signature to be countersigned, meaning a signature can be signed by another signature."}},"required":["type","id","created","modified","signee","related_to","related_version","hash_algorithm","algorithm","value"],"oneOf":[{"required":["public_key"]},{"required":["public_cert_chain"]},{"required":["cert_url"]},{"required":["thumbprint"]}],"unevaluatedProperties":false,"$defs":{"signature-algorithm-type-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512","Ed25519","Ed448","XMSS-SHA2_10_256","XMSS-SHA2_16_256","XMSS-SHA2_20_256","LMS_SHA256_M32_H5","LMS_SHA256_M32_H10","LMS_SHA256_M32_H15","LMS_SHA256_M32_H20","LMS_SHA256_M32_H25"]}]}}}'),Au=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/timestamp.json","$schema":"http://json-schema.org/draft-07/schema#","title":"timestamp","description":"The \'timestamp\' data type represents dates and times and uses the JSON string type [RFC8259] for serialization. The timestamp data MUST be a valid RFC 3339-formatted timestamp [RFC3339] using the format yyyy-mm-ddThh:mm:ss[.s+]Z where the \'s+\' represents 1 or more sub-second values. The brackets denote that sub-second precision is optional, and that if no digits are provided, the decimal place MUST NOT be present. The timestamp MUST be represented in the UTC+0 timezone and MUST use the \'Z\' designation to indicate this. Additional requirements may be defined where this data type is used.","type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\\\.[0-9]+)?Z$"}'),Tu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/data-types/variable.json","$schema":"http://json-schema.org/draft-07/schema#","title":"variable","description":"Variables can be defined and then used as the playbook is executed. Variables are stored in a dictionary where the key is the name of the variable and the value is a variable data type. Variables can represent stateful elements that may need to be captured to allow for the successful execution of the playbook. All playbook variables are mutable unless identified as a constant. \\n\\nIn addition to the rules for all dictionary keys, variable names: \\n\\nMUST be unique within the contextual scope they are declared. \\n\\nMUST be prefixed and suffixed with __ (two underscore characters) for both declaration and use. \\n\\nMUST contain the keyword \':value\' when using the variable (e.g., __ipaddress__:value). \\n\\nMUST include the double underscore \'__\' for the variable name prefix and suffix (a total of four characters) as part of the 250 ASCII character length limit. \\n\\nMUST start with a letter after the variable prefix __. \\n\\nAre case-sensitive (age, Age and AGE are three different variables) but SHOULD be lowercase. \\n\\nThe scope of a variable is determined by where the variable is declared. A variable may be defined globally for the entire playbook or locally within a workflow step. Variables are scoped to the object they are defined in, and any object that is used or referenced by that object. A specific variable can only be defined once, however, a variable can be assigned and used in the object where it is defined or in any object used or referenced by that object (e.g., a playbook variable can be assigned at the playbook level but also reassigned a different value within a workflow step). \\n\\nVariables are referenced by using the key name from the dictionary with a suffix (keyword) of \':value\'. For example, if you had a variable in the dictionary called \'__ip_addresses__\', one could reference this and use it in a playbook by using \'__ip_addresses__:value\'. Variables MAY be passed to and from external playbooks provided that system supports passing of arguments when the system function is invoked or returns its results. \\n\\nThe \'variable\' data type captures variable information and uses the JSON object type [RFC8259] for serialization.","type":"object","properties":{"type":{"$ref":"#/$defs/variable-type-ov","description":"The type of variable being used. The value for this property SHOULD come from the \'variable-type-ov\' vocabulary."},"description":{"type":"string","description":"An detailed description of this variable."},"value":{"type":["string","null"],"description":"The value MUST be defined as one of the following JSON types: a string value, a number or boolean encoded as a JSON string, an empty string \\"\\", the special JSON NULL value, or a JSON object. \\n\\nNOTE: An empty string is NOT equivalent to a JSON NULL value. An empty string means the value is known to be empty. A value of NULL means the value is unknown or undefined."},"constant":{"type":"boolean","description":"This property defines if this variable is immutable. If true, the variable is immutable and MUST NOT be changed. If false, the variable is mutable and can be updated later on in the playbook. The default value is \'false\'. If this property is not present then the value is \'false\'.","default":false},"external":{"type":"boolean","description":"This property only applies to playbook scoped variables. \\n\\nWhen set to \'true\' the variable declaration defines that the variable\'s initial value is passed into the playbook from a calling context. \\n\\nWhen set to \'false\' or omitted, the variable is defined within the playbook."}},"required":["type"],"$defs":{"variable-type-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["bool","dictionary","float","hexstring","integer","ipv4-addr","ipv6-addr","long","mac-addr","hash","md5-hash","sha256-hash","string","uri","uuid"]}]}}}'),Cu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/extension-definition/extension-definition.json","$schema":"http://json-schema.org/draft-07/schema#","title":"extension-definition","description":"The CACAO extension object allows a playbook producer to define detailed information about the extensions that are in use in a playbook that they created. In a playbook, extensions are stored in a dictionary where the ID is the key and the extension definition object is the value. Workflow steps, agents, data markings and playbooks themselves can use extensions by referencing their IDs. \\n\\nExtensions can use and refer to all objects that may be used in other parts of a playbook including variables and constants just like other parts of the playbook. While the extension\'s name and description are optional, they are encouraged and producers SHOULD populate them \\n\\n Requirements for Extension Properties: \\n\\nA CACAO playbook MAY have any number of Extensions containing one or more properties. \\n\\nExtension property names MUST be in ASCII and MUST only contain the characters a-z (lowercase ASCII), 0-9, and underscore (_). \\n\\nExtension property names MUST have a minimum length of 3 ASCII characters. \\n\\nExtension property names MUST be no longer than 250 ASCII characters in length. \\n\\nExtension properties SHOULD only be used when there are no existing properties defined by the CACAO playbook specification that fulfills that need.","type":"object","properties":{"type":{"type":"string","enum":["extension-definition"],"description":"The value of this property MUST be \'extension-definition\'."},"name":{"type":"string","description":"A name used to identify this extension for display purposes during execution, development or troubleshooting."},"description":{"type":"string","description":"More details, context, and possibly an explanation about what this extension does and accomplishes. \\n\\nWhile the extension\'s description is optional, it is encouraged that producers SHOULD populate the property. \\n\\nNOTE: The schema property is the normative definition of the extension, and this property, if present, is for documentation purposes only."},"created_by":{"$ref":"../data-types/identifier.json","description":"An ID that represents the entity that created this extension. The ID MUST represent a STIX 2.1+ identity object."},"schema":{"type":"string","description":"The normative definition of the extension, either as a URL or as text explaining the definition. \\n\\nA URL SHOULD point to a JSON schema or a location that contains information about the schema."},"version":{"type":"string","description":"The version of this extension. Producers of playbook extensions are encouraged to follow standard semantic versioning procedures where the version number follows the pattern, MAJOR.MINOR.PATCH [SemVer]. This will allow consumers to distinguish between the three different levels of compatibility typically identified by such versioning strings."},"external_references":{"type":"array","items":{"$ref":"./../data-types/external-reference.json"},"description":"A list of external references for this extension."}},"required":["type","name","created_by","schema","version"],"unevaluatedProperties":false}'),ju=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/playbook.json","$schema":"http://json-schema.org/draft-07/schema#","title":"playbook","description":"CACAO playbooks are made up of six parts playbook metadata, the workflow logic, a list of object definitions used in the workflow logic (agents and targets), a list of extensions, a list of data markings, and a list of any digital signatures. Playbooks MAY refer to other playbooks in the workflow, similar to how programs refer to function calls or modules that comprise the program. The definition and normative requirements for all data types listed in the property table below and other property tables in this document can be found in Section 10.","type":"object","properties":{"type":{"type":"string","description":"The value of this property MUST be \'playbook\'.","enum":["playbook"]},"spec_version":{"type":"string","description":"The version of the specification used to represent this playbook. The value of this property MUST be \'cacao-2.0\' to represent the version of this specification.","enum":["cacao-2.0"]},"id":{"$ref":"data-types/identifier.json","description":"A value that uniquely identifies the playbook. All playbooks with the same id are considered different versions of the same playbook and the version of the playbook is identified by its modified property."},"name":{"type":"string","description":"A name for this playbook. Playbook names often follow a naming convention that is unique within an organization, community, or trust group and as such this name SHOULD be unique."},"description":{"type":"string","description":"More details, context, and possibly an explanation about what this playbook does and tries to accomplish. Producers SHOULD populate this property."},"playbook_types":{"type":"array","description":"A list of playbook types that specifies the operational roles that this playbook addresses. This property SHOULD be populated. \\n\\nThe values for this property SHOULD come from the \'playbook-type-ov\' vocabulary (see section 3.1.1).","items":{"$ref":"#/$defs/playbook-type-ov"}},"playbook_activities":{"type":"array","description":"A list of activities pertaining to the playbook. This property SHOULD be populated. If the playbook_types property is populated and comes from the playbook-type-ov then this property MUST have at least one assigned activity. \\n\\nThis property allows an author to define more detailed descriptions for the various activities that a playbook performs. This property provides a much richer and verbose method to describe all aspects of a playbook than just the playbook_types property. \\n\\nThe values for this property SHOULD come from the \'playbook-activity-type-ov\' vocabulary (see section 3.1.2). \\n\\nEach listed activity MUST be reflected in a CACAO workflow step object and that object MUST be included in the workflow property.","items":{"$ref":"#/$defs/playbook-activity-type-ov"},"minItems":1},"playbook_processing_summary":{"$ref":"data-types/playbook-processing-summary.json","description":"This property contains a summarized list of processing features that are defined within this playbook. This property enables the content of a playbook to be assessed without requiring the entire content to be parsed or understood. See section 10.14."},"created_by":{"$ref":"data-types/identifier.json","description":"An ID that represents the entity that created this playbook. The ID MUST represent a STIX 2.1+ identity object."},"created":{"$ref":"data-types/timestamp.json","description":"The time at which this playbook was originally created. The creator can use any time it deems most appropriate as the time the playbook was created, but it MUST be given to the nearest millisecond (exactly three digits after the decimal place in seconds). The created property MUST NOT be changed when creating a new version of the object."},"modified":{"$ref":"data-types/timestamp.json","description":"The time that this particular version of the playbook was last modified. The creator can use any time it deems most appropriate as the time that this version of the playbook was modified, but it MUST be given to the nearest millisecond (exactly three digits after the decimal place in seconds). The modified property MUST be later than or equal to the value of the created property. If created and modified properties are the same, then this is the first version of the playbook."},"revoked":{"type":"boolean","description":"A boolean that identifies if the playbook creator deems that this playbook is no longer valid. The default value is \'false\'."},"valid_from":{"$ref":"data-types/timestamp.json","description":"The time from which this playbook is considered valid and the workflow steps that it contains can be executed. More detailed information about time frames MAY be applied in the workflow. \\n\\nIf omitted, the playbook is valid at all times or until the timestamp defined by valid_until. \\n\\nIf the revoked property is \'true\' then this property MUST be ignored."},"valid_until":{"$ref":"data-types/timestamp.json","description":"The time at which this playbook should no longer be considered a valid playbook to be executed. \\n\\nIf the valid_until property is omitted, then there is no constraint on the latest time for which the playbook is valid. \\n\\nThis property MUST be greater than the timestamp in the valid_from property if the valid_from property is defined. \\n\\nIf the revoked property is true then this property MUST be ignored."},"derived_from":{"type":"array","description":"The ID of one or more CACAO playbooks that this playbook was derived from. The ID MUST represent a CACAO playbook object.","items":{"$ref":"data-types/identifier.json"},"minItems":1},"related_to":{"type":"array","description":"The ID of one or more related STIX or CACAO objects that this playbook is related to. \\n\\nThe ID SHOULD represent a CACAO playbook object, but MAY represent any STIX v2.1 CTI object or a TC approved extension.","items":{"$ref":"data-types/identifier.json"},"minItems":1},"priority":{"type":"integer","minimum":0,"maximum":100,"description":"A number (𝕎 - whole number) that represents the priority of this playbook relative to other defined playbooks. \\n\\nPriority in the context of CACAO is a subjective assessment; thus, producers of playbooks, sharing organizations, and marketplaces MAY define rules on how priority should be assessed and assigned. This specification does not address how this assessment is determined. This property is primarily to allow such usage without requiring the addition of a custom property for such practices. \\n\\nIf specified, the value of this property MUST be between 0 and 100. \\n\\nWhen left blank this means unspecified. A value of 0 means specifically undefined. Values range from 1, the highest priority, to a value of 100, the lowest. \\n\\nThe values of 1-100 in this property are inverted from severity and impact based on how the concept of priority is used today. For example, in a SOC a P1 ticket is a higher priority than a P4 ticket."},"severity":{"type":"integer","minimum":0,"maximum":100,"description":"A number (𝕎 - whole number) that represents the seriousness of the conditions that this playbook addresses. This is highly dependent on whether the playbook is a response to an incident (in which case the severity could be mapped to an incident category defined in some solution), a response to a threat (in which case the severity would likely be mapped to the severity of the threat faced or captured by threat intelligence), or a response to something else. \\n\\nMarketplaces and sharing organizations MAY define additional rules for how this property should be assigned. This specification does not address how this assessment is determined. \\n\\nIf specified, the value of this property MUST be between 0 and 100. \\n\\nWhen left blank this means unspecified. A value of 0 means specifically undefined. Values range from 1, the lowest severity, to a value of 100, the highest."},"impact":{"type":"integer","minimum":0,"maximum":100,"description":"A number (𝕎 - whole number) from 0 to 100 that represents the potential impact (as determined subjectively by the producer) the execution of the playbook might have on the organization and its infrastructure. \\n\\nIf specified, the value of this property MUST be between 0 and 100. When left blank this means unspecified. A value of 0 means specifically undefined or benign. Impact values range from 1, the lowest impact, to a value of 100, the highest. \\n\\nMarketplaces and sharing organizations MAY define additional rules for how this property should be assigned. This specification does not address how this assessment is determined. \\n\\nNOTE: The value of this property is not related to what triggered the playbook in the first place, such as a threat or an incident. \\n\\nExecuting a playbook with a higher impact score may increase the likelihood of an effect on the organization. For example, a purely investigative playbook that is non-invasive could have a low impact value of 1. In contrast, a playbook that performs firewall changes, IPS changes, moves laptops to a quarantine VLAN etc., would have a higher impact value."},"industry_sectors":{"type":"array","description":"A list of industry sectors that this playbook may be related or applicable to. \\n\\nAny industry sectors that are used in other parts of this playbook MUST also be included in this property. Any industry sectors that are used in other referenced playbooks MAY also be included in this property. \\n\\nThe values for this property SHOULD come from the \'industry-sector-ov\' vocabulary.","items":{"$ref":"#/$defs/industry-sector-ov"},"minItems":1},"labels":{"type":"array","description":"A set of terms, labels, or tags associated with this playbook. The values may be user, organization, or trust-group defined and their meaning is outside the scope of this specification.","items":{"type":"string"},"minItems":1},"external_references":{"type":"array","description":"A list of external references for this playbook or content found in this playbook. \\n\\nAny external references that are used in other parts of this playbook MUST also be included in this property. Any external references that are used in other referenced playbooks MAY also be included in this property.","items":{"$ref":"data-types/external-reference.json"},"minItems":1},"markings":{"type":"array","description":"A list of data marking objects that apply to this playbook. In some cases, though uncommon, data markings themselves may be marked with sharing or handling guidance. In this case, this property MUST NOT contain any references to the same data marking object (i.e., it cannot contain any circular references). \\n\\nEach ID MUST represent a CACAO data marking object.","items":{"$ref":"data-types/identifier.json"},"minItems":1},"playbook_variables":{"type":"object","unevaluatedProperties":false,"description":"This property contains the global variables (see section 10.18.1 for information about variable scope) that can be used within the playbook, workflow steps (including conditional steps), commands, agents, and targets defined within the playbook. See section 10.18 for information about referencing variables. \\n\\nThe key for each entry in the dictionary MUST be a \'string\' that uniquely identifies the variable. The value for each key MUST be a CACAO \'variable\' data type (see section 10.18).","patternProperties":{"^__[a-zA-Z_][a-zA-Z0-9_-]{0,199}__$":{"$ref":"data-types/variable.json"}}},"workflow_start":{"$ref":"data-types/identifier.json","description":"The first workflow step included in the workflow property that MUST be executed when starting the workflow. \\n\\nThe ID MUST represent a CACAO workflow start step object and that object MUST be included in the workflow property. This property is an implementation helper so that the entire workflow does not need to be parsed to find the start step."},"workflow_exception":{"$ref":"data-types/identifier.json","description":"The workflow step invoked whenever a playbook execution exception condition occurs. \\n\\nIf defined, the ID MUST represent a CACAO workflow step object and that object MUST be included in the workflow property."},"workflow":{"description":"The workflow property contains the processing logic for the playbook as workflow steps. All playbooks MUST contain at least the following three steps: a start step, an action/playbook-action step, and an end step. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the workflow step (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO workflow step object (see section 4).","type":"object","unevaluatedProperties":false,"patternProperties":{"^action--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/action.json"},"^end--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/end.json"},"^if-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/if-condition.json"},"^parallel--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/parallel.json"},"^playbook-action--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/playbook-action.json"},"^start--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/start.json"},"^switch-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/switch-condition.json"},"^while-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"workflows/while-condition.json"}}},"playbook_extensions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^extension-definition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"type":"object"}},"description":"This property declares the extensions that are in use on this playbook (at the metadata level, see section 3.1) and contains the properties and values that are to be used by the extensions. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' (see section 10.10 for more information on identifiers) that uniquely identifies the extension. The value for each key is a JSON object that contains the structure as defined in the extension definition\'s schema property. The actual property extension definition is located in the extension_definitions property."},"authentication_info_definitions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^http-basic--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"authentication-info/http-basic.json"},"^oauth2--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"authentication-info/oauth2.json"},"^user-auth--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"authentication-info/user-auth.json"},"^[a-z]([-a-z]*[a-z])?--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"authentication-info/authentication-info.json"}},"description":"A dictionary of authentication information that can be referenced from agents and targets in workflow steps found in the workflow property. \\n\\nThe authentication information can be used by agents and targets when performing interactions that require authentication. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the authentication information (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO \'authentication-info\' object (see section 6). \\n\\nAny authentication information that is used in other parts of this playbook MUST also be included in this property."},"agent_definitions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^group--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/group.json"},"^http-api--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/http-api.json"},"^individual--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/individual.json"},"^linux--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/linux.json"},"^location--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/location.json"},"^net-address--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/net-address.json"},"^organization--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/organization.json"},"^sector--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/sector.json"},"^security-category--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/security-category.json"},"^ssh--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/ssh.json"},"^[a-z]([-a-z]*[a-z])?--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/agent-target.json"}},"description":"A dictionary of agents that can be referenced from workflow steps found in the workflow property. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the agent (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO \'agent-target\' object (see section 7). \\n\\nAny agents that are used in other parts of this playbook MUST also be included in this property."},"target_definitions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^group--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/group.json"},"^http-api--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/http-api.json"},"^individual--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/individual.json"},"^linux--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/linux.json"},"^location--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/location.json"},"^net-address--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/net-address.json"},"^organization--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/organization.json"},"^sector--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/sector.json"},"^security-category--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/security-category.json"},"^ssh--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/ssh.json"},"^[a-z]([-a-z]*[a-z])?--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"agent-target/agent-target.json"}},"description":"A dictionary of targets that can be referenced from workflow steps found in the workflow property. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the target (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO \'agent-target\' object (see section 7). \\n\\nAny targets that are used in other parts of this playbook MUST also be included in this property."},"extension_definitions":{"type":"object","unevaluatedProperties":false,"patternProperties":{"^extension-definition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"extension-definition/extension-definition.json"}},"description":"A dictionary of extension definitions that are referenced from workflow steps found in the workflow property. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the extension (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO extension object (see section 7). \\n\\nAny extensions that are used in other parts of this playbook MUST also be included in this property."},"data_marking_definitions":{"type":"object","unevaluatedProperties":false,"description":"A dictionary of data marking definitions that can be referenced from the playbook found in the markings property. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' that uniquely identifies the data marking (see section 10.10 for more information on identifiers). The value for each key MUST be a CACAO data marking object (see section 9). \\n\\nAny data markings that are used in other parts of this playbook MUST also be included in this property.","patternProperties":{"^marking-tlp--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"data-markings/marking-tlp.json"},"^marking-iep--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"data-markings/marking-iep.json"},"^marking-statement--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"$ref":"data-markings/marking-statement.json"}}},"signatures":{"type":"array","description":"A list of digital signatures for this playbook. Adding a signature to a playbook does not represent a version change of the playbook. See sections 2.5, 10.15, and Appendix A for more information and a detailed example.","items":{"$ref":"data-types/signature.json"},"minItems":1}},"required":["type","spec_version","id","name","created_by","created","modified","workflow_start","workflow"],"unevaluatedProperties":false,"$defs":{"playbook-type-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["attack","detection","engagement","investigation","mitigation","notification","prevention","remediation"]}]},"playbook-activity-type-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["compose-content","deliver-content","identify-audience","identify-channel","scan-system","match-indicator","analyze-collected-data","identify-indicators","scan-vulnerabilities","configure-systems","restrict-access","disconnect-system","eliminate-risk","revert-system","restore-data","restore-capabilities","map-network","identify-steps","step-sequence","prepare-engagement","execute-operation","analyze-engagement-results"]}]},"industry-sector-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["aerospace","aviation","agriculture","automotive","biotechnology","chemical","commercial","consulting","construction","cosmetics","critical-infrastructure","dams","defense","education","emergency-services","energy","non-renewable-energy","renewable-energy","media","financial","food","gambling","government","local-government","national-government","regional-government","public-services","healthcare","information-communications-technology","electronics-hardware","software","telecommunications","legal-services","lodging","manufacturing","maritime","metals","mining","non-profit","humanitarian-aid","human-rights","nuclear","petroleum","pharmaceuticals","research","transportation","logistics-shipping","utilities","video-game","water"]}]}}}'),Ou=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/action.json","$schema":"http://json-schema.org/draft-07/schema#","title":"action","description":"The action step workflow step contains the actual commands to be executed by an agent against a set of targets. These commands are intended to be processed sequentially. In addition to the inherited properties, this section defines five more specific properties that are valid for this type.","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'action\'.","enum":["action"]},"commands":{"type":"array","description":"A list of commands that are to be executed as part of this step. If more than one command is listed, the commands MUST be processed in the order in which they are listed (see section 5). All commands in a given step MUST be applicable to all the agents and all the targets defined in that step.","items":{"$ref":"../commands/command-data.json"},"minItems":1},"agent":{"$ref":"../data-types/identifier.json","description":"This property contains an ID reference to a CACAO \'agent-target\' object that is stored at the playbook level in the \'agent_definitions\' property. This agent MUST execute the commands defined in this step. As stated in section 7, agents are the entities that execute commands on or against targets. \\n\\nThe ID MUST reference a CACAO agent-target object (see section 7)."},"targets":{"type":"array","description":"This property contains a list of ID references to CACAO \'agent-target\' objects that are stored at the playbook level in the target_definitions property. \\n\\nEach ID MUST reference a CACAO \'agent-target\' object (see section 7). If defined, this list MUST have at least one identifier.","items":{"$ref":"../data-types/identifier.json"},"minItems":1},"in_args":{"type":"array","description":"The list of variable names from the local \'step_variables\' dictionary (see section 4.1) or passed into this step from the global \'playbook_variables\' dictionary (see section 3.1) that are used in either an agent or one of the target(s) associated with this step. See section 10.18 for more information about variables.","items":{"type":"string"},"minItems":1},"out_args":{"type":"array","description":"The list of variable names from the local \'step_variables\' dictionary (see section 4.1) or global \'playbook_variables\' dictionary (see section 3.1) that are to be returned to this step after execution of the commands by the agent(s). Implementations SHOULD strongly discourage the use of overloading of variable names, meaning using the same variable name at the step level that is also in use at the playbook level. This is to avoid issues with implementations. However, if the variable name is reused at the step level, then only that instance of the variable SHOULD be updated. See section 10.18 for more information about variables.","items":{"type":"string"},"minItems":1}}}],"required":["commands","agent"],"unevaluatedProperties":false}'),Pu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/end.json","$schema":"http://json-schema.org/draft-07/schema#","title":"end","description":"The end step workflow step is the ending point of a playbook or branch of step (e.g., a list of steps that are part of a parallel processing branch) and represents an explicit point in the workflow to signify the end of a playbook or branch of steps. While this type inherits all of the common properties of a workflow step it does not define any additional properties. When a playbook or branch of a playbook terminates it MUST call an end step. This workflow step MUST NOT use the \'on_completion\', \'on_success\', or \'on_failure\' properties. While an end step MUST exist for the overall workflow, additional end steps MAY be present for workflow branches.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'end\'.","enum":["end"]}}},{"not":{"anyOf":[{"required":["on_completion"]},{"required":["on_failure"]},{"required":["on_success"]}]}}],"unevaluatedProperties":false}'),Iu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/if-condition.json","$schema":"http://json-schema.org/draft-07/schema#","title":"if-condition","description":"The if condition step workflow step defines the \'if-then-else\' conditional logic that can be used within the workflow of the playbook. In addition to the inherited properties, this section defines the following additional properties that are valid for this type.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'if-condition\'.","enum":["if-condition"]},"condition":{"type":"string","description":"A boolean expression as defined in the STIX Patterning Grammar that when it evaluates as true executes the workflow step identified by the \'on_true\' property, otherwise it executes the \'on_false\' workflow step."},"on_true":{"type":"string","description":"The step ID to be processed if the condition evaluates as true. \\n\\nThe entry in the \'on_true\' property forms a branch of steps that are to be executed, even if there is only one workflow step in the branch. This branch MUST reference a unique end step when that branch has completed processing. This allows implementations to know when to return to the original if condition step that started that branch to look for any \'on_completion\', \'on_success\', or \'on_failure\' actions. \\n\\nThe ID MUST represent a CACAO workflow step object.","$ref":"../data-types/identifier.json"},"on_false":{"type":"string","description":"The step ID to be processed if the condition evaluates as false. \\n\\nThe entry in the \'on_false\' property forms a branch of steps that are to be executed, even if there is only one workflow step in the branch. This branch MUST reference a unique end step when that branch has completed processing. This allows implementations to know when to return to the original if condition step that started that branch to look for any \'on_completion\', \'on_success\', or \'on_failure\' actions. \\n\\nThe ID MUST represent a CACAO workflow step object.","$ref":"../data-types/identifier.json"}}}],"required":["condition","on_true"],"unevaluatedProperties":false}'),$u=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/parallel.json","$schema":"http://json-schema.org/draft-07/schema#","title":"parallel","description":"The parallel step workflow step defines how to create steps that are processed in parallel. This workflow step allows playbook authors to define two or more steps that can be executed at the same time. For example, a playbook that responds to an incident may require both the network team and the desktop team to investigate and respond to a threat at the same time. Another example is a response to a cyber attack on an operational technology (OT) environment that requires releasing air / steam / water pressure simultaneously. In addition to the inherited properties, this section defines the following additional property that is valid for this type. Implementations MUST wait for all steps referenced in the \'next_steps\' property to complete before moving on. \\n\\nThe steps referenced from this object are intended to be processed in parallel, however, if an implementation cannot support executing steps in parallel, then the steps MAY be executed in sequential order if the desired outcome is the same.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'parallel\'.","enum":["parallel"]},"next_steps":{"type":"array","description":"A list of two or more workflow steps to be processed in parallel. The \'next_steps\' MUST contain at least two values. If there is only one value, then the parallel step MUST NOT be used. \\n\\nEach entry in the next_steps property forms a branch of steps that are to be executed, even if there is only one workflow step in the branch. Each branch MUST reference a unique end step when that branch has completed processing. This allows implementations to know when to return to the original parallel step that started that branch to look for any \'on_completion\', \'on_success\', or \'on_failure\' actions. \\n\\nThe definition of parallel execution and how many parallel steps that are possible to execute is implementation dependent and is not part of this specification. \\n\\nIf any of the steps referenced in next_steps generate an error of any kind (exception or timeout) then implementers SHOULD consider defining rollback error handling for the playbook and include those steps in the playbook itself. \\n\\nEach ID MUST represent a CACAO workflow step object.","items":{"$ref":"../data-types/identifier.json"},"minItems":2}}}],"required":["next_steps"],"unevaluatedProperties":false}'),Ru=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/playbook-action.json","$schema":"http://json-schema.org/draft-07/schema#","title":"playbook-action","description":"The playbook action step workflow step executes a referenced playbook using the agents and targets defined in the referenced playbook. In addition to the inherited properties, this section defines the following additional properties that are valid for this type.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'playbook-action\'.","enum":["playbook-action"]},"playbook_id":{"$ref":"../data-types/identifier.json","description":"The referenced playbook to execute. The playbook ID SHOULD be defined such that it is locally relevant to the system that will execute the playbook."},"playbook_version":{"$ref":"../data-types/timestamp.json","description":"The version of the CACAO playbook that this step references. \\n\\nThe value of this property MUST be the modified \'timestamp\' from the CACAO playbook that this step references. If this property is not defined then the latest version that is known or available is considered valid."},"in_args":{"type":"array","description":"The list of variable names from the local \'step_variables\' dictionary (see section 4.1) or passed into this step from the global \'playbook_variables\' dictionary (see section 3.1) that are used in this playbook. See section 10.18 for more information about variables.","items":{"type":"string"},"minItems":1},"out_args":{"type":"array","description":"The list of variable names from the local step_variables dictionary (see section 4.1) or global \'playbook_variables\' dictionary (see section 3.1) that are to be returned from this playbook after execution and stored in the same variable dictionary. See section 10.18 for more information about variables.","items":{"type":"string"},"minItems":1}}}],"required":["playbook_id"],"unevaluatedProperties":false}'),Lu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/start.json","$schema":"http://json-schema.org/draft-07/schema#","title":"start","description":"The start step workflow step is the starting point of a playbook and represents an explicit entry in the workflow to signify the start of a playbook. While this type inherits all of the common properties of a workflow step it does not define any additional properties. This workflow step MUST NOT use the \'on_success\' or \'on_failure\' properties.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'start\'.","enum":["start"]}}},{"not":{"anyOf":[{"required":["on_failure"]},{"required":["on_success"]}]}}],"unevaluatedProperties":false}'),Nu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/switch-condition.json","$schema":"http://json-schema.org/draft-07/schema#","title":"switch-condition","description":"The switch condition step workflow step defines the \'switch\' condition logic that can be used within the workflow of the playbook. In addition to the inherited properties, this section defines the following additional properties that are valid for this type.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'switch-condition\'.","enum":["switch-condition"]},"switch":{"type":"string","description":"A variable that is evaluated to determine which key in the cases dictionary is matched against to execute the associated step."},"cases":{"description":"This property is a dictionary that defines one or more case values (as dictionary keys) and a step ID (as a key value) to be processed when the case value is matched against the switch value. \\n\\nThe value for each entry in the dictionary MUST be an identifier and it MUST represent a CACAO workflow step object. This value uniquely identifies the steps to be processed when that key/value is chosen (see section 10.10 for more information on identifiers). \\n\\nEach entry in the cases property forms a branch of steps that are to be executed, even if there is only one workflow step in the branch. Each branch MUST reference a unique end step when that branch has completed processing. This allows implementations to know when to return to the original switch condition step that started that branch to look for any on_completion, on_success, or on_failure actions. \\n\\nThis dictionary MAY have a \'default\' case value.","type":"object","unevaluatedProperties":false,"patternProperties":{"^[a-zA-Z0-9_-]{0,250}":{"oneOf":[{"type":"string","pattern":"action--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"end--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"if-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"parallel--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"playbook--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"start--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"switch-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"string","pattern":"while-condition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"}]}}}}}],"required":["switch","cases"],"unevaluatedProperties":false}'),Bu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/while-condition.json","$schema":"http://json-schema.org/draft-07/schema#","title":"while-condition","description":"The while condition step workflow step defines the \'while\' conditional logic that can be used within the workflow of the playbook. In addition to the inherited properties, this section defines the following additional properties that are valid for this type.","type":"object","allOf":[{"$ref":"workflow-step.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'while-condition\'.","enum":["while-condition"]},"condition":{"type":"string","description":"A boolean expression as defined in the STIX Patterning Grammar that while it is true executes the workflow step identified by \'on_true\' otherwise it exits the while conditional part of the workflow step."},"on_true":{"type":"string","description":"The step ID to be processed every time the loop condition evaluates as true. \\n\\nThe entry in the on_true property forms a branch of steps that are to be executed, even if there is only one workflow step in the branch. This branch MUST reference a unique end step when that branch has completed processing. This allows implementations to know when to return to the original While Step that started that branch to look for any \'on_completion\', \'on_success\', or \'on_failure\' actions. \\n\\nThe ID MUST represent a CACAO workflow step object.","$ref":"../data-types/identifier.json"}}}],"required":["condition","on_true"],"unevaluatedProperties":false}'),Du=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/workflows/workflow-step.json","$schema":"http://json-schema.org/draft-07/schema#","title":"workflow-step","description":"Workflows contain a series of steps that are stored in a dictionary (see the workflow property in section 3.1), where the key is the step ID and the value is a workflow step. These workflow steps along with the associated commands form the building blocks for playbooks and are used to control the commands that need to be executed. Workflows steps are processed either sequentially, in parallel, or both depending on the type of steps required by the playbook. In addition to simple processing, workflow steps MAY also contain conditional and/or temporal operations to control the execution of the playbook. \\n\\nConditional processing means executing steps or commands after some sort of condition is met. Temporal processing means executing steps or commands either during a certain time window or after some period of time has passed. \\n\\nThis section defines the various workflow steps and how they may be used to define a playbook. \\n\\nEach workflow step contains base properties that are common across all steps. These common properties are defined in the following table. The determination of a step being successful,failing, or completing is implementation specific and is out of scope for this specification, but details MAY be included in the description property.","type":"object","properties":{"type":{"$ref":"#/$defs/workflow-step-type-enum","description":"The type of workflow step being used. The value for this property MUST come from the \'workflow-step-type-enum\' enumeration."},"name":{"type":"string","description":"A name for this step that is meant to be displayed in a user interface or captured in a log message."},"description":{"type":"string","description":"More details, context, and possibly an explanation about what this step does and tries to accomplish."},"external_references":{"type":"array","description":"A list of external references for this step.","items":{"$ref":"../data-types/external-reference.json"},"minItems":1},"delay":{"type":"integer","minimum":1,"description":"A number (𝕎 - whole number) that represents the amount of time in milliseconds that this step SHOULD wait before it starts processing. \\n\\nIf specified, the value for this property MUST be greater than or equal to 0. \\n\\nIf this property is omitted, then the workflow step executes immediately without delay."},"timeout":{"type":"integer","description":"A number (𝕎 - whole number) that represents the amount of time in milliseconds that this step MUST wait before considering the step has failed. \\n\\nWhen a timeout has occurred for a step, the on_failure step pointer is invoked (if defined) and the information included in that call states that an ACTION_TIMEOUT occurred including the id of the step that timed out. \\n\\nIf specified, the value of this property MUST be greater than or equal to 0. \\n\\nIf this property is omitted, the system executing this workflow step SHOULD consider implementing a maximum allowed timeout to ensure that no individual workflow step can block a playbook execution indefinitely."},"step_variables":{"type":"object","unevaluatedProperties":false,"description":"This property contains the variables that can be used within this workflow step or within commands, agents, and targets referenced by this workflow step. See section 10.18.2 for information about referencing variables. \\n\\nThe key for each entry in the dictionary MUST be a string that uniquely identifies the variable. The value for each key MUST be a CACAO \'variable\' data type (see section 10.18.3).","patternProperties":{"^__[a-zA-Z_][a-zA-Z0-9_-]{0,199}__$":{"$ref":"../data-types/variable.json"}}},"owner":{"$ref":"../data-types/identifier.json","description":"An ID that represents the entity that is assigned as the owner or responsible party for this step. \\n\\nThe value of this property MUST represent a STIX 2.1+ Identity object."},"on_completion":{"$ref":"../data-types/identifier.json","description":"The ID of the next step to be processed upon completion of the defined commands. \\n\\nThe value of this property MUST represent a CACAO workflow step object. \\n\\nIf this property is defined, then on_success and on_failure MUST NOT be defined."},"on_success":{"$ref":"../data-types/identifier.json","description":"The ID of the next step to be processed if this step completes successfully. \\n\\nThe value of this property MUST represent a CACAO workflow step object. \\n\\nIf this property is defined, then on_completion MUST NOT be defined. This property MUST NOT be used on the \'start\' or \'end\' steps."},"on_failure":{"$ref":"../data-types/identifier.json","description":"The ID of the next step to be processed if this step fails to complete successfully. \\n\\nThe value of this property MUST represent a CACAO workflow step object. \\n\\nIf omitted and a failure occurs, then the playbook\'s exception handler found in the workflow_exception property at the Playbook level will be invoked. \\n\\nIf this property is defined, then on_completion MUST NOT be defined. This property MUST NOT be used on the \'start\' or \'end\' steps."},"step_extensions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^extension-definition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"type":"object"}},"description":"This property declares the extensions that are in use on this step and contains any of the properties and values that are to be used by that extension. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' (see section 10.10 for more information on identifiers) that uniquely identifies the extension. The value for each key is a JSON object that contains the structure as defined in the extension definition\'s schema property. The actual step extension definition is located in the \'extension_definitions\' property found at the Playbook level."}},"required":["type"],"anyOf":[{"if":{"properties":{"type":{"const":"end"}}},"then":{"not":{"required":["on_completion","on_failure","on_success"]}}},{"required":["on_completion"],"not":{"required":["on_failure","on_success"]}},{"required":["on_success"],"not":{"required":["on_completion"]}}],"$defs":{"workflow-step-type-enum":{"type":"string","enum":["start","end","action","playbook-action","parallel","if-condition","while-condition","switch-condition"]}}}'),Fu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/authentication-info/authentication-info.json","$schema":"http://json-schema.org/draft-07/schema#","title":"authentication-info","description":"In a CACAO playbook, authentication information is used by agents and targets when they need to authenticate against a resource. Authentication information is stored in a dictionary where the ID is the key and the value is an authentication-info object (see section 10.2). Common properties for an authentication information object are defined in section 6.1. \\n\\nAuthentication information can use and refer to variables just like other parts of the playbook. For any authentication information property value, the producer may define a variable substitution such that the actual property value is determined at runtime based on the variable assigned to the authentication information. In Example 6.1, authentication information is referenced within an agent, but the authentication information\'s actual values are based on variables instead of being hard-coded in the data itself. It is generally best practice to always use variables for authentication information. Each authentication information object contains base properties that are common across all objects. \\n\\nThese properties are defined in the following table. The ID for each object is stored as the key in the \'authentication_info_definitions\' dictionary at the Playbook level.","type":"object","properties":{"type":{"$ref":"#/$defs/authentication-info-type-ov","description":"The type of object being used. The value of this property SHOULD come from the \'authentication-info-type-ov\' vocabulary."},"name":{"type":"string","description":"The name that represents this object that is meant to be displayed in a user interface or captured in a log message. This property SHOULD be populated."},"description":{"type":"string","description":"More details, context, and possibly an explanation about this object."},"authentication_info_extensions":{"minProperties":1,"type":"object","unevaluatedProperties":false,"patternProperties":{"^extension-definition--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$":{"type":"object"}},"description":"This property declares the extensions that are in use on this authentication information object and contains any of the properties and values that are to be used by that extension. \\n\\nThe key for each entry in the dictionary MUST be an \'identifier\' (see section 9.9 for more information on identifiers) that uniquely identifies the extension. The value for each key is a JSON object that contains the structure as defined in the extension definition\'s schema property. The actual step extension definition is located in the \'extension_definitions\' property found at the Playbook level."}},"required":["type"],"$defs":{"authentication-info-type-ov":{"anyOf":[{"type":"string"},{"type":"string","enum":["http-basic","oauth2","user-auth"]}]}}}'),Uu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/authentication-info/http-basic.json","$schema":"http://json-schema.org/draft-07/schema#","title":"http-basic","description":"This type defines the HTTP basic authentication information object and is used by agents and targets when performing HTTP basic authentication. This object inherits all of the authentication information common properties (see section 6.1). In addition to the inherited properties, this section defines the following additional properties that are valid for this type. If the \'kms\' and \'kms_key_identifier\' properties are used the \'user_id\' and \'password\' properties MUST NOT be populated.","allOf":[{"$ref":"authentication-info.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'http-basic\'.","enum":["http-basic"]},"user_id":{"type":"string","description":"The user_id property used in HTTP Basic authentication as defined by [RFC7617]."},"password":{"type":"string","description":"The password property used in HTTP Basic authentication as defined by [RFC7617]. This value SHOULD be passed in via a variable."},"kms":{"type":"boolean","description":"If this property is \'true\' the key material associated with this authentication information is stored in a key management store and the \'kms_key_identifier\' property contains the identifier used to look up the key material associated with the \'kms_key_identifier\'. \\n\\nIf this property is set to true then the value of the \'kms_key_identifier\' property MUST be defined and the value of the \'password\' property MUST be ignored."},"kms_key_identifier":{"type":"string","description":"This property contains the key identifier for the authentication information value stored in a key management service (KMS) used by the orchestration system executing the playbook. \\n\\nThe specific KMS used by the orchestration system is out of scope of this specification. \\n\\nIf this property is defined then the \'kms\' property MUST be set to \'true\'."}}}],"unevaluatedProperties":false}'),zu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/authentication-info/oauth2.json","$schema":"http://json-schema.org/draft-07/schema#","title":"oauth2","description":"This type defines the Oauth2 authentication information object and is used by agents and targets when performing oauth2 authentication. This object inherits all of the authentication information common properties (see section 6.1). In addition to the inherited properties, this section defines the following additional properties that are valid for this type. If the \'kms\' and \'kms_key_identifier\' properties are used the \'token\' property MUST NOT be populated.","allOf":[{"$ref":"authentication-info.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'oauth2\'.","enum":["oauth2"]},"oauth_header":{"type":"string","description":"The OAuth header used in OAuth authentication as defined in section 3.5.1 of [RFC5849] and [RFC6750]."},"token":{"type":"string","description":"The bearer token used in HTTP Bearer Token authentication as defined by [RFC6749] and [RFC6750]. This value SHOULD be passed in via a variable."},"kms":{"type":"boolean","description":"If this property is \'true\' the key material associated with this authentication information is stored in a key management store and the \'kms_key_identifier\' property contains the identifier used to look up the key material associated with the \'kms_key_identifier\'. \\n\\nIf this property is set to \'true\' then the value of the \'kms_key_identifier\' property MUST be defined and the value of the \'token\' property MUST be ignored."},"kms_key_identifier":{"type":"string","description":"This property contains the key identifier for the authentication information value stored in a key management service (KMS) used by the orchestration system executing the playbook. \\n\\nThe specific KMS used by the orchestration system is out of scope of this specification. \\n\\nIf this property is defined then the \'kms\' property MUST be set to \'true\'."}}}],"required":["oauth_header","token"],"unevaluatedProperties":false}'),Hu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-cs01/schemas/authentication-info/user-auth.json","$schema":"http://json-schema.org/draft-07/schema#","title":"user-auth","description":"This type defines a generic username / password authentication information object and is used by agents and targets when performing authentication. This object inherits all of the authentication information common properties (see section 6.1). In addition to the inherited properties, this section defines the following additional properties that are valid for this type. If the \'kms\' and \'kms_key_identifier\' properties are used the \'username\' and \'password\' properties MUST NOT be populated.","allOf":[{"$ref":"authentication-info.json"},{"properties":{"type":{"type":"string","description":"The value of this property MUST be \'user-auth\'.","enum":["user-auth"]},"username":{"type":"string","description":"A username for this authentication."},"password":{"type":"string","description":"The password for this authentication. This value SHOULD be passed in via a variable."},"kms":{"type":"boolean","description":"If this property is \'true\' the key material associated with this authentication information is stored in a key management store and the \'kms_key_identifier\' property contains the identifier used to look up the key material associated with the \'kms_key_identifier\'. \\n\\nIf this property is set to \'true\' then the value of the \'kms_key_identifier\' property MUST be defined and the value of the \'password\' property MUST be ignored."},"kms_key_identifier":{"type":"string","description":"This property contains the key identifier for the authentication information value stored in a key management service (KMS) used by the orchestration system executing the playbook. \\n\\nThe specific KMS used by the orchestration system is out of scope of this specification. \\n\\nIf this property is defined then the \'kms\' property MUST be set to \'true\'."}}}],"unevaluatedProperties":false}'),qu=JSON.parse('{"$id":"https://raw.githubusercontent.com/cyentific-rni/workflow-status/main/schema/execution-status.json","$schema":"http://json-schema.org/draft-07/schema#","title":"execution-status","description":"JSON validation schema for tracking the execution of CACAO playbooks.","type":"object","properties":{"type":{"type":"string","enum":["execution-status"],"description":"This property identifies the semantic type of the object. The value of this property is a string and MUST be \'execution-status\'."},"id":{"$ref":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-csd01/schemas/data-types/identifier.json","description":"A identifier that uniquely identifies this object (e.g., execution-status-UUIDv4)."},"workflow_step":{"$ref":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-csd01/schemas/data-types/identifier.json","description":"The identifier of the CACAO workflow step this object refers to (tracks)."},"start_time":{"$ref":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-csd01/schemas/data-types/timestamp.json","description":"A timestamp that identifies the time the step execution started."},"duration":{"$ref":"integer","description":"A number (W - whole number) that represents the amount of time in milliseconds that this step required to be fully performed."},"status":{"$ref":"#/$defs/execution-status-enum","description":"This property identifies the execution status of the workflow step. The value of this property SHOULD come from the execution-status-enum enumeration."},"status_text":{"type":"string","description":"A description that provides more details pertinent to the execution status of the workflow step."},"executed_by":{"$ref":"https://raw.githubusercontent.com/cyentific-rni/cacao-json-schemas/cacao-v2.0-csd01/schemas/data-types/identifier.json","description":"The entity executed the workflow step. This can be an agent-target or a STIX 2.1 Identity object id."},"command_b64":{"type":"array","items":{"type":"string"},"minItems":1,"description":"A list of Base64 encodings of the commands that were invoked during the execution of a workflow step, including any values stemming from variables. These are the actual commands executed."},"notes":{"type":"string","description":"This property allows incorporating notes (more context) pertinent to the execution of the workflow step."},"automated_execution":{"type":"boolean","description":"This property identifies if the workflow step was executed manually or automatically. It is either true or false."}},"$defs":{"execution-status-enum":{"type":"string","enum":["successfully_completed","failed","ongoing","server_side_error","client_side_error","timeout_error","exception_condition_invoked"]}},"required":["type","id","workflow_step","start_time","status","command_b64","automated_execution"],"unevaluatedProperties":false}'),Vu=JSON.parse('{"type":"extension-definition","name":"coordinates extension","description":"Coordinates extension for CACAO constructs for visualization purposes.","created_by":"identity--5abe695c-7bd5-4c31-8824-2528696cdbf1","schema":"https://raw.githubusercontent.com/cyentific-rni/cacao-coordinates-extension/main/schemas/coordinates.json","version":"1.0.0"}');var Ku=function(){return Ku=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&(n[i]=o)}else if(r.$ref){var a=e[r.$ref];if(a){var s=bl(a,e);Object.assign(n,s)}}})),n}function _l(t,e){var n={properties:{},enums:{},descriptions:{}};t.required&&(n.required=t.required),t.properties&&(Object.entries(t.properties).forEach((function(t){var i=t[0],r=t[1];n.properties[i]=gl(r,e)})),Object.entries(t.properties).forEach((function(t){var e=t[0],i=t[1];n.descriptions[e]=vl(i)}))),t.allOf&&(n.commonProperties={},t.allOf.forEach((function(t){var i;if(t.$ref){var r=e[null===(i=t.$ref.split("/").pop())||void 0===i?void 0:i.split(".")[0]];if(r){var o=_l(r,e);n.commonProperties=o.properties,o.required&&(n.required=Zu(Zu([],n.required||[],!0),o.required,!0)),o.enums&&(n.enums=Ku(Ku({},n.enums),o.enums)),o.descriptions&&(n.descriptions=Ku(Ku({},n.descriptions),o.descriptions))}}else t.properties&&(Object.entries(t.properties).forEach((function(t){var i=t[0],r=t[1];n.properties[i]=gl(r,e)})),Object.entries(t.properties).forEach((function(t){var e=t[0],i=t[1];n.descriptions[e]=vl(i)})))})));var i=bl(t,e);return Object.keys(i).length>0&&(n.enums=Ku(Ku({},n.enums),i)),n.properties||(n.properties={}),n.commonProperties||(n.commonProperties={}),n.required||(n.required=[]),n.enums||(n.enums={}),n}var wl,xl=function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r0?n:void 0}var i=Object.entries(e).map((function(e){var n=e[0],i=e[1];return[n,t.filterEmptyValues(i)]})).filter((function(t){t[0];var e=t[1];return""!==e&&null!=e})),r=Object.fromEntries(i);return Object.keys(r).length>0?r:void 0},t}();var Sl=function(){return Sl=Object.assign||function(t){for(var e,n=1,i=arguments.length;nn?t.slice(0,n/e)+"...":t},t.prototype.getRectShape=function(t,e,n,i,r){var o;return r=an(structuredClone(this.defaultStyle),r),pn(o=Mn("rect"),Sl({x:t,y:e,width:n,height:i},r)),pn(o,r),o},t.prototype.getDiamondShape=function(t,e,n,i,r){r=an(structuredClone(this.defaultStyle),r);var o,a=t+n/2,s=e+i/2,c=[{x:a,y:e},{x:t+n,y:s},{x:a,y:e+i},{x:t,y:s}].map((function(t){return t.x+","+t.y})).join(" ");return pn(o=Mn("polygon"),{points:c,strokeLinecap:"round",strokeLinejoin:"round"}),pn(o,r),o},t.prototype.getTextElement=function(t,e,n){var i=this.textUtil.createText(t,e);if(i.children.length>n){for(var r="",o=0;o5&&(r=r.slice(0,r.length-3)+"..."),i=this.textUtil.createText(r,e)}return i},t}(),Al=function(){function t(){}return t.create=function(t){var e,n;switch(t.type){case"rectangle":return this.drawUtils.getRectShape(t.x,t.y,t.width,t.height,t.styleAttrs);case"diamond":return this.drawUtils.getDiamondShape(t.x,t.y,t.width,t.height,t.styleAttrs);case"text":return this.drawUtils.getLabel(t.x,t.y,t.width,t.height,null!==(e=t.title)&&void 0!==e?e:"",null!==(n=t.numberOfLine)&&void 0!==n?n:1,t.styleAttrs)}},t.drawAll=function(t,e){for(var n=0,i=e;nthis.MAX_COMMANDS_DISPLAYED){var y,g=n.commands.length-this.MAX_COMMANDS_DISPLAYED;y=1==g?"1 more command":g+" more commands",h.push(d(y,t)),t+=10}else 0==(null===(o=null==n?void 0:n.commands)||void 0===o?void 0:o.length)&&(t+=5,h.push(d("no command defined",t)),t+=15);return[Cl([function(t,n){return{type:"rectangle",x:0,y:t,width:e.width,height:n,styleAttrs:{fill:a.backgroundColor,stroke:a.borderColor,fillOpacity:c,strokeOpacity:c}}}(s,t-s),u],h,!0),t-s]},e.prototype.getAgentTargetsShapeProps=function(t,e,n,i){var r,o,a,s,c=this,h=t,u=.6,l=[],d=function(t,n){return{type:"text",x:5,y:n,width:e.width-10,height:8,title:t,numberOfLine:1,styleAttrs:{fill:c.textColor,strokeOpacity:0,fontSize:8,align:"center-top",fillOpacity:u}}},p=function(t,n){var i=[],r=t;return r+=5,i.push({type:"text",x:10,y:r,width:e.width-20,height:10,title:n.type,numberOfLine:1,styleAttrs:{fill:c.commandTextColor,strokeOpacity:0,fontSize:10,align:"left-top",fontWeight:"600",fillOpacity:u}}),r+=10,n.name&&(r+=3,i.push({type:"text",x:10,y:r,width:e.width-20,height:10,title:n.name,numberOfLine:1,styleAttrs:{fill:c.commandTextColor,strokeOpacity:0,fontSize:8,align:"left-top",fontWeight:"200",fillOpacity:u}}),r+=8),r+=5,i.splice(0,0,{type:"rectangle",x:5,y:t,width:e.width-10,height:r-t,styleAttrs:{strokeWidth:.5,stroke:c.commandBorderColor,fill:c.commandBackgroundColor,rx:4,ry:4,fillOpacity:u,strokeOpacity:u}}),[i,r-t]},f={type:"text",x:5,y:h+5,width:e.width-10,height:8,title:"Agent",numberOfLine:1,styleAttrs:{fill:this.textColor,fontWeight:"bold",strokeOpacity:0,fontSize:8,align:"center-top",fillOpacity:u}};if(l.push(f),t+=15,kl.isDefined(n.agent)){var m=i.getAgent(n.agent);if(null==m)throw Error("a step refer to an agent that is not existing in the playbook");var y,g,v={type:"text",x:5,y:h+5,width:e.width-10,height:8,title:"Agent",numberOfLine:1,styleAttrs:{fill:this.textColor,fontWeight:"bold",strokeOpacity:0,fontSize:8,align:"center-top",fillOpacity:u}};l.push(v),y=(r=p(t,m))[0],g=r[1],l.push.apply(l,y),t+=g}else t+=5,l.push(d("no agent defined",t)),t+=15;var b={type:"text",x:5,y:t+5,width:e.width-10,height:8,title:"Targets",numberOfLine:1,styleAttrs:{fill:this.textColor,fontWeight:"bold",strokeOpacity:0,fontSize:8,align:"center-top",fillOpacity:u}};if(l.push(b),t+=15,0!=(null===(a=n.targets)||void 0===a?void 0:a.length)){for(var _=0,w=0,x=n.targets;w=this.MAX_COMMANDS_DISPLAYED)break;var k,S,E=i.getTarget(M);if(null==E)throw Error("a step refer to a target that is not existing in the playbook");k=(o=p(t,E))[0],S=o[1],l.push.apply(l,k),t+=5+S,_++}if((null===(s=null==n?void 0:n.targets)||void 0===s?void 0:s.length)>this.MAX_COMMANDS_DISPLAYED){var A,T=n.targets.length-this.MAX_COMMANDS_DISPLAYED;A=1==T?"1 more target":T+" more targets",l.push(d(A,t)),t+=10}}else t+=5,l.push(d("no target defined",t)),t+=15;return[Cl([function(t,n){return{type:"rectangle",x:0,y:t,width:e.width,height:n,styleAttrs:{fill:c.backgroundColor,stroke:c.borderColor,fillOpacity:u,strokeOpacity:u}}}(h,t-h)],l,!0),t-h]},e.prototype.filterCommandType=function(t){return t&&t.endsWith("_cmd")?t.replace("_cmd",""):t},e}(Ml);const Ol=jl;var Pl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Il=function(t){function e(e){var n=t.call(this,e,wl.END_STEP,{modelType:"end",className:"end-step",title:"End step",width:60,height:40,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[]})||this;return n.backgroundColor="#DB6C6C",n.borderColor="#7D0001",n.textColor="white",n}return Pl(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push(this.getBackgroundProps(e)),r.push(this.getLabelProps(e)),Al.drawAll(t,r),t},e.prototype.getLabelProps=function(t){return{type:"text",x:0,y:0,width:t.width,height:t.height,title:"End",numberOfLine:1,styleAttrs:{fill:this.textColor,strokeOpacity:0,fontSize:12,align:"center-middle"}}},e.prototype.getBackgroundProps=function(t){return{type:"rectangle",x:0,y:0,width:t.width,height:t.height,styleAttrs:{fill:this.backgroundColor,stroke:this.borderColor}}},e}(Ml);var $l=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Rl=function(t){function e(e){var n=t.call(this,e,wl.START_STEP,{modelType:"start",className:"start-step",title:"Start step",width:60,height:40,resizable:!1,incomingConnectionAllowed:[],outgoingConnectionAllowed:[Vh.ON_COMPLETION]})||this;return n.backgroundColor="#6FC78D",n.borderColor="#008127",n.textColor="white",n}return $l(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push(this.getBackgroundProps(e)),r.push(this.getLabelProps(e)),Al.drawAll(t,r),t},e.prototype.getLabelProps=function(t){return{type:"text",x:0,y:0,width:t.width,height:t.height,title:"Start",numberOfLine:1,styleAttrs:{fill:this.textColor,strokeOpacity:0,fontSize:12,align:"center-middle"}}},e.prototype.getBackgroundProps=function(t){return{type:"rectangle",x:0,y:0,width:t.width,height:t.height,styleAttrs:{fill:this.backgroundColor,stroke:this.borderColor}}},e}(Ml);var Ll=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Nl=function(t){function e(e){var n=t.call(this,e,wl.SWITCH_CONDITION_STEP,{modelType:"switch-condition",className:"switch-condition",title:"Switch condition",width:120,height:60,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[Vh.ON_COMPLETION,Vh.ON_FAILURE,Vh.ON_SUCCESS,Vh.ON_SWITCH_CONDITION]})||this;return n.backgroundColor="white",n.borderColor="#6504C1",n.textColor="#28293E",n.headerBackgroundColor="#A063DD",n.headerTextColor="white",n}return Ll(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push.apply(r,this.getPrincipalShapeProps(e,n,this.borderColor,this.headerBackgroundColor)),r.push(this.getExecutionStatusDotProps(e,i.getShapeStatus(e.id))),Al.drawAll(t,r),t},e}(Ml);var Bl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Dl=function(t){function e(e){return t.call(this,e,Vh.ON_COMPLETION,{attachers:"r:l",className:"on-completion",neighborConnectionAllowed:Object.values(Vh).filter((function(t){return!kl.isAny(t,[Vh.ON_SUCCESS,Vh.ON_FAILURE,Vh.ON_COMPLETION])}))},{stroke:"black"})||this}return Bl(e,t),e.prototype.drawConnection=function(t,e,n,i){var r,o,a,s=null!=i&&null!=i.source?"on completion":"";return(null===(r=null==i?void 0:i.source)||void 0===r?void 0:r.type)===wl.START_STEP&&(s=""),o=this.getDrawingAttributs(e),a=this.drawLineConnection(n,i,o),this.drawEmbeddedLabel(n,i,s),a},e}(Kh);var Fl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Ul=function(t){function e(e){return t.call(this,e,Vh.ON_SUCCESS,{attachers:"r:l",className:"on-success",neighborConnectionAllowed:Object.values(Vh).filter((function(t){return!kl.isAny(t,[Vh.ON_COMPLETION,Vh.ON_SUCCESS])}))},{stroke:"#008127"})||this}return Fl(e,t),e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,null!=i&&null!=i.source?"on success":""),o},e}(Kh);var zl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Hl=function(t){function e(e){return t.call(this,e,Vh.ON_FAILURE,{attachers:"b:l",className:"on-failure",neighborConnectionAllowed:Object.values(Vh).filter((function(t){return!kl.isAny(t,[Vh.ON_COMPLETION,Vh.ON_FAILURE])}))},{stroke:"#7D0001"})||this}return zl(e,t),e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,null!=i&&null!=i.source?"on failure":""),o},e}(Kh);var ql=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Vl=function(t){function e(e){var n=t.call(this,e,wl.WHILE_CONDITION_STEP,{modelType:"while-condition",className:"while-condition",title:"While condition",width:120,height:60,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[Vh.ON_COMPLETION,Vh.ON_FAILURE,Vh.ON_SUCCESS,Vh.ON_WHILE_CONDITION]})||this;return n.backgroundColor="white",n.borderColor="#6504C1",n.textColor="#28293E",n.headerBackgroundColor="#A063DD",n.headerTextColor="white",n}return ql(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push.apply(r,this.getPrincipalShapeProps(e,n,this.borderColor,this.headerBackgroundColor)),r.push(this.getExecutionStatusDotProps(e,i.getShapeStatus(e.id))),Al.drawAll(t,r),t},e}(Ml);var Kl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Zl=function(t){function e(e){var n=t.call(this,e,wl.PLAYBOOK_ACTION_STEP,{modelType:"playbook-action",className:"playbook-action-step",title:"Playbook Action",width:120,height:60,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[Vh.ON_COMPLETION,Vh.ON_FAILURE,Vh.ON_SUCCESS]})||this;return n.headerBackgroundColor="#777777",n.backgroundColor="white",n.borderColor="#000000",n.textColor="black",n.headerTextColor="white",n}return Kl(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push.apply(r,this.getPrincipalShapeProps(e,n,this.borderColor,this.headerBackgroundColor)),r.push(this.getExecutionStatusDotProps(e,i.getShapeStatus(e.id))),Al.drawAll(t,r),t},e}(Ml);var Wl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Gl=function(t){function e(e){var n=t.call(this,e,wl.PARALLEL_STEP,{modelType:"parallel",className:"parallel-step",title:"Parallel step",width:120,height:60,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[Vh.ON_COMPLETION,Vh.ON_FAILURE,Vh.ON_SUCCESS,Vh.ON_PARALLEL]})||this;return n.backgroundColor="white",n.borderColor="#AC7F0C",n.textColor="#28293E",n.headerBackgroundColor="#C7AE6F",n.headerTextColor="white",n}return Wl(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push.apply(r,this.getPrincipalShapeProps(e,n,this.borderColor,this.headerBackgroundColor)),r.push(this.getExecutionStatusDotProps(e,i.getShapeStatus(e.id))),Al.drawAll(t,r),t},e}(Ml);var Jl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Xl=function(t){function e(e){var n=t.call(this,e,wl.IF_CONDITION_STEP,{modelType:"if-condition",className:"if-condition",title:"If condition",width:120,height:60,resizable:!1,incomingConnectionAllowed:Object.values(Vh),outgoingConnectionAllowed:[Vh.ON_COMPLETION,Vh.ON_FAILURE,Vh.ON_SUCCESS,Vh.ON_IF_TRUE_CONDITION,Vh.ON_IF_FALSE_CONDITION]})||this;return n.backgroundColor="white",n.borderColor="#6504C1",n.textColor="#28293E",n.headerBackgroundColor="#A063DD",n.headerTextColor="white",n}return Jl(e,t),e.prototype.drawConstruct=function(t,e,n,i){var r=[];return r.push.apply(r,this.getPrincipalShapeProps(e,n,this.borderColor,this.headerBackgroundColor)),r.push(this.getExecutionStatusDotProps(e,i.getShapeStatus(e.id))),Al.drawAll(t,r),t},e}(Ml);var Yl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const Ql=function(t){function e(e){return t.call(this,e,Vh.ON_WHILE_CONDITION,{attachers:"b:l",className:"on-true-condition",neighborConnectionAllowed:Object.values(Vh).filter((function(t){return!kl.is(t,Vh.ON_WHILE_CONDITION)}))},{stroke:"#6504C1"})||this}return Yl(e,t),e.prototype.getLabelText=function(t){var e=cd.getCacaoConstruct(this.source),n=cd.getCacaoConstruct(this.target);return e&&n?"on true":""},e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,this.getLabelText(t),"end"),o},e}(Kh);var td=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const ed=function(t){function e(e){return t.call(this,e,Vh.ON_SWITCH_CONDITION,{attachers:"b:l",className:"on-condition",neighborConnectionAllowed:Object.values(Vh)},{stroke:"#6504C1"})||this}return td(e,t),e.prototype.getLabelText=function(t){var e=cd.getCacaoConstruct(this.source),n=cd.getCacaoConstruct(this.target);if(!e||!n)return"";if(!e.id||!n.id)return"NC switch";var i=t.getStep(e.id),r="";for(var o in i.cases)i.cases[o]===n.id&&(r=o);return"case: "+r},e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,this.getLabelText(t),"end"),o},e}(Kh);var nd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const id=function(t){function e(e){return t.call(this,e,Vh.ON_PARALLEL,{attachers:"b:l",className:"on-parallel",neighborConnectionAllowed:Object.values(Vh)},{stroke:"#AC7F0C"})||this}return nd(e,t),e.prototype.drawConnection=function(t,e,n,i){var r;return r=this.getDrawingAttributs(e),this.drawLineConnection(n,i,r)},e}(Kh);var rd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const od=function(t){function e(e){return t.call(this,e,Vh.ON_IF_FALSE_CONDITION,{attachers:"b:l",className:"on-false-condition",neighborConnectionAllowed:Object.values(Vh)},{stroke:"#6504C1"})||this}return rd(e,t),e.prototype.getLabelText=function(t){return"on false"},e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,this.getLabelText(t),"end"),o},e}(Kh);var ad=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();const sd=function(t){function e(e){return t.call(this,e,Vh.ON_IF_TRUE_CONDITION,{attachers:"b:l",className:"on-true-condition",neighborConnectionAllowed:Object.values(Vh)},{stroke:"#6504C1"})||this}return ad(e,t),e.prototype.getLabelText=function(t){return"on true"},e.prototype.drawConnection=function(t,e,n,i){var r,o;return r=this.getDrawingAttributs(e),o=this.drawLineConnection(n,i,r),this.drawEmbeddedLabel(n,i,this.getLabelText(t),"end"),o},e}(Kh),cd=function(){function t(){}return t.getCacaoConstruct=function(t,e){switch(void 0===e&&(e=void 0),!e&&t&&(e=kl.getTypeOfElement(t)),e){case wl.START_STEP:return new Rl(t);case wl.END_STEP:return new Il(t);case wl.ACTION_STEP:return new Ol(t);case wl.PLAYBOOK_ACTION_STEP:return new Zl(t);case wl.PARALLEL_STEP:return new Gl(t);case wl.SWITCH_CONDITION_STEP:return new Nl(t);case wl.WHILE_CONDITION_STEP:return new Vl(t);case wl.IF_CONDITION_STEP:return new Xl(t);default:return}},t.getCacaoConnectionList=function(e){for(var n=[],i=0,r=e;i not a cacao connection");return n.drawConnection(this._playbookHandler,this._canvas,t,e)},ud.$inject=["eventBus","canvas","playbookHandler"];const dd={__init__:["cacaoRenderer"],cacaoRenderer:["type",ld]};var pd=".djs-palette-toggle",fd=".entry",md=pd+", "+fd,yd="djs-palette-",gd="open",vd="two-column";function bd(t,e){this._eventBus=t,this._canvas=e;var n=this;t.on("tool-manager.update",(function(t){var e=t.tool;n.updateToolHighlight(e)})),t.on("i18n.changed",(function(){n._update()})),t.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function _d(t,e){var n=e.getPaletteEntries();return Be(n)?n(t):(He(n,(function(e,n){t[n]=e})),t)}bd.$inject=["eventBus","canvas"],bd.prototype.registerProvider=function(t,e){e||(e=t,t=1e3),this._eventBus.on("palette.getProviders",t,(function(t){t.providers.push(e)})),this._rebuild()},bd.prototype.getEntries=function(){return this._getProviders().reduce(_d,{})},bd.prototype._rebuild=function(){this._diagramInitialized&&this._getProviders().length&&(this._container||this._init(),this._update())},bd.prototype._init=function(){var t=this,e=this._eventBus,n=this._getParentContainer(),i=this._container=Ai(bd.HTML_MARKUP);n.appendChild(i),ui(n).add(yd+"shown"),Mi(i,md,"click",(function(e){if(pi(e.delegateTarget,pd))return t.toggle();t.trigger("click",e)})),wi.bind(i,"mousedown",(function(t){t.stopPropagation()})),Mi(i,fd,"dragstart",(function(e){t.trigger("dragstart",e)})),e.on("canvas.resized",this._layoutChanged,this),e.fire("palette.create",{container:i})},bd.prototype._getProviders=function(t){var e=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},bd.prototype._toggleState=function(t){t=t||{};var e,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=ui(i),a=ui(n);e="twoColumn"in t?t.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle(vd,e),a.toggle(yd+vd,e),"open"in t&&(o.toggle(gd,t.open),a.toggle(yd+gd,t.open)),r.fire("palette.changed",{twoColumn:e,open:this.isOpen()})},bd.prototype._update=function(){var t=Ti(".djs-palette-entries",this._container),e=this._entries=this.getEntries();di(t),He(e,(function(e,n){var i=e.group||"default",r=Ti("[data-group="+Xs(i)+"]",t);r||(ci(r=Ai('
'),"data-group",i),t.appendChild(r));var o=e.html||(e.separator?'
':'
'),a=Ai(o);if(r.appendChild(a),!e.separator&&(ci(a,"data-action",n),e.title&&ci(a,"title",e.title),e.className&&function(t,e){var n=ui(t);(Re(e)?e:e.split(/\s+/g)).forEach((function(t){n.add(t)}))}(a,e.className),e.imageUrl)){var s=Ai("");ci(s,"src",e.imageUrl),a.appendChild(s)}})),this.open()},bd.prototype.trigger=function(t,e,n){var i,r,o=e.delegateTarget||e.target;return o?(i=ci(o,"data-action"),r=e.originalEvent||e,this.triggerEntry(i,t,r,n)):e.preventDefault()},bd.prototype.triggerEntry=function(t,e,n,i){var r,o;if((r=this._entries[t])&&(o=r.action,!1!==this._eventBus.fire("palette.trigger",{entry:r,event:n}))){if(Be(o)){if("click"===e)return o(n,i)}else if(o[e])return o[e](n,i);n.preventDefault()}},bd.prototype._layoutChanged=function(){this._toggleState({})},bd.prototype._needsCollapse=function(t,e){return t<46*Object.keys(e).length+50},bd.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},bd.prototype.open=function(){this._toggleState({open:!0})},bd.prototype.toggle=function(){this.isOpen()?this.close():this.open()},bd.prototype.isActiveTool=function(t){return t&&this._activeTool===t},bd.prototype.updateToolHighlight=function(t){var e;this._toolsContainer||(e=Ti(".djs-palette-entries",this._container),this._toolsContainer=Ti("[data-group=tools]",e)),He(this._toolsContainer.children,(function(e){var n=e.getAttribute("data-action");if(n){var i=ui(e);n=n.replace("-tool",""),i.contains("entry")&&n===t?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},bd.prototype.isOpen=function(){return ui(this._container).has(gd)},bd.prototype._getParentContainer=function(){return this._canvas.getContainer()},bd.HTML_MARKUP='
';const wd={__init__:["palette"],palette:["type",bd]};var xd=function(){return xd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n
\n ',this._container.classList.add("blurred"),i.showModal(),new Promise((function(t){document.getElementsByClassName("buttonList__button button--primary")[0].addEventListener("click",(function(){i.close(),i.remove(),n._container.classList.remove("blurred"),t(!0)}))}))},t._container=document.getElementsByTagName("body")[0],t}();var Cm=function(){return Cm=Object.assign||function(t){for(var e,n=1,i=arguments.length;n0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]2?[4,Tm.showConfirm("Are you sure you want to remove this step?","You will not be able to undo this action.")]:[3,2];case 1:if(!t.sent())return[2];t.label=2;case 2:return e._modeling.removeElements([i]),[2]}}))}))}}}}},t.prototype.getRemoveEntries=function(){var t=this,e=this;return{remover:{group:"tool",className:"bin",title:"remove",action:{click:function(n,i){return jm(t,void 0,void 0,(function(){var t,n,r;return Om(this,(function(o){switch(o.label){case 0:return[4,Tm.showConfirm("Are you sure you want to remove this step?","You will not be able to undo this action.")];case 1:if(!o.sent())return[2];for(t=0,n=i;t
');ci(a,"data-action",n),(i=Ti("[data-group="+Xs(o)+"]",r))||(ci(i=Ai('
'),"data-group",o),r.appendChild(i)),i.appendChild(a),t.className&&function(t,e){var n=ui(t);(e=Re(e)?e:e.split(/\s+/g)).forEach((function(t){n.add(t)}))}(a,t.className),t.title&&ci(a,"title",t.title),t.imageUrl&&(ci(e=Ai(""),"src",t.imageUrl),e.style.width="100%",e.style.height="100%",a.appendChild(e))})),ui(r).add("open"),this._current={target:t,entries:n,pad:i},this._eventBus.fire("contextPad.open",{current:this._current})},Rm.prototype.getPad=function(t){if(this.isOpen())return this._current.pad;var e=this,n=this._overlays,i=Ai('
'),r=this._getPosition(t),o=an({html:i},this._overlaysConfig,r);Mi(i,$m,"click",(function(t){e.trigger("click",t)})),Mi(i,$m,"dragstart",(function(t){e.trigger("dragstart",t)})),wi.bind(i,"mousedown",(function(t){t.stopPropagation()}));var a=this._canvas.getRootElement();this._overlayId=n.add(a,"context-pad",o);var s=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{target:t,pad:s}),s},Rm.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Rm.prototype.isOpen=function(t){var e=this._current;if(!e)return!1;if(!t)return!0;var n=e.target;return Re(t)===Re(n)&&(Re(t)?t.length===n.length&&Ve(t,(function(t){return Lm(n,t)})):n===t)},Rm.prototype.isShown=function(){return this.isOpen()&&this._overlays.isShown()},Rm.prototype._getPosition=function(t){var e=Wn(Re(t)?t:[t]);return{position:{left:e.x+e.width+12,top:e.y-6}}};const Nm={__depends__:[{__depends__:[Vr,rs],contextPad:["type",Rm]},Am],__init__:["cacaoContextPad"],cacaoContextPad:["type",Im]};function Bm(t,e,n){t.on("autoPlace",100,(function(t){var e=t.shape;return function(t,e,n){n||(n={});var i=n.defaultDistance||50,r=Wi(t);return{x:Ki(t).right+i+e.width/2,y:r.y}}(t.source,e)})),t.on("autoPlace.end",(function(t){n.scrollToElement(t.shape)})),this.append=function(n,i,r){t.fire("autoPlace.start",{source:n,shape:i});var o=t.fire("autoPlace",{source:n,shape:i}),a=e.appendShape(n,i,o,n.parent,r);return t.fire("autoPlace.end",{source:n,shape:a}),a}}Bm.$inject=["eventBus","modeling","canvas"];var Dm=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Fm=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.HORIZONTAL_MARGIN_BETWEEN_SHAPES=130,a.VERTICAL_MARGIN_BETWEEN_SHAPES=200,a._eventBus=e,a._modeling=n,a._elementRegistry=r,a._playbookHandler=o,a.bindEvents(),a}return Dm(e,t),e.prototype.bindEvents=function(){var t=this;this._eventBus.on("autoPlace",(function(e){var n=e.shape,i=e.source;return t.getNextShapePosition(i,n)}))},e.prototype.appendShape=function(t,e,n){var i;try{if(this._playbookHandler.playbook.workflow[null==e?void 0:e.id]){var r=this._playbookHandler.getCoordinatesExtension(e.id);r&&r.x&&r.y&&(i={x:r.x,y:r.y})}}catch(t){}return null==i&&(i=this.getNextShapePosition(t,e)),this._modeling.appendShape(t,e,i,t.parent,n)},e.prototype.getFirstShapePosition=function(t){var e;try{if(this._playbookHandler.playbook.workflow[null==t?void 0:t.id]){var n=this._playbookHandler.getCoordinatesExtension(t.id);n&&n.x&&n.y&&(e={x:n.x,y:n.y})}}catch(t){}return null==e&&(e={x:300,y:window.screen.height/2-t.height/2}),this.getValidShapePosition(t,e)},e.prototype.getConnectionWaypoints=function(t,e,n){try{var i=this._playbookHandler.playbook.workflow[t];if(null==i)return[];var r=this._playbookHandler.getCoordinatesExtension(t);if(!r)return[];for(var o=function(t){for(var e=[],n=0;n0)return e[0].status}},Object.defineProperty(t.prototype,"isPlaybookChanged",{get:function(){var t=new de(this._initialPlaybook),e=new de(this._playbook);return t.signatures=[],t.created="",t.modified="",e.signatures=[],e.created="",e.modified="",console.log(kl.filterEmptyValues(t)),console.log(kl.filterEmptyValues(e)),!Rp()(kl.filterEmptyValues(t),kl.filterEmptyValues(e))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbook",{get:function(){return this._playbook},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"initialPlaybook",{set:function(t){this._initialPlaybook=new de(t)},enumerable:!1,configurable:!0}),t.prototype.isAgentDefinition=function(t){return!(!this._playbook.agent_definitions||!Object.keys(this._playbook.agent_definitions).includes(t))},t.prototype.setPlaybookDates=function(){var t=(new Date).toISOString();this.playbook.created||(this.addPlaybookProperty("created",t),this.addPlaybookProperty("modified",t)),this.isPlaybookChanged&&this.addPlaybookProperty("modified",t)},t.prototype.getStepProperty=function(t,e){return"metadata"==e?this._playbook[t]?this._playbook[t]:"":this._playbook.workflow[e][t]?this._playbook.workflow[e][t]:""},t.prototype.getPlaybookProperties=function(t){return this._playbook[t]?this._playbook[t]:""},t.prototype.setPlaybookProperties=function(t,e){t&&(e?this.playbook.workflow[e].update(t):this._playbook.update(t))},t.prototype.addPlaybookProperty=function(t,e){this.playbook[t]=e},t.prototype.updateConnection=function(t,e,n,i){this.disconnectSteps(t,e,n),this.connectSteps(t,e,i)},t.prototype.createStep=function(t,e){var n;return!this._playbook.workflow[e]&&(n=Mt.create({type:t}),"start"==t&&kl.isUndefined(this._playbook.workflow_start)&&(this._playbook.workflow_start=e),this._playbook.workflow[e]=n,!0)},t.prototype.removeStep=function(t){if(!this._playbook.workflow[t])throw new Error("the step you wants to delete does not exist");delete this._playbook.workflow[t],this._playbook.workflow_start==t&&(this._playbook.workflow_start=""),this._playbook.workflow_exception==t&&(this._playbook.workflow_exception="")},t.prototype.loadPlaybook=function(t){this._playbook=new de(t);var e={action:"update.metadata",element:this._playbook};this._eventBus.fire("playbook.changed",e)},t.prototype.getAllPropertyIdentifier=function(t){return this._playbook[t]?Object.keys(this._playbook[t]):[]},t.prototype.getAllPropertyDict=function(t){return this._playbook[t]},t.prototype.newPlaybook=function(){var t="start--"+T(),e={};return e[t]={type:"start"},new de({id:"playbook--"+T(),name:"Playbook Name",created_by:"identity--"+T(),workflow_start:t,workflow:e})},t.prototype.connectSteps=function(t,e,n){var i;if(!(i=this.getStep(t)))throw new Error("step not found with id: "+t);switch(n){case Vh.ON_COMPLETION:kl.isDefined(i.on_completion),i.on_completion=e;break;case Vh.ON_SUCCESS:kl.isDefined(i.on_success),i.on_success=e;break;case Vh.ON_FAILURE:kl.isDefined(i.on_failure),i.on_failure=e;break;case Vh.ON_PARALLEL:i.next_steps.push(e);break;case Vh.ON_SWITCH_CONDITION:for(var r=i,o=0;r.cases[o];)o++;r.cases[o]=e;break;case Vh.ON_WHILE_CONDITION:var a=i;kl.isDefined(a.on_true),a.on_true=e;break;case Vh.ON_IF_TRUE_CONDITION:var s=i;kl.isUndefined(s.on_true)&&(s.on_true=e);break;case Vh.ON_IF_FALSE_CONDITION:var c=i;kl.isUndefined(c.on_false)&&(c.on_false=e)}},t.prototype.disconnectSteps=function(t,e,n){var i;if(i=this.getStep(t)){switch(n){case Vh.ON_COMPLETION:i.on_completion="";break;case Vh.ON_SUCCESS:i.on_success="";break;case Vh.ON_FAILURE:i.on_failure="";break;case Vh.ON_PARALLEL:var r=i,o=r.next_steps.indexOf(e);if(-1==o)throw new Error("parallel connection: connection not defined in the list");delete r.next_steps[o];break;case Vh.ON_SWITCH_CONDITION:var a=i,s=!1;for(var c in a.cases)if(a.cases[c]==e){delete a.cases[c],s=!0;break}if(!s)throw new Error("parallel connection: connection not defined in the list");break;case Vh.ON_WHILE_CONDITION:var h=i;if(h.on_true!==e)throw new Error("while condition connection: on_true connected to another idTo");h.on_true="";break;case Vh.ON_IF_TRUE_CONDITION:var u=i;if(u.on_true!==e)throw new Error("if condition connection: on_true not connected to idTo");u.on_true="";break;case Vh.ON_IF_FALSE_CONDITION:var l=i;if(l.on_false!==e)throw new Error("if condition connection: on_false not connected to idTo");l.on_false=""}return!0}},t.prototype.getStep=function(t){return this._playbook.workflow[t]},t.prototype.addStepComplexProperties=function(t,e,n){var i;if(Array.isArray(this._playbook.workflow[t][e]))null===(i=this._playbook.workflow[t][e])||void 0===i||i.push(n);else{var r=this._playbook.workflow[t][e];this._playbook.workflow[t][e]=Object.assign({},r,n)}var o={action:"update.metadata",element:this._playbook};this._eventBus.fire("playbook.changed",o)},t.prototype.getListExternalRef=function(t){return"metadata"==t?[{}]:this._playbook.workflow[t].external_references||[{}]},t.prototype.getList=function(t,e){if("metadata"==e)return[];if(this._playbook.workflow[e][t]){var n=this._playbook.workflow[e][t];if(Array.isArray(n))return n}return[]},t.prototype.getDic=function(t,e){return"metadata"==t?{}:this._playbook.workflow[t][e]},t.prototype.getPreviousSteps=function(t,e){void 0===e&&(e=this._playbook);var n=[];for(var i in e.workflow){var r=e.workflow[i];for(var o in t!==(null==r?void 0:r.on_completion)&&t!==(null==r?void 0:r.on_success)&&t!==(null==r?void 0:r.on_failure)&&t!==(null==r?void 0:r.on_true)&&t!==(null==r?void 0:r.on_false)&&t!==(null==r?void 0:r.on_true)||n.push(i),r.cases)if(o===t){n.push(i);break}for(var o in r.next_steps)if(o===t){n.push(i);break}}return n},t.prototype.getAgent=function(t){return this.playbook.agent_definitions[t]},t.prototype.getTarget=function(t){return this.playbook.target_definitions[t]},t.prototype.removeAgent=function(t){delete this.playbook.agent_definitions[t]},t.prototype.removeTarget=function(t){delete this.playbook.target_definitions[t]},t.prototype.setAgent=function(t,e){delete this.playbook.agent_definitions[t],this.playbook.agent_definitions[e[0]]=e[1]},t.prototype.setTarget=function(t,e){delete this.playbook.target_definitions[t],this.playbook.target_definitions[e[0]]=e[1]},t.prototype.getNextSteps=function(t){var e=[];switch((null==t?void 0:t.on_completion)&&e.push([null==t?void 0:t.on_completion,Vh.ON_COMPLETION]),(null==t?void 0:t.on_success)&&e.push([null==t?void 0:t.on_success,Vh.ON_SUCCESS]),(null==t?void 0:t.on_failure)&&e.push([null==t?void 0:t.on_failure,Vh.ON_FAILURE]),t.type){case"if-condition":var n=t;(null==n?void 0:n.on_true)&&e.push([n.on_true,Vh.ON_IF_TRUE_CONDITION]),(null==n?void 0:n.on_false)&&e.push([n.on_false,Vh.ON_IF_FALSE_CONDITION]);break;case"while-condition":var i=t;(null==i?void 0:i.on_true)&&e.push([i.on_true,Vh.ON_WHILE_CONDITION]);break;case"switch-condition":var r=t;if(null==r?void 0:r.cases)for(var o in r.cases)e.push([r.cases[o],Vh.ON_SWITCH_CONDITION]);break;case"parallel":var a=t;if(null==a?void 0:a.next_steps)for(var o in a.next_steps)e.push([a.next_steps[o],Vh.ON_PARALLEL])}return e},t.prototype.getTLPMarking=function(){if(!this._playbook)return"";for(var t in this._playbook.markings){var e=this._playbook.markings[t],n=this._playbook.data_marking_definitions[e];if("marking-tlp"===n.type)return n.tlpv2_level}return""},t.prototype.getPlaybookAndStatus=function(){var t={};return t.playbook=this._playbook,t.execution_status=this._executionStatus,t},t.prototype.updateExecutionStatus=function(){for(var t in this._executionStatus)0==this._executionStatus[t].length&&delete this._executionStatus[t]},t.prototype.hasExecutionStatus=function(){return this.updateExecutionStatus(),0!==Object.keys(this._executionStatus).length},t.prototype.updateCoordinatesExtension=function(t){var e,n,i,r,o,a;if(t.waypoints){if(null==(g=this.playbook.workflow[null===(e=null==t?void 0:t.source)||void 0===e?void 0:e.id]))throw Error("the connection's source does not correspond to any workflow step");var s=this.getCoordinatesExtension(null===(n=null==t?void 0:t.source)||void 0===n?void 0:n.id);if(!g.step_extensions)return;if(s||(g.step_extensions[ml]=new ly,s=g.step_extensions[ml]),!s)return;for(var c=void 0,h=0,u=s.outgoing_connections;h"+In(o)+"":"";e='\n\x3c!-- created using CACAO Roaster --\x3e\n\n'+a+i+""}catch(e){t=e}if(t)throw t;var s=this._playbookHandler.playbook.name,c=s?s+".svg":"playbook.svg";this.downloadFile(e,c,"image/svg+xml;charset=utf-8")},t}();const yy=my;my.$inject=["playbookHandler","elementRegistry","canvas"];const gy={__init__:["cacaoExporter"],cacaoExporter:["type",yy]};var vy=n(6533),by=n.n(vy);const _y=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}');var wy=function(){function t(t,e,n){var i=this;this._playbookHandler=t,e.on(["elements.changed","diagram.init","playbook.changed"],(function(){i.validatePlaybook()})),this.initContainer(n)}return t.prototype.initContainer=function(t){this._validatorContainer=document.createElement("div"),this._validatorContainer.className="validator-container",this._validatorIcon=document.createElement("div"),this._validatorIcon.className="validator-icon",this._validatorMessage=document.createElement("div"),this._validatorMessage.className="validator-message",t.appendChild(this._validatorContainer),this._validatorContainer.appendChild(this._validatorIcon),this._validatorContainer.appendChild(this._validatorMessage)},t.prototype.loadSchemas=function(t){for(var e=Object.values(Wu),n=0,i=e;n'.concat(t[1],'\n

in ').concat(t[0],'

\n

').concat(t[2],"

\n "),e.appendChild(n)})),Tm.showDialog("Playbook Errors",e)},t}();const xy=wy;wy.$inject=["playbookHandler","eventBus","config.canvas.container"];const My={__init__:["cacaoValidator"],cacaoValidator:["type",xy]};var ky=function(){function t(t,e,n,i,r,o){var a=this;this._playbookHandler=t,this._cacaoModeling=e,this._eventBus=n,this._canvas=i,this._cacaoAutoPlace=r,this._elementRegistry=o,this._eventBus.on("cacao.import.start",(function(t){var e=t.playbook;a.loadPlaybook(e)})),this._eventBus.on("load.workflow",(function(t){var e=t.playbook;a.loadWorkflow(e)}))}return t.prototype.loadPlaybook=function(t){this._cacaoModeling.clearCanvas(),this._playbookHandler.loadPlaybook(t),this.loadWorkflow(t),this._eventBus.fire("playbook.loaded",{})},t.prototype.loadWorkflow=function(t){for(var e,n=new de(t).workflow,i=!0;i;)for(var r in i=!1,n){if(n[t.workflow_start])r=t.workflow_start;else if(0!=this._playbookHandler.getPreviousSteps(r,t).length)continue;i=!0;var o=n[r],a=[],s=void 0,c=void 0,h=void 0;for(a.push([o,r,s,c,h]);a.length>0;){o=(e=a.shift())[0],r=e[1],s=e[2],c=e[3],h=e[4];var u=null!=this._elementRegistry.get(r);if(s&&c&&h?this.loadNextStep(o,r,s,c,h):this.loadStep(o,r),delete n[r],!u)for(var l=0,d=this._playbookHandler.getNextSteps(o);l0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]n._headerLabels.offsetWidth-70?(o.style.visibility="hidden",t||(t=o),e++):o.style.visibility="visible",n._LabelsMoreIndicator.innerHTML=e+" more",t?(n._LabelsMoreIndicator.classList.remove("moreindicator--hide"),n._LabelsMoreIndicator.classList.add("moreindicator--show"),n._LabelsMoreIndicator.remove(),n._headerLabels.insertBefore(n._LabelsMoreIndicator,t)):(n._LabelsMoreIndicator.classList.remove("moreindicator--show"),n._LabelsMoreIndicator.classList.add("moreindicator--hide"),n._LabelsMoreIndicator.remove())}};window.onresize=h,h()}},t.prototype.loadHeaderOptionEntries=function(){var t=this,e=[{title:"EXPANDED MODE",className:this._cacaoModeling.isExpandedMode()?"expander expanded":"expander",action:function(e){for(var n,i,r=0,o=t._elementRegistry.getAll();r\n \n "),i.onclick=function(e){n._cacaoSidePanel.confirmAndClosePanel(),t.action(e)},e.appendChild(i)},t}();const Oy=jy;jy.$inject=["playbookHandler","config.container","eventBus","cacaoExporter","cacaoSidePanel","cacaoSigning","elementRegistry","modeling"];const Py={__init__:["cacaoHeader"],cacaoHeader:["type",Oy]};var Iy=1e5,$y=1e5;function Ry(t,e){this._canvas=t,this._visible=!1;var n=this;e.on("diagram.init",(function(){n._init()})),e.on("gridSnapping.toggle",(function(t){var e=t.active;n.toggle(e),n._centerGridAroundViewbox()})),e.on("canvas.viewbox.changed",(function(t){var e=t.viewbox;n._centerGridAroundViewbox(e)}))}Ry.prototype._init=function(){var t=Ti("defs",this._canvas._svg);t||(t=Mn("defs"),hn(this._canvas._svg,t));var e=this._pattern=Mn("pattern"),n="djs-grid-pattern-"+Math.trunc(1e6*Math.random());pn(e,{id:n,width:ls,height:ls,patternUnits:"userSpaceOnUse"});var i=this._circle=Mn("circle");pn(i,{cx:.5,cy:.5,r:.5,fill:"#ccc"}),hn(e,i),hn(t,e),pn(this._gfx=Mn("rect"),{x:-5e4,y:-5e4,width:Iy,height:$y,fill:`url(#${n})`})},Ry.prototype._centerGridAroundViewbox=function(t){t||(t=this._canvas.viewbox());var e=Wi(t);pn(this._gfx,{x:-5e4+ds(e.x,ls),y:-5e4+ds(e.y,ls)})},Ry.prototype.isVisible=function(){return this._visible},Ry.prototype.toggle=function(t){if(void 0===t&&(t=!this._visible),t!==this._visible){var e=this._getParent();t?hn(e,this._gfx):vn(e),this._visible=t}},Ry.prototype._getParent=function(){return this._canvas.getLayer("djs-grid",-2)},Ry.$inject=["canvas","eventBus"];var Ly={__init__:["grid"],grid:["type",Ry]},Ny={min:.2,max:4};function By(t,e,n,i,r){var o=this;this._canvas=i,this._elementRegistry=r,this._eventBus=n,this._injector=e,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init();var a=new(Yc().Manager)(document);a.add(new(Yc().Pan)),a.on("panmove",l),a.on("panend",d);var s=new(Yc().Manager)(this._svg);s.add(new(Yc().Pan)),s.on("panstart",u(!0)),s.add(new(Yc().Tap)),s.on("tap",(function(t){h(Wy(t))}));var c=new(Yc().Manager)(this._viewportDom);function h(t){o._state._svgClientRect&&!Hy(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),Fy(Dy({x:t.x-o._state._svgClientRect.left,y:t.y-o._state._svgClientRect.top},o._svg,o._lastViewbox),o._canvas),o._update()}function u(t){return function(e){var n=Wy(e);o._state._svgClientRect&&!Hy(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),t&&h(n);var r=Dy({x:n.x-o._state._svgClientRect.left,y:n.y-o._state._svgClientRect.top},o._svg,o._lastViewbox),a=i.viewbox(),s=function(t,e){var n=e.x+e.width/2,i=e.y+e.height/2;return{x:t.x-n,y:t.y-i}}(r,a),c=o._viewportDom.getBoundingClientRect(),u={x:n.x-c.left+1,y:n.y-c.top+1};an(o._state,{cachedViewbox:a,initialDragPosition:{x:n.x,y:n.y},isDragging:!0,offsetViewport:s,offsetViewportDom:u,viewportClientRect:o._viewport.getBoundingClientRect(),parentClientRect:o._parent.getBoundingClientRect()}),wi.bind(document,"mousemove",l),wi.bind(document,"mouseup",d)}}function l(t){var e=Wy(t);if(o._state.isDragging){o._state._svgClientRect&&!Hy(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect());var n=o._state.offsetViewportDom,i=o._state.viewportClientRect,r=o._state.parentClientRect;an(o._viewportDom.style,{top:e.y-n.y-r.top+"px",left:e.x-n.x-r.left+"px"});var a=Vy(r,{top:e.y-n.y-r.top,left:e.x-n.x-r.left,width:i.width,height:i.height});an(o._overlay.style,{clipPath:a});var s=Dy({x:e.x-o._state._svgClientRect.left,y:e.y-o._state._svgClientRect.top},o._svg,o._lastViewbox);Fy({x:s.x-o._state.offsetViewport.x,y:s.y-o._state.offsetViewport.y},o._canvas)}}function d(t){var e=Wy(t);o._state.isDragging&&(o._state.initialDragPosition.x===e.x&&o._state.initialDragPosition.y===e.y&&h(t),o._update(),an(o._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),wi.unbind(document,"mousemove",l),wi.unbind(document,"mouseup",d))}c.add(new(Yc().Pan)),c.on("panstart",u(!1)),this.toggle(t&&t.open||!1),wi.bind(this._viewportDom,"mousedown",u(!1)),wi.bind(this._svg,"mousedown",u(!0)),wi.bind(this._parent,"wheel",(function(t){if(t.preventDefault(),t.stopPropagation(),t.ctrlKey&&(o._state._svgClientRect&&!Hy(o._state._svgClientRect)||(o._state._svgClientRect=o._svg.getBoundingClientRect()),e=t,n=o._state._svgClientRect,e.x>n.left&&e.xn.top&&e.y.1){var u=h>0?1:-1,l=Math.log(i.zoom())/Math.log(10),d=(r=Ny,20,a=Math.log(r.min)/Math.log(10),s=Math.log(r.max)/Math.log(10),(Math.abs(a)+Math.abs(s))/20),p=Math.round(l/d)*d;p+=d*u;var f=Math.pow(10,p);i.zoom(function(t,e){return Math.max(t.min,Math.min(t.max,e))}(Ny,f),m),o._state.zoomDelta=0;var m=Dy({x:t.clientX-o._state._svgClientRect.left,y:t.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);Fy(m,o._canvas),o._update()}}})),wi.bind(this._toggle,"click",(function(t){t.preventDefault(),t.stopPropagation(),o.toggle()})),n.on(["shape.added","connection.added"],(function(t){var e=t.element;o._addElement(e),o._update()})),n.on(["shape.removed","connection.removed"],(function(t){var e=t.element;o._removeElement(e),o._update()})),n.on("elements.changed",250,(function(t){t.elements.forEach((function(t){o._updateElement(t)})),o._update()})),n.on("element.updateId",(function(t){var e=t.element,n=t.newId;o._updateElementId(e,n)})),n.on("canvas.viewbox.changed",(function(){o._state.isDragging||o._update()})),n.on("canvas.resized",(function(){document.body.contains(o._parent)&&(o._state.isDragging||o._update(),o._state._svgClientRect=o._svg.getBoundingClientRect())})),n.on(["root.set","plane.set"],(function(t){o._clear(),(t.element||t.plane.rootElement).children.forEach((function(t){o._addElement(t)})),o._update()}))}function Dy(t,e,n){var i=e.getBoundingClientRect(),r=function(t,e){var n=t.width/t.height,i=an({},{x:t.x,y:t.y,width:t.width,height:t.height});if(n>e){var r=i.width*(1/e);an(i,{y:i.y-(r-i.height)/2,height:r})}else if(ns?zy(o,a,s):zy(o,a,a.childNodes.length-1):this._elementsGroup.appendChild(o),function(t){return t.waypoints}(t)?(i=0,r=0,void 0!==(n=t.parent).x&&void 0!==n.y&&(i=-n.x,r=-n.y),pn(o,{transform:"translate("+i+" "+r+")"})):(i=t.x,r=t.y,a&&(i-=(n=t.parent).x,r-=n.y),pn(o,{transform:"translate("+i+" "+r+")"})),t.children&&t.children.length&&t.children.forEach((function(t){e._addElement(t)})),o}}},By.prototype._removeElement=function(t){var e=this._svg.getElementById(t.id);e&&gn(e)},By.prototype._createElement=function(t){var e,n=this._elementRegistry.getGraphics(t);if(n&&(e=Mr(n))){var i=bn(e);return pn(i,{id:t.id}),i}},By.prototype._clear=function(){vn(this._elementsGroup)};var qy=Math.sign||function(t){return t>=0?1:-1};function Vy(t,e){return"polygon("+[Ky(e.left,e.top),Ky(e.left+e.width,e.top),Ky(e.left+e.width,e.top+e.height),Ky(e.left,e.top+e.height),Ky(e.left,t.height),Ky(t.width,t.height),Ky(t.width,0),Ky(0,0),Ky(0,t.height),Ky(e.left,t.height)].join(", ")+")"}function Ky(t,e){return t+"px "+e+"px"}function Zy(t){return Ve(t,(function(t){return Le(t)?Zy(t):Ne(t)&&isFinite(t)}))}function Wy(t){return t.center?t.center:{x:t.clientX,y:t.clientY}}var Gy={__init__:["minimap"],minimap:["type",By]},Jy=n(5456),Xy=n.n(Jy),Yy=n(5835),Qy=n(8764).Buffer,tg=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))},eg=function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]new Date(r.modified).getTime())&&(e=r);return e?[3,4]:[4,Tm.showAlert("You can not countersign this playbook","You are not the creator of the playbook and this playbook does not contain any signature that pass the validation")];case 3:return a.sent(),[2];case 4:return[4,this.createSignatureObject((function(t,n){return tg(o,void 0,void 0,(function(){return eg(this,(function(i){switch(i.label){case 0:return[4,this.countersign(e,t,n)];case 1:return i.sent(),[2]}}))}))}))];case 5:return a.sent(),[3,8];case 6:return[4,Tm.showAlert("You can not countersign this playbook","You are not the creator of the playbook and this playbook does not contain any signature that pass the validation")];case 7:a.sent(),a.label=8;case 8:return[2]}}))}))},t.prototype.canUserSignOrCounterSignPlaybook=function(){if(this._playbookHandler.playbook.created_by==pe.instance.identifier)return"sign";for(var t=0,e=this._playbookHandler.playbook.signatures;t(new Date).getTime()))},t}();const og=rg;function ag(t,e){if(!ng.includes(t))throw Error("hash algorithm not handle by the application: "+t);return Yy.createHash(t).update(e).digest("hex")}function sg(t,e,n){if(!ig.includes(t))throw Error("sign algorithm not handle by the application: "+t);var i=Yy.createSign(t);return(i=i.update(n)).sign(e)}var cg={properties:{type:"jss",id:"identifier",signee:"string",valid_from:"timestamp",valid_until:"timestamp",hash_algorithm:"hash-algorithm-type-enum",algorithm:"signature-algorithm-type-enum",public_cert_chain:"string[]",cert_url:"string",thumbprint:"string"},enums:{"hash-algorithm-type-enum":ng,"signature-algorithm-type-enum":ig},required:["type","id","created","modified","signee","related_to","related_version","hash_algorithm","algorithm","public_key","private_key"],commonProperties:{}};rg.$inject=["playbookHandler","cacaoRules"];const hg={__init__:["cacaoSigning"],cacaoSigning:["type",og]};var ug=function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]You can save it first using the EXPORT button before leaving.")];case 1:return t.sent()?[2,!0]:[2,!1]}}))},new((n=void 0)||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}));var t,e,n,i},t}();var dg=function(){function t(t){this._container=document.createElement("div"),this._container.id="cacaoWindow",this._app=t,this._headerEntry=this.createHeaderEntry(),this.initPage()}return Object.defineProperty(t.prototype,"headerTabEntry",{get:function(){return this._headerEntry},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),t.prototype.show=function(){this._headerEntry.classList.add("tab-open"),this._app.currentWindow=this._container},t.prototype.hide=function(){this._headerEntry.classList.remove("tab-open")},t.prototype.initPage=function(){var t=this,e=document.createElement("div");e.className="window__logo";var n=document.createElement("div");n.className="window__buttoncontainer";var i=document.createElement("div");i.className="window__button button--new button--big",i.innerHTML='\n
\n

Create

\n ',i.onclick=function(e){t.loadEditor()};var r=document.createElement("div");r.className="window__button button--open button--big",r.innerHTML='\n
\n

Import

\n ',r.onclick=function(e){try{t.openFileExplorer()}catch(e){Tm.showAlert("Error when trying to import a file",e.message)}};var o=document.createElement("div");o.className="window__button button--settings button--small button--wholerow",o.innerHTML='\n
\n

user settings

\n ',o.onclick=function(t){pe.instance.showDialog()},this._container.appendChild(e),n.appendChild(i),n.appendChild(r),this._container.appendChild(n),this._container.appendChild(o),this._container.className="picker-window"},t.prototype.openFileExplorer=function(){var t=this,e=document.createElement("input");e.type="file",e.multiple=!1,e.accept="application/json",e.addEventListener("change",(function(e){var n=e.target;if(!n.files)throw new Error("input.files undefined");var i=n.files[0];if(!i)throw new Error("file undefined");if(function(t){return"application/json"==t.type}(i)){var r=new FileReader;r.onload=function(e){try{var n=e.target.result,i=JSON.parse(n);if(fg(i))t.loadEditor(new de(i));else{if(null==i.playbook||!fg(i.playbook))throw new Error("The JSON imported is not a CACAO playbook");t.loadEditor(new de(i.playbook),i.execution_status)}}catch(e){Tm.showAlert("Error when trying to import a file",e.message)}},r.readAsText(i)}}),!1),e.click()},t.prototype.loadEditor=function(t,e){var n,i=this;void 0===t&&(t=void 0),t||(t=function(){var t="start--"+T(),e={};e[t]={type:"start"};var n=new de({id:"playbook--"+T(),name:"Playbook Name",description:"Playbook Description",workflow_start:t,workflow:e});return pe.instance.isFulfil&&(n.created_by=pe.instance.identifier),n}()),this._container.className="",this._container.textContent="",this._editor=new lg(this._container,t,e),this._editor.addListener((function(){var t;i.updateWindowTab(null!==(t=i._editor.playbook.name)&&void 0!==t?t:"")})),this.updateWindowTab(null!==(n=this._editor.playbook.name)&&void 0!==n?n:"")},t.prototype.updateWindowTab=function(t){this._headerEntryTextElement.innerText=t,this._headerEntryTlpIndicator.className="";var e=this._editor.playbookHandler.getTLPMarking().replace(/[:+]/g,"-").toLowerCase();""!==e&&(this._headerEntryTlpIndicator.classList.add("tlp-icon"),this._headerEntryTlpIndicator.classList.add(e))},t.prototype.createHeaderEntry=function(){var t=this,e=document.createElement("div");e.className="header-tab-entry",e.onclick=function(){t._app.openWindow(t)},this._headerEntryTlpIndicator=document.createElement("div");var n=document.createElement("div");return n.className="header-tab-entry-remove-button",n.onclick=function(n){return i=t,r=void 0,a=function(){var t;return function(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=this._windows.length&&(e=this._windows.length-1),-1==e&&(this.newWindow(),e=0),this.openWindow(this._windows[e]))},e.prototype.addHeaderTab=function(t){this._headerTabContainer.appendChild(t)},e.prototype.init=function(t){this.initHeader(t),this._body=document.createElement("div"),this._body.id="app-body",t.appendChild(this._body)},e.prototype.initHeader=function(t){var e=this,n=document.createElement("div");n.id="app-tab-container",this._headerTabContainer=document.createElement("div"),this._headerTabContainer.id="header-tab-container";var i=document.createElement("div");i.id="header-new-tab-button",i.onclick=function(){e.openWindow(e.newWindow())},t.appendChild(n),n.appendChild(this._headerTabContainer),n.appendChild(i)},e.prototype.newWindow=function(){var t=new pg(this);return this._windows.push(t),this.addHeaderTab(t.headerTabEntry),t},e.prototype.openWindow=function(t){this._windows.forEach((function(t){t.hide()})),t.show()},e}((function(t){this._container=t,this._container.id="cacao-application"}));const gg=yg;window.addEventListener("load",(function(){var t=document.getElementById("container");t&&new gg(t)}))})()})(); \ No newline at end of file diff --git a/bundle.74d7d3b8bacd4d384b45.js.LICENSE.txt b/bundle.74d7d3b8bacd4d384b45.js.LICENSE.txt new file mode 100644 index 0000000..619d5b4 --- /dev/null +++ b/bundle.74d7d3b8bacd4d384b45.js.LICENSE.txt @@ -0,0 +1,18 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + +/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ diff --git a/c63dd9761798b5898871.png b/c63dd9761798b5898871.png new file mode 100644 index 0000000..1209d85 Binary files /dev/null and b/c63dd9761798b5898871.png differ diff --git a/caf5c42be05bd6cf8b9d.png b/caf5c42be05bd6cf8b9d.png new file mode 100644 index 0000000..034a7ae Binary files /dev/null and b/caf5c42be05bd6cf8b9d.png differ diff --git a/cb4be0230caf509ac475.svg b/cb4be0230caf509ac475.svg new file mode 100644 index 0000000..c2d5f35 --- /dev/null +++ b/cb4be0230caf509ac475.svg @@ -0,0 +1,224 @@ + + + +camunda Services GmbH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cdb29a5d7ccf57ff05a3.ttf b/cdb29a5d7ccf57ff05a3.ttf new file mode 100644 index 0000000..00559ee Binary files /dev/null and b/cdb29a5d7ccf57ff05a3.ttf differ diff --git a/cfb635a5111b545f5598.ttf b/cfb635a5111b545f5598.ttf new file mode 100644 index 0000000..e61e8e8 Binary files /dev/null and b/cfb635a5111b545f5598.ttf differ diff --git a/d8b850b920a5ef49d752.ttf b/d8b850b920a5ef49d752.ttf new file mode 100644 index 0000000..71c0f99 Binary files /dev/null and b/d8b850b920a5ef49d752.ttf differ diff --git a/daa3452a70dd56a63c71.png b/daa3452a70dd56a63c71.png new file mode 100644 index 0000000..3855018 Binary files /dev/null and b/daa3452a70dd56a63c71.png differ diff --git a/dbdfd398abcbbafc022b.ttf b/dbdfd398abcbbafc022b.ttf new file mode 100644 index 0000000..89513d9 Binary files /dev/null and b/dbdfd398abcbbafc022b.ttf differ diff --git a/e0293c064077dfc2f559.png b/e0293c064077dfc2f559.png new file mode 100644 index 0000000..47edad2 Binary files /dev/null and b/e0293c064077dfc2f559.png differ diff --git a/e373f6163127e2d469af.ttf b/e373f6163127e2d469af.ttf new file mode 100644 index 0000000..12b7b3c Binary files /dev/null and b/e373f6163127e2d469af.ttf differ diff --git a/e4c59c4a5aa75d3a3df3.svg b/e4c59c4a5aa75d3a3df3.svg new file mode 100644 index 0000000..c1d1876 --- /dev/null +++ b/e4c59c4a5aa75d3a3df3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/eaae1aaf139b806c50b4.png b/eaae1aaf139b806c50b4.png new file mode 100644 index 0000000..870814b Binary files /dev/null and b/eaae1aaf139b806c50b4.png differ diff --git a/f15f43137be3a22ce0b2.png b/f15f43137be3a22ce0b2.png new file mode 100644 index 0000000..510a2c6 Binary files /dev/null and b/f15f43137be3a22ce0b2.png differ diff --git a/f51e3f550c03ff7022be.svg b/f51e3f550c03ff7022be.svg new file mode 100644 index 0000000..f4adf8d --- /dev/null +++ b/f51e3f550c03ff7022be.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/f59f2def9081b883f0a4.png b/f59f2def9081b883f0a4.png new file mode 100644 index 0000000..2040e32 Binary files /dev/null and b/f59f2def9081b883f0a4.png differ diff --git a/faa872cc78c010c0f063.png b/faa872cc78c010c0f063.png new file mode 100644 index 0000000..7797330 Binary files /dev/null and b/faa872cc78c010c0f063.png differ diff --git a/fdbaab3de35b6d845655.svg b/fdbaab3de35b6d845655.svg new file mode 100644 index 0000000..09bb265 --- /dev/null +++ b/fdbaab3de35b6d845655.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fdbe145397e352ee5d0d.svg b/fdbe145397e352ee5d0d.svg new file mode 100644 index 0000000..7a39829 --- /dev/null +++ b/fdbe145397e352ee5d0d.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..98af865 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +CACAO Roaster
\ No newline at end of file