@chillicream/nitro-embedded 32.0.0-insider.9 → 32.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/assets/context-providers.eb0f9c1e.d_1sxt2-.js +6737 -0
  2. package/assets/{editor.worker.b77dd5d8.C0IIxtwH.js → editor.worker.eb0f9c1e.CPSH5_7o.js} +1 -1
  3. package/assets/graphql-engine-scheduler.eb0f9c1e.BwYTNJtE.js +363 -0
  4. package/assets/graphql-indexer-scheduler.eb0f9c1e.CZ7x4nfh.js +270 -0
  5. package/assets/graphql.worker.eb0f9c1e.DozJBJdY.js +317 -0
  6. package/assets/index.eb0f9c1e.BltwUsAV.js +39 -0
  7. package/assets/{json.worker.b77dd5d8.DZEULY4m.js → json.worker.eb0f9c1e.GAJVQ_Ac.js} +1 -1
  8. package/assets/{jsonMode.b77dd5d8.BrLH2lOw.js → jsonMode.eb0f9c1e.C3ukgfVD.js} +1 -1
  9. package/assets/main.eb0f9c1e.D9a6EbRi.js +603 -0
  10. package/assets/{monaco.b77dd5d8.BIK2XPY0.css → monaco.eb0f9c1e.BxVJuD1y.css} +1 -1
  11. package/assets/{monaco.b77dd5d8.B2HNXd5G.js → monaco.eb0f9c1e.CiFWjB0j.js} +6 -6
  12. package/assets/{monaco.b77dd5d8.DswWXrKx.css → monaco.eb0f9c1e.DAGxi9tN.css} +1 -1
  13. package/assets/session-scheduler.eb0f9c1e.Dj_pvu9w.js +270 -0
  14. package/assets/{yaml.b77dd5d8.CiG9qhDA.js → yaml.eb0f9c1e.DNvATgZi.js} +1 -1
  15. package/assets/{yaml.worker.b77dd5d8.BVSUE8bO.js → yaml.worker.eb0f9c1e.CQeMr55x.js} +1 -1
  16. package/favicon.ico +0 -0
  17. package/favicon.svg +4 -4
  18. package/index.html +5 -5
  19. package/package.json +1 -1
  20. package/service-worker.js +1 -1
  21. package/assets/context-providers.b77dd5d8.BdMSNOpA.js +0 -4073
  22. package/assets/graphql-engine-scheduler.b77dd5d8.DfKzBtee.js +0 -436
  23. package/assets/graphql-indexer-scheduler.b77dd5d8.DT5wmKGJ.js +0 -345
  24. package/assets/graphql.worker.b77dd5d8.Bme-NBap.js +0 -328
  25. package/assets/index.b77dd5d8.ERcJsx7F.js +0 -32
  26. package/assets/main.b77dd5d8.DVDBlDqU.js +0 -5615
  27. package/assets/session-scheduler.b77dd5d8.Zf-SqrYf.js +0 -345
  28. /package/assets/{FiraCode-Medium.b77dd5d8.-YTCSZkP.woff2 → FiraCode-Medium.eb0f9c1e.-YTCSZkP.woff2} +0 -0
  29. /package/assets/{codicon.b77dd5d8.Hscy-R9e.ttf → codicon.eb0f9c1e.Hscy-R9e.ttf} +0 -0
  30. /package/assets/{context-providers.b77dd5d8.3HkX5s82.css → context-providers.eb0f9c1e.3HkX5s82.css} +0 -0
  31. /package/assets/{main.b77dd5d8.BdMtxJz7.css → main.eb0f9c1e.BdMtxJz7.css} +0 -0
  32. /package/assets/{monaco.b77dd5d8.Drs7RHvp.js → monaco.eb0f9c1e.D0z7AHed.js} +0 -0
  33. /package/assets/{monaco.b77dd5d8.BX--odEo.js → monaco.eb0f9c1e.DFXJF4sG.js} +0 -0
  34. /package/assets/{monaco.b77dd5d8.wf5zjNun.js → monaco.eb0f9c1e.De8cDpD3.js} +0 -0
  35. /package/assets/{monaco.b77dd5d8.D8gAt9bt.js → monaco.eb0f9c1e.DkQhus17.js} +0 -0
  36. /package/assets/{monaco.b77dd5d8.DuZrSKpE.js → monaco.eb0f9c1e.wTso0TWV.js} +0 -0
@@ -0,0 +1,363 @@
1
+ var pr=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports);import{p as process$1,B as Buffer}from"./monaco.eb0f9c1e.DkQhus17.js";var vr=pr((exports,module)=>{getOsName();isMacLike();const IS_RUNNING_IN_ELECTRON=navigator.userAgent.indexOf("Electron")>=0;function getOsName(){return navigator.userAgent.indexOf("Win")>=0?"Windows":navigator.userAgent.indexOf("Mac")>=0?"macOS":navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0?"Linux":"Unknown"}function isMacLike(){const r=navigator.userAgent.toLowerCase();return r.includes("mac os")||r.includes("ipad")}const APP_NAME="Nitro",APP_VERSION="32.0.0",APP_GRAPHQL_CLIENT_ID="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==",cloudUriPattern=new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i"),IS_RUNNING_IN_CLOUD=cloudUriPattern?.test(self.origin)??!1,APP_TYPE=IS_RUNNING_IN_CLOUD?"cloud":IS_RUNNING_IN_ELECTRON?"app":"middleware",APP_AGENT=`${APP_NAME}/${APP_VERSION} (${APP_TYPE})`,HEADER_AUTHORIZATION="Authorization",HEADER_CONTENT_TYPE="Content-Type",HEADER_USER_AGENT="User-Agent",HTTP_SCHEME_PATTERN=/^https?:\/\//i,INTERPOLATION_VARIABLE_NAME_PATTERN=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN=/fusion-operation-plan/i,INTROSPECTION_PREFIX=/^_{2}(?!_)/i,ABORT_ERROR_NAME="AbortError",ABORT_ERROR=new DOMException("Action cancelled",ABORT_ERROR_NAME),TIMEOUT_ABORT_ERROR_MESSAGE="Action timed out",TIMEOUT_ABORT_ERROR=new DOMException(TIMEOUT_ABORT_ERROR_MESSAGE,ABORT_ERROR_NAME);class TimeoutAbortSignal{#e;#t;#r;constructor(n,a){this.#e=n,this.#t=a}get aborted(){return this.#e.aborted}get cancelled(){return this.#t()}get onabort(){return this.#e.onabort}get reason(){return this.#e.reason}dispatchEvent(n){return this.#e.dispatchEvent(n)}throwIfAborted(){this.#e.throwIfAborted()}toAbortSignal(){return this.#e}toPromise(){if(this.#r)return this.#r;const n=this;let a=!1;return this.#r=new Promise((i,o)=>{if(n.aborted){a=!0,o(TIMEOUT_ABORT_ERROR);return}if(n.cancelled){a=!0,i();return}function s(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),a||(a=!0,o(TIMEOUT_ABORT_ERROR))}function l(){n.removeEventListener("abort",s),n.removeEventListener("cancelled",l),a||(a=!0,i())}n.addEventListener("abort",s),n.addEventListener("cancelled",l)}),this.#r}addEventListener(n,a,i){this.#e.addEventListener(n,a,i)}removeEventListener(n,a,i){this.#e.removeEventListener(n,a,i)}}class TimeoutAbortController{_controller=new AbortController;_signal=new TimeoutAbortSignal(this._controller.signal,()=>this._cancelled);_cancelled=!1;_timeoutHandle;constructor(n){this._timeoutHandle=self.setTimeout(()=>{this.abort(TIMEOUT_ABORT_ERROR_MESSAGE)},n)}get signal(){return this._signal}abort(n){this._controller.abort(n)}cancel(){this._cancelled=!0,self.clearTimeout(this._timeoutHandle),this._signal.dispatchEvent(new Event("cancelled"))}}function isAbortError(r){return r instanceof DOMException&&r.name===ABORT_ERROR_NAME}function isTimeoutAbortError(r){return isAbortError(r)&&r.message===TIMEOUT_ABORT_ERROR_MESSAGE}function createAbortScope(r,n,a){return a?a.aborted?Promise.reject(ABORT_ERROR):(a.addEventListener("abort",r),n().finally(()=>{a.removeEventListener("abort",r)})):n()}function distinct(r){return r.filter((n,a,i)=>i.indexOf(n)===a)}function isObjectArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="object"&&!Array.isArray(n))}function isStringArray(r){return typeof r!="string"&&Array.isArray(r)&&r.every(n=>typeof n=="string")}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function getAugmentedNamespace(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var n=r.default;if(typeof n=="function"){var a=function i(){var o=!1;try{o=this instanceof i}catch{}return o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var o=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(a,i,o.get?o:{enumerable:!0,get:function(){return r[i]}})}),a}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,typeof Object.create=="function"?inherits_browser.exports=function(n,a){a&&(n.super_=a,n.prototype=Object.create(a.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(n,a){if(a){n.super_=a;var i=function(){};i.prototype=a.prototype,n.prototype=new i,n.prototype.constructor=n}}),inherits_browser.exports}var safeBuffer$1={exports:{}},dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(r){Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var n={},a={};a.byteLength=c,a.toByteArray=h,a.fromByteArray=_;for(var i=[],o=[],s=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=l.length;f<d;++f)i[f]=l[f],o[l.charCodeAt(f)]=f;o[45]=62,o[95]=63;function u(O){var M=O.length;if(M%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=O.indexOf("=");F===-1&&(F=M);var L=F===M?0:4-F%4;return[F,L]}function c(O){var M=u(O),F=M[0],L=M[1];return(F+L)*3/4-L}function v(O,M,F){return(M+F)*3/4-F}function h(O){var M,F=u(O),L=F[0],k=F[1],P=new s(v(O,L,k)),U=0,B=k>0?L-4:L,j;for(j=0;j<B;j+=4)M=o[O.charCodeAt(j)]<<18|o[O.charCodeAt(j+1)]<<12|o[O.charCodeAt(j+2)]<<6|o[O.charCodeAt(j+3)],P[U++]=M>>16&255,P[U++]=M>>8&255,P[U++]=M&255;return k===2&&(M=o[O.charCodeAt(j)]<<2|o[O.charCodeAt(j+1)]>>4,P[U++]=M&255),k===1&&(M=o[O.charCodeAt(j)]<<10|o[O.charCodeAt(j+1)]<<4|o[O.charCodeAt(j+2)]>>2,P[U++]=M>>8&255,P[U++]=M&255),P}function m(O){return i[O>>18&63]+i[O>>12&63]+i[O>>6&63]+i[O&63]}function g(O,M,F){for(var L,k=[],P=M;P<F;P+=3)L=(O[P]<<16&16711680)+(O[P+1]<<8&65280)+(O[P+2]&255),k.push(m(L));return k.join("")}function _(O){for(var M,F=O.length,L=F%3,k=[],P=16383,U=0,B=F-L;U<B;U+=P)k.push(g(O,U,U+P>B?B:U+P));return L===1?(M=O[F-1],k.push(i[M>>2]+i[M<<4&63]+"==")):L===2&&(M=(O[F-2]<<8)+O[F-1],k.push(i[M>>10]+i[M>>4&63]+i[M<<2&63]+"=")),k.join("")}var S={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */S.read=function(O,M,F,L,k){var P,U,B=k*8-L-1,j=(1<<B)-1,$=j>>1,A=-7,R=F?k-1:0,y=F?-1:1,b=O[M+R];for(R+=y,P=b&(1<<-A)-1,b>>=-A,A+=B;A>0;P=P*256+O[M+R],R+=y,A-=8);for(U=P&(1<<-A)-1,P>>=-A,A+=L;A>0;U=U*256+O[M+R],R+=y,A-=8);if(P===0)P=1-$;else{if(P===j)return U?NaN:(b?-1:1)*(1/0);U=U+Math.pow(2,L),P=P-$}return(b?-1:1)*U*Math.pow(2,P-L)},S.write=function(O,M,F,L,k,P){var U,B,j,$=P*8-k-1,A=(1<<$)-1,R=A>>1,y=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=L?0:P-1,D=L?1:-1,I=M<0||M===0&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===1/0?(B=isNaN(M)?1:0,U=A):(U=Math.floor(Math.log(M)/Math.LN2),M*(j=Math.pow(2,-U))<1&&(U--,j*=2),U+R>=1?M+=y/j:M+=y*Math.pow(2,1-R),M*j>=2&&(U++,j/=2),U+R>=A?(B=0,U=A):U+R>=1?(B=(M*j-1)*Math.pow(2,k),U=U+R):(B=M*Math.pow(2,R-1)*Math.pow(2,k),U=0));k>=8;O[F+b]=B&255,b+=D,B/=256,k-=8);for(U=U<<k|B,$+=k;$>0;O[F+b]=U&255,b+=D,U/=256,$-=8);O[F+b-D]|=I*128};/*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */(function(O){const M=a,F=S,L=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=A,O.SlowBuffer=q,O.INSPECT_MAX_BYTES=50;const k=2147483647;O.kMaxLength=k;const{Uint8Array:P,ArrayBuffer:U,SharedArrayBuffer:B}=globalThis;A.TYPED_ARRAY_SUPPORT=j(),!A.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function j(){try{const ee=new P(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,P.prototype),Object.setPrototypeOf(ee,Q),ee.foo()===42}catch{return!1}}Object.defineProperty(A.prototype,"parent",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.buffer}}),Object.defineProperty(A.prototype,"offset",{enumerable:!0,get:function(){if(A.isBuffer(this))return this.byteOffset}});function $(ee){if(ee>k)throw new RangeError('The value "'+ee+'" is invalid for option "size"');const Q=new P(ee);return Object.setPrototypeOf(Q,A.prototype),Q}function A(ee,Q,Y){if(typeof ee=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return D(ee)}return R(ee,Q,Y)}A.poolSize=8192;function R(ee,Q,Y){if(typeof ee=="string")return I(ee,Q);if(U.isView(ee))return C(ee);if(ee==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ee);if(je(ee,U)||ee&&je(ee.buffer,U)||typeof B<"u"&&(je(ee,B)||ee&&je(ee.buffer,B)))return x(ee,Q,Y);if(typeof ee=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const te=ee.valueOf&&ee.valueOf();if(te!=null&&te!==ee)return A.from(te,Q,Y);const oe=w(ee);if(oe)return oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ee[Symbol.toPrimitive]=="function")return A.from(ee[Symbol.toPrimitive]("string"),Q,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ee)}A.from=function(ee,Q,Y){return R(ee,Q,Y)},Object.setPrototypeOf(A.prototype,P.prototype),Object.setPrototypeOf(A,P);function y(ee){if(typeof ee!="number")throw new TypeError('"size" argument must be of type number');if(ee<0)throw new RangeError('The value "'+ee+'" is invalid for option "size"')}function b(ee,Q,Y){return y(ee),ee<=0?$(ee):Q!==void 0?typeof Y=="string"?$(ee).fill(Q,Y):$(ee).fill(Q):$(ee)}A.alloc=function(ee,Q,Y){return b(ee,Q,Y)};function D(ee){return y(ee),$(ee<0?0:E(ee)|0)}A.allocUnsafe=function(ee){return D(ee)},A.allocUnsafeSlow=function(ee){return D(ee)};function I(ee,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!A.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);const Y=G(ee,Q)|0;let te=$(Y);const oe=te.write(ee,Q);return oe!==Y&&(te=te.slice(0,oe)),te}function T(ee){const Q=ee.length<0?0:E(ee.length)|0,Y=$(Q);for(let te=0;te<Q;te+=1)Y[te]=ee[te]&255;return Y}function C(ee){if(je(ee,P)){const Q=new P(ee);return x(Q.buffer,Q.byteOffset,Q.byteLength)}return T(ee)}function x(ee,Q,Y){if(Q<0||ee.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(ee.byteLength<Q+(Y||0))throw new RangeError('"length" is outside of buffer bounds');let te;return Q===void 0&&Y===void 0?te=new P(ee):Y===void 0?te=new P(ee,Q):te=new P(ee,Q,Y),Object.setPrototypeOf(te,A.prototype),te}function w(ee){if(A.isBuffer(ee)){const Q=E(ee.length)|0,Y=$(Q);return Y.length===0||ee.copy(Y,0,0,Q),Y}if(ee.length!==void 0)return typeof ee.length!="number"||Le(ee.length)?$(0):T(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return T(ee.data)}function E(ee){if(ee>=k)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+k.toString(16)+" bytes");return ee|0}function q(ee){return+ee!=ee&&(ee=0),A.alloc(+ee)}A.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==A.prototype},A.compare=function(Q,Y){if(je(Q,P)&&(Q=A.from(Q,Q.offset,Q.byteLength)),je(Y,P)&&(Y=A.from(Y,Y.offset,Y.byteLength)),!A.isBuffer(Q)||!A.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===Y)return 0;let te=Q.length,oe=Y.length;for(let le=0,de=Math.min(te,oe);le<de;++le)if(Q[le]!==Y[le]){te=Q[le],oe=Y[le];break}return te<oe?-1:oe<te?1:0},A.isEncoding=function(Q){switch(String(Q).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},A.concat=function(Q,Y){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return A.alloc(0);let te;if(Y===void 0)for(Y=0,te=0;te<Q.length;++te)Y+=Q[te].length;const oe=A.allocUnsafe(Y);let le=0;for(te=0;te<Q.length;++te){let de=Q[te];if(je(de,P))le+de.length>oe.length?(A.isBuffer(de)||(de=A.from(de)),de.copy(oe,le)):P.prototype.set.call(oe,de,le);else if(A.isBuffer(de))de.copy(oe,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=de.length}return oe};function G(ee,Q){if(A.isBuffer(ee))return ee.length;if(U.isView(ee)||je(ee,U))return ee.byteLength;if(typeof ee!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ee);const Y=ee.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&Y===0)return 0;let oe=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return Fe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return qe(ee).length;default:if(oe)return te?-1:Fe(ee).length;Q=(""+Q).toLowerCase(),oe=!0}}A.byteLength=G;function z(ee,Q,Y){let te=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,Q>>>=0,Y<=Q))return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return pe(this,Q,Y);case"utf8":case"utf-8":return ne(this,Q,Y);case"ascii":return fe(this,Q,Y);case"latin1":case"binary":return se(this,Q,Y);case"base64":return ie(this,Q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce(this,Q,Y);default:if(te)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),te=!0}}A.prototype._isBuffer=!0;function H(ee,Q,Y){const te=ee[Q];ee[Q]=ee[Y],ee[Y]=te}A.prototype.swap16=function(){const Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<Q;Y+=2)H(this,Y,Y+1);return this},A.prototype.swap32=function(){const Q=this.length;if(Q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<Q;Y+=4)H(this,Y,Y+3),H(this,Y+1,Y+2);return this},A.prototype.swap64=function(){const Q=this.length;if(Q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<Q;Y+=8)H(this,Y,Y+7),H(this,Y+1,Y+6),H(this,Y+2,Y+5),H(this,Y+3,Y+4);return this},A.prototype.toString=function(){const Q=this.length;return Q===0?"":arguments.length===0?ne(this,0,Q):z.apply(this,arguments)},A.prototype.toLocaleString=A.prototype.toString,A.prototype.equals=function(Q){if(!A.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:A.compare(this,Q)===0},A.prototype.inspect=function(){let Q="";const Y=O.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(Q+=" ... "),"<Buffer "+Q+">"},L&&(A.prototype[L]=A.prototype.inspect),A.prototype.compare=function(Q,Y,te,oe,le){if(je(Q,P)&&(Q=A.from(Q,Q.offset,Q.byteLength)),!A.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(Y===void 0&&(Y=0),te===void 0&&(te=Q?Q.length:0),oe===void 0&&(oe=0),le===void 0&&(le=this.length),Y<0||te>Q.length||oe<0||le>this.length)throw new RangeError("out of range index");if(oe>=le&&Y>=te)return 0;if(oe>=le)return-1;if(Y>=te)return 1;if(Y>>>=0,te>>>=0,oe>>>=0,le>>>=0,this===Q)return 0;let de=le-oe,De=te-Y;const Ae=Math.min(de,De),ge=this.slice(oe,le),ke=Q.slice(Y,te);for(let xe=0;xe<Ae;++xe)if(ge[xe]!==ke[xe]){de=ge[xe],De=ke[xe];break}return de<De?-1:De<de?1:0};function V(ee,Q,Y,te,oe){if(ee.length===0)return-1;if(typeof Y=="string"?(te=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,Le(Y)&&(Y=oe?0:ee.length-1),Y<0&&(Y=ee.length+Y),Y>=ee.length){if(oe)return-1;Y=ee.length-1}else if(Y<0)if(oe)Y=0;else return-1;if(typeof Q=="string"&&(Q=A.from(Q,te)),A.isBuffer(Q))return Q.length===0?-1:K(ee,Q,Y,te,oe);if(typeof Q=="number")return Q=Q&255,typeof P.prototype.indexOf=="function"?oe?P.prototype.indexOf.call(ee,Q,Y):P.prototype.lastIndexOf.call(ee,Q,Y):K(ee,[Q],Y,te,oe);throw new TypeError("val must be string, number or Buffer")}function K(ee,Q,Y,te,oe){let le=1,de=ee.length,De=Q.length;if(te!==void 0&&(te=String(te).toLowerCase(),te==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(ee.length<2||Q.length<2)return-1;le=2,de/=2,De/=2,Y/=2}function Ae(ke,xe){return le===1?ke[xe]:ke.readUInt16BE(xe*le)}let ge;if(oe){let ke=-1;for(ge=Y;ge<de;ge++)if(Ae(ee,ge)===Ae(Q,ke===-1?0:ge-ke)){if(ke===-1&&(ke=ge),ge-ke+1===De)return ke*le}else ke!==-1&&(ge-=ge-ke),ke=-1}else for(Y+De>de&&(Y=de-De),ge=Y;ge>=0;ge--){let ke=!0;for(let xe=0;xe<De;xe++)if(Ae(ee,ge+xe)!==Ae(Q,xe)){ke=!1;break}if(ke)return ge}return-1}A.prototype.includes=function(Q,Y,te){return this.indexOf(Q,Y,te)!==-1},A.prototype.indexOf=function(Q,Y,te){return V(this,Q,Y,te,!0)},A.prototype.lastIndexOf=function(Q,Y,te){return V(this,Q,Y,te,!1)};function Z(ee,Q,Y,te){Y=Number(Y)||0;const oe=ee.length-Y;te?(te=Number(te),te>oe&&(te=oe)):te=oe;const le=Q.length;te>le/2&&(te=le/2);let de;for(de=0;de<te;++de){const De=parseInt(Q.substr(de*2,2),16);if(Le(De))return de;ee[Y+de]=De}return de}function re(ee,Q,Y,te){return Se(Fe(Q,ee.length-Y),ee,Y,te)}function W(ee,Q,Y,te){return Se(Ie(Q),ee,Y,te)}function X(ee,Q,Y,te){return Se(qe(Q),ee,Y,te)}function J(ee,Q,Y,te){return Se(Qe(Q,ee.length-Y),ee,Y,te)}A.prototype.write=function(Q,Y,te,oe){if(Y===void 0)oe="utf8",te=this.length,Y=0;else if(te===void 0&&typeof Y=="string")oe=Y,te=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(te)?(te=te>>>0,oe===void 0&&(oe="utf8")):(oe=te,te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const le=this.length-Y;if((te===void 0||te>le)&&(te=le),Q.length>0&&(te<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");let de=!1;for(;;)switch(oe){case"hex":return Z(this,Q,Y,te);case"utf8":case"utf-8":return re(this,Q,Y,te);case"ascii":case"latin1":case"binary":return W(this,Q,Y,te);case"base64":return X(this,Q,Y,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,Q,Y,te);default:if(de)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),de=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(ee,Q,Y){return Q===0&&Y===ee.length?M.fromByteArray(ee):M.fromByteArray(ee.slice(Q,Y))}function ne(ee,Q,Y){Y=Math.min(ee.length,Y);const te=[];let oe=Q;for(;oe<Y;){const le=ee[oe];let de=null,De=le>239?4:le>223?3:le>191?2:1;if(oe+De<=Y){let Ae,ge,ke,xe;switch(De){case 1:le<128&&(de=le);break;case 2:Ae=ee[oe+1],(Ae&192)===128&&(xe=(le&31)<<6|Ae&63,xe>127&&(de=xe));break;case 3:Ae=ee[oe+1],ge=ee[oe+2],(Ae&192)===128&&(ge&192)===128&&(xe=(le&15)<<12|(Ae&63)<<6|ge&63,xe>2047&&(xe<55296||xe>57343)&&(de=xe));break;case 4:Ae=ee[oe+1],ge=ee[oe+2],ke=ee[oe+3],(Ae&192)===128&&(ge&192)===128&&(ke&192)===128&&(xe=(le&15)<<18|(Ae&63)<<12|(ge&63)<<6|ke&63,xe>65535&&xe<1114112&&(de=xe))}}de===null?(de=65533,De=1):de>65535&&(de-=65536,te.push(de>>>10&1023|55296),de=56320|de&1023),te.push(de),oe+=De}return ue(te)}const ae=4096;function ue(ee){const Q=ee.length;if(Q<=ae)return String.fromCharCode.apply(String,ee);let Y="",te=0;for(;te<Q;)Y+=String.fromCharCode.apply(String,ee.slice(te,te+=ae));return Y}function fe(ee,Q,Y){let te="";Y=Math.min(ee.length,Y);for(let oe=Q;oe<Y;++oe)te+=String.fromCharCode(ee[oe]&127);return te}function se(ee,Q,Y){let te="";Y=Math.min(ee.length,Y);for(let oe=Q;oe<Y;++oe)te+=String.fromCharCode(ee[oe]);return te}function pe(ee,Q,Y){const te=ee.length;(!Q||Q<0)&&(Q=0),(!Y||Y<0||Y>te)&&(Y=te);let oe="";for(let le=Q;le<Y;++le)oe+=we[ee[le]];return oe}function ce(ee,Q,Y){const te=ee.slice(Q,Y);let oe="";for(let le=0;le<te.length-1;le+=2)oe+=String.fromCharCode(te[le]+te[le+1]*256);return oe}A.prototype.slice=function(Q,Y){const te=this.length;Q=~~Q,Y=Y===void 0?te:~~Y,Q<0?(Q+=te,Q<0&&(Q=0)):Q>te&&(Q=te),Y<0?(Y+=te,Y<0&&(Y=0)):Y>te&&(Y=te),Y<Q&&(Y=Q);const oe=this.subarray(Q,Y);return Object.setPrototypeOf(oe,A.prototype),oe};function he(ee,Q,Y){if(ee%1!==0||ee<0)throw new RangeError("offset is not uint");if(ee+Q>Y)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(Q,Y,te){Q=Q>>>0,Y=Y>>>0,te||he(Q,Y,this.length);let oe=this[Q],le=1,de=0;for(;++de<Y&&(le*=256);)oe+=this[Q+de]*le;return oe},A.prototype.readUintBE=A.prototype.readUIntBE=function(Q,Y,te){Q=Q>>>0,Y=Y>>>0,te||he(Q,Y,this.length);let oe=this[Q+--Y],le=1;for(;Y>0&&(le*=256);)oe+=this[Q+--Y]*le;return oe},A.prototype.readUint8=A.prototype.readUInt8=function(Q,Y){return Q=Q>>>0,Y||he(Q,1,this.length),this[Q]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(Q,Y){return Q=Q>>>0,Y||he(Q,2,this.length),this[Q]|this[Q+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(Q,Y){return Q=Q>>>0,Y||he(Q,2,this.length),this[Q]<<8|this[Q+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},A.prototype.readBigUInt64LE=He(function(Q){Q=Q>>>0,Ge(Q,"offset");const Y=this[Q],te=this[Q+7];(Y===void 0||te===void 0)&&Me(Q,this.length-8);const oe=Y+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24,le=this[++Q]+this[++Q]*2**8+this[++Q]*2**16+te*2**24;return BigInt(oe)+(BigInt(le)<<BigInt(32))}),A.prototype.readBigUInt64BE=He(function(Q){Q=Q>>>0,Ge(Q,"offset");const Y=this[Q],te=this[Q+7];(Y===void 0||te===void 0)&&Me(Q,this.length-8);const oe=Y*2**24+this[++Q]*2**16+this[++Q]*2**8+this[++Q],le=this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+te;return(BigInt(oe)<<BigInt(32))+BigInt(le)}),A.prototype.readIntLE=function(Q,Y,te){Q=Q>>>0,Y=Y>>>0,te||he(Q,Y,this.length);let oe=this[Q],le=1,de=0;for(;++de<Y&&(le*=256);)oe+=this[Q+de]*le;return le*=128,oe>=le&&(oe-=Math.pow(2,8*Y)),oe},A.prototype.readIntBE=function(Q,Y,te){Q=Q>>>0,Y=Y>>>0,te||he(Q,Y,this.length);let oe=Y,le=1,de=this[Q+--oe];for(;oe>0&&(le*=256);)de+=this[Q+--oe]*le;return le*=128,de>=le&&(de-=Math.pow(2,8*Y)),de},A.prototype.readInt8=function(Q,Y){return Q=Q>>>0,Y||he(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},A.prototype.readInt16LE=function(Q,Y){Q=Q>>>0,Y||he(Q,2,this.length);const te=this[Q]|this[Q+1]<<8;return te&32768?te|4294901760:te},A.prototype.readInt16BE=function(Q,Y){Q=Q>>>0,Y||he(Q,2,this.length);const te=this[Q+1]|this[Q]<<8;return te&32768?te|4294901760:te},A.prototype.readInt32LE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},A.prototype.readInt32BE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},A.prototype.readBigInt64LE=He(function(Q){Q=Q>>>0,Ge(Q,"offset");const Y=this[Q],te=this[Q+7];(Y===void 0||te===void 0)&&Me(Q,this.length-8);const oe=this[Q+4]+this[Q+5]*2**8+this[Q+6]*2**16+(te<<24);return(BigInt(oe)<<BigInt(32))+BigInt(Y+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24)}),A.prototype.readBigInt64BE=He(function(Q){Q=Q>>>0,Ge(Q,"offset");const Y=this[Q],te=this[Q+7];(Y===void 0||te===void 0)&&Me(Q,this.length-8);const oe=(Y<<24)+this[++Q]*2**16+this[++Q]*2**8+this[++Q];return(BigInt(oe)<<BigInt(32))+BigInt(this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+te)}),A.prototype.readFloatLE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),F.read(this,Q,!0,23,4)},A.prototype.readFloatBE=function(Q,Y){return Q=Q>>>0,Y||he(Q,4,this.length),F.read(this,Q,!1,23,4)},A.prototype.readDoubleLE=function(Q,Y){return Q=Q>>>0,Y||he(Q,8,this.length),F.read(this,Q,!0,52,8)},A.prototype.readDoubleBE=function(Q,Y){return Q=Q>>>0,Y||he(Q,8,this.length),F.read(this,Q,!1,52,8)};function ve(ee,Q,Y,te,oe,le){if(!A.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>oe||Q<le)throw new RangeError('"value" argument is out of bounds');if(Y+te>ee.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(Q,Y,te,oe){if(Q=+Q,Y=Y>>>0,te=te>>>0,!oe){const De=Math.pow(2,8*te)-1;ve(this,Q,Y,te,De,0)}let le=1,de=0;for(this[Y]=Q&255;++de<te&&(le*=256);)this[Y+de]=Q/le&255;return Y+te},A.prototype.writeUintBE=A.prototype.writeUIntBE=function(Q,Y,te,oe){if(Q=+Q,Y=Y>>>0,te=te>>>0,!oe){const De=Math.pow(2,8*te)-1;ve(this,Q,Y,te,De,0)}let le=te-1,de=1;for(this[Y+le]=Q&255;--le>=0&&(de*=256);)this[Y+le]=Q/de&255;return Y+te},A.prototype.writeUint8=A.prototype.writeUInt8=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,1,255,0),this[Y]=Q&255,Y+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,2,65535,0),this[Y]=Q&255,this[Y+1]=Q>>>8,Y+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,2,65535,0),this[Y]=Q>>>8,this[Y+1]=Q&255,Y+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,4,4294967295,0),this[Y+3]=Q>>>24,this[Y+2]=Q>>>16,this[Y+1]=Q>>>8,this[Y]=Q&255,Y+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,4,4294967295,0),this[Y]=Q>>>24,this[Y+1]=Q>>>16,this[Y+2]=Q>>>8,this[Y+3]=Q&255,Y+4};function ye(ee,Q,Y,te,oe){Re(Q,te,oe,ee,Y,7);let le=Number(Q&BigInt(4294967295));ee[Y++]=le,le=le>>8,ee[Y++]=le,le=le>>8,ee[Y++]=le,le=le>>8,ee[Y++]=le;let de=Number(Q>>BigInt(32)&BigInt(4294967295));return ee[Y++]=de,de=de>>8,ee[Y++]=de,de=de>>8,ee[Y++]=de,de=de>>8,ee[Y++]=de,Y}function be(ee,Q,Y,te,oe){Re(Q,te,oe,ee,Y,7);let le=Number(Q&BigInt(4294967295));ee[Y+7]=le,le=le>>8,ee[Y+6]=le,le=le>>8,ee[Y+5]=le,le=le>>8,ee[Y+4]=le;let de=Number(Q>>BigInt(32)&BigInt(4294967295));return ee[Y+3]=de,de=de>>8,ee[Y+2]=de,de=de>>8,ee[Y+1]=de,de=de>>8,ee[Y]=de,Y+8}A.prototype.writeBigUInt64LE=He(function(Q,Y=0){return ye(this,Q,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=He(function(Q,Y=0){return be(this,Q,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(Q,Y,te,oe){if(Q=+Q,Y=Y>>>0,!oe){const Ae=Math.pow(2,8*te-1);ve(this,Q,Y,te,Ae-1,-Ae)}let le=0,de=1,De=0;for(this[Y]=Q&255;++le<te&&(de*=256);)Q<0&&De===0&&this[Y+le-1]!==0&&(De=1),this[Y+le]=(Q/de>>0)-De&255;return Y+te},A.prototype.writeIntBE=function(Q,Y,te,oe){if(Q=+Q,Y=Y>>>0,!oe){const Ae=Math.pow(2,8*te-1);ve(this,Q,Y,te,Ae-1,-Ae)}let le=te-1,de=1,De=0;for(this[Y+le]=Q&255;--le>=0&&(de*=256);)Q<0&&De===0&&this[Y+le+1]!==0&&(De=1),this[Y+le]=(Q/de>>0)-De&255;return Y+te},A.prototype.writeInt8=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,1,127,-128),Q<0&&(Q=255+Q+1),this[Y]=Q&255,Y+1},A.prototype.writeInt16LE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,2,32767,-32768),this[Y]=Q&255,this[Y+1]=Q>>>8,Y+2},A.prototype.writeInt16BE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,2,32767,-32768),this[Y]=Q>>>8,this[Y+1]=Q&255,Y+2},A.prototype.writeInt32LE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,4,2147483647,-2147483648),this[Y]=Q&255,this[Y+1]=Q>>>8,this[Y+2]=Q>>>16,this[Y+3]=Q>>>24,Y+4},A.prototype.writeInt32BE=function(Q,Y,te){return Q=+Q,Y=Y>>>0,te||ve(this,Q,Y,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[Y]=Q>>>24,this[Y+1]=Q>>>16,this[Y+2]=Q>>>8,this[Y+3]=Q&255,Y+4},A.prototype.writeBigInt64LE=He(function(Q,Y=0){return ye(this,Q,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=He(function(Q,Y=0){return be(this,Q,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(ee,Q,Y,te,oe,le){if(Y+te>ee.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function me(ee,Q,Y,te,oe){return Q=+Q,Y=Y>>>0,oe||_e(ee,Q,Y,4),F.write(ee,Q,Y,te,23,4),Y+4}A.prototype.writeFloatLE=function(Q,Y,te){return me(this,Q,Y,!0,te)},A.prototype.writeFloatBE=function(Q,Y,te){return me(this,Q,Y,!1,te)};function Pe(ee,Q,Y,te,oe){return Q=+Q,Y=Y>>>0,oe||_e(ee,Q,Y,8),F.write(ee,Q,Y,te,52,8),Y+8}A.prototype.writeDoubleLE=function(Q,Y,te){return Pe(this,Q,Y,!0,te)},A.prototype.writeDoubleBE=function(Q,Y,te){return Pe(this,Q,Y,!1,te)},A.prototype.copy=function(Q,Y,te,oe){if(!A.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(te||(te=0),!oe&&oe!==0&&(oe=this.length),Y>=Q.length&&(Y=Q.length),Y||(Y=0),oe>0&&oe<te&&(oe=te),oe===te||Q.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(te<0||te>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),Q.length-Y<oe-te&&(oe=Q.length-Y+te);const le=oe-te;return this===Q&&typeof P.prototype.copyWithin=="function"?this.copyWithin(Y,te,oe):P.prototype.set.call(Q,this.subarray(te,oe),Y),le},A.prototype.fill=function(Q,Y,te,oe){if(typeof Q=="string"){if(typeof Y=="string"?(oe=Y,Y=0,te=this.length):typeof te=="string"&&(oe=te,te=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!A.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(Q.length===1){const de=Q.charCodeAt(0);(oe==="utf8"&&de<128||oe==="latin1")&&(Q=de)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(Y<0||this.length<Y||this.length<te)throw new RangeError("Out of range index");if(te<=Y)return this;Y=Y>>>0,te=te===void 0?this.length:te>>>0,Q||(Q=0);let le;if(typeof Q=="number")for(le=Y;le<te;++le)this[le]=Q;else{const de=A.isBuffer(Q)?Q:A.from(Q,oe),De=de.length;if(De===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(le=0;le<te-Y;++le)this[le+Y]=de[le%De]}return this};const Ne={};function Ee(ee,Q,Y){Ne[ee]=class extends Y{constructor(){super(),Object.defineProperty(this,"message",{value:Q.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${ee}]`,this.stack,delete this.name}get code(){return ee}set code(oe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:oe,writable:!0})}toString(){return`${this.name} [${ee}]: ${this.message}`}}}Ee("ERR_BUFFER_OUT_OF_BOUNDS",function(ee){return ee?`${ee} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ee("ERR_INVALID_ARG_TYPE",function(ee,Q){return`The "${ee}" argument must be of type number. Received type ${typeof Q}`},TypeError),Ee("ERR_OUT_OF_RANGE",function(ee,Q,Y){let te=`The value of "${ee}" is out of range.`,oe=Y;return Number.isInteger(Y)&&Math.abs(Y)>2**32?oe=Be(String(Y)):typeof Y=="bigint"&&(oe=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(oe=Be(oe)),oe+="n"),te+=` It must be ${Q}. Received ${oe}`,te},RangeError);function Be(ee){let Q="",Y=ee.length;const te=ee[0]==="-"?1:0;for(;Y>=te+4;Y-=3)Q=`_${ee.slice(Y-3,Y)}${Q}`;return`${ee.slice(0,Y)}${Q}`}function Ce(ee,Q,Y){Ge(Q,"offset"),(ee[Q]===void 0||ee[Q+Y]===void 0)&&Me(Q,ee.length-(Y+1))}function Re(ee,Q,Y,te,oe,le){if(ee>Y||ee<Q){const de=typeof Q=="bigint"?"n":"";let De;throw Q===0||Q===BigInt(0)?De=`>= 0${de} and < 2${de} ** ${(le+1)*8}${de}`:De=`>= -(2${de} ** ${(le+1)*8-1}${de}) and < 2 ** ${(le+1)*8-1}${de}`,new Ne.ERR_OUT_OF_RANGE("value",De,ee)}Ce(te,oe,le)}function Ge(ee,Q){if(typeof ee!="number")throw new Ne.ERR_INVALID_ARG_TYPE(Q,"number",ee)}function Me(ee,Q,Y){throw Math.floor(ee)!==ee?(Ge(ee,Y),new Ne.ERR_OUT_OF_RANGE("offset","an integer",ee)):Q<0?new Ne.ERR_BUFFER_OUT_OF_BOUNDS:new Ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Q}`,ee)}const Te=/[^+/0-9A-Za-z-_]/g;function Ke(ee){if(ee=ee.split("=")[0],ee=ee.trim().replace(Te,""),ee.length<2)return"";for(;ee.length%4!==0;)ee=ee+"=";return ee}function Fe(ee,Q){Q=Q||1/0;let Y;const te=ee.length;let oe=null;const le=[];for(let de=0;de<te;++de){if(Y=ee.charCodeAt(de),Y>55295&&Y<57344){if(!oe){if(Y>56319){(Q-=3)>-1&&le.push(239,191,189);continue}else if(de+1===te){(Q-=3)>-1&&le.push(239,191,189);continue}oe=Y;continue}if(Y<56320){(Q-=3)>-1&&le.push(239,191,189),oe=Y;continue}Y=(oe-55296<<10|Y-56320)+65536}else oe&&(Q-=3)>-1&&le.push(239,191,189);if(oe=null,Y<128){if((Q-=1)<0)break;le.push(Y)}else if(Y<2048){if((Q-=2)<0)break;le.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((Q-=3)<0)break;le.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((Q-=4)<0)break;le.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return le}function Ie(ee){const Q=[];for(let Y=0;Y<ee.length;++Y)Q.push(ee.charCodeAt(Y)&255);return Q}function Qe(ee,Q){let Y,te,oe;const le=[];for(let de=0;de<ee.length&&!((Q-=2)<0);++de)Y=ee.charCodeAt(de),te=Y>>8,oe=Y%256,le.push(oe),le.push(te);return le}function qe(ee){return M.toByteArray(Ke(ee))}function Se(ee,Q,Y,te){let oe;for(oe=0;oe<te&&!(oe+Y>=Q.length||oe>=ee.length);++oe)Q[oe+Y]=ee[oe];return oe}function je(ee,Q){return ee instanceof Q||ee!=null&&ee.constructor!=null&&ee.constructor.name!=null&&ee.constructor.name===Q.name}function Le(ee){return ee!==ee}const we=function(){const ee="0123456789abcdef",Q=new Array(256);for(let Y=0;Y<16;++Y){const te=Y*16;for(let oe=0;oe<16;++oe)Q[te+oe]=ee[Y]+ee[oe]}return Q}();function He(ee){return typeof BigInt>"u"?$e:ee}function $e(){throw new Error("BigInt not supported")}})(n);const N=n.Buffer;r.Blob=n.Blob,r.BlobOptions=n.BlobOptions,r.Buffer=n.Buffer,r.File=n.File,r.FileOptions=n.FileOptions,r.INSPECT_MAX_BYTES=n.INSPECT_MAX_BYTES,r.SlowBuffer=n.SlowBuffer,r.TranscodeEncoding=n.TranscodeEncoding,r.atob=n.atob,r.btoa=n.btoa,r.constants=n.constants,r.default=N,r.isAscii=n.isAscii,r.isUtf8=n.isUtf8,r.kMaxLength=n.kMaxLength,r.kStringMaxLength=n.kStringMaxLength,r.resolveObjectURL=n.resolveObjectURL,r.transcode=n.transcode}(dist)),dist}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(r,n){var a=requireDist(),i=a.Buffer;function o(l,f){for(var d in l)f[d]=l[d]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?r.exports=a:(o(a,n),n.Buffer=s);function s(l,f,d){return i(l,f,d)}s.prototype=Object.create(i.prototype),o(i,s),s.from=function(l,f,d){if(typeof l=="number")throw new TypeError("Argument must not be a number");return i(l,f,d)},s.alloc=function(l,f,d){if(typeof l!="number")throw new TypeError("Argument must be a number");var u=i(l);return f!==void 0?typeof d=="string"?u.fill(f,d):u.fill(f):u.fill(0),u},s.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i(l)},s.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(l)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}var readableBrowser$1={exports:{}},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(L,k,P){return Function.prototype.apply.call(L,k,P)},a;r&&typeof r.ownKeys=="function"?a=r.ownKeys:Object.getOwnPropertySymbols?a=function(L){return Object.getOwnPropertyNames(L).concat(Object.getOwnPropertySymbols(L))}:a=function(L){return Object.getOwnPropertyNames(L)};function i(F){console&&console.warn&&console.warn(F)}var o=Number.isNaN||function(L){return L!==L};function s(){s.init.call(this)}events.exports=s,events.exports.once=N,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function f(F){if(typeof F!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof F)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(F){if(typeof F!="number"||F<0||o(F))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+F+".");l=F}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(L){if(typeof L!="number"||L<0||o(L))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+L+".");return this._maxListeners=L,this};function d(F){return F._maxListeners===void 0?s.defaultMaxListeners:F._maxListeners}s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(L){for(var k=[],P=1;P<arguments.length;P++)k.push(arguments[P]);var U=L==="error",B=this._events;if(B!==void 0)U=U&&B.error===void 0;else if(!U)return!1;if(U){var j;if(k.length>0&&(j=k[0]),j instanceof Error)throw j;var $=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw $.context=j,$}var A=B[L];if(A===void 0)return!1;if(typeof A=="function")n(A,this,k);else for(var R=A.length,y=g(A,R),P=0;P<R;++P)n(y[P],this,k);return!0};function u(F,L,k,P){var U,B,j;if(f(k),B=F._events,B===void 0?(B=F._events=Object.create(null),F._eventsCount=0):(B.newListener!==void 0&&(F.emit("newListener",L,k.listener?k.listener:k),B=F._events),j=B[L]),j===void 0)j=B[L]=k,++F._eventsCount;else if(typeof j=="function"?j=B[L]=P?[k,j]:[j,k]:P?j.unshift(k):j.push(k),U=d(F),U>0&&j.length>U&&!j.warned){j.warned=!0;var $=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");$.name="MaxListenersExceededWarning",$.emitter=F,$.type=L,$.count=j.length,i($)}return F}s.prototype.addListener=function(L,k){return u(this,L,k,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(L,k){return u(this,L,k,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function v(F,L,k){var P={fired:!1,wrapFn:void 0,target:F,type:L,listener:k},U=c.bind(P);return U.listener=k,P.wrapFn=U,U}s.prototype.once=function(L,k){return f(k),this.on(L,v(this,L,k)),this},s.prototype.prependOnceListener=function(L,k){return f(k),this.prependListener(L,v(this,L,k)),this},s.prototype.removeListener=function(L,k){var P,U,B,j,$;if(f(k),U=this._events,U===void 0)return this;if(P=U[L],P===void 0)return this;if(P===k||P.listener===k)--this._eventsCount===0?this._events=Object.create(null):(delete U[L],U.removeListener&&this.emit("removeListener",L,P.listener||k));else if(typeof P!="function"){for(B=-1,j=P.length-1;j>=0;j--)if(P[j]===k||P[j].listener===k){$=P[j].listener,B=j;break}if(B<0)return this;B===0?P.shift():_(P,B),P.length===1&&(U[L]=P[0]),U.removeListener!==void 0&&this.emit("removeListener",L,$||k)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(L){var k,P,U;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[L]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[L]),this;if(arguments.length===0){var B=Object.keys(P),j;for(U=0;U<B.length;++U)j=B[U],j!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(k=P[L],typeof k=="function")this.removeListener(L,k);else if(k!==void 0)for(U=k.length-1;U>=0;U--)this.removeListener(L,k[U]);return this};function h(F,L,k){var P=F._events;if(P===void 0)return[];var U=P[L];return U===void 0?[]:typeof U=="function"?k?[U.listener||U]:[U]:k?S(U):g(U,U.length)}s.prototype.listeners=function(L){return h(this,L,!0)},s.prototype.rawListeners=function(L){return h(this,L,!1)},s.listenerCount=function(F,L){return typeof F.listenerCount=="function"?F.listenerCount(L):m.call(F,L)},s.prototype.listenerCount=m;function m(F){var L=this._events;if(L!==void 0){var k=L[F];if(typeof k=="function")return 1;if(k!==void 0)return k.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]};function g(F,L){for(var k=new Array(L),P=0;P<L;++P)k[P]=F[P];return k}function _(F,L){for(;L+1<F.length;L++)F[L]=F[L+1];F.pop()}function S(F){for(var L=new Array(F.length),k=0;k<L.length;++k)L[k]=F[k].listener||F[k];return L}function N(F,L){return new Promise(function(k,P){function U(j){F.removeListener(L,B),P(j)}function B(){typeof F.removeListener=="function"&&F.removeListener("error",U),k([].slice.call(arguments))}M(F,L,B,{once:!0}),L!=="error"&&O(F,U,{once:!0})})}function O(F,L,k){typeof F.on=="function"&&M(F,"error",L,k)}function M(F,L,k,P){if(typeof F.on=="function")P.once?F.once(L,k):F.on(L,k);else if(typeof F.addEventListener=="function")F.addEventListener(L,function U(B){P.once&&F.removeEventListener(L,U),k(B)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof F)}return events.exports}var streamBrowser$1,hasRequiredStreamBrowser$1;function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1||(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter),streamBrowser$1}var util$1={},types$1={},shams$3,hasRequiredShams$3;function requireShams$3(){return hasRequiredShams$3||(hasRequiredShams$3=1,shams$3=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},a=Symbol("test"),i=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;n[a]=o;for(a in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==a||!Object.prototype.propertyIsEnumerable.call(n,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,a);if(l.value!==o||l.enumerable!==!0)return!1}return!0}),shams$3}var shams$2,hasRequiredShams$2;function requireShams$2(){if(hasRequiredShams$2)return shams$2;hasRequiredShams$2=1;var r=requireShams$3();return shams$2=function(){return r()&&!!Symbol.toStringTag},shams$2}var esObjectAtoms$1,hasRequiredEsObjectAtoms$1;function requireEsObjectAtoms$1(){return hasRequiredEsObjectAtoms$1||(hasRequiredEsObjectAtoms$1=1,esObjectAtoms$1=Object),esObjectAtoms$1}var esErrors,hasRequiredEsErrors;function requireEsErrors(){return hasRequiredEsErrors||(hasRequiredEsErrors=1,esErrors=Error),esErrors}var _eval,hasRequired_eval;function require_eval(){return hasRequired_eval||(hasRequired_eval=1,_eval=EvalError),_eval}var range,hasRequiredRange;function requireRange(){return hasRequiredRange||(hasRequiredRange=1,range=RangeError),range}var ref,hasRequiredRef;function requireRef(){return hasRequiredRef||(hasRequiredRef=1,ref=ReferenceError),ref}var syntax,hasRequiredSyntax;function requireSyntax(){return hasRequiredSyntax||(hasRequiredSyntax=1,syntax=SyntaxError),syntax}var type$1,hasRequiredType;function requireType(){return hasRequiredType||(hasRequiredType=1,type$1=TypeError),type$1}var uri,hasRequiredUri;function requireUri(){return hasRequiredUri||(hasRequiredUri=1,uri=URIError),uri}var abs,hasRequiredAbs;function requireAbs(){return hasRequiredAbs||(hasRequiredAbs=1,abs=Math.abs),abs}var floor,hasRequiredFloor;function requireFloor(){return hasRequiredFloor||(hasRequiredFloor=1,floor=Math.floor),floor}var max,hasRequiredMax;function requireMax(){return hasRequiredMax||(hasRequiredMax=1,max=Math.max),max}var min,hasRequiredMin;function requireMin(){return hasRequiredMin||(hasRequiredMin=1,min=Math.min),min}var pow,hasRequiredPow;function requirePow(){return hasRequiredPow||(hasRequiredPow=1,pow=Math.pow),pow}var round,hasRequiredRound;function requireRound(){return hasRequiredRound||(hasRequiredRound=1,round=Math.round),round}var _isNaN,hasRequired_isNaN;function require_isNaN(){return hasRequired_isNaN||(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(n){return n!==n}),_isNaN}var sign$1,hasRequiredSign$1;function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var r=require_isNaN();return sign$1=function(a){return r(a)||a===0?a:a<0?-1:1},sign$1}var gOPD,hasRequiredGOPD;function requireGOPD(){return hasRequiredGOPD||(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor),gOPD}var gopd$2,hasRequiredGopd$2;function requireGopd$2(){if(hasRequiredGopd$2)return gopd$2;hasRequiredGopd$2=1;var r=requireGOPD();if(r)try{r([],"length")}catch{r=null}return gopd$2=r,gopd$2}var esDefineProperty$1,hasRequiredEsDefineProperty$1;function requireEsDefineProperty$1(){if(hasRequiredEsDefineProperty$1)return esDefineProperty$1;hasRequiredEsDefineProperty$1=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return esDefineProperty$1=r,esDefineProperty$1}var shams$1,hasRequiredShams$1;function requireShams$1(){return hasRequiredShams$1||(hasRequiredShams$1=1,shams$1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},a=Symbol("test"),i=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;n[a]=o;for(var s in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var l=Object.getOwnPropertySymbols(n);if(l.length!==1||l[0]!==a||!Object.prototype.propertyIsEnumerable.call(n,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(n,a);if(f.value!==o||f.enumerable!==!0)return!1}return!0}),shams$1}var hasSymbols$1,hasRequiredHasSymbols$1;function requireHasSymbols$1(){if(hasRequiredHasSymbols$1)return hasSymbols$1;hasRequiredHasSymbols$1=1;var r=typeof Symbol<"u"&&Symbol,n=requireShams$1();return hasSymbols$1=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()},hasSymbols$1}var Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf;function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf||(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Reflect_getPrototypeOf}var esObjectAtoms,hasRequiredEsObjectAtoms;function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms||(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object),esObjectAtoms}var Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireObject_getPrototypeOf(){if(hasRequiredObject_getPrototypeOf)return Object_getPrototypeOf;hasRequiredObject_getPrototypeOf=1;var r=requireEsObjectAtoms();return Object_getPrototypeOf=r.getPrototypeOf||null,Object_getPrototypeOf}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,a=Math.max,i="[object Function]",o=function(d,u){for(var c=[],v=0;v<d.length;v+=1)c[v]=d[v];for(var h=0;h<u.length;h+=1)c[h+d.length]=u[h];return c},s=function(d,u){for(var c=[],v=u,h=0;v<d.length;v+=1,h+=1)c[h]=d[v];return c},l=function(f,d){for(var u="",c=0;c<f.length;c+=1)u+=f[c],c+1<f.length&&(u+=d);return u};return implementation=function(d){var u=this;if(typeof u!="function"||n.apply(u)!==i)throw new TypeError(r+u);for(var c=s(arguments,1),v,h=function(){if(this instanceof v){var N=u.apply(this,o(c,arguments));return Object(N)===N?N:this}return u.apply(d,o(c,arguments))},m=a(0,u.length-c.length),g=[],_=0;_<m;_++)g[_]="$"+_;if(v=Function("binder","return function ("+l(g,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var S=function(){};S.prototype=u.prototype,v.prototype=new S,S.prototype=null}return v},implementation}var functionBind,hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var r=requireImplementation();return functionBind=Function.prototype.bind||r,functionBind}var functionCall,hasRequiredFunctionCall;function requireFunctionCall(){return hasRequiredFunctionCall||(hasRequiredFunctionCall=1,functionCall=Function.prototype.call),functionCall}var functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply||(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply),functionApply}var reflectApply,hasRequiredReflectApply;function requireReflectApply(){return hasRequiredReflectApply||(hasRequiredReflectApply=1,reflectApply=typeof Reflect<"u"&&Reflect&&Reflect.apply),reflectApply}var actualApply,hasRequiredActualApply;function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var r=requireFunctionBind(),n=requireFunctionApply(),a=requireFunctionCall(),i=requireReflectApply();return actualApply=i||r.call(a,n),actualApply}var callBindApplyHelpers,hasRequiredCallBindApplyHelpers;function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var r=requireFunctionBind(),n=requireType(),a=requireFunctionCall(),i=requireActualApply();return callBindApplyHelpers=function(s){if(s.length<1||typeof s[0]!="function")throw new n("a function is required");return i(r,a,s)},callBindApplyHelpers}var get,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var r=requireCallBindApplyHelpers(),n=requireGopd$2(),a;try{a=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var i=!!a&&n&&n(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;return get=i&&typeof i.get=="function"?r([i.get]):typeof s=="function"?function(f){return s(f==null?f:o(f))}:!1,get}var getProto,hasRequiredGetProto;function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var r=requireReflect_getPrototypeOf(),n=requireObject_getPrototypeOf(),a=requireGet();return getProto=r?function(o){return r(o)}:n?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return n(o)}:a?function(o){return a(o)}:null,getProto}var hasown,hasRequiredHasown;function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,a=requireFunctionBind();return hasown=a.call(r,n),hasown}var getIntrinsic$1,hasRequiredGetIntrinsic$1;function requireGetIntrinsic$1(){if(hasRequiredGetIntrinsic$1)return getIntrinsic$1;hasRequiredGetIntrinsic$1=1;var r,n=requireEsObjectAtoms$1(),a=requireEsErrors(),i=require_eval(),o=requireRange(),s=requireRef(),l=requireSyntax(),f=requireType(),d=requireUri(),u=requireAbs(),c=requireFloor(),v=requireMax(),h=requireMin(),m=requirePow(),g=requireRound(),_=requireSign$1(),S=Function,N=function(Z){try{return S('"use strict"; return ('+Z+").constructor;")()}catch{}},O=requireGopd$2(),M=requireEsDefineProperty$1(),F=function(){throw new f},L=O?function(){try{return arguments.callee,F}catch{try{return O(arguments,"callee").get}catch{return F}}}():F,k=requireHasSymbols$1()(),P=requireGetProto(),U=requireObject_getPrototypeOf(),B=requireReflect_getPrototypeOf(),j=requireFunctionApply(),$=requireFunctionCall(),A={},R=typeof Uint8Array>"u"||!P?r:P(Uint8Array),y={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":k&&P?P([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":S,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&P?P(P([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!P?r:P(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!P?r:P(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&P?P(""[Symbol.iterator]()):r,"%Symbol%":k?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":L,"%TypedArray%":R,"%TypeError%":f,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":$,"%Function.prototype.apply%":j,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":U,"%Math.abs%":u,"%Math.floor%":c,"%Math.max%":v,"%Math.min%":h,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":B};if(P)try{null.error}catch(Z){var b=P(P(Z));y["%Error.prototype%"]=b}var D=function Z(re){var W;if(re==="%AsyncFunction%")W=N("async function () {}");else if(re==="%GeneratorFunction%")W=N("function* () {}");else if(re==="%AsyncGeneratorFunction%")W=N("async function* () {}");else if(re==="%AsyncGenerator%"){var X=Z("%AsyncGeneratorFunction%");X&&(W=X.prototype)}else if(re==="%AsyncIteratorPrototype%"){var J=Z("%AsyncGenerator%");J&&P&&(W=P(J.prototype))}return y[re]=W,W},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=requireFunctionBind(),C=requireHasown(),x=T.call($,Array.prototype.concat),w=T.call(j,Array.prototype.splice),E=T.call($,String.prototype.replace),q=T.call($,String.prototype.slice),G=T.call($,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,V=function(re){var W=q(re,0,1),X=q(re,-1);if(W==="%"&&X!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(X==="%"&&W!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var J=[];return E(re,z,function(ie,ne,ae,ue){J[J.length]=ae?E(ue,H,"$1"):ne||ie}),J},K=function(re,W){var X=re,J;if(C(I,X)&&(J=I[X],X="%"+J[0]+"%"),C(y,X)){var ie=y[X];if(ie===A&&(ie=D(X)),typeof ie>"u"&&!W)throw new f("intrinsic "+re+" exists, but is not available. Please file an issue!");return{alias:J,name:X,value:ie}}throw new l("intrinsic "+re+" does not exist!")};return getIntrinsic$1=function(re,W){if(typeof re!="string"||re.length===0)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof W!="boolean")throw new f('"allowMissing" argument must be a boolean');if(G(/^%?[^%]*%?$/,re)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=V(re),J=X.length>0?X[0]:"",ie=K("%"+J+"%",W),ne=ie.name,ae=ie.value,ue=!1,fe=ie.alias;fe&&(J=fe[0],w(X,x([0,1],fe)));for(var se=1,pe=!0;se<X.length;se+=1){var ce=X[se],he=q(ce,0,1),ve=q(ce,-1);if((he==='"'||he==="'"||he==="`"||ve==='"'||ve==="'"||ve==="`")&&he!==ve)throw new l("property names with quotes must have matching quotes");if((ce==="constructor"||!pe)&&(ue=!0),J+="."+ce,ne="%"+J+"%",C(y,ne))ae=y[ne];else if(ae!=null){if(!(ce in ae)){if(!W)throw new f("base intrinsic for "+re+" exists, but the property is not available.");return}if(O&&se+1>=X.length){var ye=O(ae,ce);pe=!!ye,pe&&"get"in ye&&!("originalValue"in ye.get)?ae=ye.get:ae=ae[ce]}else pe=C(ae,ce),ae=ae[ce];pe&&!ue&&(y[ne]=ae)}}return ae},getIntrinsic$1}var callBound,hasRequiredCallBound;function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var r=requireGetIntrinsic$1(),n=requireCallBindApplyHelpers(),a=n([r("%String.prototype.indexOf%")]);return callBound=function(o,s){var l=r(o,!!s);return typeof l=="function"&&a(o,".prototype.")>-1?n([l]):l},callBound}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var r=requireShams$2()(),n=requireCallBound(),a=n("Object.prototype.toString"),i=function(f){return r&&f&&typeof f=="object"&&Symbol.toStringTag in f?!1:a(f)==="[object Arguments]"},o=function(f){return i(f)?!0:f!==null&&typeof f=="object"&&"length"in f&&typeof f.length=="number"&&f.length>=0&&a(f)!=="[object Array]"&&"callee"in f&&a(f.callee)==="[object Function]"},s=function(){return i(arguments)}();return i.isLegacyArguments=o,isArguments=s?i:o,isArguments}var isRegex,hasRequiredIsRegex;function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var r=requireCallBound(),n=requireShams$2()(),a=requireHasown(),i=requireGopd$2(),o;if(n){var s=r("RegExp.prototype.exec"),l={},f=function(){throw l},d={toString:f,valueOf:f};typeof Symbol.toPrimitive=="symbol"&&(d[Symbol.toPrimitive]=f),o=function(h){if(!h||typeof h!="object")return!1;var m=i(h,"lastIndex"),g=m&&a(m,"value");if(!g)return!1;try{s(h,d)}catch(_){return _===l}}}else{var u=r("Object.prototype.toString"),c="[object RegExp]";o=function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:u(h)===c}}return isRegex=o,isRegex}var safeRegexTest,hasRequiredSafeRegexTest;function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var r=requireCallBound(),n=requireIsRegex(),a=r("RegExp.prototype.exec"),i=requireType();return safeRegexTest=function(s){if(!n(s))throw new i("`regex` must be a RegExp");return function(f){return a(s,f)!==null}},safeRegexTest}var isGeneratorFunction,hasRequiredIsGeneratorFunction;function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var r=requireCallBound(),n=requireSafeRegexTest(),a=n(/^\s*(?:function)?\*/),i=requireShams$2()(),o=requireGetProto(),s=r("Object.prototype.toString"),l=r("Function.prototype.toString"),f=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},d;return isGeneratorFunction=function(c){if(typeof c!="function")return!1;if(a(l(c)))return!0;if(!i){var v=s(c);return v==="[object GeneratorFunction]"}if(!o)return!1;if(typeof d>"u"){var h=f();d=h?o(h):!1}return o(c)===d},isGeneratorFunction}var isCallable,hasRequiredIsCallable;function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,a,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{a=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,a)}catch(O){O!==i&&(n=null)}else n=null;var o=/^\s*class\b/,s=function(M){try{var F=r.call(M);return o.test(F)}catch{return!1}},l=function(M){try{return s(M)?!1:(r.call(M),!0)}catch{return!1}},f=Object.prototype.toString,d="[object Object]",u="[object Function]",c="[object GeneratorFunction]",v="[object HTMLAllCollection]",h="[object HTML document.all class]",m="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),S=function(){return!1};if(typeof document=="object"){var N=document.all;f.call(N)===f.call(document.all)&&(S=function(M){if((_||!M)&&(typeof M>"u"||typeof M=="object"))try{var F=f.call(M);return(F===v||F===h||F===m||F===d)&&M("")==null}catch{}return!1})}return isCallable=n?function(M){if(S(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{n(M,null,a)}catch(F){if(F!==i)return!1}return!s(M)&&l(M)}:function(M){if(S(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(g)return l(M);if(s(M))return!1;var F=f.call(M);return F!==u&&F!==c&&!/^\[object HTML/.test(F)?!1:l(M)},isCallable}var forEach,hasRequiredForEach;function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var r=requireIsCallable(),n=Object.prototype.toString,a=Object.prototype.hasOwnProperty,i=function(d,u,c){for(var v=0,h=d.length;v<h;v++)a.call(d,v)&&(c==null?u(d[v],v,d):u.call(c,d[v],v,d))},o=function(d,u,c){for(var v=0,h=d.length;v<h;v++)c==null?u(d.charAt(v),v,d):u.call(c,d.charAt(v),v,d)},s=function(d,u,c){for(var v in d)a.call(d,v)&&(c==null?u(d[v],v,d):u.call(c,d[v],v,d))};function l(f){return n.call(f)==="[object Array]"}return forEach=function(d,u,c){if(!r(u))throw new TypeError("iterator must be a function");var v;arguments.length>=3&&(v=c),l(d)?i(d,u,v):typeof d=="string"?o(d,u,v):s(d,u,v)},forEach}var possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames;function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames||(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),possibleTypedArrayNames}var availableTypedArrays,hasRequiredAvailableTypedArrays;function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var r=requirePossibleTypedArrayNames(),n=typeof globalThis>"u"?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var i=[],o=0;o<r.length;o++)typeof n[r[o]]=="function"&&(i[i.length]=r[o]);return i},availableTypedArrays}var callBind={exports:{}},shams,hasRequiredShams;function requireShams(){return hasRequiredShams||(hasRequiredShams=1,shams=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},a=Symbol("test"),i=Object(a);if(typeof a=="string"||Object.prototype.toString.call(a)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var o=42;n[a]=o;for(a in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==a||!Object.prototype.propertyIsEnumerable.call(n,a))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,a);if(l.value!==o||l.enumerable!==!0)return!1}return!0}),shams}var hasSymbols,hasRequiredHasSymbols;function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var r=typeof Symbol<"u"&&Symbol,n=requireShams();return hasSymbols=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()},hasSymbols}var hasProto,hasRequiredHasProto;function requireHasProto(){if(hasRequiredHasProto)return hasProto;hasRequiredHasProto=1;var r={__proto__:null,foo:{}},n=Object;return hasProto=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof n)},hasProto}var getIntrinsic,hasRequiredGetIntrinsic;function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;hasRequiredGetIntrinsic=1;var r,n=requireEsErrors(),a=require_eval(),i=requireRange(),o=requireRef(),s=requireSyntax(),l=requireType(),f=requireUri(),d=Function,u=function(I){try{return d('"use strict"; return ('+I+").constructor;")()}catch{}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch{c=null}var v=function(){throw new l},h=c?function(){try{return arguments.callee,v}catch{try{return c(arguments,"callee").get}catch{return v}}}():v,m=requireHasSymbols()(),g=requireHasProto()(),_=Object.getPrototypeOf||(g?function(I){return I.__proto__}:null),S={},N=typeof Uint8Array>"u"||!_?r:_(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":m&&_?_([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":S,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&_?_(_([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m||!_?r:_(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m||!_?r:_(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&_?_(""[Symbol.iterator]()):r,"%Symbol%":m?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":N,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(_)try{null.error}catch(I){var M=_(_(I));O["%Error.prototype%"]=M}var F=function I(T){var C;if(T==="%AsyncFunction%")C=u("async function () {}");else if(T==="%GeneratorFunction%")C=u("function* () {}");else if(T==="%AsyncGeneratorFunction%")C=u("async function* () {}");else if(T==="%AsyncGenerator%"){var x=I("%AsyncGeneratorFunction%");x&&(C=x.prototype)}else if(T==="%AsyncIteratorPrototype%"){var w=I("%AsyncGenerator%");w&&_&&(C=_(w.prototype))}return O[T]=C,C},L={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=requireFunctionBind(),P=requireHasown(),U=k.call(Function.call,Array.prototype.concat),B=k.call(Function.apply,Array.prototype.splice),j=k.call(Function.call,String.prototype.replace),$=k.call(Function.call,String.prototype.slice),A=k.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,y=/\\(\\)?/g,b=function(T){var C=$(T,0,1),x=$(T,-1);if(C==="%"&&x!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(x==="%"&&C!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var w=[];return j(T,R,function(E,q,G,z){w[w.length]=G?j(z,y,"$1"):q||E}),w},D=function(T,C){var x=T,w;if(P(L,x)&&(w=L[x],x="%"+w[0]+"%"),P(O,x)){var E=O[x];if(E===S&&(E=F(x)),typeof E>"u"&&!C)throw new l("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:w,name:x,value:E}}throw new s("intrinsic "+T+" does not exist!")};return getIntrinsic=function(T,C){if(typeof T!="string"||T.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof C!="boolean")throw new l('"allowMissing" argument must be a boolean');if(A(/^%?[^%]*%?$/,T)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var x=b(T),w=x.length>0?x[0]:"",E=D("%"+w+"%",C),q=E.name,G=E.value,z=!1,H=E.alias;H&&(w=H[0],B(x,U([0,1],H)));for(var V=1,K=!0;V<x.length;V+=1){var Z=x[V],re=$(Z,0,1),W=$(Z,-1);if((re==='"'||re==="'"||re==="`"||W==='"'||W==="'"||W==="`")&&re!==W)throw new s("property names with quotes must have matching quotes");if((Z==="constructor"||!K)&&(z=!0),w+="."+Z,q="%"+w+"%",P(O,q))G=O[q];else if(G!=null){if(!(Z in G)){if(!C)throw new l("base intrinsic for "+T+" exists, but the property is not available.");return}if(c&&V+1>=x.length){var X=c(G,Z);K=!!X,K&&"get"in X&&!("originalValue"in X.get)?G=X.get:G=G[Z]}else K=P(G,Z),G=G[Z];K&&!z&&(O[q]=G)}}return G},getIntrinsic}var esDefineProperty,hasRequiredEsDefineProperty;function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var r=requireGetIntrinsic(),n=r("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return esDefineProperty=n,esDefineProperty}var gopd$1,hasRequiredGopd$1;function requireGopd$1(){if(hasRequiredGopd$1)return gopd$1;hasRequiredGopd$1=1;var r=requireGetIntrinsic(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}return gopd$1=n,gopd$1}var defineDataProperty,hasRequiredDefineDataProperty;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var r=requireEsDefineProperty(),n=requireSyntax(),a=requireType(),i=requireGopd$1();return defineDataProperty=function(s,l,f){if(!s||typeof s!="object"&&typeof s!="function")throw new a("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,h=!!i&&i(s,l);if(r)r(s,l,{configurable:c===null&&h?h.configurable:!c,enumerable:d===null&&h?h.enumerable:!d,value:f,writable:u===null&&h?h.writable:!u});else if(v||!d&&!u&&!c)s[l]=f;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},defineDataProperty}var hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors;function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var r=requireEsDefineProperty(),n=function(){return!!r};return n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},hasPropertyDescriptors_1=n,hasPropertyDescriptors_1}var gopd,hasRequiredGopd;function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var r=requireGetIntrinsic(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}return gopd=n,gopd}var setFunctionLength,hasRequiredSetFunctionLength;function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var r=requireGetIntrinsic(),n=requireDefineDataProperty(),a=requireHasPropertyDescriptors()(),i=requireGopd(),o=requireType(),s=r("%Math.floor%");return setFunctionLength=function(f,d){if(typeof f!="function")throw new o("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||s(d)!==d)throw new o("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],c=!0,v=!0;if("length"in f&&i){var h=i(f,"length");h&&!h.configurable&&(c=!1),h&&!h.writable&&(v=!1)}return(c||v||!u)&&(a?n(f,"length",d,!0,!0):n(f,"length",d)),f},setFunctionLength}var applyBind,hasRequiredApplyBind;function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var r=requireFunctionBind(),n=requireFunctionApply(),a=requireActualApply();return applyBind=function(){return a(r,n,arguments)},applyBind}var hasRequiredCallBind;function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,function(r){var n=requireSetFunctionLength(),a=requireEsDefineProperty(),i=requireCallBindApplyHelpers(),o=requireApplyBind();r.exports=function(l){var f=i(arguments),d=l.length-(arguments.length-1);return n(f,1+(d>0?d:0),!0)},a?a(r.exports,"apply",{value:o}):r.exports.apply=o}(callBind)),callBind.exports}var whichTypedArray,hasRequiredWhichTypedArray;function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var r=requireForEach(),n=requireAvailableTypedArrays(),a=requireCallBind(),i=requireCallBound(),o=requireGopd$2(),s=requireGetProto(),l=i("Object.prototype.toString"),f=requireShams$2()(),d=typeof globalThis>"u"?commonjsGlobal:globalThis,u=n(),c=i("String.prototype.slice"),v=i("Array.prototype.indexOf",!0)||function(S,N){for(var O=0;O<S.length;O+=1)if(S[O]===N)return O;return-1},h={__proto__:null};f&&o&&s?r(u,function(_){var S=new d[_];if(Symbol.toStringTag in S&&s){var N=s(S),O=o(N,Symbol.toStringTag);if(!O&&N){var M=s(N);O=o(M,Symbol.toStringTag)}h["$"+_]=a(O.get)}}):r(u,function(_){var S=new d[_],N=S.slice||S.set;N&&(h["$"+_]=a(N))});var m=function(S){var N=!1;return r(h,function(O,M){if(!N)try{"$"+O(S)===M&&(N=c(M,1))}catch{}}),N},g=function(S){var N=!1;return r(h,function(O,M){if(!N)try{O(S),N=c(M,1)}catch{}}),N};return whichTypedArray=function(S){if(!S||typeof S!="object")return!1;if(!f){var N=c(l(S),8,-1);return v(u,N)>-1?N:N!=="Object"?!1:g(S)}return o?m(S):null},whichTypedArray}var isTypedArray$1,hasRequiredIsTypedArray$1;function requireIsTypedArray$1(){if(hasRequiredIsTypedArray$1)return isTypedArray$1;hasRequiredIsTypedArray$1=1;var r=requireWhichTypedArray();return isTypedArray$1=function(a){return!!r(a)},isTypedArray$1}var hasRequiredTypes$1;function requireTypes$1(){return hasRequiredTypes$1||(hasRequiredTypes$1=1,function(r){var n=requireIsArguments(),a=requireIsGeneratorFunction(),i=requireWhichTypedArray(),o=requireIsTypedArray$1();function s(se){return se.call.bind(se)}var l=typeof BigInt<"u",f=typeof Symbol<"u",d=s(Object.prototype.toString),u=s(Number.prototype.valueOf),c=s(String.prototype.valueOf),v=s(Boolean.prototype.valueOf);if(l)var h=s(BigInt.prototype.valueOf);if(f)var m=s(Symbol.prototype.valueOf);function g(se,pe){if(typeof se!="object")return!1;try{return pe(se),!0}catch{return!1}}r.isArgumentsObject=n,r.isGeneratorFunction=a,r.isTypedArray=o;function _(se){return typeof Promise<"u"&&se instanceof Promise||se!==null&&typeof se=="object"&&typeof se.then=="function"&&typeof se.catch=="function"}r.isPromise=_;function S(se){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(se):o(se)||q(se)}r.isArrayBufferView=S;function N(se){return i(se)==="Uint8Array"}r.isUint8Array=N;function O(se){return i(se)==="Uint8ClampedArray"}r.isUint8ClampedArray=O;function M(se){return i(se)==="Uint16Array"}r.isUint16Array=M;function F(se){return i(se)==="Uint32Array"}r.isUint32Array=F;function L(se){return i(se)==="Int8Array"}r.isInt8Array=L;function k(se){return i(se)==="Int16Array"}r.isInt16Array=k;function P(se){return i(se)==="Int32Array"}r.isInt32Array=P;function U(se){return i(se)==="Float32Array"}r.isFloat32Array=U;function B(se){return i(se)==="Float64Array"}r.isFloat64Array=B;function j(se){return i(se)==="BigInt64Array"}r.isBigInt64Array=j;function $(se){return i(se)==="BigUint64Array"}r.isBigUint64Array=$;function A(se){return d(se)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function R(se){return typeof Map>"u"?!1:A.working?A(se):se instanceof Map}r.isMap=R;function y(se){return d(se)==="[object Set]"}y.working=typeof Set<"u"&&y(new Set);function b(se){return typeof Set>"u"?!1:y.working?y(se):se instanceof Set}r.isSet=b;function D(se){return d(se)==="[object WeakMap]"}D.working=typeof WeakMap<"u"&&D(new WeakMap);function I(se){return typeof WeakMap>"u"?!1:D.working?D(se):se instanceof WeakMap}r.isWeakMap=I;function T(se){return d(se)==="[object WeakSet]"}T.working=typeof WeakSet<"u"&&T(new WeakSet);function C(se){return T(se)}r.isWeakSet=C;function x(se){return d(se)==="[object ArrayBuffer]"}x.working=typeof ArrayBuffer<"u"&&x(new ArrayBuffer);function w(se){return typeof ArrayBuffer>"u"?!1:x.working?x(se):se instanceof ArrayBuffer}r.isArrayBuffer=w;function E(se){return d(se)==="[object DataView]"}E.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&E(new DataView(new ArrayBuffer(1),0,1));function q(se){return typeof DataView>"u"?!1:E.working?E(se):se instanceof DataView}r.isDataView=q;var G=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function z(se){return d(se)==="[object SharedArrayBuffer]"}function H(se){return typeof G>"u"?!1:(typeof z.working>"u"&&(z.working=z(new G)),z.working?z(se):se instanceof G)}r.isSharedArrayBuffer=H;function V(se){return d(se)==="[object AsyncFunction]"}r.isAsyncFunction=V;function K(se){return d(se)==="[object Map Iterator]"}r.isMapIterator=K;function Z(se){return d(se)==="[object Set Iterator]"}r.isSetIterator=Z;function re(se){return d(se)==="[object Generator]"}r.isGeneratorObject=re;function W(se){return d(se)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=W;function X(se){return g(se,u)}r.isNumberObject=X;function J(se){return g(se,c)}r.isStringObject=J;function ie(se){return g(se,v)}r.isBooleanObject=ie;function ne(se){return l&&g(se,h)}r.isBigIntObject=ne;function ae(se){return f&&g(se,m)}r.isSymbolObject=ae;function ue(se){return X(se)||J(se)||ie(se)||ne(se)||ae(se)}r.isBoxedPrimitive=ue;function fe(se){return typeof Uint8Array<"u"&&(w(se)||H(se))}r.isAnyArrayBuffer=fe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(se){Object.defineProperty(r,se,{enumerable:!1,value:function(){throw new Error(se+" is not supported in userland")}})})}(types$1)),types$1}var isBufferBrowser,hasRequiredIsBufferBrowser;function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser||(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}),isBufferBrowser}var hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(r){var n={},a=Object.getOwnPropertyDescriptors||function(G){for(var z=Object.keys(G),H={},V=0;V<z.length;V++)H[z[V]]=Object.getOwnPropertyDescriptor(G,z[V]);return H},i=/%[sdj%]/g;r.format=function(q){if(!k(q)){for(var G=[],z=0;z<arguments.length;z++)G.push(f(arguments[z]));return G.join(" ")}for(var z=1,H=arguments,V=H.length,K=String(q).replace(i,function(re){if(re==="%%")return"%";if(z>=V)return re;switch(re){case"%s":return String(H[z++]);case"%d":return Number(H[z++]);case"%j":try{return JSON.stringify(H[z++])}catch{return"[Circular]"}default:return re}}),Z=H[z];z<V;Z=H[++z])M(Z)||!j(Z)?K+=" "+Z:K+=" "+f(Z);return K},r.deprecate=function(q,G){if(typeof process$1<"u"&&process$1.noDeprecation===!0)return q;if(typeof process$1>"u")return function(){return r.deprecate(q,G).apply(this,arguments)};var z=!1;function H(){if(!z){if(process$1.throwDeprecation)throw new Error(G);process$1.traceDeprecation?console.trace(G):console.error(G),z=!0}return q.apply(this,arguments)}return H};var o={},s=/^$/;if(n.NODE_DEBUG){var l=n.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+l+"$","i")}r.debuglog=function(q){if(q=q.toUpperCase(),!o[q])if(s.test(q)){var G=process$1.pid;o[q]=function(){var z=r.format.apply(r,arguments);console.error("%s %d: %s",q,G,z)}}else o[q]=function(){};return o[q]};function f(q,G){var z={seen:[],stylize:u};return arguments.length>=3&&(z.depth=arguments[2]),arguments.length>=4&&(z.colors=arguments[3]),O(G)?z.showHidden=G:G&&r._extend(z,G),U(z.showHidden)&&(z.showHidden=!1),U(z.depth)&&(z.depth=2),U(z.colors)&&(z.colors=!1),U(z.customInspect)&&(z.customInspect=!0),z.colors&&(z.stylize=d),v(z,q,z.depth)}r.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d(q,G){var z=f.styles[G];return z?"\x1B["+f.colors[z][0]+"m"+q+"\x1B["+f.colors[z][1]+"m":q}function u(q,G){return q}function c(q){var G={};return q.forEach(function(z,H){G[z]=!0}),G}function v(q,G,z){if(q.customInspect&&G&&R(G.inspect)&&G.inspect!==r.inspect&&!(G.constructor&&G.constructor.prototype===G)){var H=G.inspect(z,q);return k(H)||(H=v(q,H,z)),H}var V=h(q,G);if(V)return V;var K=Object.keys(G),Z=c(K);if(q.showHidden&&(K=Object.getOwnPropertyNames(G)),A(G)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return m(G);if(K.length===0){if(R(G)){var re=G.name?": "+G.name:"";return q.stylize("[Function"+re+"]","special")}if(B(G))return q.stylize(RegExp.prototype.toString.call(G),"regexp");if($(G))return q.stylize(Date.prototype.toString.call(G),"date");if(A(G))return m(G)}var W="",X=!1,J=["{","}"];if(N(G)&&(X=!0,J=["[","]"]),R(G)){var ie=G.name?": "+G.name:"";W=" [Function"+ie+"]"}if(B(G)&&(W=" "+RegExp.prototype.toString.call(G)),$(G)&&(W=" "+Date.prototype.toUTCString.call(G)),A(G)&&(W=" "+m(G)),K.length===0&&(!X||G.length==0))return J[0]+W+J[1];if(z<0)return B(G)?q.stylize(RegExp.prototype.toString.call(G),"regexp"):q.stylize("[Object]","special");q.seen.push(G);var ne;return X?ne=g(q,G,z,Z,K):ne=K.map(function(ae){return _(q,G,z,Z,ae,X)}),q.seen.pop(),S(ne,W,J)}function h(q,G){if(U(G))return q.stylize("undefined","undefined");if(k(G)){var z="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(z,"string")}if(L(G))return q.stylize(""+G,"number");if(O(G))return q.stylize(""+G,"boolean");if(M(G))return q.stylize("null","null")}function m(q){return"["+Error.prototype.toString.call(q)+"]"}function g(q,G,z,H,V){for(var K=[],Z=0,re=G.length;Z<re;++Z)C(G,String(Z))?K.push(_(q,G,z,H,String(Z),!0)):K.push("");return V.forEach(function(W){W.match(/^\d+$/)||K.push(_(q,G,z,H,W,!0))}),K}function _(q,G,z,H,V,K){var Z,re,W;if(W=Object.getOwnPropertyDescriptor(G,V)||{value:G[V]},W.get?W.set?re=q.stylize("[Getter/Setter]","special"):re=q.stylize("[Getter]","special"):W.set&&(re=q.stylize("[Setter]","special")),C(H,V)||(Z="["+V+"]"),re||(q.seen.indexOf(W.value)<0?(M(z)?re=v(q,W.value,null):re=v(q,W.value,z-1),re.indexOf(`
7
+ `)>-1&&(K?re=re.split(`
8
+ `).map(function(X){return" "+X}).join(`
9
+ `).slice(2):re=`
10
+ `+re.split(`
11
+ `).map(function(X){return" "+X}).join(`
12
+ `))):re=q.stylize("[Circular]","special")),U(Z)){if(K&&V.match(/^\d+$/))return re;Z=JSON.stringify(""+V),Z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=q.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=q.stylize(Z,"string"))}return Z+": "+re}function S(q,G,z){var H=q.reduce(function(V,K){return K.indexOf(`
13
+ `)>=0,V+K.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?z[0]+(G===""?"":G+`
14
+ `)+" "+q.join(`,
15
+ `)+" "+z[1]:z[0]+G+" "+q.join(", ")+" "+z[1]}r.types=requireTypes$1();function N(q){return Array.isArray(q)}r.isArray=N;function O(q){return typeof q=="boolean"}r.isBoolean=O;function M(q){return q===null}r.isNull=M;function F(q){return q==null}r.isNullOrUndefined=F;function L(q){return typeof q=="number"}r.isNumber=L;function k(q){return typeof q=="string"}r.isString=k;function P(q){return typeof q=="symbol"}r.isSymbol=P;function U(q){return q===void 0}r.isUndefined=U;function B(q){return j(q)&&b(q)==="[object RegExp]"}r.isRegExp=B,r.types.isRegExp=B;function j(q){return typeof q=="object"&&q!==null}r.isObject=j;function $(q){return j(q)&&b(q)==="[object Date]"}r.isDate=$,r.types.isDate=$;function A(q){return j(q)&&(b(q)==="[object Error]"||q instanceof Error)}r.isError=A,r.types.isNativeError=A;function R(q){return typeof q=="function"}r.isFunction=R;function y(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}r.isPrimitive=y,r.isBuffer=requireIsBufferBrowser();function b(q){return Object.prototype.toString.call(q)}function D(q){return q<10?"0"+q.toString(10):q.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var q=new Date,G=[D(q.getHours()),D(q.getMinutes()),D(q.getSeconds())].join(":");return[q.getDate(),I[q.getMonth()],G].join(" ")}r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=requireInherits_browser(),r._extend=function(q,G){if(!G||!j(G))return q;for(var z=Object.keys(G),H=z.length;H--;)q[z[H]]=G[z[H]];return q};function C(q,G){return Object.prototype.hasOwnProperty.call(q,G)}var x=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;r.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(x&&G[x]){var z=G[x];if(typeof z!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(z,x,{value:z,enumerable:!1,writable:!1,configurable:!0}),z}function z(){for(var H,V,K=new Promise(function(W,X){H=W,V=X}),Z=[],re=0;re<arguments.length;re++)Z.push(arguments[re]);Z.push(function(W,X){W?V(W):H(X)});try{G.apply(this,Z)}catch(W){V(W)}return K}return Object.setPrototypeOf(z,Object.getPrototypeOf(G)),x&&Object.defineProperty(z,x,{value:z,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(z,a(G))},r.promisify.custom=x;function w(q,G){if(!q){var z=new Error("Promise was rejected with a falsy value");z.reason=q,q=z}return G(q)}function E(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function G(){for(var z=[],H=0;H<arguments.length;H++)z.push(arguments[H]);var V=z.pop();if(typeof V!="function")throw new TypeError("The last argument must be of type Function");var K=this,Z=function(){return V.apply(K,arguments)};q.apply(this,z).then(function(re){process$1.nextTick(Z.bind(null,null,re))},function(re){process$1.nextTick(w.bind(null,re,Z))})}return Object.setPrototypeOf(G,Object.getPrototypeOf(q)),Object.defineProperties(G,a(q)),G}r.callbackify=E}(util$1)),util$1}var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function r(g,_){var S=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);_&&(N=N.filter(function(O){return Object.getOwnPropertyDescriptor(g,O).enumerable})),S.push.apply(S,N)}return S}function n(g){for(var _=1;_<arguments.length;_++){var S=arguments[_]!=null?arguments[_]:{};_%2?r(Object(S),!0).forEach(function(N){a(g,N,S[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(S)):r(Object(S)).forEach(function(N){Object.defineProperty(g,N,Object.getOwnPropertyDescriptor(S,N))})}return g}function a(g,_,S){return _=l(_),_ in g?Object.defineProperty(g,_,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[_]=S,g}function i(g,_){if(!(g instanceof _))throw new TypeError("Cannot call a class as a function")}function o(g,_){for(var S=0;S<_.length;S++){var N=_[S];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(g,l(N.key),N)}}function s(g,_,S){return _&&o(g.prototype,_),Object.defineProperty(g,"prototype",{writable:!1}),g}function l(g){var _=f(g,"string");return typeof _=="symbol"?_:String(_)}function f(g,_){if(typeof g!="object"||g===null)return g;var S=g[Symbol.toPrimitive];if(S!==void 0){var N=S.call(g,_);if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var d=requireDist(),u=d.Buffer,c=requireUtil$1(),v=c.inspect,h=v&&v.custom||"inspect";function m(g,_,S){u.prototype.copy.call(g,_,S)}return buffer_list=function(){function g(){i(this,g),this.head=null,this.tail=null,this.length=0}return s(g,[{key:"push",value:function(S){var N={data:S,next:null};this.length>0?this.tail.next=N:this.head=N,this.tail=N,++this.length}},{key:"unshift",value:function(S){var N={data:S,next:this.head};this.length===0&&(this.tail=N),this.head=N,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var N=this.head,O=""+N.data;N=N.next;)O+=S+N.data;return O}},{key:"concat",value:function(S){if(this.length===0)return u.alloc(0);for(var N=u.allocUnsafe(S>>>0),O=this.head,M=0;O;)m(O.data,N,M),M+=O.data.length,O=O.next;return N}},{key:"consume",value:function(S,N){var O;return S<this.head.data.length?(O=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?O=this.shift():O=N?this._getString(S):this._getBuffer(S),O}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var N=this.head,O=1,M=N.data;for(S-=M.length;N=N.next;){var F=N.data,L=S>F.length?F.length:S;if(L===F.length?M+=F:M+=F.slice(0,S),S-=L,S===0){L===F.length?(++O,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=F.slice(L));break}++O}return this.length-=O,M}},{key:"_getBuffer",value:function(S){var N=u.allocUnsafe(S),O=this.head,M=1;for(O.data.copy(N),S-=O.data.length;O=O.next;){var F=O.data,L=S>F.length?F.length:S;if(F.copy(N,N.length-S,0,L),S-=L,S===0){L===F.length?(++M,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=F.slice(L));break}++M}return this.length-=M,N}},{key:h,value:function(S,N){return v(this,n(n({},N),{},{depth:0,customInspect:!1}))}}]),g}(),buffer_list}var destroy_1$1,hasRequiredDestroy$1;function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;hasRequiredDestroy$1=1;function r(l,f){var d=this,u=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return u||c?(f?f(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(o,this,l)):process$1.nextTick(o,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(v){!f&&v?d._writableState?d._writableState.errorEmitted?process$1.nextTick(a,d):(d._writableState.errorEmitted=!0,process$1.nextTick(n,d,v)):process$1.nextTick(n,d,v):f?(process$1.nextTick(a,d),f(v)):process$1.nextTick(a,d)}),this)}function n(l,f){o(l,f),a(l)}function a(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function i(){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)}function o(l,f){l.emit("error",f)}function s(l,f){var d=l._readableState,u=l._writableState;d&&d.autoDestroy||u&&u.autoDestroy?l.destroy(f):l.emit("error",f)}return destroy_1$1={destroy:r,undestroy:i,errorOrDestroy:s},destroy_1$1}var errorsBrowser={},hasRequiredErrorsBrowser;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;function r(f,d){f.prototype=Object.create(d.prototype),f.prototype.constructor=f,f.__proto__=d}var n={};function a(f,d,u){u||(u=Error);function c(h,m,g){return typeof d=="string"?d:d(h,m,g)}var v=function(h){r(m,h);function m(g,_,S){return h.call(this,c(g,_,S))||this}return m}(u);v.prototype.name=u.name,v.prototype.code=f,n[f]=v}function i(f,d){if(Array.isArray(f)){var u=f.length;return f=f.map(function(c){return String(c)}),u>2?"one of ".concat(d," ").concat(f.slice(0,u-1).join(", "),", or ")+f[u-1]:u===2?"one of ".concat(d," ").concat(f[0]," or ").concat(f[1]):"of ".concat(d," ").concat(f[0])}else return"of ".concat(d," ").concat(String(f))}function o(f,d,u){return f.substr(0,d.length)===d}function s(f,d,u){return(u===void 0||u>f.length)&&(u=f.length),f.substring(u-d.length,u)===d}function l(f,d,u){return typeof u!="number"&&(u=0),u+d.length>f.length?!1:f.indexOf(d,u)!==-1}return a("ERR_INVALID_OPT_VALUE",function(f,d){return'The value "'+d+'" is invalid for option "'+f+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(f,d,u){var c;typeof d=="string"&&o(d,"not ")?(c="must not be",d=d.replace(/^not /,"")):c="must be";var v;if(s(f," argument"))v="The ".concat(f," ").concat(c," ").concat(i(d,"type"));else{var h=l(f,".")?"property":"argument";v='The "'.concat(f,'" ').concat(h," ").concat(c," ").concat(i(d,"type"))}return v+=". Received type ".concat(typeof u),v},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(f){return"The "+f+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(f){return"Cannot call "+f+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(f){return"Unknown encoding: "+f},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=n,errorsBrowser}var state,hasRequiredState;function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var r=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;function n(i,o,s){return i.highWaterMark!=null?i.highWaterMark:o?i[s]:null}function a(i,o,s,l){var f=n(o,l,s);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var d=l?s:"highWaterMark";throw new r(d,f)}return Math.floor(f)}return i.objectMode?16:16*1024}return state={getHighWaterMark:a},state}var browser$c,hasRequiredBrowser$c;function requireBrowser$c(){if(hasRequiredBrowser$c)return browser$c;hasRequiredBrowser$c=1,browser$c=r;function r(a,i){if(n("noDeprecation"))return a;var o=!1;function s(){if(!o){if(n("throwDeprecation"))throw new Error(i);n("traceDeprecation")?console.trace(i):console.warn(i),o=!0}return a.apply(this,arguments)}return s}function n(a){try{if(!commonjsGlobal.localStorage)return!1}catch{return!1}var i=commonjsGlobal.localStorage[a];return i==null?!1:String(i).toLowerCase()==="true"}return browser$c}var _stream_writable$1,hasRequired_stream_writable$1;function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;hasRequired_stream_writable$1=1,_stream_writable$1=U;function r(H){var V=this;this.next=null,this.entry=null,this.finish=function(){z(V,H)}}var n;U.WritableState=k;var a={deprecate:requireBrowser$c()},i=requireStreamBrowser$1(),o=requireDist().Buffer,s=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function l(H){return o.from(H)}function f(H){return o.isBuffer(H)||H instanceof s}var d=requireDestroy$1(),u=requireState(),c=u.getHighWaterMark,v=requireErrorsBrowser().codes,h=v.ERR_INVALID_ARG_TYPE,m=v.ERR_METHOD_NOT_IMPLEMENTED,g=v.ERR_MULTIPLE_CALLBACK,_=v.ERR_STREAM_CANNOT_PIPE,S=v.ERR_STREAM_DESTROYED,N=v.ERR_STREAM_NULL_VALUES,O=v.ERR_STREAM_WRITE_AFTER_END,M=v.ERR_UNKNOWN_ENCODING,F=d.errorOrDestroy;requireInherits_browser()(U,i);function L(){}function k(H,V,K){n=n||require_stream_duplex$1(),H=H||{},typeof K!="boolean"&&(K=V instanceof n),this.objectMode=!!H.objectMode,K&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=c(this,H,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Z=H.decodeStrings===!1;this.decodeStrings=!Z,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){D(V,re)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}k.prototype.getBuffer=function(){for(var V=this.bufferedRequest,K=[];V;)K.push(V),V=V.next;return K},function(){try{Object.defineProperty(k.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var P;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(U,Symbol.hasInstance,{value:function(V){return P.call(this,V)?!0:this!==U?!1:V&&V._writableState instanceof k}})):P=function(V){return V instanceof this};function U(H){n=n||require_stream_duplex$1();var V=this instanceof n;if(!V&&!P.call(U,this))return new U(H);this._writableState=new k(H,this,V),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),i.call(this)}U.prototype.pipe=function(){F(this,new _)};function B(H,V){var K=new O;F(H,K),process$1.nextTick(V,K)}function j(H,V,K,Z){var re;return K===null?re=new N:typeof K!="string"&&!V.objectMode&&(re=new h("chunk",["string","Buffer"],K)),re?(F(H,re),process$1.nextTick(Z,re),!1):!0}U.prototype.write=function(H,V,K){var Z=this._writableState,re=!1,W=!Z.objectMode&&f(H);return W&&!o.isBuffer(H)&&(H=l(H)),typeof V=="function"&&(K=V,V=null),W?V="buffer":V||(V=Z.defaultEncoding),typeof K!="function"&&(K=L),Z.ending?B(this,K):(W||j(this,Z,H,K))&&(Z.pendingcb++,re=A(this,Z,W,H,V,K)),re},U.prototype.cork=function(){this._writableState.corked++},U.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&C(this,H))},U.prototype.setDefaultEncoding=function(V){if(typeof V=="string"&&(V=V.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((V+"").toLowerCase())>-1))throw new M(V);return this._writableState.defaultEncoding=V,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $(H,V,K){return!H.objectMode&&H.decodeStrings!==!1&&typeof V=="string"&&(V=o.from(V,K)),V}Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function A(H,V,K,Z,re,W){if(!K){var X=$(V,Z,re);Z!==X&&(K=!0,re="buffer",Z=X)}var J=V.objectMode?1:Z.length;V.length+=J;var ie=V.length<V.highWaterMark;if(ie||(V.needDrain=!0),V.writing||V.corked){var ne=V.lastBufferedRequest;V.lastBufferedRequest={chunk:Z,encoding:re,isBuf:K,callback:W,next:null},ne?ne.next=V.lastBufferedRequest:V.bufferedRequest=V.lastBufferedRequest,V.bufferedRequestCount+=1}else R(H,V,!1,J,Z,re,W);return ie}function R(H,V,K,Z,re,W,X){V.writelen=Z,V.writecb=X,V.writing=!0,V.sync=!0,V.destroyed?V.onwrite(new S("write")):K?H._writev(re,V.onwrite):H._write(re,W,V.onwrite),V.sync=!1}function y(H,V,K,Z,re){--V.pendingcb,K?(process$1.nextTick(re,Z),process$1.nextTick(q,H,V),H._writableState.errorEmitted=!0,F(H,Z)):(re(Z),H._writableState.errorEmitted=!0,F(H,Z),q(H,V))}function b(H){H.writing=!1,H.writecb=null,H.length-=H.writelen,H.writelen=0}function D(H,V){var K=H._writableState,Z=K.sync,re=K.writecb;if(typeof re!="function")throw new g;if(b(K),V)y(H,K,Z,V,re);else{var W=x(K)||H.destroyed;!W&&!K.corked&&!K.bufferProcessing&&K.bufferedRequest&&C(H,K),Z?process$1.nextTick(I,H,K,W,re):I(H,K,W,re)}}function I(H,V,K,Z){K||T(H,V),V.pendingcb--,Z(),q(H,V)}function T(H,V){V.length===0&&V.needDrain&&(V.needDrain=!1,H.emit("drain"))}function C(H,V){V.bufferProcessing=!0;var K=V.bufferedRequest;if(H._writev&&K&&K.next){var Z=V.bufferedRequestCount,re=new Array(Z),W=V.corkedRequestsFree;W.entry=K;for(var X=0,J=!0;K;)re[X]=K,K.isBuf||(J=!1),K=K.next,X+=1;re.allBuffers=J,R(H,V,!0,V.length,re,"",W.finish),V.pendingcb++,V.lastBufferedRequest=null,W.next?(V.corkedRequestsFree=W.next,W.next=null):V.corkedRequestsFree=new r(V),V.bufferedRequestCount=0}else{for(;K;){var ie=K.chunk,ne=K.encoding,ae=K.callback,ue=V.objectMode?1:ie.length;if(R(H,V,!1,ue,ie,ne,ae),K=K.next,V.bufferedRequestCount--,V.writing)break}K===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=K,V.bufferProcessing=!1}U.prototype._write=function(H,V,K){K(new m("_write()"))},U.prototype._writev=null,U.prototype.end=function(H,V,K){var Z=this._writableState;return typeof H=="function"?(K=H,H=null,V=null):typeof V=="function"&&(K=V,V=null),H!=null&&this.write(H,V),Z.corked&&(Z.corked=1,this.uncork()),Z.ending||G(this,Z,K),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function x(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}function w(H,V){H._final(function(K){V.pendingcb--,K&&F(H,K),V.prefinished=!0,H.emit("prefinish"),q(H,V)})}function E(H,V){!V.prefinished&&!V.finalCalled&&(typeof H._final=="function"&&!V.destroyed?(V.pendingcb++,V.finalCalled=!0,process$1.nextTick(w,H,V)):(V.prefinished=!0,H.emit("prefinish")))}function q(H,V){var K=x(V);if(K&&(E(H,V),V.pendingcb===0&&(V.finished=!0,H.emit("finish"),V.autoDestroy))){var Z=H._readableState;(!Z||Z.autoDestroy&&Z.endEmitted)&&H.destroy()}return K}function G(H,V,K){V.ending=!0,q(H,V),K&&(V.finished?process$1.nextTick(K):H.once("finish",K)),V.ended=!0,H.writable=!1}function z(H,V,K){var Z=H.entry;for(H.entry=null;Z;){var re=Z.callback;V.pendingcb--,re(K),Z=Z.next}V.corkedRequestsFree.next=H}return Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(V){this._writableState&&(this._writableState.destroyed=V)}}),U.prototype.destroy=d.destroy,U.prototype._undestroy=d.undestroy,U.prototype._destroy=function(H,V){V(H)},_stream_writable$1}var _stream_duplex$1,hasRequired_stream_duplex$1;function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var r=Object.keys||function(u){var c=[];for(var v in u)c.push(v);return c};_stream_duplex$1=l;var n=require_stream_readable$1(),a=require_stream_writable$1();requireInherits_browser()(l,n);for(var i=r(a.prototype),o=0;o<i.length;o++){var s=i[o];l.prototype[s]||(l.prototype[s]=a.prototype[s])}function l(u){if(!(this instanceof l))return new l(u);n.call(this,u),a.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(){this._writableState.ended||process$1.nextTick(d,this)}function d(u){u.end()}return Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),_stream_duplex$1}var string_decoder={},hasRequiredString_decoder;function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var r=requireSafeBuffer$1().Buffer,n=r.isEncoding||function(N){switch(N=""+N,N&&N.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 a(N){if(!N)return"utf8";for(var O;;)switch(N){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 N;default:if(O)return;N=(""+N).toLowerCase(),O=!0}}function i(N){var O=a(N);if(typeof O!="string"&&(r.isEncoding===n||!n(N)))throw new Error("Unknown encoding: "+N);return O||N}string_decoder.StringDecoder=o;function o(N){this.encoding=i(N);var O;switch(this.encoding){case"utf16le":this.text=v,this.end=h,O=4;break;case"utf8":this.fillLast=d,O=4;break;case"base64":this.text=m,this.end=g,O=3;break;default:this.write=_,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(O)}o.prototype.write=function(N){if(N.length===0)return"";var O,M;if(this.lastNeed){if(O=this.fillLast(N),O===void 0)return"";M=this.lastNeed,this.lastNeed=0}else M=0;return M<N.length?O?O+this.text(N,M):this.text(N,M):O||""},o.prototype.end=c,o.prototype.text=u,o.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length};function s(N){return N<=127?0:N>>5===6?2:N>>4===14?3:N>>3===30?4:N>>6===2?-1:-2}function l(N,O,M){var F=O.length-1;if(F<M)return 0;var L=s(O[F]);return L>=0?(L>0&&(N.lastNeed=L-1),L):--F<M||L===-2?0:(L=s(O[F]),L>=0?(L>0&&(N.lastNeed=L-2),L):--F<M||L===-2?0:(L=s(O[F]),L>=0?(L>0&&(L===2?L=0:N.lastNeed=L-3),L):0))}function f(N,O,M){if((O[0]&192)!==128)return N.lastNeed=0,"�";if(N.lastNeed>1&&O.length>1){if((O[1]&192)!==128)return N.lastNeed=1,"�";if(N.lastNeed>2&&O.length>2&&(O[2]&192)!==128)return N.lastNeed=2,"�"}}function d(N){var O=this.lastTotal-this.lastNeed,M=f(this,N);if(M!==void 0)return M;if(this.lastNeed<=N.length)return N.copy(this.lastChar,O,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,O,0,N.length),this.lastNeed-=N.length}function u(N,O){var M=l(this,N,O);if(!this.lastNeed)return N.toString("utf8",O);this.lastTotal=M;var F=N.length-(M-this.lastNeed);return N.copy(this.lastChar,0,F),N.toString("utf8",O,F)}function c(N){var O=N&&N.length?this.write(N):"";return this.lastNeed?O+"�":O}function v(N,O){if((N.length-O)%2===0){var M=N.toString("utf16le",O);if(M){var F=M.charCodeAt(M.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],M.slice(0,-1)}return M}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",O,N.length-1)}function h(N){var O=N&&N.length?this.write(N):"";if(this.lastNeed){var M=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,M)}return O}function m(N,O){var M=(N.length-O)%3;return M===0?N.toString("base64",O):(this.lastNeed=3-M,this.lastTotal=3,M===1?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",O,N.length-M))}function g(N){var O=N&&N.length?this.write(N):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}function _(N){return N.toString(this.encoding)}function S(N){return N&&N.length?this.write(N):""}return string_decoder}var endOfStream,hasRequiredEndOfStream;function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var r=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function n(s){var l=!1;return function(){if(!l){l=!0;for(var f=arguments.length,d=new Array(f),u=0;u<f;u++)d[u]=arguments[u];s.apply(this,d)}}}function a(){}function i(s){return s.setHeader&&typeof s.abort=="function"}function o(s,l,f){if(typeof l=="function")return o(s,null,l);l||(l={}),f=n(f||a);var d=l.readable||l.readable!==!1&&s.readable,u=l.writable||l.writable!==!1&&s.writable,c=function(){s.writable||h()},v=s._writableState&&s._writableState.finished,h=function(){u=!1,v=!0,d||f.call(s)},m=s._readableState&&s._readableState.endEmitted,g=function(){d=!1,m=!0,u||f.call(s)},_=function(M){f.call(s,M)},S=function(){var M;if(d&&!m)return(!s._readableState||!s._readableState.ended)&&(M=new r),f.call(s,M);if(u&&!v)return(!s._writableState||!s._writableState.ended)&&(M=new r),f.call(s,M)},N=function(){s.req.on("finish",h)};return i(s)?(s.on("complete",h),s.on("abort",S),s.req?N():s.on("request",N)):u&&!s._writableState&&(s.on("end",c),s.on("close",c)),s.on("end",g),s.on("finish",h),l.error!==!1&&s.on("error",_),s.on("close",S),function(){s.removeListener("complete",h),s.removeListener("abort",S),s.removeListener("request",N),s.req&&s.req.removeListener("finish",h),s.removeListener("end",c),s.removeListener("close",c),s.removeListener("finish",h),s.removeListener("end",g),s.removeListener("error",_),s.removeListener("close",S)}}return endOfStream=o,endOfStream}var async_iterator,hasRequiredAsync_iterator;function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;hasRequiredAsync_iterator=1;var r;function n(M,F,L){return F=a(F),F in M?Object.defineProperty(M,F,{value:L,enumerable:!0,configurable:!0,writable:!0}):M[F]=L,M}function a(M){var F=i(M,"string");return typeof F=="symbol"?F:String(F)}function i(M,F){if(typeof M!="object"||M===null)return M;var L=M[Symbol.toPrimitive];if(L!==void 0){var k=L.call(M,F);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(M)}var o=requireEndOfStream(),s=Symbol("lastResolve"),l=Symbol("lastReject"),f=Symbol("error"),d=Symbol("ended"),u=Symbol("lastPromise"),c=Symbol("handlePromise"),v=Symbol("stream");function h(M,F){return{value:M,done:F}}function m(M){var F=M[s];if(F!==null){var L=M[v].read();L!==null&&(M[u]=null,M[s]=null,M[l]=null,F(h(L,!1)))}}function g(M){process$1.nextTick(m,M)}function _(M,F){return function(L,k){M.then(function(){if(F[d]){L(h(void 0,!0));return}F[c](L,k)},k)}}var S=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((r={get stream(){return this[v]},next:function(){var F=this,L=this[f];if(L!==null)return Promise.reject(L);if(this[d])return Promise.resolve(h(void 0,!0));if(this[v].destroyed)return new Promise(function(B,j){process$1.nextTick(function(){F[f]?j(F[f]):B(h(void 0,!0))})});var k=this[u],P;if(k)P=new Promise(_(k,this));else{var U=this[v].read();if(U!==null)return Promise.resolve(h(U,!1));P=new Promise(this[c])}return this[u]=P,P}},n(r,Symbol.asyncIterator,function(){return this}),n(r,"return",function(){var F=this;return new Promise(function(L,k){F[v].destroy(null,function(P){if(P){k(P);return}L(h(void 0,!0))})})}),r),S),O=function(F){var L,k=Object.create(N,(L={},n(L,v,{value:F,writable:!0}),n(L,s,{value:null,writable:!0}),n(L,l,{value:null,writable:!0}),n(L,f,{value:null,writable:!0}),n(L,d,{value:F._readableState.endEmitted,writable:!0}),n(L,c,{value:function(U,B){var j=k[v].read();j?(k[u]=null,k[s]=null,k[l]=null,U(h(j,!1))):(k[s]=U,k[l]=B)},writable:!0}),L));return k[u]=null,o(F,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var U=k[l];U!==null&&(k[u]=null,k[s]=null,k[l]=null,U(P)),k[f]=P;return}var B=k[s];B!==null&&(k[u]=null,k[s]=null,k[l]=null,B(h(void 0,!0))),k[d]=!0}),F.on("readable",g.bind(null,k)),k};return async_iterator=O,async_iterator}var fromBrowser,hasRequiredFromBrowser;function requireFromBrowser(){return hasRequiredFromBrowser||(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")}),fromBrowser}var _stream_readable$1,hasRequired_stream_readable$1;function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;hasRequired_stream_readable$1=1,_stream_readable$1=B;var r;B.ReadableState=U,requireEvents().EventEmitter;var n=function(X,J){return X.listeners(J).length},a=requireStreamBrowser$1(),i=requireDist().Buffer,o=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(W){return i.from(W)}function l(W){return i.isBuffer(W)||W instanceof o}var f=requireUtil$1(),d;f&&f.debuglog?d=f.debuglog("stream"):d=function(){};var u=requireBuffer_list(),c=requireDestroy$1(),v=requireState(),h=v.getHighWaterMark,m=requireErrorsBrowser().codes,g=m.ERR_INVALID_ARG_TYPE,_=m.ERR_STREAM_PUSH_AFTER_EOF,S=m.ERR_METHOD_NOT_IMPLEMENTED,N=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,O,M,F;requireInherits_browser()(B,a);var L=c.errorOrDestroy,k=["error","close","destroy","pause","resume"];function P(W,X,J){if(typeof W.prependListener=="function")return W.prependListener(X,J);!W._events||!W._events[X]?W.on(X,J):Array.isArray(W._events[X])?W._events[X].unshift(J):W._events[X]=[J,W._events[X]]}function U(W,X,J){r=r||require_stream_duplex$1(),W=W||{},typeof J!="boolean"&&(J=X instanceof r),this.objectMode=!!W.objectMode,J&&(this.objectMode=this.objectMode||!!W.readableObjectMode),this.highWaterMark=h(this,W,"readableHighWaterMark",J),this.buffer=new u,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=W.emitClose!==!1,this.autoDestroy=!!W.autoDestroy,this.destroyed=!1,this.defaultEncoding=W.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,W.encoding&&(O||(O=requireString_decoder().StringDecoder),this.decoder=new O(W.encoding),this.encoding=W.encoding)}function B(W){if(r=r||require_stream_duplex$1(),!(this instanceof B))return new B(W);var X=this instanceof r;this._readableState=new U(W,this,X),this.readable=!0,W&&(typeof W.read=="function"&&(this._read=W.read),typeof W.destroy=="function"&&(this._destroy=W.destroy)),a.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(X){this._readableState&&(this._readableState.destroyed=X)}}),B.prototype.destroy=c.destroy,B.prototype._undestroy=c.undestroy,B.prototype._destroy=function(W,X){X(W)},B.prototype.push=function(W,X){var J=this._readableState,ie;return J.objectMode?ie=!0:typeof W=="string"&&(X=X||J.defaultEncoding,X!==J.encoding&&(W=i.from(W,X),X=""),ie=!0),j(this,W,X,!1,ie)},B.prototype.unshift=function(W){return j(this,W,null,!0,!1)};function j(W,X,J,ie,ne){d("readableAddChunk",X);var ae=W._readableState;if(X===null)ae.reading=!1,D(W,ae);else{var ue;if(ne||(ue=A(ae,X)),ue)L(W,ue);else if(ae.objectMode||X&&X.length>0)if(typeof X!="string"&&!ae.objectMode&&Object.getPrototypeOf(X)!==i.prototype&&(X=s(X)),ie)ae.endEmitted?L(W,new N):$(W,ae,X,!0);else if(ae.ended)L(W,new _);else{if(ae.destroyed)return!1;ae.reading=!1,ae.decoder&&!J?(X=ae.decoder.write(X),ae.objectMode||X.length!==0?$(W,ae,X,!1):C(W,ae)):$(W,ae,X,!1)}else ie||(ae.reading=!1,C(W,ae))}return!ae.ended&&(ae.length<ae.highWaterMark||ae.length===0)}function $(W,X,J,ie){X.flowing&&X.length===0&&!X.sync?(X.awaitDrain=0,W.emit("data",J)):(X.length+=X.objectMode?1:J.length,ie?X.buffer.unshift(J):X.buffer.push(J),X.needReadable&&I(W)),C(W,X)}function A(W,X){var J;return!l(X)&&typeof X!="string"&&X!==void 0&&!W.objectMode&&(J=new g("chunk",["string","Buffer","Uint8Array"],X)),J}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(W){O||(O=requireString_decoder().StringDecoder);var X=new O(W);this._readableState.decoder=X,this._readableState.encoding=this._readableState.decoder.encoding;for(var J=this._readableState.buffer.head,ie="";J!==null;)ie+=X.write(J.data),J=J.next;return this._readableState.buffer.clear(),ie!==""&&this._readableState.buffer.push(ie),this._readableState.length=ie.length,this};var R=1073741824;function y(W){return W>=R?W=R:(W--,W|=W>>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W}function b(W,X){return W<=0||X.length===0&&X.ended?0:X.objectMode?1:W!==W?X.flowing&&X.length?X.buffer.head.data.length:X.length:(W>X.highWaterMark&&(X.highWaterMark=y(W)),W<=X.length?W:X.ended?X.length:(X.needReadable=!0,0))}B.prototype.read=function(W){d("read",W),W=parseInt(W,10);var X=this._readableState,J=W;if(W!==0&&(X.emittedReadable=!1),W===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended))return d("read: emitReadable",X.length,X.ended),X.length===0&&X.ended?K(this):I(this),null;if(W=b(W,X),W===0&&X.ended)return X.length===0&&K(this),null;var ie=X.needReadable;d("need readable",ie),(X.length===0||X.length-W<X.highWaterMark)&&(ie=!0,d("length less than watermark",ie)),X.ended||X.reading?(ie=!1,d("reading or ended",ie)):ie&&(d("do read"),X.reading=!0,X.sync=!0,X.length===0&&(X.needReadable=!0),this._read(X.highWaterMark),X.sync=!1,X.reading||(W=b(J,X)));var ne;return W>0?ne=V(W,X):ne=null,ne===null?(X.needReadable=X.length<=X.highWaterMark,W=0):(X.length-=W,X.awaitDrain=0),X.length===0&&(X.ended||(X.needReadable=!0),J!==W&&X.ended&&K(this)),ne!==null&&this.emit("data",ne),ne};function D(W,X){if(d("onEofChunk"),!X.ended){if(X.decoder){var J=X.decoder.end();J&&J.length&&(X.buffer.push(J),X.length+=X.objectMode?1:J.length)}X.ended=!0,X.sync?I(W):(X.needReadable=!1,X.emittedReadable||(X.emittedReadable=!0,T(W)))}}function I(W){var X=W._readableState;d("emitReadable",X.needReadable,X.emittedReadable),X.needReadable=!1,X.emittedReadable||(d("emitReadable",X.flowing),X.emittedReadable=!0,process$1.nextTick(T,W))}function T(W){var X=W._readableState;d("emitReadable_",X.destroyed,X.length,X.ended),!X.destroyed&&(X.length||X.ended)&&(W.emit("readable"),X.emittedReadable=!1),X.needReadable=!X.flowing&&!X.ended&&X.length<=X.highWaterMark,H(W)}function C(W,X){X.readingMore||(X.readingMore=!0,process$1.nextTick(x,W,X))}function x(W,X){for(;!X.reading&&!X.ended&&(X.length<X.highWaterMark||X.flowing&&X.length===0);){var J=X.length;if(d("maybeReadMore read 0"),W.read(0),J===X.length)break}X.readingMore=!1}B.prototype._read=function(W){L(this,new S("_read()"))},B.prototype.pipe=function(W,X){var J=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=W;break;case 1:ie.pipes=[ie.pipes,W];break;default:ie.pipes.push(W);break}ie.pipesCount+=1,d("pipe count=%d opts=%j",ie.pipesCount,X);var ne=(!X||X.end!==!1)&&W!==process$1.stdout&&W!==process$1.stderr,ae=ne?fe:_e;ie.endEmitted?process$1.nextTick(ae):J.once("end",ae),W.on("unpipe",ue);function ue(me,Pe){d("onunpipe"),me===J&&Pe&&Pe.hasUnpiped===!1&&(Pe.hasUnpiped=!0,ce())}function fe(){d("onend"),W.end()}var se=w(J);W.on("drain",se);var pe=!1;function ce(){d("cleanup"),W.removeListener("close",ye),W.removeListener("finish",be),W.removeListener("drain",se),W.removeListener("error",ve),W.removeListener("unpipe",ue),J.removeListener("end",fe),J.removeListener("end",_e),J.removeListener("data",he),pe=!0,ie.awaitDrain&&(!W._writableState||W._writableState.needDrain)&&se()}J.on("data",he);function he(me){d("ondata");var Pe=W.write(me);d("dest.write",Pe),Pe===!1&&((ie.pipesCount===1&&ie.pipes===W||ie.pipesCount>1&&re(ie.pipes,W)!==-1)&&!pe&&(d("false write response, pause",ie.awaitDrain),ie.awaitDrain++),J.pause())}function ve(me){d("onerror",me),_e(),W.removeListener("error",ve),n(W,"error")===0&&L(W,me)}P(W,"error",ve);function ye(){W.removeListener("finish",be),_e()}W.once("close",ye);function be(){d("onfinish"),W.removeListener("close",ye),_e()}W.once("finish",be);function _e(){d("unpipe"),J.unpipe(W)}return W.emit("pipe",J),ie.flowing||(d("pipe resume"),J.resume()),W};function w(W){return function(){var J=W._readableState;d("pipeOnDrain",J.awaitDrain),J.awaitDrain&&J.awaitDrain--,J.awaitDrain===0&&n(W,"data")&&(J.flowing=!0,H(W))}}B.prototype.unpipe=function(W){var X=this._readableState,J={hasUnpiped:!1};if(X.pipesCount===0)return this;if(X.pipesCount===1)return W&&W!==X.pipes?this:(W||(W=X.pipes),X.pipes=null,X.pipesCount=0,X.flowing=!1,W&&W.emit("unpipe",this,J),this);if(!W){var ie=X.pipes,ne=X.pipesCount;X.pipes=null,X.pipesCount=0,X.flowing=!1;for(var ae=0;ae<ne;ae++)ie[ae].emit("unpipe",this,{hasUnpiped:!1});return this}var ue=re(X.pipes,W);return ue===-1?this:(X.pipes.splice(ue,1),X.pipesCount-=1,X.pipesCount===1&&(X.pipes=X.pipes[0]),W.emit("unpipe",this,J),this)},B.prototype.on=function(W,X){var J=a.prototype.on.call(this,W,X),ie=this._readableState;return W==="data"?(ie.readableListening=this.listenerCount("readable")>0,ie.flowing!==!1&&this.resume()):W==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,d("on readable",ie.length,ie.reading),ie.length?I(this):ie.reading||process$1.nextTick(q,this)),J},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(W,X){var J=a.prototype.removeListener.call(this,W,X);return W==="readable"&&process$1.nextTick(E,this),J},B.prototype.removeAllListeners=function(W){var X=a.prototype.removeAllListeners.apply(this,arguments);return(W==="readable"||W===void 0)&&process$1.nextTick(E,this),X};function E(W){var X=W._readableState;X.readableListening=W.listenerCount("readable")>0,X.resumeScheduled&&!X.paused?X.flowing=!0:W.listenerCount("data")>0&&W.resume()}function q(W){d("readable nexttick read 0"),W.read(0)}B.prototype.resume=function(){var W=this._readableState;return W.flowing||(d("resume"),W.flowing=!W.readableListening,G(this,W)),W.paused=!1,this};function G(W,X){X.resumeScheduled||(X.resumeScheduled=!0,process$1.nextTick(z,W,X))}function z(W,X){d("resume",X.reading),X.reading||W.read(0),X.resumeScheduled=!1,W.emit("resume"),H(W),X.flowing&&!X.reading&&W.read(0)}B.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(W){var X=W._readableState;for(d("flow",X.flowing);X.flowing&&W.read()!==null;);}B.prototype.wrap=function(W){var X=this,J=this._readableState,ie=!1;W.on("end",function(){if(d("wrapped end"),J.decoder&&!J.ended){var ue=J.decoder.end();ue&&ue.length&&X.push(ue)}X.push(null)}),W.on("data",function(ue){if(d("wrapped data"),J.decoder&&(ue=J.decoder.write(ue)),!(J.objectMode&&ue==null)&&!(!J.objectMode&&(!ue||!ue.length))){var fe=X.push(ue);fe||(ie=!0,W.pause())}});for(var ne in W)this[ne]===void 0&&typeof W[ne]=="function"&&(this[ne]=function(fe){return function(){return W[fe].apply(W,arguments)}}(ne));for(var ae=0;ae<k.length;ae++)W.on(k[ae],this.emit.bind(this,k[ae]));return this._read=function(ue){d("wrapped _read",ue),ie&&(ie=!1,W.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return M===void 0&&(M=requireAsync_iterator()),M(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(X){this._readableState&&(this._readableState.flowing=X)}}),B._fromList=V,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function V(W,X){if(X.length===0)return null;var J;return X.objectMode?J=X.buffer.shift():!W||W>=X.length?(X.decoder?J=X.buffer.join(""):X.buffer.length===1?J=X.buffer.first():J=X.buffer.concat(X.length),X.buffer.clear()):J=X.buffer.consume(W,X.decoder),J}function K(W){var X=W._readableState;d("endReadable",X.endEmitted),X.endEmitted||(X.ended=!0,process$1.nextTick(Z,X,W))}function Z(W,X){if(d("endReadableNT",W.endEmitted,W.length),!W.endEmitted&&W.length===0&&(W.endEmitted=!0,X.readable=!1,X.emit("end"),W.autoDestroy)){var J=X._writableState;(!J||J.autoDestroy&&J.finished)&&X.destroy()}}typeof Symbol=="function"&&(B.from=function(W,X){return F===void 0&&(F=requireFromBrowser()),F(B,W,X)});function re(W,X){for(var J=0,ie=W.length;J<ie;J++)if(W[J]===X)return J;return-1}return _stream_readable$1}var _stream_transform$1,hasRequired_stream_transform$1;function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=f;var r=requireErrorsBrowser().codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,i=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,s=require_stream_duplex$1();requireInherits_browser()(f,s);function l(c,v){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new a);h.writechunk=null,h.writecb=null,v!=null&&this.push(v),m(c);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function f(c){if(!(this instanceof f))return new f(c);s.call(this,c),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",d)}function d(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(v,h){u(c,v,h)}):u(this,null,null)}f.prototype.push=function(c,v){return this._transformState.needTransform=!1,s.prototype.push.call(this,c,v)},f.prototype._transform=function(c,v,h){h(new n("_transform()"))},f.prototype._write=function(c,v,h){var m=this._transformState;if(m.writecb=h,m.writechunk=c,m.writeencoding=v,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},f.prototype._read=function(c){var v=this._transformState;v.writechunk!==null&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},f.prototype._destroy=function(c,v){s.prototype._destroy.call(this,c,function(h){v(h)})};function u(c,v,h){if(v)return c.emit("error",v);if(h!=null&&c.push(h),c._writableState.length)throw new o;if(c._transformState.transforming)throw new i;return c.push(null)}return _stream_transform$1}var _stream_passthrough$1,hasRequired_stream_passthrough$1;function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=n;var r=require_stream_transform$1();requireInherits_browser()(n,r);function n(a){if(!(this instanceof n))return new n(a);r.call(this,a)}return n.prototype._transform=function(a,i,o){o(null,a)},_stream_passthrough$1}var pipeline_1,hasRequiredPipeline;function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;hasRequiredPipeline=1;var r;function n(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var a=requireErrorsBrowser().codes,i=a.ERR_MISSING_ARGS,o=a.ERR_STREAM_DESTROYED;function s(h){if(h)throw h}function l(h){return h.setHeader&&typeof h.abort=="function"}function f(h,m,g,_){_=n(_);var S=!1;h.on("close",function(){S=!0}),r===void 0&&(r=requireEndOfStream()),r(h,{readable:m,writable:g},function(O){if(O)return _(O);S=!0,_()});var N=!1;return function(O){if(!S&&!N){if(N=!0,l(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();_(O||new o("pipe"))}}}function d(h){h()}function u(h,m){return h.pipe(m)}function c(h){return!h.length||typeof h[h.length-1]!="function"?s:h.pop()}function v(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];var _=c(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new i("streams");var S,N=m.map(function(O,M){var F=M<m.length-1,L=M>0;return f(O,F,L,function(k){S||(S=k),k&&N.forEach(d),!F&&(N.forEach(d),_(S))})});return m.reduce(u)}return pipeline_1=v,pipeline_1}var hasRequiredReadableBrowser$1;function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,function(r,n){n=r.exports=require_stream_readable$1(),n.Stream=n,n.Readable=n,n.Writable=require_stream_writable$1(),n.Duplex=require_stream_duplex$1(),n.Transform=require_stream_transform$1(),n.PassThrough=require_stream_passthrough$1(),n.finished=requireEndOfStream(),n.pipeline=requirePipeline()}(readableBrowser$1,readableBrowser$1.exports)),readableBrowser$1.exports}var hashBase$2,hasRequiredHashBase$2;function requireHashBase$2(){if(hasRequiredHashBase$2)return hashBase$2;hasRequiredHashBase$2=1;var r=requireSafeBuffer$1().Buffer,n=requireReadableBrowser$1().Transform,a=requireInherits_browser();function i(s,l){if(!r.isBuffer(s)&&typeof s!="string")throw new TypeError(l+" must be a string or a buffer")}function o(s){n.call(this),this._block=r.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return a(o,n),o.prototype._transform=function(s,l,f){var d=null;try{this.update(s,l)}catch(u){d=u}f(d)},o.prototype._flush=function(s){var l=null;try{this.push(this.digest())}catch(f){l=f}s(l)},o.prototype.update=function(s,l){if(i(s,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(s)||(s=r.from(s,l));for(var f=this._block,d=0;this._blockOffset+s.length-d>=this._blockSize;){for(var u=this._blockOffset;u<this._blockSize;)f[u++]=s[d++];this._update(),this._blockOffset=0}for(;d<s.length;)f[this._blockOffset++]=s[d++];for(var c=0,v=s.length*8;v>0;++c)this._length[c]+=v,v=this._length[c]/4294967296|0,v>0&&(this._length[c]-=4294967296*v);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var l=this._digest();s!==void 0&&(l=l.toString(s)),this._block.fill(0),this._blockOffset=0;for(var f=0;f<4;++f)this._length[f]=0;return l},o.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$2=o,hashBase$2}var md5_js,hasRequiredMd5_js;function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var r=requireInherits_browser(),n=requireHashBase$2(),a=requireSafeBuffer$1().Buffer,i=new Array(16);function o(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}r(o,n),o.prototype._update=function(){for(var c=i,v=0;v<16;++v)c[v]=this._block.readInt32LE(v*4);var h=this._a,m=this._b,g=this._c,_=this._d;h=l(h,m,g,_,c[0],3614090360,7),_=l(_,h,m,g,c[1],3905402710,12),g=l(g,_,h,m,c[2],606105819,17),m=l(m,g,_,h,c[3],3250441966,22),h=l(h,m,g,_,c[4],4118548399,7),_=l(_,h,m,g,c[5],1200080426,12),g=l(g,_,h,m,c[6],2821735955,17),m=l(m,g,_,h,c[7],4249261313,22),h=l(h,m,g,_,c[8],1770035416,7),_=l(_,h,m,g,c[9],2336552879,12),g=l(g,_,h,m,c[10],4294925233,17),m=l(m,g,_,h,c[11],2304563134,22),h=l(h,m,g,_,c[12],1804603682,7),_=l(_,h,m,g,c[13],4254626195,12),g=l(g,_,h,m,c[14],2792965006,17),m=l(m,g,_,h,c[15],1236535329,22),h=f(h,m,g,_,c[1],4129170786,5),_=f(_,h,m,g,c[6],3225465664,9),g=f(g,_,h,m,c[11],643717713,14),m=f(m,g,_,h,c[0],3921069994,20),h=f(h,m,g,_,c[5],3593408605,5),_=f(_,h,m,g,c[10],38016083,9),g=f(g,_,h,m,c[15],3634488961,14),m=f(m,g,_,h,c[4],3889429448,20),h=f(h,m,g,_,c[9],568446438,5),_=f(_,h,m,g,c[14],3275163606,9),g=f(g,_,h,m,c[3],4107603335,14),m=f(m,g,_,h,c[8],1163531501,20),h=f(h,m,g,_,c[13],2850285829,5),_=f(_,h,m,g,c[2],4243563512,9),g=f(g,_,h,m,c[7],1735328473,14),m=f(m,g,_,h,c[12],2368359562,20),h=d(h,m,g,_,c[5],4294588738,4),_=d(_,h,m,g,c[8],2272392833,11),g=d(g,_,h,m,c[11],1839030562,16),m=d(m,g,_,h,c[14],4259657740,23),h=d(h,m,g,_,c[1],2763975236,4),_=d(_,h,m,g,c[4],1272893353,11),g=d(g,_,h,m,c[7],4139469664,16),m=d(m,g,_,h,c[10],3200236656,23),h=d(h,m,g,_,c[13],681279174,4),_=d(_,h,m,g,c[0],3936430074,11),g=d(g,_,h,m,c[3],3572445317,16),m=d(m,g,_,h,c[6],76029189,23),h=d(h,m,g,_,c[9],3654602809,4),_=d(_,h,m,g,c[12],3873151461,11),g=d(g,_,h,m,c[15],530742520,16),m=d(m,g,_,h,c[2],3299628645,23),h=u(h,m,g,_,c[0],4096336452,6),_=u(_,h,m,g,c[7],1126891415,10),g=u(g,_,h,m,c[14],2878612391,15),m=u(m,g,_,h,c[5],4237533241,21),h=u(h,m,g,_,c[12],1700485571,6),_=u(_,h,m,g,c[3],2399980690,10),g=u(g,_,h,m,c[10],4293915773,15),m=u(m,g,_,h,c[1],2240044497,21),h=u(h,m,g,_,c[8],1873313359,6),_=u(_,h,m,g,c[15],4264355552,10),g=u(g,_,h,m,c[6],2734768916,15),m=u(m,g,_,h,c[13],1309151649,21),h=u(h,m,g,_,c[4],4149444226,6),_=u(_,h,m,g,c[11],3174756917,10),g=u(g,_,h,m,c[2],718787259,15),m=u(m,g,_,h,c[9],3951481745,21),this._a=this._a+h|0,this._b=this._b+m|0,this._c=this._c+g|0,this._d=this._d+_|0},o.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 c=a.allocUnsafe(16);return c.writeInt32LE(this._a,0),c.writeInt32LE(this._b,4),c.writeInt32LE(this._c,8),c.writeInt32LE(this._d,12),c};function s(c,v){return c<<v|c>>>32-v}function l(c,v,h,m,g,_,S){return s(c+(v&h|~v&m)+g+_|0,S)+v|0}function f(c,v,h,m,g,_,S){return s(c+(v&m|h&~m)+g+_|0,S)+v|0}function d(c,v,h,m,g,_,S){return s(c+(v^h^m)+g+_|0,S)+v|0}function u(c,v,h,m,g,_,S){return s(c+(h^(v|~m))+g+_|0,S)+v|0}return md5_js=o,md5_js}var md5_jsExports=requireMd5_js(),MD5=getDefaultExportFromCjs(md5_jsExports);function createHash(...r){let n=new MD5;return r.forEach(a=>n=n.update(a)),n.digest("hex")}function objectNameComparer(r,n){return r.name.localeCompare(n.name,"en",{sensitivity:"base"})}let nanoid=(r=21)=>crypto.getRandomValues(new Uint8Array(r)).reduce((n,a)=>(a&=63,a<36?n+=a.toString(36):a<62?n+=(a-26).toString(36).toUpperCase():a>62?n+="-":n+="_",n),"");const ID_PREFIX_SEPARATOR="|";function createId(r){return r&&r.length>0?`${r}${ID_PREFIX_SEPARATOR}${nanoid()}`:nanoid()}function createDocumentId(){return createId("doc")}function createRequestId(){return createId("req")}function createScopeId(){return createId("scope")}function createSchemaInfoApiUrl(r){return`api://${r}`}function now(){return Date.now()}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(r,n){(function(a,i){r.exports=i()})(dayjs_min,function(){var a=1e3,i=6e4,o=36e5,s="millisecond",l="second",f="minute",d="hour",u="day",c="week",v="month",h="quarter",m="year",g="date",_="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var b=["th","st","nd","rd"],D=y%100;return"["+y+(b[(D-20)%10]||b[D]||b[0])+"]"}},M=function(y,b,D){var I=String(y);return!I||I.length>=b?y:""+Array(b+1-I.length).join(D)+y},F={s:M,z:function(y){var b=-y.utcOffset(),D=Math.abs(b),I=Math.floor(D/60),T=D%60;return(b<=0?"+":"-")+M(I,2,"0")+":"+M(T,2,"0")},m:function y(b,D){if(b.date()<D.date())return-y(D,b);var I=12*(D.year()-b.year())+(D.month()-b.month()),T=b.clone().add(I,v),C=D-T<0,x=b.clone().add(I+(C?-1:1),v);return+(-(I+(D-T)/(C?T-x:x-T))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:v,y:m,w:c,d:u,D:g,h:d,m:f,s:l,ms:s,Q:h}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},L="en",k={};k[L]=O;var P="$isDayjsObject",U=function(y){return y instanceof A||!(!y||!y[P])},B=function y(b,D,I){var T;if(!b)return L;if(typeof b=="string"){var C=b.toLowerCase();k[C]&&(T=C),D&&(k[C]=D,T=C);var x=b.split("-");if(!T&&x.length>1)return y(x[0])}else{var w=b.name;k[w]=b,T=w}return!I&&T&&(L=T),T||!I&&L},j=function(y,b){if(U(y))return y.clone();var D=typeof b=="object"?b:{};return D.date=y,D.args=arguments,new A(D)},$=F;$.l=B,$.i=U,$.w=function(y,b){return j(y,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var A=function(){function y(D){this.$L=B(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[P]=!0}var b=y.prototype;return b.parse=function(D){this.$d=function(I){var T=I.date,C=I.utc;if(T===null)return new Date(NaN);if($.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var x=T.match(S);if(x){var w=x[2]-1||0,E=(x[7]||"0").substring(0,3);return C?new Date(Date.UTC(x[1],w,x[3]||1,x[4]||0,x[5]||0,x[6]||0,E)):new Date(x[1],w,x[3]||1,x[4]||0,x[5]||0,x[6]||0,E)}}return new Date(T)}(D),this.init()},b.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},b.$utils=function(){return $},b.isValid=function(){return this.$d.toString()!==_},b.isSame=function(D,I){var T=j(D);return this.startOf(I)<=T&&T<=this.endOf(I)},b.isAfter=function(D,I){return j(D)<this.startOf(I)},b.isBefore=function(D,I){return this.endOf(I)<j(D)},b.$g=function(D,I,T){return $.u(D)?this[I]:this.set(T,D)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(D,I){var T=this,C=!!$.u(I)||I,x=$.p(D),w=function(Z,re){var W=$.w(T.$u?Date.UTC(T.$y,re,Z):new Date(T.$y,re,Z),T);return C?W:W.endOf(u)},E=function(Z,re){return $.w(T.toDate()[Z].apply(T.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(re)),T)},q=this.$W,G=this.$M,z=this.$D,H="set"+(this.$u?"UTC":"");switch(x){case m:return C?w(1,0):w(31,11);case v:return C?w(1,G):w(0,G+1);case c:var V=this.$locale().weekStart||0,K=(q<V?q+7:q)-V;return w(C?z-K:z+(6-K),G);case u:case g:return E(H+"Hours",0);case d:return E(H+"Minutes",1);case f:return E(H+"Seconds",2);case l:return E(H+"Milliseconds",3);default:return this.clone()}},b.endOf=function(D){return this.startOf(D,!1)},b.$set=function(D,I){var T,C=$.p(D),x="set"+(this.$u?"UTC":""),w=(T={},T[u]=x+"Date",T[g]=x+"Date",T[v]=x+"Month",T[m]=x+"FullYear",T[d]=x+"Hours",T[f]=x+"Minutes",T[l]=x+"Seconds",T[s]=x+"Milliseconds",T)[C],E=C===u?this.$D+(I-this.$W):I;if(C===v||C===m){var q=this.clone().set(g,1);q.$d[w](E),q.init(),this.$d=q.set(g,Math.min(this.$D,q.daysInMonth())).$d}else w&&this.$d[w](E);return this.init(),this},b.set=function(D,I){return this.clone().$set(D,I)},b.get=function(D){return this[$.p(D)]()},b.add=function(D,I){var T,C=this;D=Number(D);var x=$.p(I),w=function(G){var z=j(C);return $.w(z.date(z.date()+Math.round(G*D)),C)};if(x===v)return this.set(v,this.$M+D);if(x===m)return this.set(m,this.$y+D);if(x===u)return w(1);if(x===c)return w(7);var E=(T={},T[f]=i,T[d]=o,T[l]=a,T)[x]||1,q=this.$d.getTime()+D*E;return $.w(q,this)},b.subtract=function(D,I){return this.add(-1*D,I)},b.format=function(D){var I=this,T=this.$locale();if(!this.isValid())return T.invalidDate||_;var C=D||"YYYY-MM-DDTHH:mm:ssZ",x=$.z(this),w=this.$H,E=this.$m,q=this.$M,G=T.weekdays,z=T.months,H=T.meridiem,V=function(re,W,X,J){return re&&(re[W]||re(I,C))||X[W].slice(0,J)},K=function(re){return $.s(w%12||12,re,"0")},Z=H||function(re,W,X){var J=re<12?"AM":"PM";return X?J.toLowerCase():J};return C.replace(N,function(re,W){return W||function(X){switch(X){case"YY":return String(I.$y).slice(-2);case"YYYY":return $.s(I.$y,4,"0");case"M":return q+1;case"MM":return $.s(q+1,2,"0");case"MMM":return V(T.monthsShort,q,z,3);case"MMMM":return V(z,q);case"D":return I.$D;case"DD":return $.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return V(T.weekdaysMin,I.$W,G,2);case"ddd":return V(T.weekdaysShort,I.$W,G,3);case"dddd":return G[I.$W];case"H":return String(w);case"HH":return $.s(w,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return Z(w,E,!0);case"A":return Z(w,E,!1);case"m":return String(E);case"mm":return $.s(E,2,"0");case"s":return String(I.$s);case"ss":return $.s(I.$s,2,"0");case"SSS":return $.s(I.$ms,3,"0");case"Z":return x}return null}(re)||x.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(D,I,T){var C,x=this,w=$.p(I),E=j(D),q=(E.utcOffset()-this.utcOffset())*i,G=this-E,z=function(){return $.m(x,E)};switch(w){case m:C=z()/12;break;case v:C=z();break;case h:C=z()/3;break;case c:C=(G-q)/6048e5;break;case u:C=(G-q)/864e5;break;case d:C=G/o;break;case f:C=G/i;break;case l:C=G/a;break;default:C=G}return T?C:$.a(C)},b.daysInMonth=function(){return this.endOf(v).$D},b.$locale=function(){return k[this.$L]},b.locale=function(D,I){if(!D)return this.$L;var T=this.clone(),C=B(D,I,!0);return C&&(T.$L=C),T},b.clone=function(){return $.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},y}(),R=A.prototype;return j.prototype=R,[["$ms",s],["$s",l],["$m",f],["$H",d],["$W",u],["$M",v],["$y",m],["$D",g]].forEach(function(y){R[y[1]]=function(b){return this.$g(b,y[0],y[1])}}),j.extend=function(y,b){return y.$i||(y(b,A,j),y.$i=!0),j},j.locale=B,j.isDayjs=U,j.unix=function(y){return j(1e3*y)},j.en=k[L],j.Ls=k,j.p={},j})}(dayjs_min$1)),dayjs_min$1.exports}requireDayjs_min();var RelativeDateTimeRange=(r=>(r[r.today=0]="today",r[r.last15Minutes=900]="last15Minutes",r[r.last30Minutes=1800]="last30Minutes",r[r.lastHour=3600]="lastHour",r[r.last2Hours=7200]="last2Hours",r[r.last6Hours=21600]="last6Hours",r[r.last12Hours=43200]="last12Hours",r[r.last24Hours=86400]="last24Hours",r[r.last2Days=172800]="last2Days",r[r.last7Days=604800]="last7Days",r[r.last60Days=5184e3]="last60Days",r))(RelativeDateTimeRange||{});function harmonizeSchemaUrl(r){return r.replace(/\/(?=\?)|\/(?=#)|\/$/,"")}const HTTP_HEADER_KEY_VALID_PATTERN=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;function isHttpHeaderKeyValid(r){return HTTP_HEADER_KEY_VALID_PATTERN.test(r)}class LRUMap extends Map{#e=10;#t;constructor(n){super(),n?.maxSize&&n.maxSize>0&&(this.#e=n.maxSize),this.#t=n?.cleanupItem}get(n){if(!super.has(n))return;const a=super.get(n);return a!==void 0&&(super.delete(n),super.set(n,a)),a}set(n,a){if(this.size>=this.#e){const i=this.entries().next().value;this.delete(i[0]),this.#t?.(i[1])}return super.set(n,a)}}/*!
16
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
17
+ *
18
+ * Copyright (c) 2014-present, Jon Schlinkert.
19
+ * Released under the MIT License.
20
+ */var isPrimitive,hasRequiredIsPrimitive;function requireIsPrimitive(){return hasRequiredIsPrimitive||(hasRequiredIsPrimitive=1,isPrimitive=function(n){return typeof n=="object"?n===null:typeof n!="function"}),isPrimitive}/*!
21
+ * isobject <https://github.com/jonschlinkert/isobject>
22
+ *
23
+ * Copyright (c) 2014-2017, Jon Schlinkert.
24
+ * Released under the MIT License.
25
+ */var isobject,hasRequiredIsobject;function requireIsobject(){return hasRequiredIsobject||(hasRequiredIsobject=1,isobject=function(n){return n!=null&&typeof n=="object"&&Array.isArray(n)===!1}),isobject}/*!
26
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
27
+ *
28
+ * Copyright (c) 2014-2017, Jon Schlinkert.
29
+ * Released under the MIT License.
30
+ */var isPlainObject$1,hasRequiredIsPlainObject;function requireIsPlainObject(){if(hasRequiredIsPlainObject)return isPlainObject$1;hasRequiredIsPlainObject=1;var r=requireIsobject();function n(a){return r(a)===!0&&Object.prototype.toString.call(a)==="[object Object]"}return isPlainObject$1=function(i){var o,s;return!(n(i)===!1||(o=i.constructor,typeof o!="function")||(s=o.prototype,n(s)===!1)||s.hasOwnProperty("isPrototypeOf")===!1)},isPlainObject$1}/*!
31
+ * set-value <https://github.com/jonschlinkert/set-value>
32
+ *
33
+ * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
34
+ * Released under the MIT License.
35
+ */var setValue_1,hasRequiredSetValue;function requireSetValue(){if(hasRequiredSetValue)return setValue_1;hasRequiredSetValue=1;const{deleteProperty:r}=Reflect,n=requireIsPrimitive(),a=requireIsPlainObject(),i=m=>typeof m=="object"&&m!==null||typeof m=="function",o=m=>m==="__proto__"||m==="constructor"||m==="prototype",s=m=>{if(!n(m))throw new TypeError("Object keys must be strings or symbols");if(o(m))throw new Error(`Cannot set unsafe key: "${m}"`)},l=m=>Array.isArray(m)?m.flat().map(String).join(","):m,f=(m,g)=>{if(typeof m!="string"||!g)return m;let _=m+";";return g.arrays!==void 0&&(_+=`arrays=${g.arrays};`),g.separator!==void 0&&(_+=`separator=${g.separator};`),g.split!==void 0&&(_+=`split=${g.split};`),g.merge!==void 0&&(_+=`merge=${g.merge};`),g.preservePaths!==void 0&&(_+=`preservePaths=${g.preservePaths};`),_},d=(m,g,_)=>{const S=l(g?f(m,g):m);s(S);const N=h.cache.get(S)||_();return h.cache.set(S,N),N},u=(m,g={})=>{const _=g.separator||".",S=_==="/"?!1:g.preservePaths;if(typeof m=="string"&&S!==!1&&/\//.test(m))return[m];const N=[];let O="";const M=F=>{let L;F.trim()!==""&&Number.isInteger(L=Number(F))?N.push(L):N.push(F)};for(let F=0;F<m.length;F++){const L=m[F];if(L==="\\"){O+=m[++F];continue}if(L===_){M(O),O="";continue}O+=L}return O&&M(O),N},c=(m,g)=>g&&typeof g.split=="function"?g.split(m):typeof m=="symbol"?[m]:Array.isArray(m)?m:d(m,g,()=>u(m,g)),v=(m,g,_,S)=>{if(s(g),_===void 0)r(m,g);else if(S&&S.merge){const N=S.merge==="function"?S.merge:Object.assign;N&&a(m[g])&&a(_)?m[g]=N(m[g],_):m[g]=_}else m[g]=_;return m},h=(m,g,_,S)=>{if(!g||!i(m))return m;const N=c(g,S);let O=m;for(let M=0;M<N.length;M++){const F=N[M],L=N[M+1];if(s(F),L===void 0){v(O,F,_,S);break}if(typeof L=="number"&&!Array.isArray(O[F])){O=O[F]=[];continue}i(O[F])||(O[F]={}),O=O[F]}return m};return h.split=c,h.cache=new Map,h.clear=()=>{h.cache=new Map},setValue_1=h,setValue_1}requireSetValue();function isURL(r){return HTTP_SCHEME_PATTERN.test(r)}function delay(r){return new Promise(n=>void self.setTimeout(n,r))}const FIFTY_MILLISECONDS=50,ONE_SECOND=1e3,FIVE_SECONDS=5e3,ONE_MINUTE=6e4;function isSessionExpired(r,n=ONE_MINUTE){return msUntilSessionExpired(r,n)<1}function msUntilSessionExpired(r,n=ONE_MINUTE){return r.expiresAt-now()-n}const instanceOfAny=(r,n)=>n.some(a=>r instanceof a);let idbProxyableTypes,cursorAdvanceMethods;function getIdbProxyableTypes(){return idbProxyableTypes||(idbProxyableTypes=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function getCursorAdvanceMethods(){return cursorAdvanceMethods||(cursorAdvanceMethods=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const cursorRequestMap=new WeakMap,transactionDoneMap=new WeakMap,transactionStoreNamesMap=new WeakMap,transformCache=new WeakMap,reverseTransformCache=new WeakMap;function promisifyRequest(r){const n=new Promise((a,i)=>{const o=()=>{r.removeEventListener("success",s),r.removeEventListener("error",l)},s=()=>{a(wrap$1(r.result)),o()},l=()=>{i(r.error),o()};r.addEventListener("success",s),r.addEventListener("error",l)});return n.then(a=>{a instanceof IDBCursor&&cursorRequestMap.set(a,r)}).catch(()=>{}),reverseTransformCache.set(n,r),n}function cacheDonePromiseForTransaction(r){if(transactionDoneMap.has(r))return;const n=new Promise((a,i)=>{const o=()=>{r.removeEventListener("complete",s),r.removeEventListener("error",l),r.removeEventListener("abort",l)},s=()=>{a(),o()},l=()=>{i(r.error||new DOMException("AbortError","AbortError")),o()};r.addEventListener("complete",s),r.addEventListener("error",l),r.addEventListener("abort",l)});transactionDoneMap.set(r,n)}let idbProxyTraps={get(r,n,a){if(r instanceof IDBTransaction){if(n==="done")return transactionDoneMap.get(r);if(n==="objectStoreNames")return r.objectStoreNames||transactionStoreNamesMap.get(r);if(n==="store")return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return wrap$1(r[n])},set(r,n,a){return r[n]=a,!0},has(r,n){return r instanceof IDBTransaction&&(n==="done"||n==="store")?!0:n in r}};function replaceTraps(r){idbProxyTraps=r(idbProxyTraps)}function wrapFunction(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(n,...a){const i=r.call(unwrap(this),n,...a);return transactionStoreNamesMap.set(i,n.sort?n.sort():[n]),wrap$1(i)}:getCursorAdvanceMethods().includes(r)?function(...n){return r.apply(unwrap(this),n),wrap$1(cursorRequestMap.get(this))}:function(...n){return wrap$1(r.apply(unwrap(this),n))}}function transformCachableValue(r){return typeof r=="function"?wrapFunction(r):(r instanceof IDBTransaction&&cacheDonePromiseForTransaction(r),instanceOfAny(r,getIdbProxyableTypes())?new Proxy(r,idbProxyTraps):r)}function wrap$1(r){if(r instanceof IDBRequest)return promisifyRequest(r);if(transformCache.has(r))return transformCache.get(r);const n=transformCachableValue(r);return n!==r&&(transformCache.set(r,n),reverseTransformCache.set(n,r)),n}const unwrap=r=>reverseTransformCache.get(r);function openDB(r,n,{blocked:a,upgrade:i,blocking:o,terminated:s}={}){const l=indexedDB.open(r,n),f=wrap$1(l);return i&&l.addEventListener("upgradeneeded",d=>{i(wrap$1(l.result),d.oldVersion,d.newVersion,wrap$1(l.transaction),d)}),a&&l.addEventListener("blocked",d=>a(d.oldVersion,d.newVersion,d)),f.then(d=>{s&&d.addEventListener("close",()=>s()),o&&d.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),f}const readMethods=["get","getKey","getAll","getAllKeys","count"],writeMethods=["put","add","delete","clear"],cachedMethods=new Map;function getMethod(r,n){if(!(r instanceof IDBDatabase&&!(n in r)&&typeof n=="string"))return;if(cachedMethods.get(n))return cachedMethods.get(n);const a=n.replace(/FromIndex$/,""),i=n!==a,o=writeMethods.includes(a);if(!(a in(i?IDBIndex:IDBObjectStore).prototype)||!(o||readMethods.includes(a)))return;const s=async function(l,...f){const d=this.transaction(l,o?"readwrite":"readonly");let u=d.store;return i&&(u=u.index(f.shift())),(await Promise.all([u[a](...f),o&&d.done]))[0]};return cachedMethods.set(n,s),s}replaceTraps(r=>({...r,get:(n,a,i)=>getMethod(n,a)||r.get(n,a,i),has:(n,a)=>!!getMethod(n,a)||r.has(n,a)}));const advanceMethodProps=["continue","continuePrimaryKey","advance"],methodMap={},advanceResults=new WeakMap,ittrProxiedCursorToOriginalProxy=new WeakMap,cursorIteratorTraps={get(r,n){if(!advanceMethodProps.includes(n))return r[n];let a=methodMap[n];return a||(a=methodMap[n]=function(...i){advanceResults.set(this,ittrProxiedCursorToOriginalProxy.get(this)[n](...i))}),a}};async function*iterate(...r){let n=this;if(n instanceof IDBCursor||(n=await n.openCursor(...r)),!n)return;n=n;const a=new Proxy(n,cursorIteratorTraps);for(ittrProxiedCursorToOriginalProxy.set(a,n),reverseTransformCache.set(a,unwrap(n));n;)yield a,n=await(advanceResults.get(a)||n.continue()),advanceResults.delete(a)}function isIteratorProp(r,n){return n===Symbol.asyncIterator&&instanceOfAny(r,[IDBIndex,IDBObjectStore,IDBCursor])||n==="iterate"&&instanceOfAny(r,[IDBIndex,IDBObjectStore])}replaceTraps(r=>({...r,get(n,a,i){return isIteratorProp(n,a)?iterate:r.get(n,a,i)},has(n,a){return isIteratorProp(n,a)||r.has(n,a)}}));const DB_NAME="chillicream-nitro";function getDatabaseName(){return self.appNamespace?`${DB_NAME}-${self.appNamespace}`:DB_NAME}function getEntityByKey(r,n){return openDatabaseScope(a=>a.get(r,n))}function putEntity(r,n){return openDatabaseScope(async a=>{await a.put(r,n)})}function openDatabase(){return openDB(getDatabaseName())}async function openDatabaseScope(r){const n=await openDatabase();try{return await r(n)}finally{n.close()}}async function openTransactionScope(r,n,a,i,o){const s=await createTransaction(r,n,a);try{return o?await createAbortScope(()=>s.abort("transaction aborted"),()=>i(s,r.version),o):await i(s,r.version)}finally{await s.done}}function openDatabaseWithTransactionScope(r,n,a,i){return openDatabaseScope(o=>openTransactionScope(o,r,n,a,i))}const camelizationCache=new Map;function camelizeString(r){let n=camelizationCache.get(r);return n||(n=r.split("-").reduce((a,i)=>(i&&(a!==""?(a+=i[0].toUpperCase(),a+=i.substring(1)):a=i),a),""),camelizationCache.set(r,n)),n}async function createTransaction(r,n,a){const i=r.transaction(n,a),o={},s={};for(const l of n){const f=i.objectStore(l),d=camelizeString(l);o[d]=f,s[d]={};for(const u of f.indexNames)s[d][u]=f.index(u)}return{abort:l=>abortWithError(i,l),done:i.done.catch(l=>{if(!isAbortError(l))throw l}),store:o,index:s}}function abortWithError(r,n){throw r.abort(),new Error(n)}globalThis.idbGet=function(r,n){return openDatabaseScope(async a=>{console.log("IDB_GET",{store:r,key:n,data:await a.get(r,n)})})};globalThis.idbSet=function(r,n,a){return openDatabaseScope(async i=>{console.log("IDB_SET",{store:r,key:a,value:n,result:await i.put(r,n,a)})})};async function getUserSession({sub:r,tenant:n,issuer:a}){return openDatabaseWithTransactionScope(["session"],"readonly",i=>i.index.session.key.get([r,n,a]))}async function replaceUserSession(r){return await putEntity("session",r),r}const APP_CURRENT_TENANT="current-tenant";function getCurrentTenant(){return getEntityByKey("app",APP_CURRENT_TENANT)}var cryptoJs$1={exports:{}};function commonjsRequire(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}},cryptoBrowserify={},browser$b={exports:{}},hasRequiredBrowser$b;function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var r=65536,n=4294967295;function a(){throw new Error(`Secure random number generation is not supported by this browser.
36
+ Use Chrome, Firefox or Internet Explorer 11`)}var i=requireSafeBuffer$1().Buffer,o=commonjsGlobal.crypto||commonjsGlobal.msCrypto;o&&o.getRandomValues?browser$b.exports=s:browser$b.exports=a;function s(l,f){if(l>n)throw new RangeError("requested too many random bytes");var d=i.allocUnsafe(l);if(l>0)if(l>r)for(var u=0;u<l;u+=r)o.getRandomValues(d.slice(u,u+r));else o.getRandomValues(d);return typeof f=="function"?process$1.nextTick(function(){f(null,d)}):d}return browser$b.exports}var hashBase$1,hasRequiredHashBase$1;function requireHashBase$1(){if(hasRequiredHashBase$1)return hashBase$1;hasRequiredHashBase$1=1;var r=requireSafeBuffer$1().Buffer,n=requireReadableBrowser$1().Transform,a=requireInherits_browser();function i(s,l){if(!r.isBuffer(s)&&typeof s!="string")throw new TypeError(l+" must be a string or a buffer")}function o(s){n.call(this),this._block=r.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return a(o,n),o.prototype._transform=function(s,l,f){var d=null;try{this.update(s,l)}catch(u){d=u}f(d)},o.prototype._flush=function(s){var l=null;try{this.push(this.digest())}catch(f){l=f}s(l)},o.prototype.update=function(s,l){if(i(s,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(s)||(s=r.from(s,l));for(var f=this._block,d=0;this._blockOffset+s.length-d>=this._blockSize;){for(var u=this._blockOffset;u<this._blockSize;)f[u++]=s[d++];this._update(),this._blockOffset=0}for(;d<s.length;)f[this._blockOffset++]=s[d++];for(var c=0,v=s.length*8;v>0;++c)this._length[c]+=v,v=this._length[c]/4294967296|0,v>0&&(this._length[c]-=4294967296*v);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var l=this._digest();s!==void 0&&(l=l.toString(s)),this._block.fill(0),this._blockOffset=0;for(var f=0;f<4;++f)this._length[f]=0;return l},o.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase$1=o,hashBase$1}var ripemd160$3,hasRequiredRipemd160$2;function requireRipemd160$2(){if(hasRequiredRipemd160$2)return ripemd160$3;hasRequiredRipemd160$2=1;var r=requireDist().Buffer,n=requireInherits_browser(),a=requireHashBase$1(),i=new Array(16),o=[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],s=[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],l=[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],f=[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],d=[0,1518500249,1859775393,2400959708,2840853838],u=[1352829926,1548603684,1836072691,2053994217,0];function c(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}n(c,a),c.prototype._update=function(){for(var N=i,O=0;O<16;++O)N[O]=this._block.readInt32LE(O*4);for(var M=this._a|0,F=this._b|0,L=this._c|0,k=this._d|0,P=this._e|0,U=this._a|0,B=this._b|0,j=this._c|0,$=this._d|0,A=this._e|0,R=0;R<80;R+=1){var y,b;R<16?(y=h(M,F,L,k,P,N[o[R]],d[0],l[R]),b=S(U,B,j,$,A,N[s[R]],u[0],f[R])):R<32?(y=m(M,F,L,k,P,N[o[R]],d[1],l[R]),b=_(U,B,j,$,A,N[s[R]],u[1],f[R])):R<48?(y=g(M,F,L,k,P,N[o[R]],d[2],l[R]),b=g(U,B,j,$,A,N[s[R]],u[2],f[R])):R<64?(y=_(M,F,L,k,P,N[o[R]],d[3],l[R]),b=m(U,B,j,$,A,N[s[R]],u[3],f[R])):(y=S(M,F,L,k,P,N[o[R]],d[4],l[R]),b=h(U,B,j,$,A,N[s[R]],u[4],f[R])),M=P,P=k,k=v(L,10),L=F,F=y,U=A,A=$,$=v(j,10),j=B,B=b}var D=this._b+L+$|0;this._b=this._c+k+A|0,this._c=this._d+P+U|0,this._d=this._e+M+B|0,this._e=this._a+F+j|0,this._a=D},c.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 N=r.alloc?r.alloc(20):new r(20);return N.writeInt32LE(this._a,0),N.writeInt32LE(this._b,4),N.writeInt32LE(this._c,8),N.writeInt32LE(this._d,12),N.writeInt32LE(this._e,16),N};function v(N,O){return N<<O|N>>>32-O}function h(N,O,M,F,L,k,P,U){return v(N+(O^M^F)+k+P|0,U)+L|0}function m(N,O,M,F,L,k,P,U){return v(N+(O&M|~O&F)+k+P|0,U)+L|0}function g(N,O,M,F,L,k,P,U){return v(N+((O|~M)^F)+k+P|0,U)+L|0}function _(N,O,M,F,L,k,P,U){return v(N+(O&F|M&~F)+k+P|0,U)+L|0}function S(N,O,M,F,L,k,P,U){return v(N+(O^(M|~F))+k+P|0,U)+L|0}return ripemd160$3=c,ripemd160$3}var sha_js={exports:{}},isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var r={}.toString;return isarray$1=Array.isArray||function(n){return r.call(n)=="[object Array]"},isarray$1}var isTypedArray,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var r=requireWhichTypedArray();return isTypedArray=function(a){return!!r(a)},isTypedArray}var typedArrayBuffer,hasRequiredTypedArrayBuffer;function requireTypedArrayBuffer(){if(hasRequiredTypedArrayBuffer)return typedArrayBuffer;hasRequiredTypedArrayBuffer=1;var r=requireType(),n=requireCallBound(),a=n("TypedArray.prototype.buffer",!0),i=requireIsTypedArray();return typedArrayBuffer=a||function(s){if(!i(s))throw new r("Not a Typed Array");return s.buffer},typedArrayBuffer}var toBuffer,hasRequiredToBuffer$1;function requireToBuffer$1(){if(hasRequiredToBuffer$1)return toBuffer;hasRequiredToBuffer$1=1;var r=requireSafeBuffer$1().Buffer,n=requireIsarray$1(),a=requireTypedArrayBuffer(),i=ArrayBuffer.isView||function(d){try{return a(d),!0}catch{return!1}},o=typeof Uint8Array<"u",s=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",l=s&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);return toBuffer=function(d,u){if(d instanceof r)return d;if(typeof d=="string")return r.from(d,u);if(s&&i(d)){if(d.byteLength===0)return r.alloc(0);if(l){var c=r.from(d.buffer,d.byteOffset,d.byteLength);if(c.byteLength===d.byteLength)return c}var v=d instanceof Uint8Array?d:new Uint8Array(d.buffer,d.byteOffset,d.byteLength),h=r.from(v);if(h.length===d.byteLength)return h}if(o&&d instanceof Uint8Array)return r.from(d);var m=n(d);if(m)for(var g=0;g<d.length;g+=1){var _=d[g];if(typeof _!="number"||_<0||_>255||~~_!==_)throw new RangeError("Array items must be numbers in the range 0-255.")}if(m||r.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return r.from(d);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},toBuffer}var hash$1,hasRequiredHash$1;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var r=requireSafeBuffer$1().Buffer,n=requireToBuffer$1();function a(i,o){this._block=r.alloc(i),this._finalSize=o,this._blockSize=i,this._len=0}return a.prototype.update=function(i,o){i=n(i,o||"utf8");for(var s=this._block,l=this._blockSize,f=i.length,d=this._len,u=0;u<f;){for(var c=d%l,v=Math.min(f-u,l-c),h=0;h<v;h++)s[c+h]=i[u+h];d+=v,u+=v,d%l===0&&this._update(s)}return this._len+=f,this},a.prototype.digest=function(i){var o=this._len%this._blockSize;this._block[o]=128,this._block.fill(0,o+1),o>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var l=(s&4294967295)>>>0,f=(s-l)/4294967296;this._block.writeUInt32BE(f,this._blockSize-8),this._block.writeUInt32BE(l,this._blockSize-4)}this._update(this._block);var d=this._hash();return i?d.toString(i):d},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=a,hash$1}var sha$1,hasRequiredSha$1;function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var r=requireInherits_browser(),n=requireHash$1(),a=requireSafeBuffer$1().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function s(){this.init(),this._w=o,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(u){return u<<5|u>>>27}function f(u){return u<<30|u>>>2}function d(u,c,v,h){return u===0?c&v|~c&h:u===2?c&v|c&h|v&h:c^v^h}return s.prototype._update=function(u){for(var c=this._w,v=this._a|0,h=this._b|0,m=this._c|0,g=this._d|0,_=this._e|0,S=0;S<16;++S)c[S]=u.readInt32BE(S*4);for(;S<80;++S)c[S]=c[S-3]^c[S-8]^c[S-14]^c[S-16];for(var N=0;N<80;++N){var O=~~(N/20),M=l(v)+d(O,h,m,g)+_+c[N]+i[O]|0;_=g,g=m,m=f(h),h=v,v=M}this._a=v+this._a|0,this._b=h+this._b|0,this._c=m+this._c|0,this._d=g+this._d|0,this._e=_+this._e|0},s.prototype._hash=function(){var u=a.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},sha$1=s,sha$1}var sha1$2,hasRequiredSha1$1;function requireSha1$1(){if(hasRequiredSha1$1)return sha1$2;hasRequiredSha1$1=1;var r=requireInherits_browser(),n=requireHash$1(),a=requireSafeBuffer$1().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function s(){this.init(),this._w=o,n.call(this,64,56)}r(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function l(c){return c<<1|c>>>31}function f(c){return c<<5|c>>>27}function d(c){return c<<30|c>>>2}function u(c,v,h,m){return c===0?v&h|~v&m:c===2?v&h|v&m|h&m:v^h^m}return s.prototype._update=function(c){for(var v=this._w,h=this._a|0,m=this._b|0,g=this._c|0,_=this._d|0,S=this._e|0,N=0;N<16;++N)v[N]=c.readInt32BE(N*4);for(;N<80;++N)v[N]=l(v[N-3]^v[N-8]^v[N-14]^v[N-16]);for(var O=0;O<80;++O){var M=~~(O/20),F=f(h)+u(M,m,g,_)+S+v[O]+i[M]|0;S=_,_=g,g=d(m),m=h,h=F}this._a=h+this._a|0,this._b=m+this._b|0,this._c=g+this._c|0,this._d=_+this._d|0,this._e=S+this._e|0},s.prototype._hash=function(){var c=a.allocUnsafe(20);return c.writeInt32BE(this._a|0,0),c.writeInt32BE(this._b|0,4),c.writeInt32BE(this._c|0,8),c.writeInt32BE(this._d|0,12),c.writeInt32BE(this._e|0,16),c},sha1$2=s,sha1$2}var sha256$3,hasRequiredSha256$1;function requireSha256$1(){if(hasRequiredSha256$1)return sha256$3;hasRequiredSha256$1=1;var r=requireInherits_browser(),n=requireHash$1(),a=requireSafeBuffer$1().Buffer,i=[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],o=new Array(64);function s(){this.init(),this._w=o,n.call(this,64,56)}r(s,n),s.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};function l(h,m,g){return g^h&(m^g)}function f(h,m,g){return h&m|g&(h|m)}function d(h){return(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10)}function u(h){return(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7)}function c(h){return(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3}function v(h){return(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10}return s.prototype._update=function(h){for(var m=this._w,g=this._a|0,_=this._b|0,S=this._c|0,N=this._d|0,O=this._e|0,M=this._f|0,F=this._g|0,L=this._h|0,k=0;k<16;++k)m[k]=h.readInt32BE(k*4);for(;k<64;++k)m[k]=v(m[k-2])+m[k-7]+c(m[k-15])+m[k-16]|0;for(var P=0;P<64;++P){var U=L+u(O)+l(O,M,F)+i[P]+m[P]|0,B=d(g)+f(g,_,S)|0;L=F,F=M,M=O,O=N+U|0,N=S,S=_,_=g,g=U+B|0}this._a=g+this._a|0,this._b=_+this._b|0,this._c=S+this._c|0,this._d=N+this._d|0,this._e=O+this._e|0,this._f=M+this._f|0,this._g=F+this._g|0,this._h=L+this._h|0},s.prototype._hash=function(){var h=a.allocUnsafe(32);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h.writeInt32BE(this._h,28),h},sha256$3=s,sha256$3}var sha224$3,hasRequiredSha224$1;function requireSha224$1(){if(hasRequiredSha224$1)return sha224$3;hasRequiredSha224$1=1;var r=requireInherits_browser(),n=requireSha256$1(),a=requireHash$1(),i=requireSafeBuffer$1().Buffer,o=new Array(64);function s(){this.init(),this._w=o,a.call(this,64,56)}return r(s,n),s.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},s.prototype._hash=function(){var l=i.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},sha224$3=s,sha224$3}var sha512$3,hasRequiredSha512$1;function requireSha512$1(){if(hasRequiredSha512$1)return sha512$3;hasRequiredSha512$1=1;var r=requireInherits_browser(),n=requireHash$1(),a=requireSafeBuffer$1().Buffer,i=[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],o=new Array(160);function s(){this.init(),this._w=o,n.call(this,128,112)}r(s,n),s.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};function l(_,S,N){return N^_&(S^N)}function f(_,S,N){return _&S|N&(_|S)}function d(_,S){return(_>>>28|S<<4)^(S>>>2|_<<30)^(S>>>7|_<<25)}function u(_,S){return(_>>>14|S<<18)^(_>>>18|S<<14)^(S>>>9|_<<23)}function c(_,S){return(_>>>1|S<<31)^(_>>>8|S<<24)^_>>>7}function v(_,S){return(_>>>1|S<<31)^(_>>>8|S<<24)^(_>>>7|S<<25)}function h(_,S){return(_>>>19|S<<13)^(S>>>29|_<<3)^_>>>6}function m(_,S){return(_>>>19|S<<13)^(S>>>29|_<<3)^(_>>>6|S<<26)}function g(_,S){return _>>>0<S>>>0?1:0}return s.prototype._update=function(_){for(var S=this._w,N=this._ah|0,O=this._bh|0,M=this._ch|0,F=this._dh|0,L=this._eh|0,k=this._fh|0,P=this._gh|0,U=this._hh|0,B=this._al|0,j=this._bl|0,$=this._cl|0,A=this._dl|0,R=this._el|0,y=this._fl|0,b=this._gl|0,D=this._hl|0,I=0;I<32;I+=2)S[I]=_.readInt32BE(I*4),S[I+1]=_.readInt32BE(I*4+4);for(;I<160;I+=2){var T=S[I-30],C=S[I-30+1],x=c(T,C),w=v(C,T);T=S[I-4],C=S[I-4+1];var E=h(T,C),q=m(C,T),G=S[I-14],z=S[I-14+1],H=S[I-32],V=S[I-32+1],K=w+z|0,Z=x+G+g(K,w)|0;K=K+q|0,Z=Z+E+g(K,q)|0,K=K+V|0,Z=Z+H+g(K,V)|0,S[I]=Z,S[I+1]=K}for(var re=0;re<160;re+=2){Z=S[re],K=S[re+1];var W=f(N,O,M),X=f(B,j,$),J=d(N,B),ie=d(B,N),ne=u(L,R),ae=u(R,L),ue=i[re],fe=i[re+1],se=l(L,k,P),pe=l(R,y,b),ce=D+ae|0,he=U+ne+g(ce,D)|0;ce=ce+pe|0,he=he+se+g(ce,pe)|0,ce=ce+fe|0,he=he+ue+g(ce,fe)|0,ce=ce+K|0,he=he+Z+g(ce,K)|0;var ve=ie+X|0,ye=J+W+g(ve,ie)|0;U=P,D=b,P=k,b=y,k=L,y=R,R=A+ce|0,L=F+he+g(R,A)|0,F=M,A=$,M=O,$=j,O=N,j=B,B=ce+ve|0,N=he+ye+g(B,ce)|0}this._al=this._al+B|0,this._bl=this._bl+j|0,this._cl=this._cl+$|0,this._dl=this._dl+A|0,this._el=this._el+R|0,this._fl=this._fl+y|0,this._gl=this._gl+b|0,this._hl=this._hl+D|0,this._ah=this._ah+N+g(this._al,B)|0,this._bh=this._bh+O+g(this._bl,j)|0,this._ch=this._ch+M+g(this._cl,$)|0,this._dh=this._dh+F+g(this._dl,A)|0,this._eh=this._eh+L+g(this._el,R)|0,this._fh=this._fh+k+g(this._fl,y)|0,this._gh=this._gh+P+g(this._gl,b)|0,this._hh=this._hh+U+g(this._hl,D)|0},s.prototype._hash=function(){var _=a.allocUnsafe(64);function S(N,O,M){_.writeInt32BE(N,M),_.writeInt32BE(O,M+4)}return S(this._ah,this._al,0),S(this._bh,this._bl,8),S(this._ch,this._cl,16),S(this._dh,this._dl,24),S(this._eh,this._el,32),S(this._fh,this._fl,40),S(this._gh,this._gl,48),S(this._hh,this._hl,56),_},sha512$3=s,sha512$3}var sha384$3,hasRequiredSha384$1;function requireSha384$1(){if(hasRequiredSha384$1)return sha384$3;hasRequiredSha384$1=1;var r=requireInherits_browser(),n=requireSha512$1(),a=requireHash$1(),i=requireSafeBuffer$1().Buffer,o=new Array(160);function s(){this.init(),this._w=o,a.call(this,128,112)}return r(s,n),s.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},s.prototype._hash=function(){var l=i.allocUnsafe(48);function f(d,u,c){l.writeInt32BE(d,c),l.writeInt32BE(u,c+4)}return f(this._ah,this._al,0),f(this._bh,this._bl,8),f(this._ch,this._cl,16),f(this._dh,this._dl,24),f(this._eh,this._el,32),f(this._fh,this._fl,40),l},sha384$3=s,sha384$3}var hasRequiredSha_js;function requireSha_js(){return hasRequiredSha_js||(hasRequiredSha_js=1,function(r){r.exports=function(a){var i=a.toLowerCase(),o=r.exports[i];if(!o)throw new Error(i+" is not supported (we accept pull requests)");return new o},r.exports.sha=requireSha$1(),r.exports.sha1=requireSha1$1(),r.exports.sha224=requireSha224$1(),r.exports.sha256=requireSha256$1(),r.exports.sha384=requireSha384$1(),r.exports.sha512=requireSha512$1()}(sha_js)),sha_js.exports}var streamBrowserify,hasRequiredStreamBrowserify;function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=a;var r=requireEvents().EventEmitter,n=requireInherits_browser();n(a,r),a.Readable=require_stream_readable$1(),a.Writable=require_stream_writable$1(),a.Duplex=require_stream_duplex$1(),a.Transform=require_stream_transform$1(),a.PassThrough=require_stream_passthrough$1(),a.finished=requireEndOfStream(),a.pipeline=requirePipeline(),a.Stream=a;function a(){r.call(this)}return a.prototype.pipe=function(i,o){var s=this;function l(m){i.writable&&i.write(m)===!1&&s.pause&&s.pause()}s.on("data",l);function f(){s.readable&&s.resume&&s.resume()}i.on("drain",f),!i._isStdio&&(!o||o.end!==!1)&&(s.on("end",u),s.on("close",c));var d=!1;function u(){d||(d=!0,i.end())}function c(){d||(d=!0,typeof i.destroy=="function"&&i.destroy())}function v(m){if(h(),r.listenerCount(this,"error")===0)throw m}s.on("error",v),i.on("error",v);function h(){s.removeListener("data",l),i.removeListener("drain",f),s.removeListener("end",u),s.removeListener("close",c),s.removeListener("error",v),i.removeListener("error",v),s.removeListener("end",h),s.removeListener("close",h),i.removeListener("close",h)}return s.on("end",h),s.on("close",h),i.on("close",h),i.emit("pipe",s),i},streamBrowserify}var cipherBase,hasRequiredCipherBase;function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var r=requireSafeBuffer$1().Buffer,n=requireStreamBrowserify().Transform,a=requireString_decoder().StringDecoder,i=requireInherits_browser();function o(d){n.call(this),this.hashMode=typeof d=="string",this.hashMode?this[d]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(o,n);var s=typeof Uint8Array<"u",l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);function f(d,u){if(d instanceof r)return d;if(typeof d=="string")return r.from(d,u);if(l&&ArrayBuffer.isView(d)){if(d.byteLength===0)return r.alloc(0);var c=r.from(d.buffer,d.byteOffset,d.byteLength);if(c.byteLength===d.byteLength)return c}if(s&&d instanceof Uint8Array||r.isBuffer(d)&&d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d))return r.from(d);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}return o.prototype.update=function(d,u,c){var v=f(d,u),h=this._update(v);return this.hashMode?this:(c&&(h=this._toString(h,c)),h)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(d,u,c){var v;try{this.hashMode?this._update(d):this.push(this._update(d))}catch(h){v=h}finally{c(v)}},o.prototype._flush=function(d){var u;try{this.push(this.__final())}catch(c){u=c}d(u)},o.prototype._finalOrDigest=function(d){var u=this.__final()||r.alloc(0);return d&&(u=this._toString(u,d,!0)),u},o.prototype._toString=function(d,u,c){if(this._decoder||(this._decoder=new a(u),this._encoding=u),this._encoding!==u)throw new Error("can’t switch encodings");var v=this._decoder.write(d);return c&&(v+=this._decoder.end()),v},cipherBase=o,cipherBase}var browser$a,hasRequiredBrowser$a;function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var r=requireInherits_browser(),n=requireMd5_js(),a=requireRipemd160$2(),i=requireSha_js(),o=requireCipherBase();function s(l){o.call(this,"digest"),this._hash=l}return r(s,o),s.prototype._update=function(l){this._hash.update(l)},s.prototype._final=function(){return this._hash.digest()},browser$a=function(f){return f=f.toLowerCase(),f==="md5"?new n:f==="rmd160"||f==="ripemd160"?new a:new s(i(f))},browser$a}var legacy,hasRequiredLegacy;function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var r=requireInherits_browser(),n=requireSafeBuffer$1().Buffer,a=requireCipherBase(),i=n.alloc(128),o=64;function s(l,f){a.call(this,"digest"),typeof f=="string"&&(f=n.from(f)),this._alg=l,this._key=f,f.length>o?f=l(f):f.length<o&&(f=n.concat([f,i],o));for(var d=this._ipad=n.allocUnsafe(o),u=this._opad=n.allocUnsafe(o),c=0;c<o;c++)d[c]=f[c]^54,u[c]=f[c]^92;this._hash=[d]}return r(s,a),s.prototype._update=function(l){this._hash.push(l)},s.prototype._final=function(){var l=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,l]))},legacy=s,legacy}var md5$3,hasRequiredMd5$2;function requireMd5$2(){if(hasRequiredMd5$2)return md5$3;hasRequiredMd5$2=1;var r=requireMd5_js();return md5$3=function(n){return new r().update(n).digest()},md5$3}var browser$9,hasRequiredBrowser$9;function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var r=requireInherits_browser(),n=requireLegacy(),a=requireCipherBase(),i=requireSafeBuffer$1().Buffer,o=requireMd5$2(),s=requireRipemd160$2(),l=requireSha_js(),f=i.alloc(128);function d(u,c){a.call(this,"digest"),typeof c=="string"&&(c=i.from(c));var v=u==="sha512"||u==="sha384"?128:64;if(this._alg=u,this._key=c,c.length>v){var h=u==="rmd160"?new s:l(u);c=h.update(c).digest()}else c.length<v&&(c=i.concat([c,f],v));for(var m=this._ipad=i.allocUnsafe(v),g=this._opad=i.allocUnsafe(v),_=0;_<v;_++)m[_]=c[_]^54,g[_]=c[_]^92;this._hash=u==="rmd160"?new s:l(u),this._hash.update(m)}return r(d,a),d.prototype._update=function(u){this._hash.update(u)},d.prototype._final=function(){var u=this._hash.digest(),c=this._alg==="rmd160"?new s:l(this._alg);return c.update(this._opad).update(u).digest()},browser$9=function(c,v){return c=c.toLowerCase(),c==="rmd160"||c==="ripemd160"?new d("rmd160",v):c==="md5"?new n(o,v):new d(c,v)},browser$9}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256$2={sign:"ecdsa",hash:"sha256",id:""},sha224$2={sign:"ecdsa",hash:"sha224",id:""},sha384$2={sign:"ecdsa",hash:"sha384",id:""},sha512$2={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"};var require$$6={sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption,"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:sha256$2,sha224:sha224$2,sha384:sha384$2,sha512:sha512$2,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA,"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,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos||(hasRequiredAlgos=1,algos=require$$6),algos}var browser$8={},precondition,hasRequiredPrecondition;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var r=Math.pow(2,30)-1;return precondition=function(n,a){if(typeof n!="number")throw new TypeError("Iterations not a number");if(n<0)throw new TypeError("Bad iterations");if(typeof a!="number")throw new TypeError("Key length not a number");if(a<0||a>r||a!==a)throw new TypeError("Bad key length")},precondition}var defaultEncoding_1,hasRequiredDefaultEncoding;function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;hasRequiredDefaultEncoding=1;var r;if(commonjsGlobal.process&&commonjsGlobal.process.browser)r="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){var n=parseInt(process$1.version.split(".")[0].slice(1),10);r=n>=6?"utf-8":"binary"}else r="utf-8";return defaultEncoding_1=r,defaultEncoding_1}var makeHash,hasRequiredMakeHash;function requireMakeHash(){if(hasRequiredMakeHash)return makeHash;hasRequiredMakeHash=1;var r=4,n=new Buffer(r);n.fill(0);var a=8,i=16;function o(s){if(s.length%r!==0){var l=s.length+(r-s.length%r);s=Buffer.concat([s,n],l)}for(var f=new Array(s.length>>>2),d=0,u=0;d<s.length;d+=r,u++)f[u]=s.readInt32LE(d);return f}return makeHash=function(l,f){var d=f(o(l),l.length*a);l=new Buffer(i);for(var u=0;u<d.length;u++)l.writeInt32LE(d[u],u<<2,!0);return l},makeHash}var md5$2,hasRequiredMd5$1;function requireMd5$1(){if(hasRequiredMd5$1)return md5$2;hasRequiredMd5$1=1;var r=requireMakeHash();function n(u,c){u[c>>5]|=128<<c%32,u[(c+64>>>9<<4)+14]=c;for(var v=1732584193,h=-271733879,m=-1732584194,g=271733878,_=0;_<u.length;_+=16){var S=v,N=h,O=m,M=g;v=i(v,h,m,g,u[_+0],7,-680876936),g=i(g,v,h,m,u[_+1],12,-389564586),m=i(m,g,v,h,u[_+2],17,606105819),h=i(h,m,g,v,u[_+3],22,-1044525330),v=i(v,h,m,g,u[_+4],7,-176418897),g=i(g,v,h,m,u[_+5],12,1200080426),m=i(m,g,v,h,u[_+6],17,-1473231341),h=i(h,m,g,v,u[_+7],22,-45705983),v=i(v,h,m,g,u[_+8],7,1770035416),g=i(g,v,h,m,u[_+9],12,-1958414417),m=i(m,g,v,h,u[_+10],17,-42063),h=i(h,m,g,v,u[_+11],22,-1990404162),v=i(v,h,m,g,u[_+12],7,1804603682),g=i(g,v,h,m,u[_+13],12,-40341101),m=i(m,g,v,h,u[_+14],17,-1502002290),h=i(h,m,g,v,u[_+15],22,1236535329),v=o(v,h,m,g,u[_+1],5,-165796510),g=o(g,v,h,m,u[_+6],9,-1069501632),m=o(m,g,v,h,u[_+11],14,643717713),h=o(h,m,g,v,u[_+0],20,-373897302),v=o(v,h,m,g,u[_+5],5,-701558691),g=o(g,v,h,m,u[_+10],9,38016083),m=o(m,g,v,h,u[_+15],14,-660478335),h=o(h,m,g,v,u[_+4],20,-405537848),v=o(v,h,m,g,u[_+9],5,568446438),g=o(g,v,h,m,u[_+14],9,-1019803690),m=o(m,g,v,h,u[_+3],14,-187363961),h=o(h,m,g,v,u[_+8],20,1163531501),v=o(v,h,m,g,u[_+13],5,-1444681467),g=o(g,v,h,m,u[_+2],9,-51403784),m=o(m,g,v,h,u[_+7],14,1735328473),h=o(h,m,g,v,u[_+12],20,-1926607734),v=s(v,h,m,g,u[_+5],4,-378558),g=s(g,v,h,m,u[_+8],11,-2022574463),m=s(m,g,v,h,u[_+11],16,1839030562),h=s(h,m,g,v,u[_+14],23,-35309556),v=s(v,h,m,g,u[_+1],4,-1530992060),g=s(g,v,h,m,u[_+4],11,1272893353),m=s(m,g,v,h,u[_+7],16,-155497632),h=s(h,m,g,v,u[_+10],23,-1094730640),v=s(v,h,m,g,u[_+13],4,681279174),g=s(g,v,h,m,u[_+0],11,-358537222),m=s(m,g,v,h,u[_+3],16,-722521979),h=s(h,m,g,v,u[_+6],23,76029189),v=s(v,h,m,g,u[_+9],4,-640364487),g=s(g,v,h,m,u[_+12],11,-421815835),m=s(m,g,v,h,u[_+15],16,530742520),h=s(h,m,g,v,u[_+2],23,-995338651),v=l(v,h,m,g,u[_+0],6,-198630844),g=l(g,v,h,m,u[_+7],10,1126891415),m=l(m,g,v,h,u[_+14],15,-1416354905),h=l(h,m,g,v,u[_+5],21,-57434055),v=l(v,h,m,g,u[_+12],6,1700485571),g=l(g,v,h,m,u[_+3],10,-1894986606),m=l(m,g,v,h,u[_+10],15,-1051523),h=l(h,m,g,v,u[_+1],21,-2054922799),v=l(v,h,m,g,u[_+8],6,1873313359),g=l(g,v,h,m,u[_+15],10,-30611744),m=l(m,g,v,h,u[_+6],15,-1560198380),h=l(h,m,g,v,u[_+13],21,1309151649),v=l(v,h,m,g,u[_+4],6,-145523070),g=l(g,v,h,m,u[_+11],10,-1120210379),m=l(m,g,v,h,u[_+2],15,718787259),h=l(h,m,g,v,u[_+9],21,-343485551),v=f(v,S),h=f(h,N),m=f(m,O),g=f(g,M)}return[v,h,m,g]}function a(u,c,v,h,m,g){return f(d(f(f(c,u),f(h,g)),m),v)}function i(u,c,v,h,m,g,_){return a(c&v|~c&h,u,c,m,g,_)}function o(u,c,v,h,m,g,_){return a(c&h|v&~h,u,c,m,g,_)}function s(u,c,v,h,m,g,_){return a(c^v^h,u,c,m,g,_)}function l(u,c,v,h,m,g,_){return a(v^(c|~h),u,c,m,g,_)}function f(u,c){var v=(u&65535)+(c&65535),h=(u>>16)+(c>>16)+(v>>16);return h<<16|v&65535}function d(u,c){return u<<c|u>>>32-c}return md5$2=function(c){return r(c,n)},md5$2}var hashBase,hasRequiredHashBase;function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var r=requireStreamBrowserify().Transform,n=requireInherits_browser();function a(i){r.call(this),this._block=new Buffer(i),this._blockSize=i,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}return n(a,r),a.prototype._transform=function(i,o,s){var l=null;try{o!=="buffer"&&(i=new Buffer(i,o)),this.update(i)}catch(f){l=f}s(l)},a.prototype._flush=function(i){var o=null;try{this.push(this._digest())}catch(s){o=s}i(o)},a.prototype.update=function(i,o){if(!Buffer.isBuffer(i)&&typeof i!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");Buffer.isBuffer(i)||(i=new Buffer(i,o||"binary"));for(var s=this._block,l=0;this._blockOffset+i.length-l>=this._blockSize;){for(var f=this._blockOffset;f<this._blockSize;)s[f++]=i[l++];this._update(),this._blockOffset=0}for(;l<i.length;)s[this._blockOffset++]=i[l++];for(var d=0,u=i.length*8;u>0;++d)this._length[d]+=u,u=this._length[d]/4294967296|0,u>0&&(this._length[d]-=4294967296*u);return this},a.prototype._update=function(i){throw new Error("_update is not implemented")},a.prototype.digest=function(i){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var o=this._digest();return i!==void 0&&(o=o.toString(i)),o},a.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=a,hashBase}var ripemd160$2,hasRequiredRipemd160$1;function requireRipemd160$1(){if(hasRequiredRipemd160$1)return ripemd160$2;hasRequiredRipemd160$1=1;var r=requireInherits_browser(),n=requireHashBase();function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}r(a,n),a.prototype._update=function(){for(var u=new Array(16),c=0;c<16;++c)u[c]=this._block.readInt32LE(c*4);var v=this._a,h=this._b,m=this._c,g=this._d,_=this._e;v=o(v,h,m,g,_,u[0],0,11),m=i(m,10),_=o(_,v,h,m,g,u[1],0,14),h=i(h,10),g=o(g,_,v,h,m,u[2],0,15),v=i(v,10),m=o(m,g,_,v,h,u[3],0,12),_=i(_,10),h=o(h,m,g,_,v,u[4],0,5),g=i(g,10),v=o(v,h,m,g,_,u[5],0,8),m=i(m,10),_=o(_,v,h,m,g,u[6],0,7),h=i(h,10),g=o(g,_,v,h,m,u[7],0,9),v=i(v,10),m=o(m,g,_,v,h,u[8],0,11),_=i(_,10),h=o(h,m,g,_,v,u[9],0,13),g=i(g,10),v=o(v,h,m,g,_,u[10],0,14),m=i(m,10),_=o(_,v,h,m,g,u[11],0,15),h=i(h,10),g=o(g,_,v,h,m,u[12],0,6),v=i(v,10),m=o(m,g,_,v,h,u[13],0,7),_=i(_,10),h=o(h,m,g,_,v,u[14],0,9),g=i(g,10),v=o(v,h,m,g,_,u[15],0,8),m=i(m,10),_=s(_,v,h,m,g,u[7],1518500249,7),h=i(h,10),g=s(g,_,v,h,m,u[4],1518500249,6),v=i(v,10),m=s(m,g,_,v,h,u[13],1518500249,8),_=i(_,10),h=s(h,m,g,_,v,u[1],1518500249,13),g=i(g,10),v=s(v,h,m,g,_,u[10],1518500249,11),m=i(m,10),_=s(_,v,h,m,g,u[6],1518500249,9),h=i(h,10),g=s(g,_,v,h,m,u[15],1518500249,7),v=i(v,10),m=s(m,g,_,v,h,u[3],1518500249,15),_=i(_,10),h=s(h,m,g,_,v,u[12],1518500249,7),g=i(g,10),v=s(v,h,m,g,_,u[0],1518500249,12),m=i(m,10),_=s(_,v,h,m,g,u[9],1518500249,15),h=i(h,10),g=s(g,_,v,h,m,u[5],1518500249,9),v=i(v,10),m=s(m,g,_,v,h,u[2],1518500249,11),_=i(_,10),h=s(h,m,g,_,v,u[14],1518500249,7),g=i(g,10),v=s(v,h,m,g,_,u[11],1518500249,13),m=i(m,10),_=s(_,v,h,m,g,u[8],1518500249,12),h=i(h,10),g=l(g,_,v,h,m,u[3],1859775393,11),v=i(v,10),m=l(m,g,_,v,h,u[10],1859775393,13),_=i(_,10),h=l(h,m,g,_,v,u[14],1859775393,6),g=i(g,10),v=l(v,h,m,g,_,u[4],1859775393,7),m=i(m,10),_=l(_,v,h,m,g,u[9],1859775393,14),h=i(h,10),g=l(g,_,v,h,m,u[15],1859775393,9),v=i(v,10),m=l(m,g,_,v,h,u[8],1859775393,13),_=i(_,10),h=l(h,m,g,_,v,u[1],1859775393,15),g=i(g,10),v=l(v,h,m,g,_,u[2],1859775393,14),m=i(m,10),_=l(_,v,h,m,g,u[7],1859775393,8),h=i(h,10),g=l(g,_,v,h,m,u[0],1859775393,13),v=i(v,10),m=l(m,g,_,v,h,u[6],1859775393,6),_=i(_,10),h=l(h,m,g,_,v,u[13],1859775393,5),g=i(g,10),v=l(v,h,m,g,_,u[11],1859775393,12),m=i(m,10),_=l(_,v,h,m,g,u[5],1859775393,7),h=i(h,10),g=l(g,_,v,h,m,u[12],1859775393,5),v=i(v,10),m=f(m,g,_,v,h,u[1],2400959708,11),_=i(_,10),h=f(h,m,g,_,v,u[9],2400959708,12),g=i(g,10),v=f(v,h,m,g,_,u[11],2400959708,14),m=i(m,10),_=f(_,v,h,m,g,u[10],2400959708,15),h=i(h,10),g=f(g,_,v,h,m,u[0],2400959708,14),v=i(v,10),m=f(m,g,_,v,h,u[8],2400959708,15),_=i(_,10),h=f(h,m,g,_,v,u[12],2400959708,9),g=i(g,10),v=f(v,h,m,g,_,u[4],2400959708,8),m=i(m,10),_=f(_,v,h,m,g,u[13],2400959708,9),h=i(h,10),g=f(g,_,v,h,m,u[3],2400959708,14),v=i(v,10),m=f(m,g,_,v,h,u[7],2400959708,5),_=i(_,10),h=f(h,m,g,_,v,u[15],2400959708,6),g=i(g,10),v=f(v,h,m,g,_,u[14],2400959708,8),m=i(m,10),_=f(_,v,h,m,g,u[5],2400959708,6),h=i(h,10),g=f(g,_,v,h,m,u[6],2400959708,5),v=i(v,10),m=f(m,g,_,v,h,u[2],2400959708,12),_=i(_,10),h=d(h,m,g,_,v,u[4],2840853838,9),g=i(g,10),v=d(v,h,m,g,_,u[0],2840853838,15),m=i(m,10),_=d(_,v,h,m,g,u[5],2840853838,5),h=i(h,10),g=d(g,_,v,h,m,u[9],2840853838,11),v=i(v,10),m=d(m,g,_,v,h,u[7],2840853838,6),_=i(_,10),h=d(h,m,g,_,v,u[12],2840853838,8),g=i(g,10),v=d(v,h,m,g,_,u[2],2840853838,13),m=i(m,10),_=d(_,v,h,m,g,u[10],2840853838,12),h=i(h,10),g=d(g,_,v,h,m,u[14],2840853838,5),v=i(v,10),m=d(m,g,_,v,h,u[1],2840853838,12),_=i(_,10),h=d(h,m,g,_,v,u[3],2840853838,13),g=i(g,10),v=d(v,h,m,g,_,u[8],2840853838,14),m=i(m,10),_=d(_,v,h,m,g,u[11],2840853838,11),h=i(h,10),g=d(g,_,v,h,m,u[6],2840853838,8),v=i(v,10),m=d(m,g,_,v,h,u[15],2840853838,5),_=i(_,10),h=d(h,m,g,_,v,u[13],2840853838,6),g=i(g,10);var S=this._a,N=this._b,O=this._c,M=this._d,F=this._e;S=d(S,N,O,M,F,u[5],1352829926,8),O=i(O,10),F=d(F,S,N,O,M,u[14],1352829926,9),N=i(N,10),M=d(M,F,S,N,O,u[7],1352829926,9),S=i(S,10),O=d(O,M,F,S,N,u[0],1352829926,11),F=i(F,10),N=d(N,O,M,F,S,u[9],1352829926,13),M=i(M,10),S=d(S,N,O,M,F,u[2],1352829926,15),O=i(O,10),F=d(F,S,N,O,M,u[11],1352829926,15),N=i(N,10),M=d(M,F,S,N,O,u[4],1352829926,5),S=i(S,10),O=d(O,M,F,S,N,u[13],1352829926,7),F=i(F,10),N=d(N,O,M,F,S,u[6],1352829926,7),M=i(M,10),S=d(S,N,O,M,F,u[15],1352829926,8),O=i(O,10),F=d(F,S,N,O,M,u[8],1352829926,11),N=i(N,10),M=d(M,F,S,N,O,u[1],1352829926,14),S=i(S,10),O=d(O,M,F,S,N,u[10],1352829926,14),F=i(F,10),N=d(N,O,M,F,S,u[3],1352829926,12),M=i(M,10),S=d(S,N,O,M,F,u[12],1352829926,6),O=i(O,10),F=f(F,S,N,O,M,u[6],1548603684,9),N=i(N,10),M=f(M,F,S,N,O,u[11],1548603684,13),S=i(S,10),O=f(O,M,F,S,N,u[3],1548603684,15),F=i(F,10),N=f(N,O,M,F,S,u[7],1548603684,7),M=i(M,10),S=f(S,N,O,M,F,u[0],1548603684,12),O=i(O,10),F=f(F,S,N,O,M,u[13],1548603684,8),N=i(N,10),M=f(M,F,S,N,O,u[5],1548603684,9),S=i(S,10),O=f(O,M,F,S,N,u[10],1548603684,11),F=i(F,10),N=f(N,O,M,F,S,u[14],1548603684,7),M=i(M,10),S=f(S,N,O,M,F,u[15],1548603684,7),O=i(O,10),F=f(F,S,N,O,M,u[8],1548603684,12),N=i(N,10),M=f(M,F,S,N,O,u[12],1548603684,7),S=i(S,10),O=f(O,M,F,S,N,u[4],1548603684,6),F=i(F,10),N=f(N,O,M,F,S,u[9],1548603684,15),M=i(M,10),S=f(S,N,O,M,F,u[1],1548603684,13),O=i(O,10),F=f(F,S,N,O,M,u[2],1548603684,11),N=i(N,10),M=l(M,F,S,N,O,u[15],1836072691,9),S=i(S,10),O=l(O,M,F,S,N,u[5],1836072691,7),F=i(F,10),N=l(N,O,M,F,S,u[1],1836072691,15),M=i(M,10),S=l(S,N,O,M,F,u[3],1836072691,11),O=i(O,10),F=l(F,S,N,O,M,u[7],1836072691,8),N=i(N,10),M=l(M,F,S,N,O,u[14],1836072691,6),S=i(S,10),O=l(O,M,F,S,N,u[6],1836072691,6),F=i(F,10),N=l(N,O,M,F,S,u[9],1836072691,14),M=i(M,10),S=l(S,N,O,M,F,u[11],1836072691,12),O=i(O,10),F=l(F,S,N,O,M,u[8],1836072691,13),N=i(N,10),M=l(M,F,S,N,O,u[12],1836072691,5),S=i(S,10),O=l(O,M,F,S,N,u[2],1836072691,14),F=i(F,10),N=l(N,O,M,F,S,u[10],1836072691,13),M=i(M,10),S=l(S,N,O,M,F,u[0],1836072691,13),O=i(O,10),F=l(F,S,N,O,M,u[4],1836072691,7),N=i(N,10),M=l(M,F,S,N,O,u[13],1836072691,5),S=i(S,10),O=s(O,M,F,S,N,u[8],2053994217,15),F=i(F,10),N=s(N,O,M,F,S,u[6],2053994217,5),M=i(M,10),S=s(S,N,O,M,F,u[4],2053994217,8),O=i(O,10),F=s(F,S,N,O,M,u[1],2053994217,11),N=i(N,10),M=s(M,F,S,N,O,u[3],2053994217,14),S=i(S,10),O=s(O,M,F,S,N,u[11],2053994217,14),F=i(F,10),N=s(N,O,M,F,S,u[15],2053994217,6),M=i(M,10),S=s(S,N,O,M,F,u[0],2053994217,14),O=i(O,10),F=s(F,S,N,O,M,u[5],2053994217,6),N=i(N,10),M=s(M,F,S,N,O,u[12],2053994217,9),S=i(S,10),O=s(O,M,F,S,N,u[2],2053994217,12),F=i(F,10),N=s(N,O,M,F,S,u[13],2053994217,9),M=i(M,10),S=s(S,N,O,M,F,u[9],2053994217,12),O=i(O,10),F=s(F,S,N,O,M,u[7],2053994217,5),N=i(N,10),M=s(M,F,S,N,O,u[10],2053994217,15),S=i(S,10),O=s(O,M,F,S,N,u[14],2053994217,8),F=i(F,10),N=o(N,O,M,F,S,u[12],0,8),M=i(M,10),S=o(S,N,O,M,F,u[15],0,5),O=i(O,10),F=o(F,S,N,O,M,u[10],0,12),N=i(N,10),M=o(M,F,S,N,O,u[4],0,9),S=i(S,10),O=o(O,M,F,S,N,u[1],0,12),F=i(F,10),N=o(N,O,M,F,S,u[5],0,5),M=i(M,10),S=o(S,N,O,M,F,u[8],0,14),O=i(O,10),F=o(F,S,N,O,M,u[7],0,6),N=i(N,10),M=o(M,F,S,N,O,u[6],0,8),S=i(S,10),O=o(O,M,F,S,N,u[2],0,13),F=i(F,10),N=o(N,O,M,F,S,u[13],0,6),M=i(M,10),S=o(S,N,O,M,F,u[14],0,5),O=i(O,10),F=o(F,S,N,O,M,u[0],0,15),N=i(N,10),M=o(M,F,S,N,O,u[3],0,13),S=i(S,10),O=o(O,M,F,S,N,u[9],0,11),F=i(F,10),N=o(N,O,M,F,S,u[11],0,11),M=i(M,10);var L=this._b+m+M|0;this._b=this._c+g+F|0,this._c=this._d+_+S|0,this._d=this._e+v+N|0,this._e=this._a+h+O|0,this._a=L},a.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 u=new Buffer(20);return u.writeInt32LE(this._a,0),u.writeInt32LE(this._b,4),u.writeInt32LE(this._c,8),u.writeInt32LE(this._d,12),u.writeInt32LE(this._e,16),u};function i(u,c){return u<<c|u>>>32-c}function o(u,c,v,h,m,g,_,S){return i(u+(c^v^h)+g+_|0,S)+m|0}function s(u,c,v,h,m,g,_,S){return i(u+(c&v|~c&h)+g+_|0,S)+m|0}function l(u,c,v,h,m,g,_,S){return i(u+((c|~v)^h)+g+_|0,S)+m|0}function f(u,c,v,h,m,g,_,S){return i(u+(c&h|v&~h)+g+_|0,S)+m|0}function d(u,c,v,h,m,g,_,S){return i(u+(c^(v|~h))+g+_|0,S)+m|0}return ripemd160$2=a,ripemd160$2}var toBuffer_1,hasRequiredToBuffer;function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer_1;hasRequiredToBuffer=1;var r=requireSafeBuffer$1().Buffer,n=requireToBuffer$1(),a=typeof Uint8Array<"u",i=a&&typeof ArrayBuffer<"u",o=i&&ArrayBuffer.isView;return toBuffer_1=function(s,l,f){if(typeof s=="string"||r.isBuffer(s)||a&&s instanceof Uint8Array||o&&o(s))return n(s,l);throw new TypeError(f+" must be a string, a Buffer, a Uint8Array, or a DataView")},toBuffer_1}var syncBrowser,hasRequiredSyncBrowser;function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var r=requireMd5$1(),n=requireRipemd160$1(),a=requireSha_js(),i=requireSafeBuffer$1().Buffer,o=requirePrecondition(),s=requireDefaultEncoding(),l=requireToBuffer(),f=i.alloc(128),d={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},u={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function c(g){return new n().update(g).digest()}function v(g){function _(S){return a(g).update(S).digest()}return g==="rmd160"||g==="ripemd160"?c:g==="md5"?r:_}function h(g,_,S){var N=v(g),O=g==="sha512"||g==="sha384"?128:64;_.length>O?_=N(_):_.length<O&&(_=i.concat([_,f],O));for(var M=i.allocUnsafe(O+d[g]),F=i.allocUnsafe(O+d[g]),L=0;L<O;L++)M[L]=_[L]^54,F[L]=_[L]^92;var k=i.allocUnsafe(O+S+4);M.copy(k,0,0,O),this.ipad1=k,this.ipad2=M,this.opad=F,this.alg=g,this.blocksize=O,this.hash=N,this.size=d[g]}h.prototype.run=function(g,_){g.copy(_,this.blocksize);var S=this.hash(_);return S.copy(this.opad,this.blocksize),this.hash(this.opad)};function m(g,_,S,N,O){o(S,N),g=l(g,s,"Password"),_=l(_,s,"Salt");var M=(O||"sha1").toLowerCase(),F=u[M]||M,L=d[F];if(typeof L!="number"||!L)throw new TypeError("Digest algorithm not supported: "+O);var k=new h(F,g,_.length),P=i.allocUnsafe(N),U=i.allocUnsafe(_.length+4);_.copy(U,0,0,_.length);for(var B=0,j=L,$=Math.ceil(N/j),A=1;A<=$;A++){U.writeUInt32BE(A,_.length);for(var R=k.run(U,k.ipad1),y=R,b=1;b<S;b++){y=k.run(y,k.ipad2);for(var D=0;D<j;D++)R[D]^=y[D]}R.copy(P,B),B+=j}return P}return syncBrowser=m,syncBrowser}var async,hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var r=requireSafeBuffer$1().Buffer,n=requirePrecondition(),a=requireDefaultEncoding(),i=requireSyncBrowser(),o=requireToBuffer(),s,l=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,f={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=[],u;function c(){return u||(commonjsGlobal.process&&commonjsGlobal.process.nextTick?u=commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?u=commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?u=commonjsGlobal.setImmediate:u=commonjsGlobal.setTimeout,u)}function v(g,_,S,N,O){return l.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then(function(M){return l.deriveBits({name:"PBKDF2",salt:_,iterations:S,hash:{name:O}},M,N<<3)}).then(function(M){return r.from(M)})}function h(g){if(commonjsGlobal.process&&!commonjsGlobal.process.browser||!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(d[g]!==void 0)return d[g];s=s||r.alloc(8);var _=v(s,s,10,128,g).then(function(){return!0},function(){return!1});return d[g]=_,_}function m(g,_){g.then(function(S){c()(function(){_(null,S)})},function(S){c()(function(){_(S)})})}return async=function(g,_,S,N,O,M){typeof O=="function"&&(M=O,O=void 0),O=O||"sha1";var F=f[O.toLowerCase()];if(!F||typeof commonjsGlobal.Promise!="function"){c()(function(){var L;try{L=i(g,_,S,N,O)}catch(k){M(k);return}M(null,L)});return}if(n(S,N),g=o(g,a,"Password"),_=o(_,a,"Salt"),typeof M!="function")throw new Error("No callback provided to pbkdf2");m(h(F).then(function(L){return L?v(g,_,S,N,F):i(g,_,S,N,O)}),M)},async}var hasRequiredBrowser$8;function requireBrowser$8(){return hasRequiredBrowser$8||(hasRequiredBrowser$8=1,browser$8.pbkdf2=requireAsync(),browser$8.pbkdf2Sync=requireSyncBrowser()),browser$8}var browser$7={},des$1={},utils$3={},hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(o,s){var l=o[0+s]<<24|o[1+s]<<16|o[2+s]<<8|o[3+s];return l>>>0},utils$3.writeUInt32BE=function(o,s,l){o[0+l]=s>>>24,o[1+l]=s>>>16&255,o[2+l]=s>>>8&255,o[3+l]=s&255},utils$3.ip=function(o,s,l,f){for(var d=0,u=0,c=6;c>=0;c-=2){for(var v=0;v<=24;v+=8)d<<=1,d|=s>>>v+c&1;for(var v=0;v<=24;v+=8)d<<=1,d|=o>>>v+c&1}for(var c=6;c>=0;c-=2){for(var v=1;v<=25;v+=8)u<<=1,u|=s>>>v+c&1;for(var v=1;v<=25;v+=8)u<<=1,u|=o>>>v+c&1}l[f+0]=d>>>0,l[f+1]=u>>>0},utils$3.rip=function(o,s,l,f){for(var d=0,u=0,c=0;c<4;c++)for(var v=24;v>=0;v-=8)d<<=1,d|=s>>>v+c&1,d<<=1,d|=o>>>v+c&1;for(var c=4;c<8;c++)for(var v=24;v>=0;v-=8)u<<=1,u|=s>>>v+c&1,u<<=1,u|=o>>>v+c&1;l[f+0]=d>>>0,l[f+1]=u>>>0},utils$3.pc1=function(o,s,l,f){for(var d=0,u=0,c=7;c>=5;c--){for(var v=0;v<=24;v+=8)d<<=1,d|=s>>v+c&1;for(var v=0;v<=24;v+=8)d<<=1,d|=o>>v+c&1}for(var v=0;v<=24;v+=8)d<<=1,d|=s>>v+c&1;for(var c=1;c<=3;c++){for(var v=0;v<=24;v+=8)u<<=1,u|=s>>v+c&1;for(var v=0;v<=24;v+=8)u<<=1,u|=o>>v+c&1}for(var v=0;v<=24;v+=8)u<<=1,u|=o>>v+c&1;l[f+0]=d>>>0,l[f+1]=u>>>0},utils$3.r28shl=function(o,s){return o<<s&268435455|o>>>28-s};var r=[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];utils$3.pc2=function(o,s,l,f){for(var d=0,u=0,c=r.length>>>1,v=0;v<c;v++)d<<=1,d|=o>>>r[v]&1;for(var v=c;v<r.length;v++)u<<=1,u|=s>>>r[v]&1;l[f+0]=d>>>0,l[f+1]=u>>>0},utils$3.expand=function(o,s,l){var f=0,d=0;f=(o&1)<<5|o>>>27;for(var u=23;u>=15;u-=4)f<<=6,f|=o>>>u&63;for(var u=11;u>=3;u-=4)d|=o>>>u&63,d<<=6;d|=(o&31)<<1|o>>>31,s[l+0]=f>>>0,s[l+1]=d>>>0};var n=[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];utils$3.substitute=function(o,s){for(var l=0,f=0;f<4;f++){var d=o>>>18-f*6&63,u=n[f*64+d];l<<=4,l|=u}for(var f=0;f<4;f++){var d=s>>>18-f*6&63,u=n[256+f*64+d];l<<=4,l|=u}return l>>>0};var a=[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];return utils$3.permute=function(o){for(var s=0,l=0;l<a.length;l++)s<<=1,s|=o>>>a[l]&1;return s>>>0},utils$3.padSplit=function(o,s,l){for(var f=o.toString(2);f.length<s;)f="0"+f;for(var d=[],u=0;u<s;u+=l)d.push(f.slice(u,u+l));return d.join(" ")},utils$3}var minimalisticAssert,hasRequiredMinimalisticAssert;function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;hasRequiredMinimalisticAssert=1,minimalisticAssert=r;function r(n,a){if(!n)throw new Error(a||"Assertion failed")}return r.equal=function(a,i,o){if(a!=i)throw new Error(o||"Assertion failed: "+a+" != "+i)},minimalisticAssert}var cipher,hasRequiredCipher;function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var r=requireMinimalisticAssert();function n(a){this.options=a,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=a.padding!==!1}return cipher=n,n.prototype._init=function(){},n.prototype.update=function(i){return i.length===0?[]:this.type==="decrypt"?this._updateDecrypt(i):this._updateEncrypt(i)},n.prototype._buffer=function(i,o){for(var s=Math.min(this.buffer.length-this.bufferOff,i.length-o),l=0;l<s;l++)this.buffer[this.bufferOff+l]=i[o+l];return this.bufferOff+=s,s},n.prototype._flushBuffer=function(i,o){return this._update(this.buffer,0,i,o),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(i){var o=0,s=0,l=(this.bufferOff+i.length)/this.blockSize|0,f=new Array(l*this.blockSize);this.bufferOff!==0&&(o+=this._buffer(i,o),this.bufferOff===this.buffer.length&&(s+=this._flushBuffer(f,s)));for(var d=i.length-(i.length-o)%this.blockSize;o<d;o+=this.blockSize)this._update(i,o,f,s),s+=this.blockSize;for(;o<i.length;o++,this.bufferOff++)this.buffer[this.bufferOff]=i[o];return f},n.prototype._updateDecrypt=function(i){for(var o=0,s=0,l=Math.ceil((this.bufferOff+i.length)/this.blockSize)-1,f=new Array(l*this.blockSize);l>0;l--)o+=this._buffer(i,o),s+=this._flushBuffer(f,s);return o+=this._buffer(i,o),f},n.prototype.final=function(i){var o;i&&(o=this.update(i));var s;return this.type==="encrypt"?s=this._finalEncrypt():s=this._finalDecrypt(),o?o.concat(s):s},n.prototype._pad=function(i,o){if(o===0)return!1;for(;o<i.length;)i[o++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var i=new Array(this.blockSize);return this._update(this.buffer,0,i,0),i},n.prototype._unpad=function(i){return i},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var i=new Array(this.blockSize);return this._flushBuffer(i,0),this._unpad(i)},cipher}var des,hasRequiredDes$1;function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),a=requireUtils$3(),i=requireCipher();function o(){this.tmp=new Array(2),this.keys=null}function s(f){i.call(this,f);var d=new o;this._desState=d,this.deriveKeys(d,f.key)}n(s,i),des=s,s.create=function(d){return new s(d)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return s.prototype.deriveKeys=function(d,u){d.keys=new Array(32),r.equal(u.length,this.blockSize,"Invalid key length");var c=a.readUInt32BE(u,0),v=a.readUInt32BE(u,4);a.pc1(c,v,d.tmp,0),c=d.tmp[0],v=d.tmp[1];for(var h=0;h<d.keys.length;h+=2){var m=l[h>>>1];c=a.r28shl(c,m),v=a.r28shl(v,m),a.pc2(c,v,d.keys,h)}},s.prototype._update=function(d,u,c,v){var h=this._desState,m=a.readUInt32BE(d,u),g=a.readUInt32BE(d,u+4);a.ip(m,g,h.tmp,0),m=h.tmp[0],g=h.tmp[1],this.type==="encrypt"?this._encrypt(h,m,g,h.tmp,0):this._decrypt(h,m,g,h.tmp,0),m=h.tmp[0],g=h.tmp[1],a.writeUInt32BE(c,m,v),a.writeUInt32BE(c,g,v+4)},s.prototype._pad=function(d,u){if(this.padding===!1)return!1;for(var c=d.length-u,v=u;v<d.length;v++)d[v]=c;return!0},s.prototype._unpad=function(d){if(this.padding===!1)return d;for(var u=d[d.length-1],c=d.length-u;c<d.length;c++)r.equal(d[c],u);return d.slice(0,d.length-u)},s.prototype._encrypt=function(d,u,c,v,h){for(var m=u,g=c,_=0;_<d.keys.length;_+=2){var S=d.keys[_],N=d.keys[_+1];a.expand(g,d.tmp,0),S^=d.tmp[0],N^=d.tmp[1];var O=a.substitute(S,N),M=a.permute(O),F=g;g=(m^M)>>>0,m=F}a.rip(g,m,v,h)},s.prototype._decrypt=function(d,u,c,v,h){for(var m=c,g=u,_=d.keys.length-2;_>=0;_-=2){var S=d.keys[_],N=d.keys[_+1];a.expand(m,d.tmp,0),S^=d.tmp[0],N^=d.tmp[1];var O=a.substitute(S,N),M=a.permute(O),F=m;m=(g^M)>>>0,g=F}a.rip(m,g,v,h)},des}var cbc$1={},hasRequiredCbc$1;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),a={};function i(s){r.equal(s.length,8,"Invalid IV length"),this.iv=new Array(8);for(var l=0;l<this.iv.length;l++)this.iv[l]=s[l]}function o(s){function l(c){s.call(this,c),this._cbcInit()}n(l,s);for(var f=Object.keys(a),d=0;d<f.length;d++){var u=f[d];l.prototype[u]=a[u]}return l.create=function(v){return new l(v)},l}return cbc$1.instantiate=o,a._cbcInit=function(){var l=new i(this.options.iv);this._cbcState=l},a._update=function(l,f,d,u){var c=this._cbcState,v=this.constructor.super_.prototype,h=c.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)h[m]^=l[f+m];v._update.call(this,h,0,d,u);for(var m=0;m<this.blockSize;m++)h[m]=d[u+m]}else{v._update.call(this,l,f,d,u);for(var m=0;m<this.blockSize;m++)d[u+m]^=h[m];for(var m=0;m<this.blockSize;m++)h[m]=l[f+m]}},cbc$1}var ede,hasRequiredEde;function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var r=requireMinimalisticAssert(),n=requireInherits_browser(),a=requireCipher(),i=requireDes$1();function o(l,f){r.equal(f.length,24,"Invalid key length");var d=f.slice(0,8),u=f.slice(8,16),c=f.slice(16,24);l==="encrypt"?this.ciphers=[i.create({type:"encrypt",key:d}),i.create({type:"decrypt",key:u}),i.create({type:"encrypt",key:c})]:this.ciphers=[i.create({type:"decrypt",key:c}),i.create({type:"encrypt",key:u}),i.create({type:"decrypt",key:d})]}function s(l){a.call(this,l);var f=new o(this.type,this.options.key);this._edeState=f}return n(s,a),ede=s,s.create=function(f){return new s(f)},s.prototype._update=function(f,d,u,c){var v=this._edeState;v.ciphers[0]._update(f,d,u,c),v.ciphers[1]._update(u,c,u,c),v.ciphers[2]._update(u,c,u,c)},s.prototype._pad=i.prototype._pad,s.prototype._unpad=i.prototype._unpad,ede}var hasRequiredDes;function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}var browserifyDes,hasRequiredBrowserifyDes;function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var r=requireCipherBase(),n=requireDes(),a=requireInherits_browser(),i=requireSafeBuffer$1().Buffer,o={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],browserifyDes=s,a(s,r);function s(l){r.call(this);var f=l.mode.toLowerCase(),d=o[f],u;l.decrypt?u="decrypt":u="encrypt";var c=l.key;i.isBuffer(c)||(c=i.from(c)),(f==="des-ede"||f==="des-ede-cbc")&&(c=i.concat([c,c.slice(0,8)]));var v=l.iv;i.isBuffer(v)||(v=i.from(v)),this._des=d.create({key:c,iv:v,type:u})}return s.prototype._update=function(l){return i.from(this._des.update(l))},s.prototype._final=function(){return i.from(this._des.final())},browserifyDes}var browser$6={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(r,n){return r._cipher.encryptBlock(n)},ecb.decrypt=function(r,n){return r._cipher.decryptBlock(n)}),ecb}var cbc={},bufferXor,hasRequiredBufferXor;function requireBufferXor(){return hasRequiredBufferXor||(hasRequiredBufferXor=1,bufferXor=function(n,a){for(var i=Math.min(n.length,a.length),o=new Buffer(i),s=0;s<i;++s)o[s]=n[s]^a[s];return o}),bufferXor}var hasRequiredCbc;function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var r=requireBufferXor();return cbc.encrypt=function(n,a){var i=r(a,n._prev);return n._prev=n._cipher.encryptBlock(i),n._prev},cbc.decrypt=function(n,a){var i=n._prev;n._prev=a;var o=n._cipher.decryptBlock(a);return r(o,i)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var r=requireSafeBuffer$1().Buffer,n=requireBufferXor();function a(i,o,s){var l=o.length,f=n(o,i._cache);return i._cache=i._cache.slice(l),i._prev=r.concat([i._prev,s?o:f]),f}return cfb.encrypt=function(i,o,s){for(var l=r.allocUnsafe(0),f;o.length;)if(i._cache.length===0&&(i._cache=i._cipher.encryptBlock(i._prev),i._prev=r.allocUnsafe(0)),i._cache.length<=o.length)f=i._cache.length,l=r.concat([l,a(i,o.slice(0,f),s)]),o=o.slice(f);else{l=r.concat([l,a(i,o,s)]);break}return l},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var r=requireSafeBuffer$1().Buffer;function n(a,i,o){var s=a._cipher.encryptBlock(a._prev),l=s[0]^i;return a._prev=r.concat([a._prev.slice(1),r.from([o?i:l])]),l}return cfb8.encrypt=function(a,i,o){for(var s=i.length,l=r.allocUnsafe(s),f=-1;++f<s;)l[f]=n(a,i[f],o);return l},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var r=requireSafeBuffer$1().Buffer;function n(i,o,s){for(var l,f=-1,d=8,u=0,c,v;++f<d;)l=i._cipher.encryptBlock(i._prev),c=o&1<<7-f?128:0,v=l[0]^c,u+=(v&128)>>f%8,i._prev=a(i._prev,s?c:v);return u}function a(i,o){var s=i.length,l=-1,f=r.allocUnsafe(i.length);for(i=r.concat([i,r.from([o])]);++l<s;)f[l]=i[l]<<1|i[l+1]>>7;return f}return cfb1.encrypt=function(i,o,s){for(var l=o.length,f=r.allocUnsafe(l),d=-1;++d<l;)f[d]=n(i,o[d],s);return f},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var r=requireBufferXor();function n(a){return a._prev=a._cipher.encryptBlock(a._prev),a._prev}return ofb.encrypt=function(a,i){for(;a._cache.length<i.length;)a._cache=Buffer.concat([a._cache,n(a)]);var o=a._cache.slice(0,i.length);return a._cache=a._cache.slice(i.length),r(i,o)},ofb}var ctr={},incr32_1,hasRequiredIncr32;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;hasRequiredIncr32=1;function r(n){for(var a=n.length,i;a--;)if(i=n.readUInt8(a),i===255)n.writeUInt8(0,a);else{i++,n.writeUInt8(i,a);break}}return incr32_1=r,incr32_1}var hasRequiredCtr;function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var r=requireBufferXor(),n=requireSafeBuffer$1().Buffer,a=requireIncr32();function i(s){var l=s._cipher.encryptBlockRaw(s._prev);return a(s._prev),l}var o=16;return ctr.encrypt=function(s,l){var f=Math.ceil(l.length/o),d=s._cache.length;s._cache=n.concat([s._cache,n.allocUnsafe(f*o)]);for(var u=0;u<f;u++){var c=i(s),v=d+u*o;s._cache.writeUInt32BE(c[0],v+0),s._cache.writeUInt32BE(c[1],v+4),s._cache.writeUInt32BE(c[2],v+8),s._cache.writeUInt32BE(c[3],v+12)}var h=s._cache.slice(0,l.length);return s._cache=s._cache.slice(l.length),r(l,h)},ctr}const 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"};var require$$2={"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,aes192,aes256,"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"}},modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var r={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},n=require$$2;for(var a in n)n[a].module=r[n[a].mode];return modes_1=n,modes_1}var aes$2={},hasRequiredAes$1;function requireAes$1(){if(hasRequiredAes$1)return aes$2;hasRequiredAes$1=1;var r=requireSafeBuffer$1().Buffer;function n(f){r.isBuffer(f)||(f=r.from(f));for(var d=f.length/4|0,u=new Array(d),c=0;c<d;c++)u[c]=f.readUInt32BE(c*4);return u}function a(f){for(var d=0;d<f.length;f++)f[d]=0}function i(f,d,u,c,v){for(var h=u[0],m=u[1],g=u[2],_=u[3],S=f[0]^d[0],N=f[1]^d[1],O=f[2]^d[2],M=f[3]^d[3],F,L,k,P,U=4,B=1;B<v;B++)F=h[S>>>24]^m[N>>>16&255]^g[O>>>8&255]^_[M&255]^d[U++],L=h[N>>>24]^m[O>>>16&255]^g[M>>>8&255]^_[S&255]^d[U++],k=h[O>>>24]^m[M>>>16&255]^g[S>>>8&255]^_[N&255]^d[U++],P=h[M>>>24]^m[S>>>16&255]^g[N>>>8&255]^_[O&255]^d[U++],S=F,N=L,O=k,M=P;return F=(c[S>>>24]<<24|c[N>>>16&255]<<16|c[O>>>8&255]<<8|c[M&255])^d[U++],L=(c[N>>>24]<<24|c[O>>>16&255]<<16|c[M>>>8&255]<<8|c[S&255])^d[U++],k=(c[O>>>24]<<24|c[M>>>16&255]<<16|c[S>>>8&255]<<8|c[N&255])^d[U++],P=(c[M>>>24]<<24|c[S>>>16&255]<<16|c[N>>>8&255]<<8|c[O&255])^d[U++],F=F>>>0,L=L>>>0,k=k>>>0,P=P>>>0,[F,L,k,P]}var o=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var f=new Array(256),d=0;d<256;d++)d<128?f[d]=d<<1:f[d]=d<<1^283;for(var u=[],c=[],v=[[],[],[],[]],h=[[],[],[],[]],m=0,g=0,_=0;_<256;++_){var S=g^g<<1^g<<2^g<<3^g<<4;S=S>>>8^S&255^99,u[m]=S,c[S]=m;var N=f[m],O=f[N],M=f[O],F=f[S]*257^S*16843008;v[0][m]=F<<24|F>>>8,v[1][m]=F<<16|F>>>16,v[2][m]=F<<8|F>>>24,v[3][m]=F,F=M*16843009^O*65537^N*257^m*16843008,h[0][S]=F<<24|F>>>8,h[1][S]=F<<16|F>>>16,h[2][S]=F<<8|F>>>24,h[3][S]=F,m===0?m=g=1:(m=N^f[f[f[M^N]]],g^=f[f[g]])}return{SBOX:u,INV_SBOX:c,SUB_MIX:v,INV_SUB_MIX:h}}();function l(f){this._key=n(f),this._reset()}return l.blockSize=16,l.keySize=256/8,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var f=this._key,d=f.length,u=d+6,c=(u+1)*4,v=[],h=0;h<d;h++)v[h]=f[h];for(h=d;h<c;h++){var m=v[h-1];h%d===0?(m=m<<8|m>>>24,m=s.SBOX[m>>>24]<<24|s.SBOX[m>>>16&255]<<16|s.SBOX[m>>>8&255]<<8|s.SBOX[m&255],m^=o[h/d|0]<<24):d>6&&h%d===4&&(m=s.SBOX[m>>>24]<<24|s.SBOX[m>>>16&255]<<16|s.SBOX[m>>>8&255]<<8|s.SBOX[m&255]),v[h]=v[h-d]^m}for(var g=[],_=0;_<c;_++){var S=c-_,N=v[S-(_%4?0:4)];_<4||S<=4?g[_]=N:g[_]=s.INV_SUB_MIX[0][s.SBOX[N>>>24]]^s.INV_SUB_MIX[1][s.SBOX[N>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[N>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[N&255]]}this._nRounds=u,this._keySchedule=v,this._invKeySchedule=g},l.prototype.encryptBlockRaw=function(f){return f=n(f),i(f,this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},l.prototype.encryptBlock=function(f){var d=this.encryptBlockRaw(f),u=r.allocUnsafe(16);return u.writeUInt32BE(d[0],0),u.writeUInt32BE(d[1],4),u.writeUInt32BE(d[2],8),u.writeUInt32BE(d[3],12),u},l.prototype.decryptBlock=function(f){f=n(f);var d=f[1];f[1]=f[3],f[3]=d;var u=i(f,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),c=r.allocUnsafe(16);return c.writeUInt32BE(u[0],0),c.writeUInt32BE(u[3],4),c.writeUInt32BE(u[2],8),c.writeUInt32BE(u[1],12),c},l.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},aes$2.AES=l,aes$2}var ghash,hasRequiredGhash;function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var r=requireSafeBuffer$1().Buffer,n=r.alloc(16,0);function a(s){return[s.readUInt32BE(0),s.readUInt32BE(4),s.readUInt32BE(8),s.readUInt32BE(12)]}function i(s){var l=r.allocUnsafe(16);return l.writeUInt32BE(s[0]>>>0,0),l.writeUInt32BE(s[1]>>>0,4),l.writeUInt32BE(s[2]>>>0,8),l.writeUInt32BE(s[3]>>>0,12),l}function o(s){this.h=s,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}return o.prototype.ghash=function(s){for(var l=-1;++l<s.length;)this.state[l]^=s[l];this._multiply()},o.prototype._multiply=function(){for(var s=a(this.h),l=[0,0,0,0],f,d,u,c=-1;++c<128;){for(d=(this.state[~~(c/8)]&1<<7-c%8)!==0,d&&(l[0]^=s[0],l[1]^=s[1],l[2]^=s[2],l[3]^=s[3]),u=(s[3]&1)!==0,f=3;f>0;f--)s[f]=s[f]>>>1|(s[f-1]&1)<<31;s[0]=s[0]>>>1,u&&(s[0]=s[0]^225<<24)}this.state=i(l)},o.prototype.update=function(s){this.cache=r.concat([this.cache,s]);for(var l;this.cache.length>=16;)l=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(l)},o.prototype.final=function(s,l){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(i([0,s,0,l])),this.state},ghash=o,ghash}var authCipher,hasRequiredAuthCipher;function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var r=requireAes$1(),n=requireSafeBuffer$1().Buffer,a=requireCipherBase(),i=requireInherits_browser(),o=requireGhash(),s=requireBufferXor(),l=requireIncr32();function f(c,v){var h=0;c.length!==v.length&&h++;for(var m=Math.min(c.length,v.length),g=0;g<m;++g)h+=c[g]^v[g];return h}function d(c,v,h){if(v.length===12)return c._finID=n.concat([v,n.from([0,0,0,1])]),n.concat([v,n.from([0,0,0,2])]);var m=new o(h),g=v.length,_=g%16;m.update(v),_&&(_=16-_,m.update(n.alloc(_,0))),m.update(n.alloc(8,0));var S=g*8,N=n.alloc(8);N.writeUIntBE(S,0,8),m.update(N),c._finID=m.state;var O=n.from(c._finID);return l(O),O}function u(c,v,h,m){a.call(this);var g=n.alloc(4,0);this._cipher=new r.AES(v);var _=this._cipher.encryptBlock(g);this._ghash=new o(_),h=d(this,h,_),this._prev=n.from(h),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=m,this._alen=0,this._len=0,this._mode=c,this._authTag=null,this._called=!1}return i(u,a),u.prototype._update=function(c){if(!this._called&&this._alen){var v=16-this._alen%16;v<16&&(v=n.alloc(v,0),this._ghash.update(v))}this._called=!0;var h=this._mode.encrypt(this,c);return this._decrypt?this._ghash.update(c):this._ghash.update(h),this._len+=c.length,h},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var c=s(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&f(c,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=c,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(v){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=v},u.prototype.setAAD=function(v){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(v),this._alen+=v.length},authCipher=u,authCipher}var streamCipher,hasRequiredStreamCipher;function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var r=requireAes$1(),n=requireSafeBuffer$1().Buffer,a=requireCipherBase(),i=requireInherits_browser();function o(s,l,f,d){a.call(this),this._cipher=new r.AES(l),this._prev=n.from(f),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=d,this._mode=s}return i(o,a),o.prototype._update=function(s){return this._mode.encrypt(this,s,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},streamCipher=o,streamCipher}var evp_bytestokey,hasRequiredEvp_bytestokey;function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var r=requireSafeBuffer$1().Buffer,n=requireMd5_js();function a(i,o,s,l){if(r.isBuffer(i)||(i=r.from(i,"binary")),o&&(r.isBuffer(o)||(o=r.from(o,"binary")),o.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=s/8,d=r.alloc(f),u=r.alloc(l||0),c=r.alloc(0);f>0||l>0;){var v=new n;v.update(c),v.update(i),o&&v.update(o),c=v.digest();var h=0;if(f>0){var m=d.length-f;h=Math.min(f,c.length),c.copy(d,m,0,h),f-=h}if(h<c.length&&l>0){var g=u.length-l,_=Math.min(l,c.length-h);c.copy(u,g,h,h+_),l-=_}}return c.fill(0),{key:d,iv:u}}return evp_bytestokey=a,evp_bytestokey}var hasRequiredEncrypter;function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var r=requireModes$1(),n=requireAuthCipher(),a=requireSafeBuffer$1().Buffer,i=requireStreamCipher(),o=requireCipherBase(),s=requireAes$1(),l=requireEvp_bytestokey(),f=requireInherits_browser();function d(m,g,_){o.call(this),this._cache=new c,this._cipher=new s.AES(g),this._prev=a.from(_),this._mode=m,this._autopadding=!0}f(d,o),d.prototype._update=function(m){this._cache.add(m);for(var g,_,S=[];g=this._cache.get();)_=this._mode.encrypt(this,g),S.push(_);return a.concat(S)};var u=a.alloc(16,16);d.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return m=this._mode.encrypt(this,m),this._cipher.scrub(),m;if(!m.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this};function c(){this.cache=a.allocUnsafe(0)}c.prototype.add=function(m){this.cache=a.concat([this.cache,m])},c.prototype.get=function(){if(this.cache.length>15){var m=this.cache.slice(0,16);return this.cache=this.cache.slice(16),m}return null},c.prototype.flush=function(){for(var m=16-this.cache.length,g=a.allocUnsafe(m),_=-1;++_<m;)g.writeUInt8(m,_);return a.concat([this.cache,g])};function v(m,g,_){var S=r[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if(typeof g=="string"&&(g=a.from(g)),g.length!==S.key/8)throw new TypeError("invalid key length "+g.length);if(typeof _=="string"&&(_=a.from(_)),S.mode!=="GCM"&&_.length!==S.iv)throw new TypeError("invalid iv length "+_.length);return S.type==="stream"?new i(S.module,g,_):S.type==="auth"?new n(S.module,g,_):new d(S.module,g,_)}function h(m,g){var _=r[m.toLowerCase()];if(!_)throw new TypeError("invalid suite type");var S=l(g,!1,_.key,_.iv);return v(m,S.key,S.iv)}return encrypter.createCipheriv=v,encrypter.createCipher=h,encrypter}var decrypter={},hasRequiredDecrypter;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var r=requireAuthCipher(),n=requireSafeBuffer$1().Buffer,a=requireModes$1(),i=requireStreamCipher(),o=requireCipherBase(),s=requireAes$1(),l=requireEvp_bytestokey(),f=requireInherits_browser();function d(m,g,_){o.call(this),this._cache=new u,this._last=void 0,this._cipher=new s.AES(g),this._prev=n.from(_),this._mode=m,this._autopadding=!0}f(d,o),d.prototype._update=function(m){this._cache.add(m);for(var g,_,S=[];g=this._cache.get(this._autopadding);)_=this._mode.decrypt(this,g),S.push(_);return n.concat(S)},d.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return c(this._mode.decrypt(this,m));if(m)throw new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this};function u(){this.cache=n.allocUnsafe(0)}u.prototype.add=function(m){this.cache=n.concat([this.cache,m])},u.prototype.get=function(m){var g;if(m){if(this.cache.length>16)return g=this.cache.slice(0,16),this.cache=this.cache.slice(16),g}else if(this.cache.length>=16)return g=this.cache.slice(0,16),this.cache=this.cache.slice(16),g;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache};function c(m){var g=m[15];if(g<1||g>16)throw new Error("unable to decrypt data");for(var _=-1;++_<g;)if(m[_+(16-g)]!==g)throw new Error("unable to decrypt data");if(g!==16)return m.slice(0,16-g)}function v(m,g,_){var S=a[m.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if(typeof _=="string"&&(_=n.from(_)),S.mode!=="GCM"&&_.length!==S.iv)throw new TypeError("invalid iv length "+_.length);if(typeof g=="string"&&(g=n.from(g)),g.length!==S.key/8)throw new TypeError("invalid key length "+g.length);return S.type==="stream"?new i(S.module,g,_,!0):S.type==="auth"?new r(S.module,g,_,!0):new d(S.module,g,_)}function h(m,g){var _=a[m.toLowerCase()];if(!_)throw new TypeError("invalid suite type");var S=l(g,!1,_.key,_.iv);return v(m,S.key,S.iv)}return decrypter.createDecipher=h,decrypter.createDecipheriv=v,decrypter}var hasRequiredBrowser$7;function requireBrowser$7(){if(hasRequiredBrowser$7)return browser$6;hasRequiredBrowser$7=1;var r=requireEncrypter(),n=requireDecrypter(),a=require$$2;function i(){return Object.keys(a)}return browser$6.createCipher=browser$6.Cipher=r.createCipher,browser$6.createCipheriv=browser$6.Cipheriv=r.createCipheriv,browser$6.createDecipher=browser$6.Decipher=n.createDecipher,browser$6.createDecipheriv=browser$6.Decipheriv=n.createDecipheriv,browser$6.listCiphers=browser$6.getCiphers=i,browser$6}var modes={},hasRequiredModes;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,function(r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}}(modes)),modes}var hasRequiredBrowser$6;function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$7;hasRequiredBrowser$6=1;var r=requireBrowserifyDes(),n=requireBrowser$7(),a=requireModes$1(),i=requireModes(),o=requireEvp_bytestokey();function s(c,v){c=c.toLowerCase();var h,m;if(a[c])h=a[c].key,m=a[c].iv;else if(i[c])h=i[c].key*8,m=i[c].iv;else throw new TypeError("invalid suite type");var g=o(v,!1,h,m);return f(c,g.key,g.iv)}function l(c,v){c=c.toLowerCase();var h,m;if(a[c])h=a[c].key,m=a[c].iv;else if(i[c])h=i[c].key*8,m=i[c].iv;else throw new TypeError("invalid suite type");var g=o(v,!1,h,m);return d(c,g.key,g.iv)}function f(c,v,h){if(c=c.toLowerCase(),a[c])return n.createCipheriv(c,v,h);if(i[c])return new r({key:v,iv:h,mode:c});throw new TypeError("invalid suite type")}function d(c,v,h){if(c=c.toLowerCase(),a[c])return n.createDecipheriv(c,v,h);if(i[c])return new r({key:v,iv:h,mode:c,decrypt:!0});throw new TypeError("invalid suite type")}function u(){return Object.keys(i).concat(n.getCiphers())}return browser$7.createCipher=browser$7.Cipher=s,browser$7.createCipheriv=browser$7.Cipheriv=f,browser$7.createDecipher=browser$7.Decipher=l,browser$7.createDecipheriv=browser$7.Decipheriv=d,browser$7.listCiphers=browser$7.getCiphers=u,browser$7}var browser$5={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,function(r){(function(n,a){function i($,A){if(!$)throw new Error(A||"Assertion failed")}function o($,A){$.super_=A;var R=function(){};R.prototype=A.prototype,$.prototype=new R,$.prototype.constructor=$}function s($,A,R){if(s.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((A==="le"||A==="be")&&(R=A,A=10),this._init($||0,A||10,R||"be"))}typeof n=="object"?n.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(A){return A instanceof s?!0:A!==null&&typeof A=="object"&&A.constructor.wordSize===s.wordSize&&Array.isArray(A.words)},s.max=function(A,R){return A.cmp(R)>0?A:R},s.min=function(A,R){return A.cmp(R)<0?A:R},s.prototype._init=function(A,R,y){if(typeof A=="number")return this._initNumber(A,R,y);if(typeof A=="object")return this._initArray(A,R,y);R==="hex"&&(R=16),i(R===(R|0)&&R>=2&&R<=36),A=A.toString().replace(/\s+/g,"");var b=0;A[0]==="-"&&(b++,this.negative=1),b<A.length&&(R===16?this._parseHex(A,b,y):(this._parseBase(A,R,b),y==="le"&&this._initArray(this.toArray(),R,y)))},s.prototype._initNumber=function(A,R,y){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[A&67108863],this.length=1):A<4503599627370496?(this.words=[A&67108863,A/67108864&67108863],this.length=2):(i(A<9007199254740992),this.words=[A&67108863,A/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),R,y)},s.prototype._initArray=function(A,R,y){if(i(typeof A.length=="number"),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var D,I,T=0;if(y==="be")for(b=A.length-1,D=0;b>=0;b-=3)I=A[b]|A[b-1]<<8|A[b-2]<<16,this.words[D]|=I<<T&67108863,this.words[D+1]=I>>>26-T&67108863,T+=24,T>=26&&(T-=26,D++);else if(y==="le")for(b=0,D=0;b<A.length;b+=3)I=A[b]|A[b+1]<<8|A[b+2]<<16,this.words[D]|=I<<T&67108863,this.words[D+1]=I>>>26-T&67108863,T+=24,T>=26&&(T-=26,D++);return this.strip()};function f($,A){var R=$.charCodeAt(A);return R>=65&&R<=70?R-55:R>=97&&R<=102?R-87:R-48&15}function d($,A,R){var y=f($,R);return R-1>=A&&(y|=f($,R-1)<<4),y}s.prototype._parseHex=function(A,R,y){this.length=Math.ceil((A.length-R)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var D=0,I=0,T;if(y==="be")for(b=A.length-1;b>=R;b-=2)T=d(A,R,b)<<D,this.words[I]|=T&67108863,D>=18?(D-=18,I+=1,this.words[I]|=T>>>26):D+=8;else{var C=A.length-R;for(b=C%2===0?R+1:R;b<A.length;b+=2)T=d(A,R,b)<<D,this.words[I]|=T&67108863,D>=18?(D-=18,I+=1,this.words[I]|=T>>>26):D+=8}this.strip()};function u($,A,R,y){for(var b=0,D=Math.min($.length,R),I=A;I<D;I++){var T=$.charCodeAt(I)-48;b*=y,T>=49?b+=T-49+10:T>=17?b+=T-17+10:b+=T}return b}s.prototype._parseBase=function(A,R,y){this.words=[0],this.length=1;for(var b=0,D=1;D<=67108863;D*=R)b++;b--,D=D/R|0;for(var I=A.length-y,T=I%b,C=Math.min(I,I-T)+y,x=0,w=y;w<C;w+=b)x=u(A,w,w+b,R),this.imuln(D),this.words[0]+x<67108864?this.words[0]+=x:this._iaddn(x);if(T!==0){var E=1;for(x=u(A,w,A.length,R),w=0;w<T;w++)E*=R;this.imuln(E),this.words[0]+x<67108864?this.words[0]+=x:this._iaddn(x)}this.strip()},s.prototype.copy=function(A){A.words=new Array(this.length);for(var R=0;R<this.length;R++)A.words[R]=this.words[R];A.length=this.length,A.negative=this.negative,A.red=this.red},s.prototype.clone=function(){var A=new s(null);return this.copy(A),A},s.prototype._expand=function(A){for(;this.length<A;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],v=[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],h=[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];s.prototype.toString=function(A,R){A=A||10,R=R|0||1;var y;if(A===16||A==="hex"){y="";for(var b=0,D=0,I=0;I<this.length;I++){var T=this.words[I],C=((T<<b|D)&16777215).toString(16);D=T>>>24-b&16777215,b+=2,b>=26&&(b-=26,I--),D!==0||I!==this.length-1?y=c[6-C.length]+C+y:y=C+y}for(D!==0&&(y=D.toString(16)+y);y.length%R!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(A===(A|0)&&A>=2&&A<=36){var x=v[A],w=h[A];y="";var E=this.clone();for(E.negative=0;!E.isZero();){var q=E.modn(w).toString(A);E=E.idivn(w),E.isZero()?y=q+y:y=c[x-q.length]+q+y}for(this.isZero()&&(y="0"+y);y.length%R!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var A=this.words[0];return this.length===2?A+=this.words[1]*67108864:this.length===3&&this.words[2]===1?A+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-A:A},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(A,R){return i(typeof l<"u"),this.toArrayLike(l,A,R)},s.prototype.toArray=function(A,R){return this.toArrayLike(Array,A,R)},s.prototype.toArrayLike=function(A,R,y){var b=this.byteLength(),D=y||Math.max(1,b);i(b<=D,"byte array longer than desired length"),i(D>0,"Requested array length <= 0"),this.strip();var I=R==="le",T=new A(D),C,x,w=this.clone();if(I){for(x=0;!w.isZero();x++)C=w.andln(255),w.iushrn(8),T[x]=C;for(;x<D;x++)T[x]=0}else{for(x=0;x<D-b;x++)T[x]=0;for(x=0;!w.isZero();x++)C=w.andln(255),w.iushrn(8),T[D-x-1]=C}return T},Math.clz32?s.prototype._countBits=function(A){return 32-Math.clz32(A)}:s.prototype._countBits=function(A){var R=A,y=0;return R>=4096&&(y+=13,R>>>=13),R>=64&&(y+=7,R>>>=7),R>=8&&(y+=4,R>>>=4),R>=2&&(y+=2,R>>>=2),y+R},s.prototype._zeroBits=function(A){if(A===0)return 26;var R=A,y=0;return(R&8191)===0&&(y+=13,R>>>=13),(R&127)===0&&(y+=7,R>>>=7),(R&15)===0&&(y+=4,R>>>=4),(R&3)===0&&(y+=2,R>>>=2),(R&1)===0&&y++,y},s.prototype.bitLength=function(){var A=this.words[this.length-1],R=this._countBits(A);return(this.length-1)*26+R};function m($){for(var A=new Array($.bitLength()),R=0;R<A.length;R++){var y=R/26|0,b=R%26;A[R]=($.words[y]&1<<b)>>>b}return A}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,R=0;R<this.length;R++){var y=this._zeroBits(this.words[R]);if(A+=y,y!==26)break}return A},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(A){return this.negative!==0?this.abs().inotn(A).iaddn(1):this.clone()},s.prototype.fromTwos=function(A){return this.testn(A-1)?this.notn(A).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(A){for(;this.length<A.length;)this.words[this.length++]=0;for(var R=0;R<A.length;R++)this.words[R]=this.words[R]|A.words[R];return this.strip()},s.prototype.ior=function(A){return i((this.negative|A.negative)===0),this.iuor(A)},s.prototype.or=function(A){return this.length>A.length?this.clone().ior(A):A.clone().ior(this)},s.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},s.prototype.iuand=function(A){var R;this.length>A.length?R=A:R=this;for(var y=0;y<R.length;y++)this.words[y]=this.words[y]&A.words[y];return this.length=R.length,this.strip()},s.prototype.iand=function(A){return i((this.negative|A.negative)===0),this.iuand(A)},s.prototype.and=function(A){return this.length>A.length?this.clone().iand(A):A.clone().iand(this)},s.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},s.prototype.iuxor=function(A){var R,y;this.length>A.length?(R=this,y=A):(R=A,y=this);for(var b=0;b<y.length;b++)this.words[b]=R.words[b]^y.words[b];if(this!==R)for(;b<R.length;b++)this.words[b]=R.words[b];return this.length=R.length,this.strip()},s.prototype.ixor=function(A){return i((this.negative|A.negative)===0),this.iuxor(A)},s.prototype.xor=function(A){return this.length>A.length?this.clone().ixor(A):A.clone().ixor(this)},s.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},s.prototype.inotn=function(A){i(typeof A=="number"&&A>=0);var R=Math.ceil(A/26)|0,y=A%26;this._expand(R),y>0&&R--;for(var b=0;b<R;b++)this.words[b]=~this.words[b]&67108863;return y>0&&(this.words[b]=~this.words[b]&67108863>>26-y),this.strip()},s.prototype.notn=function(A){return this.clone().inotn(A)},s.prototype.setn=function(A,R){i(typeof A=="number"&&A>=0);var y=A/26|0,b=A%26;return this._expand(y+1),R?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this.strip()},s.prototype.iadd=function(A){var R;if(this.negative!==0&&A.negative===0)return this.negative=0,R=this.isub(A),this.negative^=1,this._normSign();if(this.negative===0&&A.negative!==0)return A.negative=0,R=this.isub(A),A.negative=1,R._normSign();var y,b;this.length>A.length?(y=this,b=A):(y=A,b=this);for(var D=0,I=0;I<b.length;I++)R=(y.words[I]|0)+(b.words[I]|0)+D,this.words[I]=R&67108863,D=R>>>26;for(;D!==0&&I<y.length;I++)R=(y.words[I]|0)+D,this.words[I]=R&67108863,D=R>>>26;if(this.length=y.length,D!==0)this.words[this.length]=D,this.length++;else if(y!==this)for(;I<y.length;I++)this.words[I]=y.words[I];return this},s.prototype.add=function(A){var R;return A.negative!==0&&this.negative===0?(A.negative=0,R=this.sub(A),A.negative^=1,R):A.negative===0&&this.negative!==0?(this.negative=0,R=A.sub(this),this.negative=1,R):this.length>A.length?this.clone().iadd(A):A.clone().iadd(this)},s.prototype.isub=function(A){if(A.negative!==0){A.negative=0;var R=this.iadd(A);return A.negative=1,R._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var y=this.cmp(A);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,D;y>0?(b=this,D=A):(b=A,D=this);for(var I=0,T=0;T<D.length;T++)R=(b.words[T]|0)-(D.words[T]|0)+I,I=R>>26,this.words[T]=R&67108863;for(;I!==0&&T<b.length;T++)R=(b.words[T]|0)+I,I=R>>26,this.words[T]=R&67108863;if(I===0&&T<b.length&&b!==this)for(;T<b.length;T++)this.words[T]=b.words[T];return this.length=Math.max(this.length,T),b!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(A){return this.clone().isub(A)};function g($,A,R){R.negative=A.negative^$.negative;var y=$.length+A.length|0;R.length=y,y=y-1|0;var b=$.words[0]|0,D=A.words[0]|0,I=b*D,T=I&67108863,C=I/67108864|0;R.words[0]=T;for(var x=1;x<y;x++){for(var w=C>>>26,E=C&67108863,q=Math.min(x,A.length-1),G=Math.max(0,x-$.length+1);G<=q;G++){var z=x-G|0;b=$.words[z]|0,D=A.words[G]|0,I=b*D+E,w+=I/67108864|0,E=I&67108863}R.words[x]=E|0,C=w|0}return C!==0?R.words[x]=C|0:R.length--,R.strip()}var _=function(A,R,y){var b=A.words,D=R.words,I=y.words,T=0,C,x,w,E=b[0]|0,q=E&8191,G=E>>>13,z=b[1]|0,H=z&8191,V=z>>>13,K=b[2]|0,Z=K&8191,re=K>>>13,W=b[3]|0,X=W&8191,J=W>>>13,ie=b[4]|0,ne=ie&8191,ae=ie>>>13,ue=b[5]|0,fe=ue&8191,se=ue>>>13,pe=b[6]|0,ce=pe&8191,he=pe>>>13,ve=b[7]|0,ye=ve&8191,be=ve>>>13,_e=b[8]|0,me=_e&8191,Pe=_e>>>13,Ne=b[9]|0,Ee=Ne&8191,Be=Ne>>>13,Ce=D[0]|0,Re=Ce&8191,Ge=Ce>>>13,Me=D[1]|0,Te=Me&8191,Ke=Me>>>13,Fe=D[2]|0,Ie=Fe&8191,Qe=Fe>>>13,qe=D[3]|0,Se=qe&8191,je=qe>>>13,Le=D[4]|0,we=Le&8191,He=Le>>>13,$e=D[5]|0,ee=$e&8191,Q=$e>>>13,Y=D[6]|0,te=Y&8191,oe=Y>>>13,le=D[7]|0,de=le&8191,De=le>>>13,Ae=D[8]|0,ge=Ae&8191,ke=Ae>>>13,xe=D[9]|0,Oe=xe&8191,ze=xe>>>13;y.negative=A.negative^R.negative,y.length=19,C=Math.imul(q,Re),x=Math.imul(q,Ge),x=x+Math.imul(G,Re)|0,w=Math.imul(G,Ge);var Ue=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,C=Math.imul(H,Re),x=Math.imul(H,Ge),x=x+Math.imul(V,Re)|0,w=Math.imul(V,Ge),C=C+Math.imul(q,Te)|0,x=x+Math.imul(q,Ke)|0,x=x+Math.imul(G,Te)|0,w=w+Math.imul(G,Ke)|0;var Ve=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,C=Math.imul(Z,Re),x=Math.imul(Z,Ge),x=x+Math.imul(re,Re)|0,w=Math.imul(re,Ge),C=C+Math.imul(H,Te)|0,x=x+Math.imul(H,Ke)|0,x=x+Math.imul(V,Te)|0,w=w+Math.imul(V,Ke)|0,C=C+Math.imul(q,Ie)|0,x=x+Math.imul(q,Qe)|0,x=x+Math.imul(G,Ie)|0,w=w+Math.imul(G,Qe)|0;var Ye=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,C=Math.imul(X,Re),x=Math.imul(X,Ge),x=x+Math.imul(J,Re)|0,w=Math.imul(J,Ge),C=C+Math.imul(Z,Te)|0,x=x+Math.imul(Z,Ke)|0,x=x+Math.imul(re,Te)|0,w=w+Math.imul(re,Ke)|0,C=C+Math.imul(H,Ie)|0,x=x+Math.imul(H,Qe)|0,x=x+Math.imul(V,Ie)|0,w=w+Math.imul(V,Qe)|0,C=C+Math.imul(q,Se)|0,x=x+Math.imul(q,je)|0,x=x+Math.imul(G,Se)|0,w=w+Math.imul(G,je)|0;var We=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(We>>>26)|0,We&=67108863,C=Math.imul(ne,Re),x=Math.imul(ne,Ge),x=x+Math.imul(ae,Re)|0,w=Math.imul(ae,Ge),C=C+Math.imul(X,Te)|0,x=x+Math.imul(X,Ke)|0,x=x+Math.imul(J,Te)|0,w=w+Math.imul(J,Ke)|0,C=C+Math.imul(Z,Ie)|0,x=x+Math.imul(Z,Qe)|0,x=x+Math.imul(re,Ie)|0,w=w+Math.imul(re,Qe)|0,C=C+Math.imul(H,Se)|0,x=x+Math.imul(H,je)|0,x=x+Math.imul(V,Se)|0,w=w+Math.imul(V,je)|0,C=C+Math.imul(q,we)|0,x=x+Math.imul(q,He)|0,x=x+Math.imul(G,we)|0,w=w+Math.imul(G,He)|0;var Xe=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,C=Math.imul(fe,Re),x=Math.imul(fe,Ge),x=x+Math.imul(se,Re)|0,w=Math.imul(se,Ge),C=C+Math.imul(ne,Te)|0,x=x+Math.imul(ne,Ke)|0,x=x+Math.imul(ae,Te)|0,w=w+Math.imul(ae,Ke)|0,C=C+Math.imul(X,Ie)|0,x=x+Math.imul(X,Qe)|0,x=x+Math.imul(J,Ie)|0,w=w+Math.imul(J,Qe)|0,C=C+Math.imul(Z,Se)|0,x=x+Math.imul(Z,je)|0,x=x+Math.imul(re,Se)|0,w=w+Math.imul(re,je)|0,C=C+Math.imul(H,we)|0,x=x+Math.imul(H,He)|0,x=x+Math.imul(V,we)|0,w=w+Math.imul(V,He)|0,C=C+Math.imul(q,ee)|0,x=x+Math.imul(q,Q)|0,x=x+Math.imul(G,ee)|0,w=w+Math.imul(G,Q)|0;var Je=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Je>>>26)|0,Je&=67108863,C=Math.imul(ce,Re),x=Math.imul(ce,Ge),x=x+Math.imul(he,Re)|0,w=Math.imul(he,Ge),C=C+Math.imul(fe,Te)|0,x=x+Math.imul(fe,Ke)|0,x=x+Math.imul(se,Te)|0,w=w+Math.imul(se,Ke)|0,C=C+Math.imul(ne,Ie)|0,x=x+Math.imul(ne,Qe)|0,x=x+Math.imul(ae,Ie)|0,w=w+Math.imul(ae,Qe)|0,C=C+Math.imul(X,Se)|0,x=x+Math.imul(X,je)|0,x=x+Math.imul(J,Se)|0,w=w+Math.imul(J,je)|0,C=C+Math.imul(Z,we)|0,x=x+Math.imul(Z,He)|0,x=x+Math.imul(re,we)|0,w=w+Math.imul(re,He)|0,C=C+Math.imul(H,ee)|0,x=x+Math.imul(H,Q)|0,x=x+Math.imul(V,ee)|0,w=w+Math.imul(V,Q)|0,C=C+Math.imul(q,te)|0,x=x+Math.imul(q,oe)|0,x=x+Math.imul(G,te)|0,w=w+Math.imul(G,oe)|0;var Ze=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,C=Math.imul(ye,Re),x=Math.imul(ye,Ge),x=x+Math.imul(be,Re)|0,w=Math.imul(be,Ge),C=C+Math.imul(ce,Te)|0,x=x+Math.imul(ce,Ke)|0,x=x+Math.imul(he,Te)|0,w=w+Math.imul(he,Ke)|0,C=C+Math.imul(fe,Ie)|0,x=x+Math.imul(fe,Qe)|0,x=x+Math.imul(se,Ie)|0,w=w+Math.imul(se,Qe)|0,C=C+Math.imul(ne,Se)|0,x=x+Math.imul(ne,je)|0,x=x+Math.imul(ae,Se)|0,w=w+Math.imul(ae,je)|0,C=C+Math.imul(X,we)|0,x=x+Math.imul(X,He)|0,x=x+Math.imul(J,we)|0,w=w+Math.imul(J,He)|0,C=C+Math.imul(Z,ee)|0,x=x+Math.imul(Z,Q)|0,x=x+Math.imul(re,ee)|0,w=w+Math.imul(re,Q)|0,C=C+Math.imul(H,te)|0,x=x+Math.imul(H,oe)|0,x=x+Math.imul(V,te)|0,w=w+Math.imul(V,oe)|0,C=C+Math.imul(q,de)|0,x=x+Math.imul(q,De)|0,x=x+Math.imul(G,de)|0,w=w+Math.imul(G,De)|0;var er=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(er>>>26)|0,er&=67108863,C=Math.imul(me,Re),x=Math.imul(me,Ge),x=x+Math.imul(Pe,Re)|0,w=Math.imul(Pe,Ge),C=C+Math.imul(ye,Te)|0,x=x+Math.imul(ye,Ke)|0,x=x+Math.imul(be,Te)|0,w=w+Math.imul(be,Ke)|0,C=C+Math.imul(ce,Ie)|0,x=x+Math.imul(ce,Qe)|0,x=x+Math.imul(he,Ie)|0,w=w+Math.imul(he,Qe)|0,C=C+Math.imul(fe,Se)|0,x=x+Math.imul(fe,je)|0,x=x+Math.imul(se,Se)|0,w=w+Math.imul(se,je)|0,C=C+Math.imul(ne,we)|0,x=x+Math.imul(ne,He)|0,x=x+Math.imul(ae,we)|0,w=w+Math.imul(ae,He)|0,C=C+Math.imul(X,ee)|0,x=x+Math.imul(X,Q)|0,x=x+Math.imul(J,ee)|0,w=w+Math.imul(J,Q)|0,C=C+Math.imul(Z,te)|0,x=x+Math.imul(Z,oe)|0,x=x+Math.imul(re,te)|0,w=w+Math.imul(re,oe)|0,C=C+Math.imul(H,de)|0,x=x+Math.imul(H,De)|0,x=x+Math.imul(V,de)|0,w=w+Math.imul(V,De)|0,C=C+Math.imul(q,ge)|0,x=x+Math.imul(q,ke)|0,x=x+Math.imul(G,ge)|0,w=w+Math.imul(G,ke)|0;var rr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(rr>>>26)|0,rr&=67108863,C=Math.imul(Ee,Re),x=Math.imul(Ee,Ge),x=x+Math.imul(Be,Re)|0,w=Math.imul(Be,Ge),C=C+Math.imul(me,Te)|0,x=x+Math.imul(me,Ke)|0,x=x+Math.imul(Pe,Te)|0,w=w+Math.imul(Pe,Ke)|0,C=C+Math.imul(ye,Ie)|0,x=x+Math.imul(ye,Qe)|0,x=x+Math.imul(be,Ie)|0,w=w+Math.imul(be,Qe)|0,C=C+Math.imul(ce,Se)|0,x=x+Math.imul(ce,je)|0,x=x+Math.imul(he,Se)|0,w=w+Math.imul(he,je)|0,C=C+Math.imul(fe,we)|0,x=x+Math.imul(fe,He)|0,x=x+Math.imul(se,we)|0,w=w+Math.imul(se,He)|0,C=C+Math.imul(ne,ee)|0,x=x+Math.imul(ne,Q)|0,x=x+Math.imul(ae,ee)|0,w=w+Math.imul(ae,Q)|0,C=C+Math.imul(X,te)|0,x=x+Math.imul(X,oe)|0,x=x+Math.imul(J,te)|0,w=w+Math.imul(J,oe)|0,C=C+Math.imul(Z,de)|0,x=x+Math.imul(Z,De)|0,x=x+Math.imul(re,de)|0,w=w+Math.imul(re,De)|0,C=C+Math.imul(H,ge)|0,x=x+Math.imul(H,ke)|0,x=x+Math.imul(V,ge)|0,w=w+Math.imul(V,ke)|0,C=C+Math.imul(q,Oe)|0,x=x+Math.imul(q,ze)|0,x=x+Math.imul(G,Oe)|0,w=w+Math.imul(G,ze)|0;var tr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(tr>>>26)|0,tr&=67108863,C=Math.imul(Ee,Te),x=Math.imul(Ee,Ke),x=x+Math.imul(Be,Te)|0,w=Math.imul(Be,Ke),C=C+Math.imul(me,Ie)|0,x=x+Math.imul(me,Qe)|0,x=x+Math.imul(Pe,Ie)|0,w=w+Math.imul(Pe,Qe)|0,C=C+Math.imul(ye,Se)|0,x=x+Math.imul(ye,je)|0,x=x+Math.imul(be,Se)|0,w=w+Math.imul(be,je)|0,C=C+Math.imul(ce,we)|0,x=x+Math.imul(ce,He)|0,x=x+Math.imul(he,we)|0,w=w+Math.imul(he,He)|0,C=C+Math.imul(fe,ee)|0,x=x+Math.imul(fe,Q)|0,x=x+Math.imul(se,ee)|0,w=w+Math.imul(se,Q)|0,C=C+Math.imul(ne,te)|0,x=x+Math.imul(ne,oe)|0,x=x+Math.imul(ae,te)|0,w=w+Math.imul(ae,oe)|0,C=C+Math.imul(X,de)|0,x=x+Math.imul(X,De)|0,x=x+Math.imul(J,de)|0,w=w+Math.imul(J,De)|0,C=C+Math.imul(Z,ge)|0,x=x+Math.imul(Z,ke)|0,x=x+Math.imul(re,ge)|0,w=w+Math.imul(re,ke)|0,C=C+Math.imul(H,Oe)|0,x=x+Math.imul(H,ze)|0,x=x+Math.imul(V,Oe)|0,w=w+Math.imul(V,ze)|0;var nr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(nr>>>26)|0,nr&=67108863,C=Math.imul(Ee,Ie),x=Math.imul(Ee,Qe),x=x+Math.imul(Be,Ie)|0,w=Math.imul(Be,Qe),C=C+Math.imul(me,Se)|0,x=x+Math.imul(me,je)|0,x=x+Math.imul(Pe,Se)|0,w=w+Math.imul(Pe,je)|0,C=C+Math.imul(ye,we)|0,x=x+Math.imul(ye,He)|0,x=x+Math.imul(be,we)|0,w=w+Math.imul(be,He)|0,C=C+Math.imul(ce,ee)|0,x=x+Math.imul(ce,Q)|0,x=x+Math.imul(he,ee)|0,w=w+Math.imul(he,Q)|0,C=C+Math.imul(fe,te)|0,x=x+Math.imul(fe,oe)|0,x=x+Math.imul(se,te)|0,w=w+Math.imul(se,oe)|0,C=C+Math.imul(ne,de)|0,x=x+Math.imul(ne,De)|0,x=x+Math.imul(ae,de)|0,w=w+Math.imul(ae,De)|0,C=C+Math.imul(X,ge)|0,x=x+Math.imul(X,ke)|0,x=x+Math.imul(J,ge)|0,w=w+Math.imul(J,ke)|0,C=C+Math.imul(Z,Oe)|0,x=x+Math.imul(Z,ze)|0,x=x+Math.imul(re,Oe)|0,w=w+Math.imul(re,ze)|0;var ir=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(ir>>>26)|0,ir&=67108863,C=Math.imul(Ee,Se),x=Math.imul(Ee,je),x=x+Math.imul(Be,Se)|0,w=Math.imul(Be,je),C=C+Math.imul(me,we)|0,x=x+Math.imul(me,He)|0,x=x+Math.imul(Pe,we)|0,w=w+Math.imul(Pe,He)|0,C=C+Math.imul(ye,ee)|0,x=x+Math.imul(ye,Q)|0,x=x+Math.imul(be,ee)|0,w=w+Math.imul(be,Q)|0,C=C+Math.imul(ce,te)|0,x=x+Math.imul(ce,oe)|0,x=x+Math.imul(he,te)|0,w=w+Math.imul(he,oe)|0,C=C+Math.imul(fe,de)|0,x=x+Math.imul(fe,De)|0,x=x+Math.imul(se,de)|0,w=w+Math.imul(se,De)|0,C=C+Math.imul(ne,ge)|0,x=x+Math.imul(ne,ke)|0,x=x+Math.imul(ae,ge)|0,w=w+Math.imul(ae,ke)|0,C=C+Math.imul(X,Oe)|0,x=x+Math.imul(X,ze)|0,x=x+Math.imul(J,Oe)|0,w=w+Math.imul(J,ze)|0;var ar=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(ar>>>26)|0,ar&=67108863,C=Math.imul(Ee,we),x=Math.imul(Ee,He),x=x+Math.imul(Be,we)|0,w=Math.imul(Be,He),C=C+Math.imul(me,ee)|0,x=x+Math.imul(me,Q)|0,x=x+Math.imul(Pe,ee)|0,w=w+Math.imul(Pe,Q)|0,C=C+Math.imul(ye,te)|0,x=x+Math.imul(ye,oe)|0,x=x+Math.imul(be,te)|0,w=w+Math.imul(be,oe)|0,C=C+Math.imul(ce,de)|0,x=x+Math.imul(ce,De)|0,x=x+Math.imul(he,de)|0,w=w+Math.imul(he,De)|0,C=C+Math.imul(fe,ge)|0,x=x+Math.imul(fe,ke)|0,x=x+Math.imul(se,ge)|0,w=w+Math.imul(se,ke)|0,C=C+Math.imul(ne,Oe)|0,x=x+Math.imul(ne,ze)|0,x=x+Math.imul(ae,Oe)|0,w=w+Math.imul(ae,ze)|0;var sr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(sr>>>26)|0,sr&=67108863,C=Math.imul(Ee,ee),x=Math.imul(Ee,Q),x=x+Math.imul(Be,ee)|0,w=Math.imul(Be,Q),C=C+Math.imul(me,te)|0,x=x+Math.imul(me,oe)|0,x=x+Math.imul(Pe,te)|0,w=w+Math.imul(Pe,oe)|0,C=C+Math.imul(ye,de)|0,x=x+Math.imul(ye,De)|0,x=x+Math.imul(be,de)|0,w=w+Math.imul(be,De)|0,C=C+Math.imul(ce,ge)|0,x=x+Math.imul(ce,ke)|0,x=x+Math.imul(he,ge)|0,w=w+Math.imul(he,ke)|0,C=C+Math.imul(fe,Oe)|0,x=x+Math.imul(fe,ze)|0,x=x+Math.imul(se,Oe)|0,w=w+Math.imul(se,ze)|0;var or=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(or>>>26)|0,or&=67108863,C=Math.imul(Ee,te),x=Math.imul(Ee,oe),x=x+Math.imul(Be,te)|0,w=Math.imul(Be,oe),C=C+Math.imul(me,de)|0,x=x+Math.imul(me,De)|0,x=x+Math.imul(Pe,de)|0,w=w+Math.imul(Pe,De)|0,C=C+Math.imul(ye,ge)|0,x=x+Math.imul(ye,ke)|0,x=x+Math.imul(be,ge)|0,w=w+Math.imul(be,ke)|0,C=C+Math.imul(ce,Oe)|0,x=x+Math.imul(ce,ze)|0,x=x+Math.imul(he,Oe)|0,w=w+Math.imul(he,ze)|0;var ur=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(ur>>>26)|0,ur&=67108863,C=Math.imul(Ee,de),x=Math.imul(Ee,De),x=x+Math.imul(Be,de)|0,w=Math.imul(Be,De),C=C+Math.imul(me,ge)|0,x=x+Math.imul(me,ke)|0,x=x+Math.imul(Pe,ge)|0,w=w+Math.imul(Pe,ke)|0,C=C+Math.imul(ye,Oe)|0,x=x+Math.imul(ye,ze)|0,x=x+Math.imul(be,Oe)|0,w=w+Math.imul(be,ze)|0;var lr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(lr>>>26)|0,lr&=67108863,C=Math.imul(Ee,ge),x=Math.imul(Ee,ke),x=x+Math.imul(Be,ge)|0,w=Math.imul(Be,ke),C=C+Math.imul(me,Oe)|0,x=x+Math.imul(me,ze)|0,x=x+Math.imul(Pe,Oe)|0,w=w+Math.imul(Pe,ze)|0;var cr=(T+C|0)+((x&8191)<<13)|0;T=(w+(x>>>13)|0)+(cr>>>26)|0,cr&=67108863,C=Math.imul(Ee,Oe),x=Math.imul(Ee,ze),x=x+Math.imul(Be,Oe)|0,w=Math.imul(Be,ze);var fr=(T+C|0)+((x&8191)<<13)|0;return T=(w+(x>>>13)|0)+(fr>>>26)|0,fr&=67108863,I[0]=Ue,I[1]=Ve,I[2]=Ye,I[3]=We,I[4]=Xe,I[5]=Je,I[6]=Ze,I[7]=er,I[8]=rr,I[9]=tr,I[10]=nr,I[11]=ir,I[12]=ar,I[13]=sr,I[14]=or,I[15]=ur,I[16]=lr,I[17]=cr,I[18]=fr,T!==0&&(I[19]=T,y.length++),y};Math.imul||(_=g);function S($,A,R){R.negative=A.negative^$.negative,R.length=$.length+A.length;for(var y=0,b=0,D=0;D<R.length-1;D++){var I=b;b=0;for(var T=y&67108863,C=Math.min(D,A.length-1),x=Math.max(0,D-$.length+1);x<=C;x++){var w=D-x,E=$.words[w]|0,q=A.words[x]|0,G=E*q,z=G&67108863;I=I+(G/67108864|0)|0,z=z+T|0,T=z&67108863,I=I+(z>>>26)|0,b+=I>>>26,I&=67108863}R.words[D]=T,y=I,I=b}return y!==0?R.words[D]=y:R.length--,R.strip()}function N($,A,R){var y=new O;return y.mulp($,A,R)}s.prototype.mulTo=function(A,R){var y,b=this.length+A.length;return this.length===10&&A.length===10?y=_(this,A,R):b<63?y=g(this,A,R):b<1024?y=S(this,A,R):y=N(this,A,R),y};function O($,A){this.x=$,this.y=A}O.prototype.makeRBT=function(A){for(var R=new Array(A),y=s.prototype._countBits(A)-1,b=0;b<A;b++)R[b]=this.revBin(b,y,A);return R},O.prototype.revBin=function(A,R,y){if(A===0||A===y-1)return A;for(var b=0,D=0;D<R;D++)b|=(A&1)<<R-D-1,A>>=1;return b},O.prototype.permute=function(A,R,y,b,D,I){for(var T=0;T<I;T++)b[T]=R[A[T]],D[T]=y[A[T]]},O.prototype.transform=function(A,R,y,b,D,I){this.permute(I,A,R,y,b,D);for(var T=1;T<D;T<<=1)for(var C=T<<1,x=Math.cos(2*Math.PI/C),w=Math.sin(2*Math.PI/C),E=0;E<D;E+=C)for(var q=x,G=w,z=0;z<T;z++){var H=y[E+z],V=b[E+z],K=y[E+z+T],Z=b[E+z+T],re=q*K-G*Z;Z=q*Z+G*K,K=re,y[E+z]=H+K,b[E+z]=V+Z,y[E+z+T]=H-K,b[E+z+T]=V-Z,z!==C&&(re=x*q-w*G,G=x*G+w*q,q=re)}},O.prototype.guessLen13b=function(A,R){var y=Math.max(R,A)|1,b=y&1,D=0;for(y=y/2|0;y;y=y>>>1)D++;return 1<<D+1+b},O.prototype.conjugate=function(A,R,y){if(!(y<=1))for(var b=0;b<y/2;b++){var D=A[b];A[b]=A[y-b-1],A[y-b-1]=D,D=R[b],R[b]=-R[y-b-1],R[y-b-1]=-D}},O.prototype.normalize13b=function(A,R){for(var y=0,b=0;b<R/2;b++){var D=Math.round(A[2*b+1]/R)*8192+Math.round(A[2*b]/R)+y;A[b]=D&67108863,D<67108864?y=0:y=D/67108864|0}return A},O.prototype.convert13b=function(A,R,y,b){for(var D=0,I=0;I<R;I++)D=D+(A[I]|0),y[2*I]=D&8191,D=D>>>13,y[2*I+1]=D&8191,D=D>>>13;for(I=2*R;I<b;++I)y[I]=0;i(D===0),i((D&-8192)===0)},O.prototype.stub=function(A){for(var R=new Array(A),y=0;y<A;y++)R[y]=0;return R},O.prototype.mulp=function(A,R,y){var b=2*this.guessLen13b(A.length,R.length),D=this.makeRBT(b),I=this.stub(b),T=new Array(b),C=new Array(b),x=new Array(b),w=new Array(b),E=new Array(b),q=new Array(b),G=y.words;G.length=b,this.convert13b(A.words,A.length,T,b),this.convert13b(R.words,R.length,w,b),this.transform(T,I,C,x,b,D),this.transform(w,I,E,q,b,D);for(var z=0;z<b;z++){var H=C[z]*E[z]-x[z]*q[z];x[z]=C[z]*q[z]+x[z]*E[z],C[z]=H}return this.conjugate(C,x,b),this.transform(C,x,G,I,b,D),this.conjugate(G,I,b),this.normalize13b(G,b),y.negative=A.negative^R.negative,y.length=A.length+R.length,y.strip()},s.prototype.mul=function(A){var R=new s(null);return R.words=new Array(this.length+A.length),this.mulTo(A,R)},s.prototype.mulf=function(A){var R=new s(null);return R.words=new Array(this.length+A.length),N(this,A,R)},s.prototype.imul=function(A){return this.clone().mulTo(A,this)},s.prototype.imuln=function(A){i(typeof A=="number"),i(A<67108864);for(var R=0,y=0;y<this.length;y++){var b=(this.words[y]|0)*A,D=(b&67108863)+(R&67108863);R>>=26,R+=b/67108864|0,R+=D>>>26,this.words[y]=D&67108863}return R!==0&&(this.words[y]=R,this.length++),this.length=A===0?1:this.length,this},s.prototype.muln=function(A){return this.clone().imuln(A)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(A){var R=m(A);if(R.length===0)return new s(1);for(var y=this,b=0;b<R.length&&R[b]===0;b++,y=y.sqr());if(++b<R.length)for(var D=y.sqr();b<R.length;b++,D=D.sqr())R[b]!==0&&(y=y.mul(D));return y},s.prototype.iushln=function(A){i(typeof A=="number"&&A>=0);var R=A%26,y=(A-R)/26,b=67108863>>>26-R<<26-R,D;if(R!==0){var I=0;for(D=0;D<this.length;D++){var T=this.words[D]&b,C=(this.words[D]|0)-T<<R;this.words[D]=C|I,I=T>>>26-R}I&&(this.words[D]=I,this.length++)}if(y!==0){for(D=this.length-1;D>=0;D--)this.words[D+y]=this.words[D];for(D=0;D<y;D++)this.words[D]=0;this.length+=y}return this.strip()},s.prototype.ishln=function(A){return i(this.negative===0),this.iushln(A)},s.prototype.iushrn=function(A,R,y){i(typeof A=="number"&&A>=0);var b;R?b=(R-R%26)/26:b=0;var D=A%26,I=Math.min((A-D)/26,this.length),T=67108863^67108863>>>D<<D,C=y;if(b-=I,b=Math.max(0,b),C){for(var x=0;x<I;x++)C.words[x]=this.words[x];C.length=I}if(I!==0)if(this.length>I)for(this.length-=I,x=0;x<this.length;x++)this.words[x]=this.words[x+I];else this.words[0]=0,this.length=1;var w=0;for(x=this.length-1;x>=0&&(w!==0||x>=b);x--){var E=this.words[x]|0;this.words[x]=w<<26-D|E>>>D,w=E&T}return C&&w!==0&&(C.words[C.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(A,R,y){return i(this.negative===0),this.iushrn(A,R,y)},s.prototype.shln=function(A){return this.clone().ishln(A)},s.prototype.ushln=function(A){return this.clone().iushln(A)},s.prototype.shrn=function(A){return this.clone().ishrn(A)},s.prototype.ushrn=function(A){return this.clone().iushrn(A)},s.prototype.testn=function(A){i(typeof A=="number"&&A>=0);var R=A%26,y=(A-R)/26,b=1<<R;if(this.length<=y)return!1;var D=this.words[y];return!!(D&b)},s.prototype.imaskn=function(A){i(typeof A=="number"&&A>=0);var R=A%26,y=(A-R)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(R!==0&&y++,this.length=Math.min(y,this.length),R!==0){var b=67108863^67108863>>>R<<R;this.words[this.length-1]&=b}return this.strip()},s.prototype.maskn=function(A){return this.clone().imaskn(A)},s.prototype.iaddn=function(A){return i(typeof A=="number"),i(A<67108864),A<0?this.isubn(-A):this.negative!==0?this.length===1&&(this.words[0]|0)<A?(this.words[0]=A-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(A),this.negative=1,this):this._iaddn(A)},s.prototype._iaddn=function(A){this.words[0]+=A;for(var R=0;R<this.length&&this.words[R]>=67108864;R++)this.words[R]-=67108864,R===this.length-1?this.words[R+1]=1:this.words[R+1]++;return this.length=Math.max(this.length,R+1),this},s.prototype.isubn=function(A){if(i(typeof A=="number"),i(A<67108864),A<0)return this.iaddn(-A);if(this.negative!==0)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var R=0;R<this.length&&this.words[R]<0;R++)this.words[R]+=67108864,this.words[R+1]-=1;return this.strip()},s.prototype.addn=function(A){return this.clone().iaddn(A)},s.prototype.subn=function(A){return this.clone().isubn(A)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(A,R,y){var b=A.length+y,D;this._expand(b);var I,T=0;for(D=0;D<A.length;D++){I=(this.words[D+y]|0)+T;var C=(A.words[D]|0)*R;I-=C&67108863,T=(I>>26)-(C/67108864|0),this.words[D+y]=I&67108863}for(;D<this.length-y;D++)I=(this.words[D+y]|0)+T,T=I>>26,this.words[D+y]=I&67108863;if(T===0)return this.strip();for(i(T===-1),T=0,D=0;D<this.length;D++)I=-(this.words[D]|0)+T,T=I>>26,this.words[D]=I&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(A,R){var y=this.length-A.length,b=this.clone(),D=A,I=D.words[D.length-1]|0,T=this._countBits(I);y=26-T,y!==0&&(D=D.ushln(y),b.iushln(y),I=D.words[D.length-1]|0);var C=b.length-D.length,x;if(R!=="mod"){x=new s(null),x.length=C+1,x.words=new Array(x.length);for(var w=0;w<x.length;w++)x.words[w]=0}var E=b.clone()._ishlnsubmul(D,1,C);E.negative===0&&(b=E,x&&(x.words[C]=1));for(var q=C-1;q>=0;q--){var G=(b.words[D.length+q]|0)*67108864+(b.words[D.length+q-1]|0);for(G=Math.min(G/I|0,67108863),b._ishlnsubmul(D,G,q);b.negative!==0;)G--,b.negative=0,b._ishlnsubmul(D,1,q),b.isZero()||(b.negative^=1);x&&(x.words[q]=G)}return x&&x.strip(),b.strip(),R!=="div"&&y!==0&&b.iushrn(y),{div:x||null,mod:b}},s.prototype.divmod=function(A,R,y){if(i(!A.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var b,D,I;return this.negative!==0&&A.negative===0?(I=this.neg().divmod(A,R),R!=="mod"&&(b=I.div.neg()),R!=="div"&&(D=I.mod.neg(),y&&D.negative!==0&&D.iadd(A)),{div:b,mod:D}):this.negative===0&&A.negative!==0?(I=this.divmod(A.neg(),R),R!=="mod"&&(b=I.div.neg()),{div:b,mod:I.mod}):(this.negative&A.negative)!==0?(I=this.neg().divmod(A.neg(),R),R!=="div"&&(D=I.mod.neg(),y&&D.negative!==0&&D.isub(A)),{div:I.div,mod:D}):A.length>this.length||this.cmp(A)<0?{div:new s(0),mod:this}:A.length===1?R==="div"?{div:this.divn(A.words[0]),mod:null}:R==="mod"?{div:null,mod:new s(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new s(this.modn(A.words[0]))}:this._wordDiv(A,R)},s.prototype.div=function(A){return this.divmod(A,"div",!1).div},s.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},s.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},s.prototype.divRound=function(A){var R=this.divmod(A);if(R.mod.isZero())return R.div;var y=R.div.negative!==0?R.mod.isub(A):R.mod,b=A.ushrn(1),D=A.andln(1),I=y.cmp(b);return I<0||D===1&&I===0?R.div:R.div.negative!==0?R.div.isubn(1):R.div.iaddn(1)},s.prototype.modn=function(A){i(A<=67108863);for(var R=(1<<26)%A,y=0,b=this.length-1;b>=0;b--)y=(R*y+(this.words[b]|0))%A;return y},s.prototype.idivn=function(A){i(A<=67108863);for(var R=0,y=this.length-1;y>=0;y--){var b=(this.words[y]|0)+R*67108864;this.words[y]=b/A|0,R=b%A}return this.strip()},s.prototype.divn=function(A){return this.clone().idivn(A)},s.prototype.egcd=function(A){i(A.negative===0),i(!A.isZero());var R=this,y=A.clone();R.negative!==0?R=R.umod(A):R=R.clone();for(var b=new s(1),D=new s(0),I=new s(0),T=new s(1),C=0;R.isEven()&&y.isEven();)R.iushrn(1),y.iushrn(1),++C;for(var x=y.clone(),w=R.clone();!R.isZero();){for(var E=0,q=1;(R.words[0]&q)===0&&E<26;++E,q<<=1);if(E>0)for(R.iushrn(E);E-- >0;)(b.isOdd()||D.isOdd())&&(b.iadd(x),D.isub(w)),b.iushrn(1),D.iushrn(1);for(var G=0,z=1;(y.words[0]&z)===0&&G<26;++G,z<<=1);if(G>0)for(y.iushrn(G);G-- >0;)(I.isOdd()||T.isOdd())&&(I.iadd(x),T.isub(w)),I.iushrn(1),T.iushrn(1);R.cmp(y)>=0?(R.isub(y),b.isub(I),D.isub(T)):(y.isub(R),I.isub(b),T.isub(D))}return{a:I,b:T,gcd:y.iushln(C)}},s.prototype._invmp=function(A){i(A.negative===0),i(!A.isZero());var R=this,y=A.clone();R.negative!==0?R=R.umod(A):R=R.clone();for(var b=new s(1),D=new s(0),I=y.clone();R.cmpn(1)>0&&y.cmpn(1)>0;){for(var T=0,C=1;(R.words[0]&C)===0&&T<26;++T,C<<=1);if(T>0)for(R.iushrn(T);T-- >0;)b.isOdd()&&b.iadd(I),b.iushrn(1);for(var x=0,w=1;(y.words[0]&w)===0&&x<26;++x,w<<=1);if(x>0)for(y.iushrn(x);x-- >0;)D.isOdd()&&D.iadd(I),D.iushrn(1);R.cmp(y)>=0?(R.isub(y),b.isub(D)):(y.isub(R),D.isub(b))}var E;return R.cmpn(1)===0?E=b:E=D,E.cmpn(0)<0&&E.iadd(A),E},s.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var R=this.clone(),y=A.clone();R.negative=0,y.negative=0;for(var b=0;R.isEven()&&y.isEven();b++)R.iushrn(1),y.iushrn(1);do{for(;R.isEven();)R.iushrn(1);for(;y.isEven();)y.iushrn(1);var D=R.cmp(y);if(D<0){var I=R;R=y,y=I}else if(D===0||y.cmpn(1)===0)break;R.isub(y)}while(!0);return y.iushln(b)},s.prototype.invm=function(A){return this.egcd(A).a.umod(A)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(A){return this.words[0]&A},s.prototype.bincn=function(A){i(typeof A=="number");var R=A%26,y=(A-R)/26,b=1<<R;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var D=b,I=y;D!==0&&I<this.length;I++){var T=this.words[I]|0;T+=D,D=T>>>26,T&=67108863,this.words[I]=T}return D!==0&&(this.words[I]=D,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(A){var R=A<0;if(this.negative!==0&&!R)return-1;if(this.negative===0&&R)return 1;this.strip();var y;if(this.length>1)y=1;else{R&&(A=-A),i(A<=67108863,"Number is too big");var b=this.words[0]|0;y=b===A?0:b<A?-1:1}return this.negative!==0?-y|0:y},s.prototype.cmp=function(A){if(this.negative!==0&&A.negative===0)return-1;if(this.negative===0&&A.negative!==0)return 1;var R=this.ucmp(A);return this.negative!==0?-R|0:R},s.prototype.ucmp=function(A){if(this.length>A.length)return 1;if(this.length<A.length)return-1;for(var R=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,D=A.words[y]|0;if(b!==D){b<D?R=-1:b>D&&(R=1);break}}return R},s.prototype.gtn=function(A){return this.cmpn(A)===1},s.prototype.gt=function(A){return this.cmp(A)===1},s.prototype.gten=function(A){return this.cmpn(A)>=0},s.prototype.gte=function(A){return this.cmp(A)>=0},s.prototype.ltn=function(A){return this.cmpn(A)===-1},s.prototype.lt=function(A){return this.cmp(A)===-1},s.prototype.lten=function(A){return this.cmpn(A)<=0},s.prototype.lte=function(A){return this.cmp(A)<=0},s.prototype.eqn=function(A){return this.cmpn(A)===0},s.prototype.eq=function(A){return this.cmp(A)===0},s.red=function(A){return new B(A)},s.prototype.toRed=function(A){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),A.convertTo(this)._forceRed(A)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(A){return this.red=A,this},s.prototype.forceRed=function(A){return i(!this.red,"Already a number in reduction context"),this._forceRed(A)},s.prototype.redAdd=function(A){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},s.prototype.redIAdd=function(A){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},s.prototype.redSub=function(A){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},s.prototype.redISub=function(A){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},s.prototype.redShl=function(A){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},s.prototype.redMul=function(A){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},s.prototype.redIMul=function(A){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(A){return i(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var M={k256:null,p224:null,p192:null,p25519:null};function F($,A){this.name=$,this.p=new s(A,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var A=new s(null);return A.words=new Array(Math.ceil(this.n/13)),A},F.prototype.ireduce=function(A){var R=A,y;do this.split(R,this.tmp),R=this.imulK(R),R=R.iadd(this.tmp),y=R.bitLength();while(y>this.n);var b=y<this.n?-1:R.ucmp(this.p);return b===0?(R.words[0]=0,R.length=1):b>0?R.isub(this.p):R.strip!==void 0?R.strip():R._strip(),R},F.prototype.split=function(A,R){A.iushrn(this.n,0,R)},F.prototype.imulK=function(A){return A.imul(this.k)};function L(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(L,F),L.prototype.split=function(A,R){for(var y=4194303,b=Math.min(A.length,9),D=0;D<b;D++)R.words[D]=A.words[D];if(R.length=b,A.length<=9){A.words[0]=0,A.length=1;return}var I=A.words[9];for(R.words[R.length++]=I&y,D=10;D<A.length;D++){var T=A.words[D]|0;A.words[D-10]=(T&y)<<4|I>>>22,I=T}I>>>=22,A.words[D-10]=I,I===0&&A.length>10?A.length-=10:A.length-=9},L.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var R=0,y=0;y<A.length;y++){var b=A.words[y]|0;R+=b*977,A.words[y]=R&67108863,R=b*64+(R/67108864|0)}return A.words[A.length-1]===0&&(A.length--,A.words[A.length-1]===0&&A.length--),A};function k(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(k,F);function P(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(P,F);function U(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(U,F),U.prototype.imulK=function(A){for(var R=0,y=0;y<A.length;y++){var b=(A.words[y]|0)*19+R,D=b&67108863;b>>>=26,A.words[y]=D,R=b}return R!==0&&(A.words[A.length++]=R),A},s._prime=function(A){if(M[A])return M[A];var R;if(A==="k256")R=new L;else if(A==="p224")R=new k;else if(A==="p192")R=new P;else if(A==="p25519")R=new U;else throw new Error("Unknown prime "+A);return M[A]=R,R};function B($){if(typeof $=="string"){var A=s._prime($);this.m=A.p,this.prime=A}else i($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}B.prototype._verify1=function(A){i(A.negative===0,"red works only with positives"),i(A.red,"red works only with red numbers")},B.prototype._verify2=function(A,R){i((A.negative|R.negative)===0,"red works only with positives"),i(A.red&&A.red===R.red,"red works only with red numbers")},B.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},B.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},B.prototype.add=function(A,R){this._verify2(A,R);var y=A.add(R);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},B.prototype.iadd=function(A,R){this._verify2(A,R);var y=A.iadd(R);return y.cmp(this.m)>=0&&y.isub(this.m),y},B.prototype.sub=function(A,R){this._verify2(A,R);var y=A.sub(R);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},B.prototype.isub=function(A,R){this._verify2(A,R);var y=A.isub(R);return y.cmpn(0)<0&&y.iadd(this.m),y},B.prototype.shl=function(A,R){return this._verify1(A),this.imod(A.ushln(R))},B.prototype.imul=function(A,R){return this._verify2(A,R),this.imod(A.imul(R))},B.prototype.mul=function(A,R){return this._verify2(A,R),this.imod(A.mul(R))},B.prototype.isqr=function(A){return this.imul(A,A.clone())},B.prototype.sqr=function(A){return this.mul(A,A)},B.prototype.sqrt=function(A){if(A.isZero())return A.clone();var R=this.m.andln(3);if(i(R%2===1),R===3){var y=this.m.add(new s(1)).iushrn(2);return this.pow(A,y)}for(var b=this.m.subn(1),D=0;!b.isZero()&&b.andln(1)===0;)D++,b.iushrn(1);i(!b.isZero());var I=new s(1).toRed(this),T=I.redNeg(),C=this.m.subn(1).iushrn(1),x=this.m.bitLength();for(x=new s(2*x*x).toRed(this);this.pow(x,C).cmp(T)!==0;)x.redIAdd(T);for(var w=this.pow(x,b),E=this.pow(A,b.addn(1).iushrn(1)),q=this.pow(A,b),G=D;q.cmp(I)!==0;){for(var z=q,H=0;z.cmp(I)!==0;H++)z=z.redSqr();i(H<G);var V=this.pow(w,new s(1).iushln(G-H-1));E=E.redMul(V),w=V.redSqr(),q=q.redMul(w),G=H}return E},B.prototype.invm=function(A){var R=A._invmp(this.m);return R.negative!==0?(R.negative=0,this.imod(R).redNeg()):this.imod(R)},B.prototype.pow=function(A,R){if(R.isZero())return new s(1).toRed(this);if(R.cmpn(1)===0)return A.clone();var y=4,b=new Array(1<<y);b[0]=new s(1).toRed(this),b[1]=A;for(var D=2;D<b.length;D++)b[D]=this.mul(b[D-1],A);var I=b[0],T=0,C=0,x=R.bitLength()%26;for(x===0&&(x=26),D=R.length-1;D>=0;D--){for(var w=R.words[D],E=x-1;E>=0;E--){var q=w>>E&1;if(I!==b[0]&&(I=this.sqr(I)),q===0&&T===0){C=0;continue}T<<=1,T|=q,C++,!(C!==y&&(D!==0||E!==0))&&(I=this.mul(I,b[T]),C=0,T=0)}x=26}return I},B.prototype.convertTo=function(A){var R=A.umod(this.m);return R===A?R.clone():R},B.prototype.convertFrom=function(A){var R=A.clone();return R.red=null,R},s.mont=function(A){return new j(A)};function j($){B.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}o(j,B),j.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},j.prototype.convertFrom=function(A){var R=this.imod(A.mul(this.rinv));return R.red=null,R},j.prototype.imul=function(A,R){if(A.isZero()||R.isZero())return A.words[0]=0,A.length=1,A;var y=A.imul(R),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=y.isub(b).iushrn(this.shift),I=D;return D.cmp(this.m)>=0?I=D.isub(this.m):D.cmpn(0)<0&&(I=D.iadd(this.m)),I._forceRed(this)},j.prototype.mul=function(A,R){if(A.isZero()||R.isZero())return new s(0)._forceRed(this);var y=A.mul(R),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),D=y.isub(b).iushrn(this.shift),I=D;return D.cmp(this.m)>=0?I=D.isub(this.m):D.cmpn(0)<0&&(I=D.iadd(this.m)),I._forceRed(this)},j.prototype.invm=function(A){var R=this.imod(A._invmp(this.m).mul(this.r2));return R._forceRed(this)}})(r,bn$4)}(bn$5)),bn$5.exports}var brorand={exports:{}},hasRequiredBrorand;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;hasRequiredBrorand=1;var r;brorand.exports=function(o){return r||(r=new n(null)),r.generate(o)};function n(i){this.rand=i}if(brorand.exports.Rand=n,n.prototype.generate=function(o){return this._rand(o)},n.prototype._rand=function(o){if(this.rand.getBytes)return this.rand.getBytes(o);for(var s=new Uint8Array(o),l=0;l<s.length;l++)s[l]=this.rand.getByte();return s},typeof self=="object")self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(o){var s=new Uint8Array(o);return self.crypto.getRandomValues(s),s}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(o){var s=new Uint8Array(o);return self.msCrypto.getRandomValues(s),s}:typeof window=="object"&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=requireCryptoBrowserify();if(typeof a.randomBytes!="function")throw new Error("Not supported");n.prototype._rand=function(o){return a.randomBytes(o)}}catch{}return brorand.exports}var mr,hasRequiredMr;function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var r=requireBn$2(),n=requireBrorand();function a(i){this.rand=i||new n.Rand}return mr=a,a.create=function(o){return new a(o)},a.prototype._randbelow=function(o){var s=o.bitLength(),l=Math.ceil(s/8);do var f=new r(this.rand.generate(l));while(f.cmp(o)>=0);return f},a.prototype._randrange=function(o,s){var l=s.sub(o);return o.add(this._randbelow(l))},a.prototype.test=function(o,s,l){var f=o.bitLength(),d=r.mont(o),u=new r(1).toRed(d);s||(s=Math.max(1,f/48|0));for(var c=o.subn(1),v=0;!c.testn(v);v++);for(var h=o.shrn(v),m=c.toRed(d),g=!0;s>0;s--){var _=this._randrange(new r(2),c);l&&l(_);var S=_.toRed(d).redPow(h);if(!(S.cmp(u)===0||S.cmp(m)===0)){for(var N=1;N<v;N++){if(S=S.redSqr(),S.cmp(u)===0)return!1;if(S.cmp(m)===0)break}if(N===v)return!1}}return g},a.prototype.getDivisor=function(o,s){var l=o.bitLength(),f=r.mont(o),d=new r(1).toRed(f);s||(s=Math.max(1,l/48|0));for(var u=o.subn(1),c=0;!u.testn(c);c++);for(var v=o.shrn(c),h=u.toRed(f);s>0;s--){var m=this._randrange(new r(2),u),g=o.gcd(m);if(g.cmpn(1)!==0)return g;var _=m.toRed(f).redPow(v);if(!(_.cmp(d)===0||_.cmp(h)===0)){for(var S=1;S<c;S++){if(_=_.redSqr(),_.cmp(d)===0)return _.fromRed().subn(1).gcd(o);if(_.cmp(h)===0)break}if(S===c)return _=_.redSqr(),_.fromRed().subn(1).gcd(o)}}return!1},mr}var generatePrime,hasRequiredGeneratePrime;function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var r=requireBrowser$b();generatePrime=S,S.simpleSieve=g,S.fermatTest=_;var n=requireBn$2(),a=new n(24),i=requireMr(),o=new i,s=new n(1),l=new n(2),f=new n(5);new n(16),new n(8);var d=new n(10),u=new n(3);new n(7);var c=new n(11),v=new n(4);new n(12);var h=null;function m(){if(h!==null)return h;var N=1048576,O=[];O[0]=2;for(var M=1,F=3;F<N;F+=2){for(var L=Math.ceil(Math.sqrt(F)),k=0;k<M&&O[k]<=L&&F%O[k]!==0;k++);M!==k&&O[k]<=L||(O[M++]=F)}return h=O,O}function g(N){for(var O=m(),M=0;M<O.length;M++)if(N.modn(O[M])===0)return N.cmpn(O[M])===0;return!0}function _(N){var O=n.mont(N);return l.toRed(O).redPow(N.subn(1)).fromRed().cmpn(1)===0}function S(N,O){if(N<16)return O===2||O===5?new n([140,123]):new n([140,39]);O=new n(O);for(var M,F;;){for(M=new n(r(Math.ceil(N/8)));M.bitLength()>N;)M.ishrn(1);if(M.isEven()&&M.iadd(s),M.testn(1)||M.iadd(l),O.cmp(l)){if(!O.cmp(f))for(;M.mod(d).cmp(u);)M.iadd(v)}else for(;M.mod(a).cmp(c);)M.iadd(v);if(F=M.shrn(1),g(F)&&g(M)&&_(F)&&_(M)&&o.test(F)&&o.test(M))return M}}return generatePrime}const 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"};var require$$1$1={modp1,modp2,modp5,modp14,modp15,modp16,modp17,modp18},dh,hasRequiredDh;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var r=requireBn$2(),n=requireMr(),a=new n,i=new r(24),o=new r(11),s=new r(10),l=new r(3),f=new r(7),d=requireGeneratePrime(),u=requireBrowser$b();dh=g;function c(S,N){return N=N||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,N)),this._pub=new r(S),this}function v(S,N){return N=N||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,N)),this._priv=new r(S),this}var h={};function m(S,N){var O=N.toString("hex"),M=[O,S.toString(16)].join("_");if(M in h)return h[M];var F=0;if(S.isEven()||!d.simpleSieve||!d.fermatTest(S)||!a.test(S))return F+=1,O==="02"||O==="05"?F+=8:F+=4,h[M]=F,F;a.test(S.shrn(1))||(F+=2);var L;switch(O){case"02":S.mod(i).cmp(o)&&(F+=8);break;case"05":L=S.mod(s),L.cmp(l)&&L.cmp(f)&&(F+=8);break;default:F+=4}return h[M]=F,F}function g(S,N,O){this.setGenerator(N),this.__prime=new r(S),this._prime=r.mont(this.__prime),this._primeLen=S.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,O?(this.setPublicKey=c,this.setPrivateKey=v):this._primeCode=8}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=m(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new r(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(S){S=new r(S),S=S.toRed(this._prime);var N=S.redPow(this._priv).fromRed(),O=new Buffer(N.toArray()),M=this.getPrime();if(O.length<M.length){var F=new Buffer(M.length-O.length);F.fill(0),O=Buffer.concat([F,O])}return O},g.prototype.getPublicKey=function(N){return _(this._pub,N)},g.prototype.getPrivateKey=function(N){return _(this._priv,N)},g.prototype.getPrime=function(S){return _(this.__prime,S)},g.prototype.getGenerator=function(S){return _(this._gen,S)},g.prototype.setGenerator=function(S,N){return N=N||"utf8",Buffer.isBuffer(S)||(S=new Buffer(S,N)),this.__gen=S,this._gen=new r(S),this};function _(S,N){var O=new Buffer(S.toArray());return N?O.toString(N):O}return dh}var hasRequiredBrowser$5;function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$5;hasRequiredBrowser$5=1;var r=requireGeneratePrime(),n=require$$1$1,a=requireDh();function i(l){var f=new Buffer(n[l].prime,"hex"),d=new Buffer(n[l].gen,"hex");return new a(f,d)}var o={binary:!0,hex:!0,base64:!0};function s(l,f,d,u){return Buffer.isBuffer(f)||o[f]===void 0?s(l,"binary",f,d):(f=f||"binary",u=u||"binary",d=d||new Buffer([2]),Buffer.isBuffer(d)||(d=new Buffer(d,u)),typeof l=="number"?new a(r(l,d),d,!0):(Buffer.isBuffer(l)||(l=new Buffer(l,f)),new a(l,d,!0)))}return browser$5.DiffieHellmanGroup=browser$5.createDiffieHellmanGroup=browser$5.getDiffieHellman=i,browser$5.createDiffieHellman=browser$5.DiffieHellman=s,browser$5}var readableBrowser={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;hasRequiredProcessNextickArgs=1,typeof process$1>"u"||!process$1.version||process$1.version.indexOf("v0.")===0||process$1.version.indexOf("v1.")===0&&process$1.version.indexOf("v1.8.")!==0?processNextickArgs.exports={nextTick:r}:processNextickArgs.exports=process$1;function r(n,a,i,o){if(typeof n!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,l,f;switch(s){case 0:case 1:return process$1.nextTick(n);case 2:return process$1.nextTick(function(){n.call(null,a)});case 3:return process$1.nextTick(function(){n.call(null,a,i)});case 4:return process$1.nextTick(function(){n.call(null,a,i,o)});default:for(l=new Array(s-1),f=0;f<l.length;)l[f++]=arguments[f];return process$1.nextTick(function(){n.apply(null,l)})}}return processNextickArgs.exports}var isarray,hasRequiredIsarray;function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var r={}.toString;return isarray=Array.isArray||function(n){return r.call(n)=="[object Array]"},isarray}var streamBrowser,hasRequiredStreamBrowser;function requireStreamBrowser(){return hasRequiredStreamBrowser||(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter),streamBrowser}var safeBuffer={exports:{}},hasRequiredSafeBuffer;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(r,n){var a=requireDist(),i=a.Buffer;function o(l,f){for(var d in l)f[d]=l[d]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?r.exports=a:(o(a,n),n.Buffer=s);function s(l,f,d){return i(l,f,d)}o(i,s),s.from=function(l,f,d){if(typeof l=="number")throw new TypeError("Argument must not be a number");return i(l,f,d)},s.alloc=function(l,f,d){if(typeof l!="number")throw new TypeError("Argument must be a number");var u=i(l);return f!==void 0?typeof d=="string"?u.fill(f,d):u.fill(f):u.fill(0),u},s.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i(l)},s.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(l)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1;function r(_){return Array.isArray?Array.isArray(_):g(_)==="[object Array]"}util.isArray=r;function n(_){return typeof _=="boolean"}util.isBoolean=n;function a(_){return _===null}util.isNull=a;function i(_){return _==null}util.isNullOrUndefined=i;function o(_){return typeof _=="number"}util.isNumber=o;function s(_){return typeof _=="string"}util.isString=s;function l(_){return typeof _=="symbol"}util.isSymbol=l;function f(_){return _===void 0}util.isUndefined=f;function d(_){return g(_)==="[object RegExp]"}util.isRegExp=d;function u(_){return typeof _=="object"&&_!==null}util.isObject=u;function c(_){return g(_)==="[object Date]"}util.isDate=c;function v(_){return g(_)==="[object Error]"||_ instanceof Error}util.isError=v;function h(_){return typeof _=="function"}util.isFunction=h;function m(_){return _===null||typeof _=="boolean"||typeof _=="number"||typeof _=="string"||typeof _=="symbol"||typeof _>"u"}util.isPrimitive=m,util.isBuffer=requireDist().Buffer.isBuffer;function g(_){return Object.prototype.toString.call(_)}return util}var BufferList={exports:{}},hasRequiredBufferList;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,function(r){function n(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}var a=requireSafeBuffer().Buffer,i=requireUtil$1();function o(s,l,f){s.copy(l,f)}r.exports=function(){function s(){n(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(f){var d={data:f,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},s.prototype.unshift=function(f){var d={data:f,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},s.prototype.shift=function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(f){if(this.length===0)return"";for(var d=this.head,u=""+d.data;d=d.next;)u+=f+d.data;return u},s.prototype.concat=function(f){if(this.length===0)return a.alloc(0);for(var d=a.allocUnsafe(f>>>0),u=this.head,c=0;u;)o(u.data,d,c),c+=u.data.length,u=u.next;return d},s}(),i&&i.inspect&&i.inspect.custom&&(r.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})}(BufferList)),BufferList.exports}var destroy_1,hasRequiredDestroy;function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var r=requireProcessNextickArgs();function n(o,s){var l=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,o)):r.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(u){!s&&u?l._writableState?l._writableState.errorEmitted||(l._writableState.errorEmitted=!0,r.nextTick(i,l,u)):r.nextTick(i,l,u):s&&s(u)}),this)}function a(){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)}function i(o,s){o.emit("error",s)}return destroy_1={destroy:n,undestroy:a},destroy_1}var _stream_writable,hasRequired_stream_writable;function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var r=requireProcessNextickArgs();_stream_writable=_;function n(I){var T=this;this.next=null,this.entry=null,this.finish=function(){D(T,I)}}var a=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:r.nextTick,i;_.WritableState=m;var o=Object.create(requireUtil());o.inherits=requireInherits_browser();var s={deprecate:requireBrowser$c()},l=requireStreamBrowser(),f=requireSafeBuffer().Buffer,d=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(I){return f.from(I)}function c(I){return f.isBuffer(I)||I instanceof d}var v=requireDestroy();o.inherits(_,l);function h(){}function m(I,T){i=i||require_stream_duplex(),I=I||{};var C=T instanceof i;this.objectMode=!!I.objectMode,C&&(this.objectMode=this.objectMode||!!I.writableObjectMode);var x=I.highWaterMark,w=I.writableHighWaterMark,E=this.objectMode?16:16*1024;x||x===0?this.highWaterMark=x:C&&(w||w===0)?this.highWaterMark=w:this.highWaterMark=E,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=I.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=I.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){P(T,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}m.prototype.getBuffer=function(){for(var T=this.bufferedRequest,C=[];T;)C.push(T),T=T.next;return C},function(){try{Object.defineProperty(m.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var g;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(I){return g.call(this,I)?!0:this!==_?!1:I&&I._writableState instanceof m}})):g=function(I){return I instanceof this};function _(I){if(i=i||require_stream_duplex(),!g.call(_,this)&&!(this instanceof i))return new _(I);this._writableState=new m(I,this),this.writable=!0,I&&(typeof I.write=="function"&&(this._write=I.write),typeof I.writev=="function"&&(this._writev=I.writev),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.final=="function"&&(this._final=I.final)),l.call(this)}_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function S(I,T){var C=new Error("write after end");I.emit("error",C),r.nextTick(T,C)}function N(I,T,C,x){var w=!0,E=!1;return C===null?E=new TypeError("May not write null values to stream"):typeof C!="string"&&C!==void 0&&!T.objectMode&&(E=new TypeError("Invalid non-string/buffer chunk")),E&&(I.emit("error",E),r.nextTick(x,E),w=!1),w}_.prototype.write=function(I,T,C){var x=this._writableState,w=!1,E=!x.objectMode&&c(I);return E&&!f.isBuffer(I)&&(I=u(I)),typeof T=="function"&&(C=T,T=null),E?T="buffer":T||(T=x.defaultEncoding),typeof C!="function"&&(C=h),x.ended?S(this,C):(E||N(this,x,I,C))&&(x.pendingcb++,w=M(this,x,E,I,T,C)),w},_.prototype.cork=function(){var I=this._writableState;I.corked++},_.prototype.uncork=function(){var I=this._writableState;I.corked&&(I.corked--,!I.writing&&!I.corked&&!I.bufferProcessing&&I.bufferedRequest&&j(this,I))},_.prototype.setDefaultEncoding=function(T){if(typeof T=="string"&&(T=T.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((T+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+T);return this._writableState.defaultEncoding=T,this};function O(I,T,C){return!I.objectMode&&I.decodeStrings!==!1&&typeof T=="string"&&(T=f.from(T,C)),T}Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(I,T,C,x,w,E){if(!C){var q=O(T,x,w);x!==q&&(C=!0,w="buffer",x=q)}var G=T.objectMode?1:x.length;T.length+=G;var z=T.length<T.highWaterMark;if(z||(T.needDrain=!0),T.writing||T.corked){var H=T.lastBufferedRequest;T.lastBufferedRequest={chunk:x,encoding:w,isBuf:C,callback:E,next:null},H?H.next=T.lastBufferedRequest:T.bufferedRequest=T.lastBufferedRequest,T.bufferedRequestCount+=1}else F(I,T,!1,G,x,w,E);return z}function F(I,T,C,x,w,E,q){T.writelen=x,T.writecb=q,T.writing=!0,T.sync=!0,C?I._writev(w,T.onwrite):I._write(w,E,T.onwrite),T.sync=!1}function L(I,T,C,x,w){--T.pendingcb,C?(r.nextTick(w,x),r.nextTick(y,I,T),I._writableState.errorEmitted=!0,I.emit("error",x)):(w(x),I._writableState.errorEmitted=!0,I.emit("error",x),y(I,T))}function k(I){I.writing=!1,I.writecb=null,I.length-=I.writelen,I.writelen=0}function P(I,T){var C=I._writableState,x=C.sync,w=C.writecb;if(k(C),T)L(I,C,x,T,w);else{var E=$(C);!E&&!C.corked&&!C.bufferProcessing&&C.bufferedRequest&&j(I,C),x?a(U,I,C,E,w):U(I,C,E,w)}}function U(I,T,C,x){C||B(I,T),T.pendingcb--,x(),y(I,T)}function B(I,T){T.length===0&&T.needDrain&&(T.needDrain=!1,I.emit("drain"))}function j(I,T){T.bufferProcessing=!0;var C=T.bufferedRequest;if(I._writev&&C&&C.next){var x=T.bufferedRequestCount,w=new Array(x),E=T.corkedRequestsFree;E.entry=C;for(var q=0,G=!0;C;)w[q]=C,C.isBuf||(G=!1),C=C.next,q+=1;w.allBuffers=G,F(I,T,!0,T.length,w,"",E.finish),T.pendingcb++,T.lastBufferedRequest=null,E.next?(T.corkedRequestsFree=E.next,E.next=null):T.corkedRequestsFree=new n(T),T.bufferedRequestCount=0}else{for(;C;){var z=C.chunk,H=C.encoding,V=C.callback,K=T.objectMode?1:z.length;if(F(I,T,!1,K,z,H,V),C=C.next,T.bufferedRequestCount--,T.writing)break}C===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=C,T.bufferProcessing=!1}_.prototype._write=function(I,T,C){C(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(I,T,C){var x=this._writableState;typeof I=="function"?(C=I,I=null,T=null):typeof T=="function"&&(C=T,T=null),I!=null&&this.write(I,T),x.corked&&(x.corked=1,this.uncork()),x.ending||b(this,x,C)};function $(I){return I.ending&&I.length===0&&I.bufferedRequest===null&&!I.finished&&!I.writing}function A(I,T){I._final(function(C){T.pendingcb--,C&&I.emit("error",C),T.prefinished=!0,I.emit("prefinish"),y(I,T)})}function R(I,T){!T.prefinished&&!T.finalCalled&&(typeof I._final=="function"?(T.pendingcb++,T.finalCalled=!0,r.nextTick(A,I,T)):(T.prefinished=!0,I.emit("prefinish")))}function y(I,T){var C=$(T);return C&&(R(I,T),T.pendingcb===0&&(T.finished=!0,I.emit("finish"))),C}function b(I,T,C){T.ending=!0,y(I,T),C&&(T.finished?r.nextTick(C):I.once("finish",C)),T.ended=!0,I.writable=!1}function D(I,T,C){var x=I.entry;for(I.entry=null;x;){var w=x.callback;T.pendingcb--,w(C),x=x.next}T.corkedRequestsFree.next=I}return Object.defineProperty(_.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),_.prototype.destroy=v.destroy,_.prototype._undestroy=v.undestroy,_.prototype._destroy=function(I,T){this.end(),T(I)},_stream_writable}var _stream_duplex,hasRequired_stream_duplex;function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var r=requireProcessNextickArgs(),n=Object.keys||function(v){var h=[];for(var m in v)h.push(m);return h};_stream_duplex=d;var a=Object.create(requireUtil());a.inherits=requireInherits_browser();var i=require_stream_readable(),o=require_stream_writable();a.inherits(d,i);for(var s=n(o.prototype),l=0;l<s.length;l++){var f=s[l];d.prototype[f]||(d.prototype[f]=o.prototype[f])}function d(v){if(!(this instanceof d))return new d(v);i.call(this,v),o.call(this,v),v&&v.readable===!1&&(this.readable=!1),v&&v.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,v&&v.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",u)}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function u(){this.allowHalfOpen||this._writableState.ended||r.nextTick(c,this)}function c(v){v.end()}return Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=v,this._writableState.destroyed=v)}}),d.prototype._destroy=function(v,h){this.push(null),this.end(),r.nextTick(h,v)},_stream_duplex}var _stream_readable,hasRequired_stream_readable;function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var r=requireProcessNextickArgs();_stream_readable=O;var n=requireIsarray(),a;O.ReadableState=N,requireEvents().EventEmitter;var i=function(V,K){return V.listeners(K).length},o=requireStreamBrowser(),s=requireSafeBuffer().Buffer,l=(typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(V){return s.from(V)}function d(V){return s.isBuffer(V)||V instanceof l}var u=Object.create(requireUtil());u.inherits=requireInherits_browser();var c=requireUtil$1(),v=void 0;c&&c.debuglog?v=c.debuglog("stream"):v=function(){};var h=requireBufferList(),m=requireDestroy(),g;u.inherits(O,o);var _=["error","close","destroy","pause","resume"];function S(V,K,Z){if(typeof V.prependListener=="function")return V.prependListener(K,Z);!V._events||!V._events[K]?V.on(K,Z):n(V._events[K])?V._events[K].unshift(Z):V._events[K]=[Z,V._events[K]]}function N(V,K){a=a||require_stream_duplex(),V=V||{};var Z=K instanceof a;this.objectMode=!!V.objectMode,Z&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var re=V.highWaterMark,W=V.readableHighWaterMark,X=this.objectMode?16:16*1024;re||re===0?this.highWaterMark=re:Z&&(W||W===0)?this.highWaterMark=W:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(g||(g=requireString_decoder().StringDecoder),this.decoder=new g(V.encoding),this.encoding=V.encoding)}function O(V){if(a=a||require_stream_duplex(),!(this instanceof O))return new O(V);this._readableState=new N(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),o.call(this)}Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){this._readableState&&(this._readableState.destroyed=V)}}),O.prototype.destroy=m.destroy,O.prototype._undestroy=m.undestroy,O.prototype._destroy=function(V,K){this.push(null),K(V)},O.prototype.push=function(V,K){var Z=this._readableState,re;return Z.objectMode?re=!0:typeof V=="string"&&(K=K||Z.defaultEncoding,K!==Z.encoding&&(V=s.from(V,K),K=""),re=!0),M(this,V,K,!1,re)},O.prototype.unshift=function(V){return M(this,V,null,!0,!1)};function M(V,K,Z,re,W){var X=V._readableState;if(K===null)X.reading=!1,j(V,X);else{var J;W||(J=L(X,K)),J?V.emit("error",J):X.objectMode||K&&K.length>0?(typeof K!="string"&&!X.objectMode&&Object.getPrototypeOf(K)!==s.prototype&&(K=f(K)),re?X.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):F(V,X,K,!0):X.ended?V.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Z?(K=X.decoder.write(K),X.objectMode||K.length!==0?F(V,X,K,!1):R(V,X)):F(V,X,K,!1))):re||(X.reading=!1)}return k(X)}function F(V,K,Z,re){K.flowing&&K.length===0&&!K.sync?(V.emit("data",Z),V.read(0)):(K.length+=K.objectMode?1:Z.length,re?K.buffer.unshift(Z):K.buffer.push(Z),K.needReadable&&$(V)),R(V,K)}function L(V,K){var Z;return!d(K)&&typeof K!="string"&&K!==void 0&&!V.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z}function k(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function(V){return g||(g=requireString_decoder().StringDecoder),this._readableState.decoder=new g(V),this._readableState.encoding=V,this};var P=8388608;function U(V){return V>=P?V=P:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function B(V,K){return V<=0||K.length===0&&K.ended?0:K.objectMode?1:V!==V?K.flowing&&K.length?K.buffer.head.data.length:K.length:(V>K.highWaterMark&&(K.highWaterMark=U(V)),V<=K.length?V:K.ended?K.length:(K.needReadable=!0,0))}O.prototype.read=function(V){v("read",V),V=parseInt(V,10);var K=this._readableState,Z=V;if(V!==0&&(K.emittedReadable=!1),V===0&&K.needReadable&&(K.length>=K.highWaterMark||K.ended))return v("read: emitReadable",K.length,K.ended),K.length===0&&K.ended?G(this):$(this),null;if(V=B(V,K),V===0&&K.ended)return K.length===0&&G(this),null;var re=K.needReadable;v("need readable",re),(K.length===0||K.length-V<K.highWaterMark)&&(re=!0,v("length less than watermark",re)),K.ended||K.reading?(re=!1,v("reading or ended",re)):re&&(v("do read"),K.reading=!0,K.sync=!0,K.length===0&&(K.needReadable=!0),this._read(K.highWaterMark),K.sync=!1,K.reading||(V=B(Z,K)));var W;return V>0?W=x(V,K):W=null,W===null?(K.needReadable=!0,V=0):K.length-=V,K.length===0&&(K.ended||(K.needReadable=!0),Z!==V&&K.ended&&G(this)),W!==null&&this.emit("data",W),W};function j(V,K){if(!K.ended){if(K.decoder){var Z=K.decoder.end();Z&&Z.length&&(K.buffer.push(Z),K.length+=K.objectMode?1:Z.length)}K.ended=!0,$(V)}}function $(V){var K=V._readableState;K.needReadable=!1,K.emittedReadable||(v("emitReadable",K.flowing),K.emittedReadable=!0,K.sync?r.nextTick(A,V):A(V))}function A(V){v("emit readable"),V.emit("readable"),C(V)}function R(V,K){K.readingMore||(K.readingMore=!0,r.nextTick(y,V,K))}function y(V,K){for(var Z=K.length;!K.reading&&!K.flowing&&!K.ended&&K.length<K.highWaterMark&&(v("maybeReadMore read 0"),V.read(0),Z!==K.length);)Z=K.length;K.readingMore=!1}O.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},O.prototype.pipe=function(V,K){var Z=this,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=V;break;case 1:re.pipes=[re.pipes,V];break;default:re.pipes.push(V);break}re.pipesCount+=1,v("pipe count=%d opts=%j",re.pipesCount,K);var W=(!K||K.end!==!1)&&V!==process$1.stdout&&V!==process$1.stderr,X=W?ie:ve;re.endEmitted?r.nextTick(X):Z.once("end",X),V.on("unpipe",J);function J(ye,be){v("onunpipe"),ye===Z&&be&&be.hasUnpiped===!1&&(be.hasUnpiped=!0,ue())}function ie(){v("onend"),V.end()}var ne=b(Z);V.on("drain",ne);var ae=!1;function ue(){v("cleanup"),V.removeListener("close",ce),V.removeListener("finish",he),V.removeListener("drain",ne),V.removeListener("error",pe),V.removeListener("unpipe",J),Z.removeListener("end",ie),Z.removeListener("end",ve),Z.removeListener("data",se),ae=!0,re.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ne()}var fe=!1;Z.on("data",se);function se(ye){v("ondata"),fe=!1;var be=V.write(ye);be===!1&&!fe&&((re.pipesCount===1&&re.pipes===V||re.pipesCount>1&&H(re.pipes,V)!==-1)&&!ae&&(v("false write response, pause",re.awaitDrain),re.awaitDrain++,fe=!0),Z.pause())}function pe(ye){v("onerror",ye),ve(),V.removeListener("error",pe),i(V,"error")===0&&V.emit("error",ye)}S(V,"error",pe);function ce(){V.removeListener("finish",he),ve()}V.once("close",ce);function he(){v("onfinish"),V.removeListener("close",ce),ve()}V.once("finish",he);function ve(){v("unpipe"),Z.unpipe(V)}return V.emit("pipe",Z),re.flowing||(v("pipe resume"),Z.resume()),V};function b(V){return function(){var K=V._readableState;v("pipeOnDrain",K.awaitDrain),K.awaitDrain&&K.awaitDrain--,K.awaitDrain===0&&i(V,"data")&&(K.flowing=!0,C(V))}}O.prototype.unpipe=function(V){var K=this._readableState,Z={hasUnpiped:!1};if(K.pipesCount===0)return this;if(K.pipesCount===1)return V&&V!==K.pipes?this:(V||(V=K.pipes),K.pipes=null,K.pipesCount=0,K.flowing=!1,V&&V.emit("unpipe",this,Z),this);if(!V){var re=K.pipes,W=K.pipesCount;K.pipes=null,K.pipesCount=0,K.flowing=!1;for(var X=0;X<W;X++)re[X].emit("unpipe",this,{hasUnpiped:!1});return this}var J=H(K.pipes,V);return J===-1?this:(K.pipes.splice(J,1),K.pipesCount-=1,K.pipesCount===1&&(K.pipes=K.pipes[0]),V.emit("unpipe",this,Z),this)},O.prototype.on=function(V,K){var Z=o.prototype.on.call(this,V,K);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var re=this._readableState;!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.emittedReadable=!1,re.reading?re.length&&$(this):r.nextTick(D,this))}return Z},O.prototype.addListener=O.prototype.on;function D(V){v("readable nexttick read 0"),V.read(0)}O.prototype.resume=function(){var V=this._readableState;return V.flowing||(v("resume"),V.flowing=!0,I(this,V)),this};function I(V,K){K.resumeScheduled||(K.resumeScheduled=!0,r.nextTick(T,V,K))}function T(V,K){K.reading||(v("resume read 0"),V.read(0)),K.resumeScheduled=!1,K.awaitDrain=0,V.emit("resume"),C(V),K.flowing&&!K.reading&&V.read(0)}O.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function C(V){var K=V._readableState;for(v("flow",K.flowing);K.flowing&&V.read()!==null;);}O.prototype.wrap=function(V){var K=this,Z=this._readableState,re=!1;V.on("end",function(){if(v("wrapped end"),Z.decoder&&!Z.ended){var J=Z.decoder.end();J&&J.length&&K.push(J)}K.push(null)}),V.on("data",function(J){if(v("wrapped data"),Z.decoder&&(J=Z.decoder.write(J)),!(Z.objectMode&&J==null)&&!(!Z.objectMode&&(!J||!J.length))){var ie=K.push(J);ie||(re=!0,V.pause())}});for(var W in V)this[W]===void 0&&typeof V[W]=="function"&&(this[W]=function(J){return function(){return V[J].apply(V,arguments)}}(W));for(var X=0;X<_.length;X++)V.on(_[X],this.emit.bind(this,_[X]));return this._read=function(J){v("wrapped _read",J),re&&(re=!1,V.resume())},this},Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),O._fromList=x;function x(V,K){if(K.length===0)return null;var Z;return K.objectMode?Z=K.buffer.shift():!V||V>=K.length?(K.decoder?Z=K.buffer.join(""):K.buffer.length===1?Z=K.buffer.head.data:Z=K.buffer.concat(K.length),K.buffer.clear()):Z=w(V,K.buffer,K.decoder),Z}function w(V,K,Z){var re;return V<K.head.data.length?(re=K.head.data.slice(0,V),K.head.data=K.head.data.slice(V)):V===K.head.data.length?re=K.shift():re=Z?E(V,K):q(V,K),re}function E(V,K){var Z=K.head,re=1,W=Z.data;for(V-=W.length;Z=Z.next;){var X=Z.data,J=V>X.length?X.length:V;if(J===X.length?W+=X:W+=X.slice(0,V),V-=J,V===0){J===X.length?(++re,Z.next?K.head=Z.next:K.head=K.tail=null):(K.head=Z,Z.data=X.slice(J));break}++re}return K.length-=re,W}function q(V,K){var Z=s.allocUnsafe(V),re=K.head,W=1;for(re.data.copy(Z),V-=re.data.length;re=re.next;){var X=re.data,J=V>X.length?X.length:V;if(X.copy(Z,Z.length-V,0,J),V-=J,V===0){J===X.length?(++W,re.next?K.head=re.next:K.head=K.tail=null):(K.head=re,re.data=X.slice(J));break}++W}return K.length-=W,Z}function G(V){var K=V._readableState;if(K.length>0)throw new Error('"endReadable()" called on non-empty stream');K.endEmitted||(K.ended=!0,r.nextTick(z,K,V))}function z(V,K){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,K.readable=!1,K.emit("end"))}function H(V,K){for(var Z=0,re=V.length;Z<re;Z++)if(V[Z]===K)return Z;return-1}return _stream_readable}var _stream_transform,hasRequired_stream_transform;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=i;var r=require_stream_duplex(),n=Object.create(requireUtil());n.inherits=requireInherits_browser(),n.inherits(i,r);function a(l,f){var d=this._transformState;d.transforming=!1;var u=d.writecb;if(!u)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,f!=null&&this.push(f),u(l);var c=this._readableState;c.reading=!1,(c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}function i(l){if(!(this instanceof i))return new i(l);r.call(this,l),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",o)}function o(){var l=this;typeof this._flush=="function"?this._flush(function(f,d){s(l,f,d)}):s(this,null,null)}i.prototype.push=function(l,f){return this._transformState.needTransform=!1,r.prototype.push.call(this,l,f)},i.prototype._transform=function(l,f,d){throw new Error("_transform() is not implemented")},i.prototype._write=function(l,f,d){var u=this._transformState;if(u.writecb=d,u.writechunk=l,u.writeencoding=f,!u.transforming){var c=this._readableState;(u.needTransform||c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}},i.prototype._read=function(l){var f=this._transformState;f.writechunk!==null&&f.writecb&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},i.prototype._destroy=function(l,f){var d=this;r.prototype._destroy.call(this,l,function(u){f(u),d.emit("close")})};function s(l,f,d){if(f)return l.emit("error",f);if(d!=null&&l.push(d),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}return _stream_transform}var _stream_passthrough,hasRequired_stream_passthrough;function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=a;var r=require_stream_transform(),n=Object.create(requireUtil());n.inherits=requireInherits_browser(),n.inherits(a,r);function a(i){if(!(this instanceof a))return new a(i);r.call(this,i)}return a.prototype._transform=function(i,o,s){s(null,i)},_stream_passthrough}var hasRequiredReadableBrowser;function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,function(r,n){n=r.exports=require_stream_readable(),n.Stream=n,n.Readable=n,n.Writable=require_stream_writable(),n.Duplex=require_stream_duplex(),n.Transform=require_stream_transform(),n.PassThrough=require_stream_passthrough()}(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var sign={exports:{}},bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,function(r){(function(n,a){function i(R,y){if(!R)throw new Error(y||"Assertion failed")}function o(R,y){R.super_=y;var b=function(){};b.prototype=y.prototype,R.prototype=new b,R.prototype.constructor=R}function s(R,y,b){if(s.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((y==="le"||y==="be")&&(b=y,y=10),this._init(R||0,y||10,b||"be"))}typeof n=="object"?n.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,b){return y.cmp(b)>0?y:b},s.min=function(y,b){return y.cmp(b)<0?y:b},s.prototype._init=function(y,b,D){if(typeof y=="number")return this._initNumber(y,b,D);if(typeof y=="object")return this._initArray(y,b,D);b==="hex"&&(b=16),i(b===(b|0)&&b>=2&&b<=36),y=y.toString().replace(/\s+/g,"");var I=0;y[0]==="-"&&(I++,this.negative=1),I<y.length&&(b===16?this._parseHex(y,I,D):(this._parseBase(y,b,I),D==="le"&&this._initArray(this.toArray(),b,D)))},s.prototype._initNumber=function(y,b,D){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(i(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),D==="le"&&this._initArray(this.toArray(),b,D)},s.prototype._initArray=function(y,b,D){if(i(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T,C,x=0;if(D==="be")for(I=y.length-1,T=0;I>=0;I-=3)C=y[I]|y[I-1]<<8|y[I-2]<<16,this.words[T]|=C<<x&67108863,this.words[T+1]=C>>>26-x&67108863,x+=24,x>=26&&(x-=26,T++);else if(D==="le")for(I=0,T=0;I<y.length;I+=3)C=y[I]|y[I+1]<<8|y[I+2]<<16,this.words[T]|=C<<x&67108863,this.words[T+1]=C>>>26-x&67108863,x+=24,x>=26&&(x-=26,T++);return this._strip()};function f(R,y){var b=R.charCodeAt(y);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;i(!1,"Invalid character in "+R)}function d(R,y,b){var D=f(R,b);return b-1>=y&&(D|=f(R,b-1)<<4),D}s.prototype._parseHex=function(y,b,D){this.length=Math.ceil((y.length-b)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T=0,C=0,x;if(D==="be")for(I=y.length-1;I>=b;I-=2)x=d(y,b,I)<<T,this.words[C]|=x&67108863,T>=18?(T-=18,C+=1,this.words[C]|=x>>>26):T+=8;else{var w=y.length-b;for(I=w%2===0?b+1:b;I<y.length;I+=2)x=d(y,b,I)<<T,this.words[C]|=x&67108863,T>=18?(T-=18,C+=1,this.words[C]|=x>>>26):T+=8}this._strip()};function u(R,y,b,D){for(var I=0,T=0,C=Math.min(R.length,b),x=y;x<C;x++){var w=R.charCodeAt(x)-48;I*=D,w>=49?T=w-49+10:w>=17?T=w-17+10:T=w,i(w>=0&&T<D,"Invalid character"),I+=T}return I}s.prototype._parseBase=function(y,b,D){this.words=[0],this.length=1;for(var I=0,T=1;T<=67108863;T*=b)I++;I--,T=T/b|0;for(var C=y.length-D,x=C%I,w=Math.min(C,C-x)+D,E=0,q=D;q<w;q+=I)E=u(y,q,q+I,b),this.imuln(T),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(x!==0){var G=1;for(E=u(y,q,y.length,b),q=0;q<x;q++)G*=b;this.imuln(G),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},s.prototype.copy=function(y){y.words=new Array(this.length);for(var b=0;b<this.length;b++)y.words[b]=this.words[b];y.length=this.length,y.negative=this.negative,y.red=this.red};function c(R,y){R.words=y.words,R.length=y.length,R.negative=y.negative,R.red=y.red}if(s.prototype._move=function(y){c(y,this)},s.prototype.clone=function(){var y=new s(null);return this.copy(y),y},s.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{s.prototype.inspect=v}else s.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],m=[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],g=[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];s.prototype.toString=function(y,b){y=y||10,b=b|0||1;var D;if(y===16||y==="hex"){D="";for(var I=0,T=0,C=0;C<this.length;C++){var x=this.words[C],w=((x<<I|T)&16777215).toString(16);T=x>>>24-I&16777215,I+=2,I>=26&&(I-=26,C--),T!==0||C!==this.length-1?D=h[6-w.length]+w+D:D=w+D}for(T!==0&&(D=T.toString(16)+D);D.length%b!==0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}if(y===(y|0)&&y>=2&&y<=36){var E=m[y],q=g[y];D="";var G=this.clone();for(G.negative=0;!G.isZero();){var z=G.modrn(q).toString(y);G=G.idivn(q),G.isZero()?D=z+D:D=h[E-z.length]+z+D}for(this.isZero()&&(D="0"+D);D.length%b!==0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},l&&(s.prototype.toBuffer=function(y,b){return this.toArrayLike(l,y,b)}),s.prototype.toArray=function(y,b){return this.toArrayLike(Array,y,b)};var _=function(y,b){return y.allocUnsafe?y.allocUnsafe(b):new y(b)};s.prototype.toArrayLike=function(y,b,D){this._strip();var I=this.byteLength(),T=D||Math.max(1,I);i(I<=T,"byte array longer than desired length"),i(T>0,"Requested array length <= 0");var C=_(y,T),x=b==="le"?"LE":"BE";return this["_toArrayLike"+x](C,I),C},s.prototype._toArrayLikeLE=function(y,b){for(var D=0,I=0,T=0,C=0;T<this.length;T++){var x=this.words[T]<<C|I;y[D++]=x&255,D<y.length&&(y[D++]=x>>8&255),D<y.length&&(y[D++]=x>>16&255),C===6?(D<y.length&&(y[D++]=x>>24&255),I=0,C=0):(I=x>>>24,C+=2)}if(D<y.length)for(y[D++]=I;D<y.length;)y[D++]=0},s.prototype._toArrayLikeBE=function(y,b){for(var D=y.length-1,I=0,T=0,C=0;T<this.length;T++){var x=this.words[T]<<C|I;y[D--]=x&255,D>=0&&(y[D--]=x>>8&255),D>=0&&(y[D--]=x>>16&255),C===6?(D>=0&&(y[D--]=x>>24&255),I=0,C=0):(I=x>>>24,C+=2)}if(D>=0)for(y[D--]=I;D>=0;)y[D--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var b=y,D=0;return b>=4096&&(D+=13,b>>>=13),b>=64&&(D+=7,b>>>=7),b>=8&&(D+=4,b>>>=4),b>=2&&(D+=2,b>>>=2),D+b},s.prototype._zeroBits=function(y){if(y===0)return 26;var b=y,D=0;return(b&8191)===0&&(D+=13,b>>>=13),(b&127)===0&&(D+=7,b>>>=7),(b&15)===0&&(D+=4,b>>>=4),(b&3)===0&&(D+=2,b>>>=2),(b&1)===0&&D++,D},s.prototype.bitLength=function(){var y=this.words[this.length-1],b=this._countBits(y);return(this.length-1)*26+b};function S(R){for(var y=new Array(R.bitLength()),b=0;b<y.length;b++){var D=b/26|0,I=b%26;y[b]=R.words[D]>>>I&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,b=0;b<this.length;b++){var D=this._zeroBits(this.words[b]);if(y+=D,D!==26)break}return y},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},s.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var b=0;b<y.length;b++)this.words[b]=this.words[b]|y.words[b];return this._strip()},s.prototype.ior=function(y){return i((this.negative|y.negative)===0),this.iuor(y)},s.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var b;this.length>y.length?b=y:b=this;for(var D=0;D<b.length;D++)this.words[D]=this.words[D]&y.words[D];return this.length=b.length,this._strip()},s.prototype.iand=function(y){return i((this.negative|y.negative)===0),this.iuand(y)},s.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var b,D;this.length>y.length?(b=this,D=y):(b=y,D=this);for(var I=0;I<D.length;I++)this.words[I]=b.words[I]^D.words[I];if(this!==b)for(;I<b.length;I++)this.words[I]=b.words[I];return this.length=b.length,this._strip()},s.prototype.ixor=function(y){return i((this.negative|y.negative)===0),this.iuxor(y)},s.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){i(typeof y=="number"&&y>=0);var b=Math.ceil(y/26)|0,D=y%26;this._expand(b),D>0&&b--;for(var I=0;I<b;I++)this.words[I]=~this.words[I]&67108863;return D>0&&(this.words[I]=~this.words[I]&67108863>>26-D),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,b){i(typeof y=="number"&&y>=0);var D=y/26|0,I=y%26;return this._expand(D+1),b?this.words[D]=this.words[D]|1<<I:this.words[D]=this.words[D]&~(1<<I),this._strip()},s.prototype.iadd=function(y){var b;if(this.negative!==0&&y.negative===0)return this.negative=0,b=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,b=this.isub(y),y.negative=1,b._normSign();var D,I;this.length>y.length?(D=this,I=y):(D=y,I=this);for(var T=0,C=0;C<I.length;C++)b=(D.words[C]|0)+(I.words[C]|0)+T,this.words[C]=b&67108863,T=b>>>26;for(;T!==0&&C<D.length;C++)b=(D.words[C]|0)+T,this.words[C]=b&67108863,T=b>>>26;if(this.length=D.length,T!==0)this.words[this.length]=T,this.length++;else if(D!==this)for(;C<D.length;C++)this.words[C]=D.words[C];return this},s.prototype.add=function(y){var b;return y.negative!==0&&this.negative===0?(y.negative=0,b=this.sub(y),y.negative^=1,b):y.negative===0&&this.negative!==0?(this.negative=0,b=y.sub(this),this.negative=1,b):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var b=this.iadd(y);return y.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var D=this.cmp(y);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,T;D>0?(I=this,T=y):(I=y,T=this);for(var C=0,x=0;x<T.length;x++)b=(I.words[x]|0)-(T.words[x]|0)+C,C=b>>26,this.words[x]=b&67108863;for(;C!==0&&x<I.length;x++)b=(I.words[x]|0)+C,C=b>>26,this.words[x]=b&67108863;if(C===0&&x<I.length&&I!==this)for(;x<I.length;x++)this.words[x]=I.words[x];return this.length=Math.max(this.length,x),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(y){return this.clone().isub(y)};function N(R,y,b){b.negative=y.negative^R.negative;var D=R.length+y.length|0;b.length=D,D=D-1|0;var I=R.words[0]|0,T=y.words[0]|0,C=I*T,x=C&67108863,w=C/67108864|0;b.words[0]=x;for(var E=1;E<D;E++){for(var q=w>>>26,G=w&67108863,z=Math.min(E,y.length-1),H=Math.max(0,E-R.length+1);H<=z;H++){var V=E-H|0;I=R.words[V]|0,T=y.words[H]|0,C=I*T+G,q+=C/67108864|0,G=C&67108863}b.words[E]=G|0,w=q|0}return w!==0?b.words[E]=w|0:b.length--,b._strip()}var O=function(y,b,D){var I=y.words,T=b.words,C=D.words,x=0,w,E,q,G=I[0]|0,z=G&8191,H=G>>>13,V=I[1]|0,K=V&8191,Z=V>>>13,re=I[2]|0,W=re&8191,X=re>>>13,J=I[3]|0,ie=J&8191,ne=J>>>13,ae=I[4]|0,ue=ae&8191,fe=ae>>>13,se=I[5]|0,pe=se&8191,ce=se>>>13,he=I[6]|0,ve=he&8191,ye=he>>>13,be=I[7]|0,_e=be&8191,me=be>>>13,Pe=I[8]|0,Ne=Pe&8191,Ee=Pe>>>13,Be=I[9]|0,Ce=Be&8191,Re=Be>>>13,Ge=T[0]|0,Me=Ge&8191,Te=Ge>>>13,Ke=T[1]|0,Fe=Ke&8191,Ie=Ke>>>13,Qe=T[2]|0,qe=Qe&8191,Se=Qe>>>13,je=T[3]|0,Le=je&8191,we=je>>>13,He=T[4]|0,$e=He&8191,ee=He>>>13,Q=T[5]|0,Y=Q&8191,te=Q>>>13,oe=T[6]|0,le=oe&8191,de=oe>>>13,De=T[7]|0,Ae=De&8191,ge=De>>>13,ke=T[8]|0,xe=ke&8191,Oe=ke>>>13,ze=T[9]|0,Ue=ze&8191,Ve=ze>>>13;D.negative=y.negative^b.negative,D.length=19,w=Math.imul(z,Me),E=Math.imul(z,Te),E=E+Math.imul(H,Me)|0,q=Math.imul(H,Te);var Ye=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,w=Math.imul(K,Me),E=Math.imul(K,Te),E=E+Math.imul(Z,Me)|0,q=Math.imul(Z,Te),w=w+Math.imul(z,Fe)|0,E=E+Math.imul(z,Ie)|0,E=E+Math.imul(H,Fe)|0,q=q+Math.imul(H,Ie)|0;var We=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(We>>>26)|0,We&=67108863,w=Math.imul(W,Me),E=Math.imul(W,Te),E=E+Math.imul(X,Me)|0,q=Math.imul(X,Te),w=w+Math.imul(K,Fe)|0,E=E+Math.imul(K,Ie)|0,E=E+Math.imul(Z,Fe)|0,q=q+Math.imul(Z,Ie)|0,w=w+Math.imul(z,qe)|0,E=E+Math.imul(z,Se)|0,E=E+Math.imul(H,qe)|0,q=q+Math.imul(H,Se)|0;var Xe=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,w=Math.imul(ie,Me),E=Math.imul(ie,Te),E=E+Math.imul(ne,Me)|0,q=Math.imul(ne,Te),w=w+Math.imul(W,Fe)|0,E=E+Math.imul(W,Ie)|0,E=E+Math.imul(X,Fe)|0,q=q+Math.imul(X,Ie)|0,w=w+Math.imul(K,qe)|0,E=E+Math.imul(K,Se)|0,E=E+Math.imul(Z,qe)|0,q=q+Math.imul(Z,Se)|0,w=w+Math.imul(z,Le)|0,E=E+Math.imul(z,we)|0,E=E+Math.imul(H,Le)|0,q=q+Math.imul(H,we)|0;var Je=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Je>>>26)|0,Je&=67108863,w=Math.imul(ue,Me),E=Math.imul(ue,Te),E=E+Math.imul(fe,Me)|0,q=Math.imul(fe,Te),w=w+Math.imul(ie,Fe)|0,E=E+Math.imul(ie,Ie)|0,E=E+Math.imul(ne,Fe)|0,q=q+Math.imul(ne,Ie)|0,w=w+Math.imul(W,qe)|0,E=E+Math.imul(W,Se)|0,E=E+Math.imul(X,qe)|0,q=q+Math.imul(X,Se)|0,w=w+Math.imul(K,Le)|0,E=E+Math.imul(K,we)|0,E=E+Math.imul(Z,Le)|0,q=q+Math.imul(Z,we)|0,w=w+Math.imul(z,$e)|0,E=E+Math.imul(z,ee)|0,E=E+Math.imul(H,$e)|0,q=q+Math.imul(H,ee)|0;var Ze=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,w=Math.imul(pe,Me),E=Math.imul(pe,Te),E=E+Math.imul(ce,Me)|0,q=Math.imul(ce,Te),w=w+Math.imul(ue,Fe)|0,E=E+Math.imul(ue,Ie)|0,E=E+Math.imul(fe,Fe)|0,q=q+Math.imul(fe,Ie)|0,w=w+Math.imul(ie,qe)|0,E=E+Math.imul(ie,Se)|0,E=E+Math.imul(ne,qe)|0,q=q+Math.imul(ne,Se)|0,w=w+Math.imul(W,Le)|0,E=E+Math.imul(W,we)|0,E=E+Math.imul(X,Le)|0,q=q+Math.imul(X,we)|0,w=w+Math.imul(K,$e)|0,E=E+Math.imul(K,ee)|0,E=E+Math.imul(Z,$e)|0,q=q+Math.imul(Z,ee)|0,w=w+Math.imul(z,Y)|0,E=E+Math.imul(z,te)|0,E=E+Math.imul(H,Y)|0,q=q+Math.imul(H,te)|0;var er=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(er>>>26)|0,er&=67108863,w=Math.imul(ve,Me),E=Math.imul(ve,Te),E=E+Math.imul(ye,Me)|0,q=Math.imul(ye,Te),w=w+Math.imul(pe,Fe)|0,E=E+Math.imul(pe,Ie)|0,E=E+Math.imul(ce,Fe)|0,q=q+Math.imul(ce,Ie)|0,w=w+Math.imul(ue,qe)|0,E=E+Math.imul(ue,Se)|0,E=E+Math.imul(fe,qe)|0,q=q+Math.imul(fe,Se)|0,w=w+Math.imul(ie,Le)|0,E=E+Math.imul(ie,we)|0,E=E+Math.imul(ne,Le)|0,q=q+Math.imul(ne,we)|0,w=w+Math.imul(W,$e)|0,E=E+Math.imul(W,ee)|0,E=E+Math.imul(X,$e)|0,q=q+Math.imul(X,ee)|0,w=w+Math.imul(K,Y)|0,E=E+Math.imul(K,te)|0,E=E+Math.imul(Z,Y)|0,q=q+Math.imul(Z,te)|0,w=w+Math.imul(z,le)|0,E=E+Math.imul(z,de)|0,E=E+Math.imul(H,le)|0,q=q+Math.imul(H,de)|0;var rr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(rr>>>26)|0,rr&=67108863,w=Math.imul(_e,Me),E=Math.imul(_e,Te),E=E+Math.imul(me,Me)|0,q=Math.imul(me,Te),w=w+Math.imul(ve,Fe)|0,E=E+Math.imul(ve,Ie)|0,E=E+Math.imul(ye,Fe)|0,q=q+Math.imul(ye,Ie)|0,w=w+Math.imul(pe,qe)|0,E=E+Math.imul(pe,Se)|0,E=E+Math.imul(ce,qe)|0,q=q+Math.imul(ce,Se)|0,w=w+Math.imul(ue,Le)|0,E=E+Math.imul(ue,we)|0,E=E+Math.imul(fe,Le)|0,q=q+Math.imul(fe,we)|0,w=w+Math.imul(ie,$e)|0,E=E+Math.imul(ie,ee)|0,E=E+Math.imul(ne,$e)|0,q=q+Math.imul(ne,ee)|0,w=w+Math.imul(W,Y)|0,E=E+Math.imul(W,te)|0,E=E+Math.imul(X,Y)|0,q=q+Math.imul(X,te)|0,w=w+Math.imul(K,le)|0,E=E+Math.imul(K,de)|0,E=E+Math.imul(Z,le)|0,q=q+Math.imul(Z,de)|0,w=w+Math.imul(z,Ae)|0,E=E+Math.imul(z,ge)|0,E=E+Math.imul(H,Ae)|0,q=q+Math.imul(H,ge)|0;var tr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(tr>>>26)|0,tr&=67108863,w=Math.imul(Ne,Me),E=Math.imul(Ne,Te),E=E+Math.imul(Ee,Me)|0,q=Math.imul(Ee,Te),w=w+Math.imul(_e,Fe)|0,E=E+Math.imul(_e,Ie)|0,E=E+Math.imul(me,Fe)|0,q=q+Math.imul(me,Ie)|0,w=w+Math.imul(ve,qe)|0,E=E+Math.imul(ve,Se)|0,E=E+Math.imul(ye,qe)|0,q=q+Math.imul(ye,Se)|0,w=w+Math.imul(pe,Le)|0,E=E+Math.imul(pe,we)|0,E=E+Math.imul(ce,Le)|0,q=q+Math.imul(ce,we)|0,w=w+Math.imul(ue,$e)|0,E=E+Math.imul(ue,ee)|0,E=E+Math.imul(fe,$e)|0,q=q+Math.imul(fe,ee)|0,w=w+Math.imul(ie,Y)|0,E=E+Math.imul(ie,te)|0,E=E+Math.imul(ne,Y)|0,q=q+Math.imul(ne,te)|0,w=w+Math.imul(W,le)|0,E=E+Math.imul(W,de)|0,E=E+Math.imul(X,le)|0,q=q+Math.imul(X,de)|0,w=w+Math.imul(K,Ae)|0,E=E+Math.imul(K,ge)|0,E=E+Math.imul(Z,Ae)|0,q=q+Math.imul(Z,ge)|0,w=w+Math.imul(z,xe)|0,E=E+Math.imul(z,Oe)|0,E=E+Math.imul(H,xe)|0,q=q+Math.imul(H,Oe)|0;var nr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(nr>>>26)|0,nr&=67108863,w=Math.imul(Ce,Me),E=Math.imul(Ce,Te),E=E+Math.imul(Re,Me)|0,q=Math.imul(Re,Te),w=w+Math.imul(Ne,Fe)|0,E=E+Math.imul(Ne,Ie)|0,E=E+Math.imul(Ee,Fe)|0,q=q+Math.imul(Ee,Ie)|0,w=w+Math.imul(_e,qe)|0,E=E+Math.imul(_e,Se)|0,E=E+Math.imul(me,qe)|0,q=q+Math.imul(me,Se)|0,w=w+Math.imul(ve,Le)|0,E=E+Math.imul(ve,we)|0,E=E+Math.imul(ye,Le)|0,q=q+Math.imul(ye,we)|0,w=w+Math.imul(pe,$e)|0,E=E+Math.imul(pe,ee)|0,E=E+Math.imul(ce,$e)|0,q=q+Math.imul(ce,ee)|0,w=w+Math.imul(ue,Y)|0,E=E+Math.imul(ue,te)|0,E=E+Math.imul(fe,Y)|0,q=q+Math.imul(fe,te)|0,w=w+Math.imul(ie,le)|0,E=E+Math.imul(ie,de)|0,E=E+Math.imul(ne,le)|0,q=q+Math.imul(ne,de)|0,w=w+Math.imul(W,Ae)|0,E=E+Math.imul(W,ge)|0,E=E+Math.imul(X,Ae)|0,q=q+Math.imul(X,ge)|0,w=w+Math.imul(K,xe)|0,E=E+Math.imul(K,Oe)|0,E=E+Math.imul(Z,xe)|0,q=q+Math.imul(Z,Oe)|0,w=w+Math.imul(z,Ue)|0,E=E+Math.imul(z,Ve)|0,E=E+Math.imul(H,Ue)|0,q=q+Math.imul(H,Ve)|0;var ir=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ir>>>26)|0,ir&=67108863,w=Math.imul(Ce,Fe),E=Math.imul(Ce,Ie),E=E+Math.imul(Re,Fe)|0,q=Math.imul(Re,Ie),w=w+Math.imul(Ne,qe)|0,E=E+Math.imul(Ne,Se)|0,E=E+Math.imul(Ee,qe)|0,q=q+Math.imul(Ee,Se)|0,w=w+Math.imul(_e,Le)|0,E=E+Math.imul(_e,we)|0,E=E+Math.imul(me,Le)|0,q=q+Math.imul(me,we)|0,w=w+Math.imul(ve,$e)|0,E=E+Math.imul(ve,ee)|0,E=E+Math.imul(ye,$e)|0,q=q+Math.imul(ye,ee)|0,w=w+Math.imul(pe,Y)|0,E=E+Math.imul(pe,te)|0,E=E+Math.imul(ce,Y)|0,q=q+Math.imul(ce,te)|0,w=w+Math.imul(ue,le)|0,E=E+Math.imul(ue,de)|0,E=E+Math.imul(fe,le)|0,q=q+Math.imul(fe,de)|0,w=w+Math.imul(ie,Ae)|0,E=E+Math.imul(ie,ge)|0,E=E+Math.imul(ne,Ae)|0,q=q+Math.imul(ne,ge)|0,w=w+Math.imul(W,xe)|0,E=E+Math.imul(W,Oe)|0,E=E+Math.imul(X,xe)|0,q=q+Math.imul(X,Oe)|0,w=w+Math.imul(K,Ue)|0,E=E+Math.imul(K,Ve)|0,E=E+Math.imul(Z,Ue)|0,q=q+Math.imul(Z,Ve)|0;var ar=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ar>>>26)|0,ar&=67108863,w=Math.imul(Ce,qe),E=Math.imul(Ce,Se),E=E+Math.imul(Re,qe)|0,q=Math.imul(Re,Se),w=w+Math.imul(Ne,Le)|0,E=E+Math.imul(Ne,we)|0,E=E+Math.imul(Ee,Le)|0,q=q+Math.imul(Ee,we)|0,w=w+Math.imul(_e,$e)|0,E=E+Math.imul(_e,ee)|0,E=E+Math.imul(me,$e)|0,q=q+Math.imul(me,ee)|0,w=w+Math.imul(ve,Y)|0,E=E+Math.imul(ve,te)|0,E=E+Math.imul(ye,Y)|0,q=q+Math.imul(ye,te)|0,w=w+Math.imul(pe,le)|0,E=E+Math.imul(pe,de)|0,E=E+Math.imul(ce,le)|0,q=q+Math.imul(ce,de)|0,w=w+Math.imul(ue,Ae)|0,E=E+Math.imul(ue,ge)|0,E=E+Math.imul(fe,Ae)|0,q=q+Math.imul(fe,ge)|0,w=w+Math.imul(ie,xe)|0,E=E+Math.imul(ie,Oe)|0,E=E+Math.imul(ne,xe)|0,q=q+Math.imul(ne,Oe)|0,w=w+Math.imul(W,Ue)|0,E=E+Math.imul(W,Ve)|0,E=E+Math.imul(X,Ue)|0,q=q+Math.imul(X,Ve)|0;var sr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(sr>>>26)|0,sr&=67108863,w=Math.imul(Ce,Le),E=Math.imul(Ce,we),E=E+Math.imul(Re,Le)|0,q=Math.imul(Re,we),w=w+Math.imul(Ne,$e)|0,E=E+Math.imul(Ne,ee)|0,E=E+Math.imul(Ee,$e)|0,q=q+Math.imul(Ee,ee)|0,w=w+Math.imul(_e,Y)|0,E=E+Math.imul(_e,te)|0,E=E+Math.imul(me,Y)|0,q=q+Math.imul(me,te)|0,w=w+Math.imul(ve,le)|0,E=E+Math.imul(ve,de)|0,E=E+Math.imul(ye,le)|0,q=q+Math.imul(ye,de)|0,w=w+Math.imul(pe,Ae)|0,E=E+Math.imul(pe,ge)|0,E=E+Math.imul(ce,Ae)|0,q=q+Math.imul(ce,ge)|0,w=w+Math.imul(ue,xe)|0,E=E+Math.imul(ue,Oe)|0,E=E+Math.imul(fe,xe)|0,q=q+Math.imul(fe,Oe)|0,w=w+Math.imul(ie,Ue)|0,E=E+Math.imul(ie,Ve)|0,E=E+Math.imul(ne,Ue)|0,q=q+Math.imul(ne,Ve)|0;var or=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(or>>>26)|0,or&=67108863,w=Math.imul(Ce,$e),E=Math.imul(Ce,ee),E=E+Math.imul(Re,$e)|0,q=Math.imul(Re,ee),w=w+Math.imul(Ne,Y)|0,E=E+Math.imul(Ne,te)|0,E=E+Math.imul(Ee,Y)|0,q=q+Math.imul(Ee,te)|0,w=w+Math.imul(_e,le)|0,E=E+Math.imul(_e,de)|0,E=E+Math.imul(me,le)|0,q=q+Math.imul(me,de)|0,w=w+Math.imul(ve,Ae)|0,E=E+Math.imul(ve,ge)|0,E=E+Math.imul(ye,Ae)|0,q=q+Math.imul(ye,ge)|0,w=w+Math.imul(pe,xe)|0,E=E+Math.imul(pe,Oe)|0,E=E+Math.imul(ce,xe)|0,q=q+Math.imul(ce,Oe)|0,w=w+Math.imul(ue,Ue)|0,E=E+Math.imul(ue,Ve)|0,E=E+Math.imul(fe,Ue)|0,q=q+Math.imul(fe,Ve)|0;var ur=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ur>>>26)|0,ur&=67108863,w=Math.imul(Ce,Y),E=Math.imul(Ce,te),E=E+Math.imul(Re,Y)|0,q=Math.imul(Re,te),w=w+Math.imul(Ne,le)|0,E=E+Math.imul(Ne,de)|0,E=E+Math.imul(Ee,le)|0,q=q+Math.imul(Ee,de)|0,w=w+Math.imul(_e,Ae)|0,E=E+Math.imul(_e,ge)|0,E=E+Math.imul(me,Ae)|0,q=q+Math.imul(me,ge)|0,w=w+Math.imul(ve,xe)|0,E=E+Math.imul(ve,Oe)|0,E=E+Math.imul(ye,xe)|0,q=q+Math.imul(ye,Oe)|0,w=w+Math.imul(pe,Ue)|0,E=E+Math.imul(pe,Ve)|0,E=E+Math.imul(ce,Ue)|0,q=q+Math.imul(ce,Ve)|0;var lr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(lr>>>26)|0,lr&=67108863,w=Math.imul(Ce,le),E=Math.imul(Ce,de),E=E+Math.imul(Re,le)|0,q=Math.imul(Re,de),w=w+Math.imul(Ne,Ae)|0,E=E+Math.imul(Ne,ge)|0,E=E+Math.imul(Ee,Ae)|0,q=q+Math.imul(Ee,ge)|0,w=w+Math.imul(_e,xe)|0,E=E+Math.imul(_e,Oe)|0,E=E+Math.imul(me,xe)|0,q=q+Math.imul(me,Oe)|0,w=w+Math.imul(ve,Ue)|0,E=E+Math.imul(ve,Ve)|0,E=E+Math.imul(ye,Ue)|0,q=q+Math.imul(ye,Ve)|0;var cr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(cr>>>26)|0,cr&=67108863,w=Math.imul(Ce,Ae),E=Math.imul(Ce,ge),E=E+Math.imul(Re,Ae)|0,q=Math.imul(Re,ge),w=w+Math.imul(Ne,xe)|0,E=E+Math.imul(Ne,Oe)|0,E=E+Math.imul(Ee,xe)|0,q=q+Math.imul(Ee,Oe)|0,w=w+Math.imul(_e,Ue)|0,E=E+Math.imul(_e,Ve)|0,E=E+Math.imul(me,Ue)|0,q=q+Math.imul(me,Ve)|0;var fr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(fr>>>26)|0,fr&=67108863,w=Math.imul(Ce,xe),E=Math.imul(Ce,Oe),E=E+Math.imul(Re,xe)|0,q=Math.imul(Re,Oe),w=w+Math.imul(Ne,Ue)|0,E=E+Math.imul(Ne,Ve)|0,E=E+Math.imul(Ee,Ue)|0,q=q+Math.imul(Ee,Ve)|0;var dr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(dr>>>26)|0,dr&=67108863,w=Math.imul(Ce,Ue),E=Math.imul(Ce,Ve),E=E+Math.imul(Re,Ue)|0,q=Math.imul(Re,Ve);var hr=(x+w|0)+((E&8191)<<13)|0;return x=(q+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,C[0]=Ye,C[1]=We,C[2]=Xe,C[3]=Je,C[4]=Ze,C[5]=er,C[6]=rr,C[7]=tr,C[8]=nr,C[9]=ir,C[10]=ar,C[11]=sr,C[12]=or,C[13]=ur,C[14]=lr,C[15]=cr,C[16]=fr,C[17]=dr,C[18]=hr,x!==0&&(C[19]=x,D.length++),D};Math.imul||(O=N);function M(R,y,b){b.negative=y.negative^R.negative,b.length=R.length+y.length;for(var D=0,I=0,T=0;T<b.length-1;T++){var C=I;I=0;for(var x=D&67108863,w=Math.min(T,y.length-1),E=Math.max(0,T-R.length+1);E<=w;E++){var q=T-E,G=R.words[q]|0,z=y.words[E]|0,H=G*z,V=H&67108863;C=C+(H/67108864|0)|0,V=V+x|0,x=V&67108863,C=C+(V>>>26)|0,I+=C>>>26,C&=67108863}b.words[T]=x,D=C,C=I}return D!==0?b.words[T]=D:b.length--,b._strip()}function F(R,y,b){return M(R,y,b)}s.prototype.mulTo=function(y,b){var D,I=this.length+y.length;return this.length===10&&y.length===10?D=O(this,y,b):I<63?D=N(this,y,b):I<1024?D=M(this,y,b):D=F(this,y,b),D},s.prototype.mul=function(y){var b=new s(null);return b.words=new Array(this.length+y.length),this.mulTo(y,b)},s.prototype.mulf=function(y){var b=new s(null);return b.words=new Array(this.length+y.length),F(this,y,b)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var b=y<0;b&&(y=-y),i(typeof y=="number"),i(y<67108864);for(var D=0,I=0;I<this.length;I++){var T=(this.words[I]|0)*y,C=(T&67108863)+(D&67108863);D>>=26,D+=T/67108864|0,D+=C>>>26,this.words[I]=C&67108863}return D!==0&&(this.words[I]=D,this.length++),this.length=y===0?1:this.length,b?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var b=S(y);if(b.length===0)return new s(1);for(var D=this,I=0;I<b.length&&b[I]===0;I++,D=D.sqr());if(++I<b.length)for(var T=D.sqr();I<b.length;I++,T=T.sqr())b[I]!==0&&(D=D.mul(T));return D},s.prototype.iushln=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26,I=67108863>>>26-b<<26-b,T;if(b!==0){var C=0;for(T=0;T<this.length;T++){var x=this.words[T]&I,w=(this.words[T]|0)-x<<b;this.words[T]=w|C,C=x>>>26-b}C&&(this.words[T]=C,this.length++)}if(D!==0){for(T=this.length-1;T>=0;T--)this.words[T+D]=this.words[T];for(T=0;T<D;T++)this.words[T]=0;this.length+=D}return this._strip()},s.prototype.ishln=function(y){return i(this.negative===0),this.iushln(y)},s.prototype.iushrn=function(y,b,D){i(typeof y=="number"&&y>=0);var I;b?I=(b-b%26)/26:I=0;var T=y%26,C=Math.min((y-T)/26,this.length),x=67108863^67108863>>>T<<T,w=D;if(I-=C,I=Math.max(0,I),w){for(var E=0;E<C;E++)w.words[E]=this.words[E];w.length=C}if(C!==0)if(this.length>C)for(this.length-=C,E=0;E<this.length;E++)this.words[E]=this.words[E+C];else this.words[0]=0,this.length=1;var q=0;for(E=this.length-1;E>=0&&(q!==0||E>=I);E--){var G=this.words[E]|0;this.words[E]=q<<26-T|G>>>T,q=G&x}return w&&q!==0&&(w.words[w.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,b,D){return i(this.negative===0),this.iushrn(y,b,D)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26,I=1<<b;if(this.length<=D)return!1;var T=this.words[D];return!!(T&I)},s.prototype.imaskn=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(b!==0&&D++,this.length=Math.min(D,this.length),b!==0){var I=67108863^67108863>>>b<<b;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(y){return this.clone().imaskn(y)},s.prototype.iaddn=function(y){return i(typeof y=="number"),i(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},s.prototype._iaddn=function(y){this.words[0]+=y;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},s.prototype.isubn=function(y){if(i(typeof y=="number"),i(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},s.prototype.addn=function(y){return this.clone().iaddn(y)},s.prototype.subn=function(y){return this.clone().isubn(y)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(y,b,D){var I=y.length+D,T;this._expand(I);var C,x=0;for(T=0;T<y.length;T++){C=(this.words[T+D]|0)+x;var w=(y.words[T]|0)*b;C-=w&67108863,x=(C>>26)-(w/67108864|0),this.words[T+D]=C&67108863}for(;T<this.length-D;T++)C=(this.words[T+D]|0)+x,x=C>>26,this.words[T+D]=C&67108863;if(x===0)return this._strip();for(i(x===-1),x=0,T=0;T<this.length;T++)C=-(this.words[T]|0)+x,x=C>>26,this.words[T]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,b){var D=this.length-y.length,I=this.clone(),T=y,C=T.words[T.length-1]|0,x=this._countBits(C);D=26-x,D!==0&&(T=T.ushln(D),I.iushln(D),C=T.words[T.length-1]|0);var w=I.length-T.length,E;if(b!=="mod"){E=new s(null),E.length=w+1,E.words=new Array(E.length);for(var q=0;q<E.length;q++)E.words[q]=0}var G=I.clone()._ishlnsubmul(T,1,w);G.negative===0&&(I=G,E&&(E.words[w]=1));for(var z=w-1;z>=0;z--){var H=(I.words[T.length+z]|0)*67108864+(I.words[T.length+z-1]|0);for(H=Math.min(H/C|0,67108863),I._ishlnsubmul(T,H,z);I.negative!==0;)H--,I.negative=0,I._ishlnsubmul(T,1,z),I.isZero()||(I.negative^=1);E&&(E.words[z]=H)}return E&&E._strip(),I._strip(),b!=="div"&&D!==0&&I.iushrn(D),{div:E||null,mod:I}},s.prototype.divmod=function(y,b,D){if(i(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,T,C;return this.negative!==0&&y.negative===0?(C=this.neg().divmod(y,b),b!=="mod"&&(I=C.div.neg()),b!=="div"&&(T=C.mod.neg(),D&&T.negative!==0&&T.iadd(y)),{div:I,mod:T}):this.negative===0&&y.negative!==0?(C=this.divmod(y.neg(),b),b!=="mod"&&(I=C.div.neg()),{div:I,mod:C.mod}):(this.negative&y.negative)!==0?(C=this.neg().divmod(y.neg(),b),b!=="div"&&(T=C.mod.neg(),D&&T.negative!==0&&T.isub(y)),{div:C.div,mod:T}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?b==="div"?{div:this.divn(y.words[0]),mod:null}:b==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,b)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var b=this.divmod(y);if(b.mod.isZero())return b.div;var D=b.div.negative!==0?b.mod.isub(y):b.mod,I=y.ushrn(1),T=y.andln(1),C=D.cmp(I);return C<0||T===1&&C===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},s.prototype.modrn=function(y){var b=y<0;b&&(y=-y),i(y<=67108863);for(var D=(1<<26)%y,I=0,T=this.length-1;T>=0;T--)I=(D*I+(this.words[T]|0))%y;return b?-I:I},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var b=y<0;b&&(y=-y),i(y<=67108863);for(var D=0,I=this.length-1;I>=0;I--){var T=(this.words[I]|0)+D*67108864;this.words[I]=T/y|0,D=T%y}return this._strip(),b?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){i(y.negative===0),i(!y.isZero());var b=this,D=y.clone();b.negative!==0?b=b.umod(y):b=b.clone();for(var I=new s(1),T=new s(0),C=new s(0),x=new s(1),w=0;b.isEven()&&D.isEven();)b.iushrn(1),D.iushrn(1),++w;for(var E=D.clone(),q=b.clone();!b.isZero();){for(var G=0,z=1;(b.words[0]&z)===0&&G<26;++G,z<<=1);if(G>0)for(b.iushrn(G);G-- >0;)(I.isOdd()||T.isOdd())&&(I.iadd(E),T.isub(q)),I.iushrn(1),T.iushrn(1);for(var H=0,V=1;(D.words[0]&V)===0&&H<26;++H,V<<=1);if(H>0)for(D.iushrn(H);H-- >0;)(C.isOdd()||x.isOdd())&&(C.iadd(E),x.isub(q)),C.iushrn(1),x.iushrn(1);b.cmp(D)>=0?(b.isub(D),I.isub(C),T.isub(x)):(D.isub(b),C.isub(I),x.isub(T))}return{a:C,b:x,gcd:D.iushln(w)}},s.prototype._invmp=function(y){i(y.negative===0),i(!y.isZero());var b=this,D=y.clone();b.negative!==0?b=b.umod(y):b=b.clone();for(var I=new s(1),T=new s(0),C=D.clone();b.cmpn(1)>0&&D.cmpn(1)>0;){for(var x=0,w=1;(b.words[0]&w)===0&&x<26;++x,w<<=1);if(x>0)for(b.iushrn(x);x-- >0;)I.isOdd()&&I.iadd(C),I.iushrn(1);for(var E=0,q=1;(D.words[0]&q)===0&&E<26;++E,q<<=1);if(E>0)for(D.iushrn(E);E-- >0;)T.isOdd()&&T.iadd(C),T.iushrn(1);b.cmp(D)>=0?(b.isub(D),I.isub(T)):(D.isub(b),T.isub(I))}var G;return b.cmpn(1)===0?G=I:G=T,G.cmpn(0)<0&&G.iadd(y),G},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var b=this.clone(),D=y.clone();b.negative=0,D.negative=0;for(var I=0;b.isEven()&&D.isEven();I++)b.iushrn(1),D.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;D.isEven();)D.iushrn(1);var T=b.cmp(D);if(T<0){var C=b;b=D,D=C}else if(T===0||D.cmpn(1)===0)break;b.isub(D)}while(!0);return D.iushln(I)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){i(typeof y=="number");var b=y%26,D=(y-b)/26,I=1<<b;if(this.length<=D)return this._expand(D+1),this.words[D]|=I,this;for(var T=I,C=D;T!==0&&C<this.length;C++){var x=this.words[C]|0;x+=T,T=x>>>26,x&=67108863,this.words[C]=x}return T!==0&&(this.words[C]=T,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var b=y<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var D;if(this.length>1)D=1;else{b&&(y=-y),i(y<=67108863,"Number is too big");var I=this.words[0]|0;D=I===y?0:I<y?-1:1}return this.negative!==0?-D|0:D},s.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return-1;if(this.negative===0&&y.negative!==0)return 1;var b=this.ucmp(y);return this.negative!==0?-b|0:b},s.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return-1;for(var b=0,D=this.length-1;D>=0;D--){var I=this.words[D]|0,T=y.words[D]|0;if(I!==T){I<T?b=-1:I>T&&(b=1);break}}return b},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new $(y)},s.prototype.toRed=function(y){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return i(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return i(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var L={k256:null,p224:null,p192:null,p25519:null};function k(R,y){this.name=R,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},k.prototype.ireduce=function(y){var b=y,D;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),D=b.bitLength();while(D>this.n);var I=D<this.n?-1:b.ucmp(this.p);return I===0?(b.words[0]=0,b.length=1):I>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},k.prototype.split=function(y,b){y.iushrn(this.n,0,b)},k.prototype.imulK=function(y){return y.imul(this.k)};function P(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(P,k),P.prototype.split=function(y,b){for(var D=4194303,I=Math.min(y.length,9),T=0;T<I;T++)b.words[T]=y.words[T];if(b.length=I,y.length<=9){y.words[0]=0,y.length=1;return}var C=y.words[9];for(b.words[b.length++]=C&D,T=10;T<y.length;T++){var x=y.words[T]|0;y.words[T-10]=(x&D)<<4|C>>>22,C=x}C>>>=22,y.words[T-10]=C,C===0&&y.length>10?y.length-=10:y.length-=9},P.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var b=0,D=0;D<y.length;D++){var I=y.words[D]|0;b+=I*977,y.words[D]=b&67108863,b=I*64+(b/67108864|0)}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function U(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(U,k);function B(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(B,k);function j(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(j,k),j.prototype.imulK=function(y){for(var b=0,D=0;D<y.length;D++){var I=(y.words[D]|0)*19+b,T=I&67108863;I>>>=26,y.words[D]=T,b=I}return b!==0&&(y.words[y.length++]=b),y},s._prime=function(y){if(L[y])return L[y];var b;if(y==="k256")b=new P;else if(y==="p224")b=new U;else if(y==="p192")b=new B;else if(y==="p25519")b=new j;else throw new Error("Unknown prime "+y);return L[y]=b,b};function $(R){if(typeof R=="string"){var y=s._prime(R);this.m=y.p,this.prime=y}else i(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}$.prototype._verify1=function(y){i(y.negative===0,"red works only with positives"),i(y.red,"red works only with red numbers")},$.prototype._verify2=function(y,b){i((y.negative|b.negative)===0,"red works only with positives"),i(y.red&&y.red===b.red,"red works only with red numbers")},$.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},$.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},$.prototype.add=function(y,b){this._verify2(y,b);var D=y.add(b);return D.cmp(this.m)>=0&&D.isub(this.m),D._forceRed(this)},$.prototype.iadd=function(y,b){this._verify2(y,b);var D=y.iadd(b);return D.cmp(this.m)>=0&&D.isub(this.m),D},$.prototype.sub=function(y,b){this._verify2(y,b);var D=y.sub(b);return D.cmpn(0)<0&&D.iadd(this.m),D._forceRed(this)},$.prototype.isub=function(y,b){this._verify2(y,b);var D=y.isub(b);return D.cmpn(0)<0&&D.iadd(this.m),D},$.prototype.shl=function(y,b){return this._verify1(y),this.imod(y.ushln(b))},$.prototype.imul=function(y,b){return this._verify2(y,b),this.imod(y.imul(b))},$.prototype.mul=function(y,b){return this._verify2(y,b),this.imod(y.mul(b))},$.prototype.isqr=function(y){return this.imul(y,y.clone())},$.prototype.sqr=function(y){return this.mul(y,y)},$.prototype.sqrt=function(y){if(y.isZero())return y.clone();var b=this.m.andln(3);if(i(b%2===1),b===3){var D=this.m.add(new s(1)).iushrn(2);return this.pow(y,D)}for(var I=this.m.subn(1),T=0;!I.isZero()&&I.andln(1)===0;)T++,I.iushrn(1);i(!I.isZero());var C=new s(1).toRed(this),x=C.redNeg(),w=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,w).cmp(x)!==0;)E.redIAdd(x);for(var q=this.pow(E,I),G=this.pow(y,I.addn(1).iushrn(1)),z=this.pow(y,I),H=T;z.cmp(C)!==0;){for(var V=z,K=0;V.cmp(C)!==0;K++)V=V.redSqr();i(K<H);var Z=this.pow(q,new s(1).iushln(H-K-1));G=G.redMul(Z),q=Z.redSqr(),z=z.redMul(q),H=K}return G},$.prototype.invm=function(y){var b=y._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},$.prototype.pow=function(y,b){if(b.isZero())return new s(1).toRed(this);if(b.cmpn(1)===0)return y.clone();var D=4,I=new Array(1<<D);I[0]=new s(1).toRed(this),I[1]=y;for(var T=2;T<I.length;T++)I[T]=this.mul(I[T-1],y);var C=I[0],x=0,w=0,E=b.bitLength()%26;for(E===0&&(E=26),T=b.length-1;T>=0;T--){for(var q=b.words[T],G=E-1;G>=0;G--){var z=q>>G&1;if(C!==I[0]&&(C=this.sqr(C)),z===0&&x===0){w=0;continue}x<<=1,x|=z,w++,!(w!==D&&(T!==0||G!==0))&&(C=this.mul(C,I[x]),w=0,x=0)}E=26}return C},$.prototype.convertTo=function(y){var b=y.umod(this.m);return b===y?b.clone():b},$.prototype.convertFrom=function(y){var b=y.clone();return b.red=null,b},s.mont=function(y){return new A(y)};function A(R){$.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}o(A,$),A.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},A.prototype.convertFrom=function(y){var b=this.imod(y.mul(this.rinv));return b.red=null,b},A.prototype.imul=function(y,b){if(y.isZero()||b.isZero())return y.words[0]=0,y.length=1,y;var D=y.imul(b),I=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=D.isub(I).iushrn(this.shift),C=T;return T.cmp(this.m)>=0?C=T.isub(this.m):T.cmpn(0)<0&&(C=T.iadd(this.m)),C._forceRed(this)},A.prototype.mul=function(y,b){if(y.isZero()||b.isZero())return new s(0)._forceRed(this);var D=y.mul(b),I=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=D.isub(I).iushrn(this.shift),C=T;return T.cmp(this.m)>=0?C=T.isub(this.m):T.cmpn(0)<0&&(C=T.iadd(this.m)),C._forceRed(this)},A.prototype.invm=function(y){var b=this.imod(y._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(r,bn$2)}(bn$3)),bn$3.exports}var browserifyRsa,hasRequiredBrowserifyRsa;function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var r=requireBn$1(),n=requireBrowser$b(),a=requireSafeBuffer$1().Buffer;function i(l){var f=l.modulus.byteLength(),d;do d=new r(n(f));while(d.cmp(l.modulus)>=0||!d.umod(l.prime1)||!d.umod(l.prime2));return d}function o(l){var f=i(l),d=f.toRed(r.mont(l.modulus)).redPow(new r(l.publicExponent)).fromRed();return{blinder:d,unblinder:f.invm(l.modulus)}}function s(l,f){var d=o(f),u=f.modulus.byteLength(),c=new r(l).mul(d.blinder).umod(f.modulus),v=c.toRed(r.mont(f.prime1)),h=c.toRed(r.mont(f.prime2)),m=f.coefficient,g=f.prime1,_=f.prime2,S=v.redPow(f.exponent1).fromRed(),N=h.redPow(f.exponent2).fromRed(),O=S.isub(N).imul(m).umod(g).imul(_);return N.iadd(O).imul(d.unblinder).umod(f.modulus).toArrayLike(a,"be",u)}return s.getr=i,browserifyRsa=s,browserifyRsa}var elliptic={};const version$1="6.6.1";var require$$0$1={version:version$1},utils$2={},utils$1={},hasRequiredUtils$2;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,function(r){var n=r;function a(s,l){if(Array.isArray(s))return s.slice();if(!s)return[];var f=[];if(typeof s!="string"){for(var d=0;d<s.length;d++)f[d]=s[d]|0;return f}if(l==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var d=0;d<s.length;d+=2)f.push(parseInt(s[d]+s[d+1],16))}else for(var d=0;d<s.length;d++){var u=s.charCodeAt(d),c=u>>8,v=u&255;c?f.push(c,v):f.push(v)}return f}n.toArray=a;function i(s){return s.length===1?"0"+s:s}n.zero2=i;function o(s){for(var l="",f=0;f<s.length;f++)l+=i(s[f].toString(16));return l}n.toHex=o,n.encode=function(l,f){return f==="hex"?o(l):l}}(utils$1)),utils$1}var hasRequiredUtils$1;function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,function(r){var n=r,a=requireBn$2(),i=requireMinimalisticAssert(),o=requireUtils$2();n.assert=i,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode;function s(c,v,h){var m=new Array(Math.max(c.bitLength(),h)+1),g;for(g=0;g<m.length;g+=1)m[g]=0;var _=1<<v+1,S=c.clone();for(g=0;g<m.length;g++){var N,O=S.andln(_-1);S.isOdd()?(O>(_>>1)-1?N=(_>>1)-O:N=O,S.isubn(N)):N=0,m[g]=N,S.iushrn(1)}return m}n.getNAF=s;function l(c,v){var h=[[],[]];c=c.clone(),v=v.clone();for(var m=0,g=0,_;c.cmpn(-m)>0||v.cmpn(-g)>0;){var S=c.andln(3)+m&3,N=v.andln(3)+g&3;S===3&&(S=-1),N===3&&(N=-1);var O;(S&1)===0?O=0:(_=c.andln(7)+m&7,(_===3||_===5)&&N===2?O=-S:O=S),h[0].push(O);var M;(N&1)===0?M=0:(_=v.andln(7)+g&7,(_===3||_===5)&&S===2?M=-N:M=N),h[1].push(M),2*m===O+1&&(m=1-m),2*g===M+1&&(g=1-g),c.iushrn(1),v.iushrn(1)}return h}n.getJSF=l;function f(c,v,h){var m="_"+v;c.prototype[v]=function(){return this[m]!==void 0?this[m]:this[m]=h.call(this)}}n.cachedProperty=f;function d(c){return typeof c=="string"?n.toArray(c,"hex"):c}n.parseBytes=d;function u(c){return new a(c,"hex","le")}n.intFromLE=u}(utils$2)),utils$2}var curve={},base$1,hasRequiredBase$1;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var r=requireBn$2(),n=requireUtils$1(),a=n.getNAF,i=n.getJSF,o=n.assert;function s(f,d){this.type=f,this.p=new r(d.p,16),this.red=d.prime?r.red(d.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=d.n&&new r(d.n,16),this.g=d.g&&this.pointFromJSON(d.g,d.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 u=this.n&&this.p.div(this.n);!u||u.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}base$1=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(d,u){o(d.precomputed);var c=d._getDoubles(),v=a(u,1,this._bitLength),h=(1<<c.step+1)-(c.step%2===0?2:1);h/=3;var m=[],g,_;for(g=0;g<v.length;g+=c.step){_=0;for(var S=g+c.step-1;S>=g;S--)_=(_<<1)+v[S];m.push(_)}for(var N=this.jpoint(null,null,null),O=this.jpoint(null,null,null),M=h;M>0;M--){for(g=0;g<m.length;g++)_=m[g],_===M?O=O.mixedAdd(c.points[g]):_===-M&&(O=O.mixedAdd(c.points[g].neg()));N=N.add(O)}return N.toP()},s.prototype._wnafMul=function(d,u){var c=4,v=d._getNAFPoints(c);c=v.wnd;for(var h=v.points,m=a(u,c,this._bitLength),g=this.jpoint(null,null,null),_=m.length-1;_>=0;_--){for(var S=0;_>=0&&m[_]===0;_--)S++;if(_>=0&&S++,g=g.dblp(S),_<0)break;var N=m[_];o(N!==0),d.type==="affine"?N>0?g=g.mixedAdd(h[N-1>>1]):g=g.mixedAdd(h[-N-1>>1].neg()):N>0?g=g.add(h[N-1>>1]):g=g.add(h[-N-1>>1].neg())}return d.type==="affine"?g.toP():g},s.prototype._wnafMulAdd=function(d,u,c,v,h){var m=this._wnafT1,g=this._wnafT2,_=this._wnafT3,S=0,N,O,M;for(N=0;N<v;N++){M=u[N];var F=M._getNAFPoints(d);m[N]=F.wnd,g[N]=F.points}for(N=v-1;N>=1;N-=2){var L=N-1,k=N;if(m[L]!==1||m[k]!==1){_[L]=a(c[L],m[L],this._bitLength),_[k]=a(c[k],m[k],this._bitLength),S=Math.max(_[L].length,S),S=Math.max(_[k].length,S);continue}var P=[u[L],null,null,u[k]];u[L].y.cmp(u[k].y)===0?(P[1]=u[L].add(u[k]),P[2]=u[L].toJ().mixedAdd(u[k].neg())):u[L].y.cmp(u[k].y.redNeg())===0?(P[1]=u[L].toJ().mixedAdd(u[k]),P[2]=u[L].add(u[k].neg())):(P[1]=u[L].toJ().mixedAdd(u[k]),P[2]=u[L].toJ().mixedAdd(u[k].neg()));var U=[-3,-1,-5,-7,0,7,5,1,3],B=i(c[L],c[k]);for(S=Math.max(B[0].length,S),_[L]=new Array(S),_[k]=new Array(S),O=0;O<S;O++){var j=B[0][O]|0,$=B[1][O]|0;_[L][O]=U[(j+1)*3+($+1)],_[k][O]=0,g[L]=P}}var A=this.jpoint(null,null,null),R=this._wnafT4;for(N=S;N>=0;N--){for(var y=0;N>=0;){var b=!0;for(O=0;O<v;O++)R[O]=_[O][N]|0,R[O]!==0&&(b=!1);if(!b)break;y++,N--}if(N>=0&&y++,A=A.dblp(y),N<0)break;for(O=0;O<v;O++){var D=R[O];D!==0&&(D>0?M=g[O][D-1>>1]:D<0&&(M=g[O][-D-1>>1].neg()),M.type==="affine"?A=A.mixedAdd(M):A=A.add(M))}}for(N=0;N<v;N++)g[N]=null;return h?A:A.toP()};function l(f,d){this.curve=f,this.type=d,this.precomputed=null}return s.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(d,u){d=n.toArray(d,u);var c=this.p.byteLength();if((d[0]===4||d[0]===6||d[0]===7)&&d.length-1===2*c){d[0]===6?o(d[d.length-1]%2===0):d[0]===7&&o(d[d.length-1]%2===1);var v=this.point(d.slice(1,1+c),d.slice(1+c,1+2*c));return v}else if((d[0]===2||d[0]===3)&&d.length-1===c)return this.pointFromX(d.slice(1,1+c),d[0]===3);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(d){return this.encode(d,!0)},l.prototype._encode=function(d){var u=this.curve.p.byteLength(),c=this.getX().toArray("be",u);return d?[this.getY().isEven()?2:3].concat(c):[4].concat(c,this.getY().toArray("be",u))},l.prototype.encode=function(d,u){return n.encode(this._encode(u),d)},l.prototype.precompute=function(d){if(this.precomputed)return this;var u={doubles:null,naf:null,beta:null};return u.naf=this._getNAFPoints(8),u.doubles=this._getDoubles(4,d),u.beta=this._getBeta(),this.precomputed=u,this},l.prototype._hasDoubles=function(d){if(!this.precomputed)return!1;var u=this.precomputed.doubles;return u?u.points.length>=Math.ceil((d.bitLength()+1)/u.step):!1},l.prototype._getDoubles=function(d,u){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var c=[this],v=this,h=0;h<u;h+=d){for(var m=0;m<d;m++)v=v.dbl();c.push(v)}return{step:d,points:c}},l.prototype._getNAFPoints=function(d){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var u=[this],c=(1<<d)-1,v=c===1?null:this.dbl(),h=1;h<c;h++)u[h]=u[h-1].add(v);return{wnd:d,points:u}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(d){for(var u=this,c=0;c<d;c++)u=u.dbl();return u},base$1}var short,hasRequiredShort;function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var r=requireUtils$1(),n=requireBn$2(),a=requireInherits_browser(),i=requireBase$1(),o=r.assert;function s(d){i.call(this,"short",d),this.a=new n(d.a,16).toRed(this.red),this.b=new n(d.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(d),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}a(s,i),short=s,s.prototype._getEndomorphism=function(u){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var c,v;if(u.beta)c=new n(u.beta,16).toRed(this.red);else{var h=this._getEndoRoots(this.p);c=h[0].cmp(h[1])<0?h[0]:h[1],c=c.toRed(this.red)}if(u.lambda)v=new n(u.lambda,16);else{var m=this._getEndoRoots(this.n);this.g.mul(m[0]).x.cmp(this.g.x.redMul(c))===0?v=m[0]:(v=m[1],o(this.g.mul(v).x.cmp(this.g.x.redMul(c))===0))}var g;return u.basis?g=u.basis.map(function(_){return{a:new n(_.a,16),b:new n(_.b,16)}}):g=this._getEndoBasis(v),{beta:c,lambda:v,basis:g}}},s.prototype._getEndoRoots=function(u){var c=u===this.p?this.red:n.mont(u),v=new n(2).toRed(c).redInvm(),h=v.redNeg(),m=new n(3).toRed(c).redNeg().redSqrt().redMul(v),g=h.redAdd(m).fromRed(),_=h.redSub(m).fromRed();return[g,_]},s.prototype._getEndoBasis=function(u){for(var c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),v=u,h=this.n.clone(),m=new n(1),g=new n(0),_=new n(0),S=new n(1),N,O,M,F,L,k,P,U=0,B,j;v.cmpn(0)!==0;){var $=h.div(v);B=h.sub($.mul(v)),j=_.sub($.mul(m));var A=S.sub($.mul(g));if(!M&&B.cmp(c)<0)N=P.neg(),O=m,M=B.neg(),F=j;else if(M&&++U===2)break;P=B,h=v,v=B,_=m,m=j,S=g,g=A}L=B.neg(),k=j;var R=M.sqr().add(F.sqr()),y=L.sqr().add(k.sqr());return y.cmp(R)>=0&&(L=N,k=O),M.negative&&(M=M.neg(),F=F.neg()),L.negative&&(L=L.neg(),k=k.neg()),[{a:M,b:F},{a:L,b:k}]},s.prototype._endoSplit=function(u){var c=this.endo.basis,v=c[0],h=c[1],m=h.b.mul(u).divRound(this.n),g=v.b.neg().mul(u).divRound(this.n),_=m.mul(v.a),S=g.mul(h.a),N=m.mul(v.b),O=g.mul(h.b),M=u.sub(_).sub(S),F=N.add(O).neg();return{k1:M,k2:F}},s.prototype.pointFromX=function(u,c){u=new n(u,16),u.red||(u=u.toRed(this.red));var v=u.redSqr().redMul(u).redIAdd(u.redMul(this.a)).redIAdd(this.b),h=v.redSqrt();if(h.redSqr().redSub(v).cmp(this.zero)!==0)throw new Error("invalid point");var m=h.fromRed().isOdd();return(c&&!m||!c&&m)&&(h=h.redNeg()),this.point(u,h)},s.prototype.validate=function(u){if(u.inf)return!0;var c=u.x,v=u.y,h=this.a.redMul(c),m=c.redSqr().redMul(c).redIAdd(h).redIAdd(this.b);return v.redSqr().redISub(m).cmpn(0)===0},s.prototype._endoWnafMulAdd=function(u,c,v){for(var h=this._endoWnafT1,m=this._endoWnafT2,g=0;g<u.length;g++){var _=this._endoSplit(c[g]),S=u[g],N=S._getBeta();_.k1.negative&&(_.k1.ineg(),S=S.neg(!0)),_.k2.negative&&(_.k2.ineg(),N=N.neg(!0)),h[g*2]=S,h[g*2+1]=N,m[g*2]=_.k1,m[g*2+1]=_.k2}for(var O=this._wnafMulAdd(1,h,m,g*2,v),M=0;M<g*2;M++)h[M]=null,m[M]=null;return O};function l(d,u,c,v){i.BasePoint.call(this,d,"affine"),u===null&&c===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(u,16),this.y=new n(c,16),v&&(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)}a(l,i.BasePoint),s.prototype.point=function(u,c,v){return new l(this,u,c,v)},s.prototype.pointFromJSON=function(u,c){return l.fromJSON(this,u,c)},l.prototype._getBeta=function(){if(this.curve.endo){var u=this.precomputed;if(u&&u.beta)return u.beta;var c=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(u){var v=this.curve,h=function(m){return v.point(m.x.redMul(v.endo.beta),m.y)};u.beta=c,c.precomputed={beta:null,naf:u.naf&&{wnd:u.naf.wnd,points:u.naf.points.map(h)},doubles:u.doubles&&{step:u.doubles.step,points:u.doubles.points.map(h)}}}return c}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(u,c,v){typeof c=="string"&&(c=JSON.parse(c));var h=u.point(c[0],c[1],v);if(!c[2])return h;function m(_){return u.point(_[0],_[1],v)}var g=c[2];return h.precomputed={beta:null,doubles:g.doubles&&{step:g.doubles.step,points:[h].concat(g.doubles.points.map(m))},naf:g.naf&&{wnd:g.naf.wnd,points:[h].concat(g.naf.points.map(m))}},h},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(u){if(this.inf)return u;if(u.inf)return this;if(this.eq(u))return this.dbl();if(this.neg().eq(u))return this.curve.point(null,null);if(this.x.cmp(u.x)===0)return this.curve.point(null,null);var c=this.y.redSub(u.y);c.cmpn(0)!==0&&(c=c.redMul(this.x.redSub(u.x).redInvm()));var v=c.redSqr().redISub(this.x).redISub(u.x),h=c.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,h)},l.prototype.dbl=function(){if(this.inf)return this;var u=this.y.redAdd(this.y);if(u.cmpn(0)===0)return this.curve.point(null,null);var c=this.curve.a,v=this.x.redSqr(),h=u.redInvm(),m=v.redAdd(v).redIAdd(v).redIAdd(c).redMul(h),g=m.redSqr().redISub(this.x.redAdd(this.x)),_=m.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,_)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(u){return u=new n(u,16),this.isInfinity()?this:this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve.endo?this.curve._endoWnafMulAdd([this],[u]):this.curve._wnafMul(this,u)},l.prototype.mulAdd=function(u,c,v){var h=[this,c],m=[u,v];return this.curve.endo?this.curve._endoWnafMulAdd(h,m):this.curve._wnafMulAdd(1,h,m,2)},l.prototype.jmulAdd=function(u,c,v){var h=[this,c],m=[u,v];return this.curve.endo?this.curve._endoWnafMulAdd(h,m,!0):this.curve._wnafMulAdd(1,h,m,2,!0)},l.prototype.eq=function(u){return this===u||this.inf===u.inf&&(this.inf||this.x.cmp(u.x)===0&&this.y.cmp(u.y)===0)},l.prototype.neg=function(u){if(this.inf)return this;var c=this.curve.point(this.x,this.y.redNeg());if(u&&this.precomputed){var v=this.precomputed,h=function(m){return m.neg()};c.precomputed={naf:v.naf&&{wnd:v.naf.wnd,points:v.naf.points.map(h)},doubles:v.doubles&&{step:v.doubles.step,points:v.doubles.points.map(h)}}}return c},l.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var u=this.curve.jpoint(this.x,this.y,this.curve.one);return u};function f(d,u,c,v){i.BasePoint.call(this,d,"jacobian"),u===null&&c===null&&v===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(u,16),this.y=new n(c,16),this.z=new n(v,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}return a(f,i.BasePoint),s.prototype.jpoint=function(u,c,v){return new f(this,u,c,v)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var u=this.z.redInvm(),c=u.redSqr(),v=this.x.redMul(c),h=this.y.redMul(c).redMul(u);return this.curve.point(v,h)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(u){if(this.isInfinity())return u;if(u.isInfinity())return this;var c=u.z.redSqr(),v=this.z.redSqr(),h=this.x.redMul(c),m=u.x.redMul(v),g=this.y.redMul(c.redMul(u.z)),_=u.y.redMul(v.redMul(this.z)),S=h.redSub(m),N=g.redSub(_);if(S.cmpn(0)===0)return N.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var O=S.redSqr(),M=O.redMul(S),F=h.redMul(O),L=N.redSqr().redIAdd(M).redISub(F).redISub(F),k=N.redMul(F.redISub(L)).redISub(g.redMul(M)),P=this.z.redMul(u.z).redMul(S);return this.curve.jpoint(L,k,P)},f.prototype.mixedAdd=function(u){if(this.isInfinity())return u.toJ();if(u.isInfinity())return this;var c=this.z.redSqr(),v=this.x,h=u.x.redMul(c),m=this.y,g=u.y.redMul(c).redMul(this.z),_=v.redSub(h),S=m.redSub(g);if(_.cmpn(0)===0)return S.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var N=_.redSqr(),O=N.redMul(_),M=v.redMul(N),F=S.redSqr().redIAdd(O).redISub(M).redISub(M),L=S.redMul(M.redISub(F)).redISub(m.redMul(O)),k=this.z.redMul(_);return this.curve.jpoint(F,L,k)},f.prototype.dblp=function(u){if(u===0)return this;if(this.isInfinity())return this;if(!u)return this.dbl();var c;if(this.curve.zeroA||this.curve.threeA){var v=this;for(c=0;c<u;c++)v=v.dbl();return v}var h=this.curve.a,m=this.curve.tinv,g=this.x,_=this.y,S=this.z,N=S.redSqr().redSqr(),O=_.redAdd(_);for(c=0;c<u;c++){var M=g.redSqr(),F=O.redSqr(),L=F.redSqr(),k=M.redAdd(M).redIAdd(M).redIAdd(h.redMul(N)),P=g.redMul(F),U=k.redSqr().redISub(P.redAdd(P)),B=P.redISub(U),j=k.redMul(B);j=j.redIAdd(j).redISub(L);var $=O.redMul(S);c+1<u&&(N=N.redMul(L)),g=U,S=$,O=j}return this.curve.jpoint(g,O.redMul(m),S)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var u,c,v;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),g=m.redSqr(),_=this.x.redAdd(m).redSqr().redISub(h).redISub(g);_=_.redIAdd(_);var S=h.redAdd(h).redIAdd(h),N=S.redSqr().redISub(_).redISub(_),O=g.redIAdd(g);O=O.redIAdd(O),O=O.redIAdd(O),u=N,c=S.redMul(_.redISub(N)).redISub(O),v=this.y.redAdd(this.y)}else{var M=this.x.redSqr(),F=this.y.redSqr(),L=F.redSqr(),k=this.x.redAdd(F).redSqr().redISub(M).redISub(L);k=k.redIAdd(k);var P=M.redAdd(M).redIAdd(M),U=P.redSqr(),B=L.redIAdd(L);B=B.redIAdd(B),B=B.redIAdd(B),u=U.redISub(k).redISub(k),c=P.redMul(k.redISub(u)).redISub(B),v=this.y.redMul(this.z),v=v.redIAdd(v)}return this.curve.jpoint(u,c,v)},f.prototype._threeDbl=function(){var u,c,v;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),g=m.redSqr(),_=this.x.redAdd(m).redSqr().redISub(h).redISub(g);_=_.redIAdd(_);var S=h.redAdd(h).redIAdd(h).redIAdd(this.curve.a),N=S.redSqr().redISub(_).redISub(_);u=N;var O=g.redIAdd(g);O=O.redIAdd(O),O=O.redIAdd(O),c=S.redMul(_.redISub(N)).redISub(O),v=this.y.redAdd(this.y)}else{var M=this.z.redSqr(),F=this.y.redSqr(),L=this.x.redMul(F),k=this.x.redSub(M).redMul(this.x.redAdd(M));k=k.redAdd(k).redIAdd(k);var P=L.redIAdd(L);P=P.redIAdd(P);var U=P.redAdd(P);u=k.redSqr().redISub(U),v=this.y.redAdd(this.z).redSqr().redISub(F).redISub(M);var B=F.redSqr();B=B.redIAdd(B),B=B.redIAdd(B),B=B.redIAdd(B),c=k.redMul(P.redISub(u)).redISub(B)}return this.curve.jpoint(u,c,v)},f.prototype._dbl=function(){var u=this.curve.a,c=this.x,v=this.y,h=this.z,m=h.redSqr().redSqr(),g=c.redSqr(),_=v.redSqr(),S=g.redAdd(g).redIAdd(g).redIAdd(u.redMul(m)),N=c.redAdd(c);N=N.redIAdd(N);var O=N.redMul(_),M=S.redSqr().redISub(O.redAdd(O)),F=O.redISub(M),L=_.redSqr();L=L.redIAdd(L),L=L.redIAdd(L),L=L.redIAdd(L);var k=S.redMul(F).redISub(L),P=v.redAdd(v).redMul(h);return this.curve.jpoint(M,k,P)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var u=this.x.redSqr(),c=this.y.redSqr(),v=this.z.redSqr(),h=c.redSqr(),m=u.redAdd(u).redIAdd(u),g=m.redSqr(),_=this.x.redAdd(c).redSqr().redISub(u).redISub(h);_=_.redIAdd(_),_=_.redAdd(_).redIAdd(_),_=_.redISub(g);var S=_.redSqr(),N=h.redIAdd(h);N=N.redIAdd(N),N=N.redIAdd(N),N=N.redIAdd(N);var O=m.redIAdd(_).redSqr().redISub(g).redISub(S).redISub(N),M=c.redMul(O);M=M.redIAdd(M),M=M.redIAdd(M);var F=this.x.redMul(S).redISub(M);F=F.redIAdd(F),F=F.redIAdd(F);var L=this.y.redMul(O.redMul(N.redISub(O)).redISub(_.redMul(S)));L=L.redIAdd(L),L=L.redIAdd(L),L=L.redIAdd(L);var k=this.z.redAdd(_).redSqr().redISub(v).redISub(S);return this.curve.jpoint(F,L,k)},f.prototype.mul=function(u,c){return u=new n(u,c),this.curve._wnafMul(this,u)},f.prototype.eq=function(u){if(u.type==="affine")return this.eq(u.toJ());if(this===u)return!0;var c=this.z.redSqr(),v=u.z.redSqr();if(this.x.redMul(v).redISub(u.x.redMul(c)).cmpn(0)!==0)return!1;var h=c.redMul(this.z),m=v.redMul(u.z);return this.y.redMul(m).redISub(u.y.redMul(h)).cmpn(0)===0},f.prototype.eqXToP=function(u){var c=this.z.redSqr(),v=u.toRed(this.curve.red).redMul(c);if(this.x.cmp(v)===0)return!0;for(var h=u.clone(),m=this.curve.redN.redMul(c);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(v.redIAdd(m),this.x.cmp(v)===0)return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0},short}var mont,hasRequiredMont;function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var r=requireBn$2(),n=requireInherits_browser(),a=requireBase$1(),i=requireUtils$1();function o(l){a.call(this,"mont",l),this.a=new r(l.a,16).toRed(this.red),this.b=new r(l.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}n(o,a),mont=o,o.prototype.validate=function(f){var d=f.normalize().x,u=d.redSqr(),c=u.redMul(d).redAdd(u.redMul(this.a)).redAdd(d),v=c.redSqrt();return v.redSqr().cmp(c)===0};function s(l,f,d){a.BasePoint.call(this,l,"projective"),f===null&&d===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(f,16),this.z=new r(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return n(s,a.BasePoint),o.prototype.decodePoint=function(f,d){return this.point(i.toArray(f,d),1)},o.prototype.point=function(f,d){return new s(this,f,d)},o.prototype.pointFromJSON=function(f){return s.fromJSON(this,f)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(f,d){return new s(f,d[0],d[1]||f.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.z.cmpn(0)===0},s.prototype.dbl=function(){var f=this.x.redAdd(this.z),d=f.redSqr(),u=this.x.redSub(this.z),c=u.redSqr(),v=d.redSub(c),h=d.redMul(c),m=v.redMul(c.redAdd(this.curve.a24.redMul(v)));return this.curve.point(h,m)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(f,d){var u=this.x.redAdd(this.z),c=this.x.redSub(this.z),v=f.x.redAdd(f.z),h=f.x.redSub(f.z),m=h.redMul(u),g=v.redMul(c),_=d.z.redMul(m.redAdd(g).redSqr()),S=d.x.redMul(m.redISub(g).redSqr());return this.curve.point(_,S)},s.prototype.mul=function(f){for(var d=f.clone(),u=this,c=this.curve.point(null,null),v=this,h=[];d.cmpn(0)!==0;d.iushrn(1))h.push(d.andln(1));for(var m=h.length-1;m>=0;m--)h[m]===0?(u=u.diffAdd(c,v),c=c.dbl()):(c=u.diffAdd(c,v),u=u.dbl());return c},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(f){return this.getX().cmp(f.getX())===0},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}var edwards,hasRequiredEdwards;function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var r=requireUtils$1(),n=requireBn$2(),a=requireInherits_browser(),i=requireBase$1(),o=r.assert;function s(f){this.twisted=(f.a|0)!==1,this.mOneA=this.twisted&&(f.a|0)===-1,this.extended=this.mOneA,i.call(this,"edwards",f),this.a=new n(f.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(f.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(f.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(f.c|0)===1}a(s,i),edwards=s,s.prototype._mulA=function(d){return this.mOneA?d.redNeg():this.a.redMul(d)},s.prototype._mulC=function(d){return this.oneC?d:this.c.redMul(d)},s.prototype.jpoint=function(d,u,c,v){return this.point(d,u,c,v)},s.prototype.pointFromX=function(d,u){d=new n(d,16),d.red||(d=d.toRed(this.red));var c=d.redSqr(),v=this.c2.redSub(this.a.redMul(c)),h=this.one.redSub(this.c2.redMul(this.d).redMul(c)),m=v.redMul(h.redInvm()),g=m.redSqrt();if(g.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");var _=g.fromRed().isOdd();return(u&&!_||!u&&_)&&(g=g.redNeg()),this.point(d,g)},s.prototype.pointFromY=function(d,u){d=new n(d,16),d.red||(d=d.toRed(this.red));var c=d.redSqr(),v=c.redSub(this.c2),h=c.redMul(this.d).redMul(this.c2).redSub(this.a),m=v.redMul(h.redInvm());if(m.cmp(this.zero)===0){if(u)throw new Error("invalid point");return this.point(this.zero,d)}var g=m.redSqrt();if(g.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");return g.fromRed().isOdd()!==u&&(g=g.redNeg()),this.point(g,d)},s.prototype.validate=function(d){if(d.isInfinity())return!0;d.normalize();var u=d.x.redSqr(),c=d.y.redSqr(),v=u.redMul(this.a).redAdd(c),h=this.c2.redMul(this.one.redAdd(this.d.redMul(u).redMul(c)));return v.cmp(h)===0};function l(f,d,u,c,v){i.BasePoint.call(this,f,"projective"),d===null&&u===null&&c===null?(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 n(d,16),this.y=new n(u,16),this.z=c?new n(c,16):this.curve.one,this.t=v&&new n(v,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()))))}return a(l,i.BasePoint),s.prototype.pointFromJSON=function(d){return l.fromJSON(this,d)},s.prototype.point=function(d,u,c,v){return new l(this,d,u,c,v)},l.fromJSON=function(d,u){return new l(d,u[0],u[1],u[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},l.prototype._extDbl=function(){var d=this.x.redSqr(),u=this.y.redSqr(),c=this.z.redSqr();c=c.redIAdd(c);var v=this.curve._mulA(d),h=this.x.redAdd(this.y).redSqr().redISub(d).redISub(u),m=v.redAdd(u),g=m.redSub(c),_=v.redSub(u),S=h.redMul(g),N=m.redMul(_),O=h.redMul(_),M=g.redMul(m);return this.curve.point(S,N,M,O)},l.prototype._projDbl=function(){var d=this.x.redAdd(this.y).redSqr(),u=this.x.redSqr(),c=this.y.redSqr(),v,h,m,g,_,S;if(this.curve.twisted){g=this.curve._mulA(u);var N=g.redAdd(c);this.zOne?(v=d.redSub(u).redSub(c).redMul(N.redSub(this.curve.two)),h=N.redMul(g.redSub(c)),m=N.redSqr().redSub(N).redSub(N)):(_=this.z.redSqr(),S=N.redSub(_).redISub(_),v=d.redSub(u).redISub(c).redMul(S),h=N.redMul(g.redSub(c)),m=N.redMul(S))}else g=u.redAdd(c),_=this.curve._mulC(this.z).redSqr(),S=g.redSub(_).redSub(_),v=this.curve._mulC(d.redISub(g)).redMul(S),h=this.curve._mulC(g).redMul(u.redISub(c)),m=g.redMul(S);return this.curve.point(v,h,m)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(d){var u=this.y.redSub(this.x).redMul(d.y.redSub(d.x)),c=this.y.redAdd(this.x).redMul(d.y.redAdd(d.x)),v=this.t.redMul(this.curve.dd).redMul(d.t),h=this.z.redMul(d.z.redAdd(d.z)),m=c.redSub(u),g=h.redSub(v),_=h.redAdd(v),S=c.redAdd(u),N=m.redMul(g),O=_.redMul(S),M=m.redMul(S),F=g.redMul(_);return this.curve.point(N,O,F,M)},l.prototype._projAdd=function(d){var u=this.z.redMul(d.z),c=u.redSqr(),v=this.x.redMul(d.x),h=this.y.redMul(d.y),m=this.curve.d.redMul(v).redMul(h),g=c.redSub(m),_=c.redAdd(m),S=this.x.redAdd(this.y).redMul(d.x.redAdd(d.y)).redISub(v).redISub(h),N=u.redMul(g).redMul(S),O,M;return this.curve.twisted?(O=u.redMul(_).redMul(h.redSub(this.curve._mulA(v))),M=g.redMul(_)):(O=u.redMul(_).redMul(h.redSub(v)),M=this.curve._mulC(g).redMul(_)),this.curve.point(N,O,M)},l.prototype.add=function(d){return this.isInfinity()?d:d.isInfinity()?this:this.curve.extended?this._extAdd(d):this._projAdd(d)},l.prototype.mul=function(d){return this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve._wnafMul(this,d)},l.prototype.mulAdd=function(d,u,c){return this.curve._wnafMulAdd(1,[this,u],[d,c],2,!1)},l.prototype.jmulAdd=function(d,u,c){return this.curve._wnafMulAdd(1,[this,u],[d,c],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var d=this.z.redInvm();return this.x=this.x.redMul(d),this.y=this.y.redMul(d),this.t&&(this.t=this.t.redMul(d)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(d){return this===d||this.getX().cmp(d.getX())===0&&this.getY().cmp(d.getY())===0},l.prototype.eqXToP=function(d){var u=d.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(u)===0)return!0;for(var c=d.clone(),v=this.curve.redN.redMul(this.z);;){if(c.iadd(this.curve.n),c.cmp(this.curve.p)>=0)return!1;if(u.redIAdd(v),this.x.cmp(u)===0)return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add,edwards}var hasRequiredCurve;function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,function(r){var n=r;n.base=requireBase$1(),n.short=requireShort(),n.mont=requireMont(),n.edwards=requireEdwards()}(curve)),curve}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var r=requireMinimalisticAssert(),n=requireInherits_browser();utils.inherits=n;function a(A,R){return(A.charCodeAt(R)&64512)!==55296||R<0||R+1>=A.length?!1:(A.charCodeAt(R+1)&64512)===56320}function i(A,R){if(Array.isArray(A))return A.slice();if(!A)return[];var y=[];if(typeof A=="string")if(R){if(R==="hex")for(A=A.replace(/[^a-z0-9]+/ig,""),A.length%2!==0&&(A="0"+A),D=0;D<A.length;D+=2)y.push(parseInt(A[D]+A[D+1],16))}else for(var b=0,D=0;D<A.length;D++){var I=A.charCodeAt(D);I<128?y[b++]=I:I<2048?(y[b++]=I>>6|192,y[b++]=I&63|128):a(A,D)?(I=65536+((I&1023)<<10)+(A.charCodeAt(++D)&1023),y[b++]=I>>18|240,y[b++]=I>>12&63|128,y[b++]=I>>6&63|128,y[b++]=I&63|128):(y[b++]=I>>12|224,y[b++]=I>>6&63|128,y[b++]=I&63|128)}else for(D=0;D<A.length;D++)y[D]=A[D]|0;return y}utils.toArray=i;function o(A){for(var R="",y=0;y<A.length;y++)R+=f(A[y].toString(16));return R}utils.toHex=o;function s(A){var R=A>>>24|A>>>8&65280|A<<8&16711680|(A&255)<<24;return R>>>0}utils.htonl=s;function l(A,R){for(var y="",b=0;b<A.length;b++){var D=A[b];R==="little"&&(D=s(D)),y+=d(D.toString(16))}return y}utils.toHex32=l;function f(A){return A.length===1?"0"+A:A}utils.zero2=f;function d(A){return A.length===7?"0"+A:A.length===6?"00"+A:A.length===5?"000"+A:A.length===4?"0000"+A:A.length===3?"00000"+A:A.length===2?"000000"+A:A.length===1?"0000000"+A:A}utils.zero8=d;function u(A,R,y,b){var D=y-R;r(D%4===0);for(var I=new Array(D/4),T=0,C=R;T<I.length;T++,C+=4){var x;b==="big"?x=A[C]<<24|A[C+1]<<16|A[C+2]<<8|A[C+3]:x=A[C+3]<<24|A[C+2]<<16|A[C+1]<<8|A[C],I[T]=x>>>0}return I}utils.join32=u;function c(A,R){for(var y=new Array(A.length*4),b=0,D=0;b<A.length;b++,D+=4){var I=A[b];R==="big"?(y[D]=I>>>24,y[D+1]=I>>>16&255,y[D+2]=I>>>8&255,y[D+3]=I&255):(y[D+3]=I>>>24,y[D+2]=I>>>16&255,y[D+1]=I>>>8&255,y[D]=I&255)}return y}utils.split32=c;function v(A,R){return A>>>R|A<<32-R}utils.rotr32=v;function h(A,R){return A<<R|A>>>32-R}utils.rotl32=h;function m(A,R){return A+R>>>0}utils.sum32=m;function g(A,R,y){return A+R+y>>>0}utils.sum32_3=g;function _(A,R,y,b){return A+R+y+b>>>0}utils.sum32_4=_;function S(A,R,y,b,D){return A+R+y+b+D>>>0}utils.sum32_5=S;function N(A,R,y,b){var D=A[R],I=A[R+1],T=b+I>>>0,C=(T<b?1:0)+y+D;A[R]=C>>>0,A[R+1]=T}utils.sum64=N;function O(A,R,y,b){var D=R+b>>>0,I=(D<R?1:0)+A+y;return I>>>0}utils.sum64_hi=O;function M(A,R,y,b){var D=R+b;return D>>>0}utils.sum64_lo=M;function F(A,R,y,b,D,I,T,C){var x=0,w=R;w=w+b>>>0,x+=w<R?1:0,w=w+I>>>0,x+=w<I?1:0,w=w+C>>>0,x+=w<C?1:0;var E=A+y+D+T+x;return E>>>0}utils.sum64_4_hi=F;function L(A,R,y,b,D,I,T,C){var x=R+b+I+C;return x>>>0}utils.sum64_4_lo=L;function k(A,R,y,b,D,I,T,C,x,w){var E=0,q=R;q=q+b>>>0,E+=q<R?1:0,q=q+I>>>0,E+=q<I?1:0,q=q+C>>>0,E+=q<C?1:0,q=q+w>>>0,E+=q<w?1:0;var G=A+y+D+T+x+E;return G>>>0}utils.sum64_5_hi=k;function P(A,R,y,b,D,I,T,C,x,w){var E=R+b+I+C+w;return E>>>0}utils.sum64_5_lo=P;function U(A,R,y){var b=R<<32-y|A>>>y;return b>>>0}utils.rotr64_hi=U;function B(A,R,y){var b=A<<32-y|R>>>y;return b>>>0}utils.rotr64_lo=B;function j(A,R,y){return A>>>y}utils.shr64_hi=j;function $(A,R,y){var b=A<<32-y|R>>>y;return b>>>0}return utils.shr64_lo=$,utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var r=requireUtils(),n=requireMinimalisticAssert();function a(){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}return common$1.BlockHash=a,a.prototype.update=function(o,s){if(o=r.toArray(o,s),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var l=o.length%this._delta8;this.pending=o.slice(o.length-l,o.length),this.pending.length===0&&(this.pending=null),o=r.join32(o,0,o.length-l,this.endian);for(var f=0;f<o.length;f+=this._delta32)this._update(o,f,f+this._delta32)}return this},a.prototype.digest=function(o){return this.update(this._pad()),n(this.pending===null),this._digest(o)},a.prototype._pad=function(){var o=this.pendingTotal,s=this._delta8,l=s-(o+this.padLength)%s,f=new Array(l+this.padLength);f[0]=128;for(var d=1;d<l;d++)f[d]=0;if(o<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)f[d++]=0;f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=o>>>24&255,f[d++]=o>>>16&255,f[d++]=o>>>8&255,f[d++]=o&255}else for(f[d++]=o&255,f[d++]=o>>>8&255,f[d++]=o>>>16&255,f[d++]=o>>>24&255,f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=0,u=8;u<this.padLength;u++)f[d++]=0;return f},common$1}var sha={},common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var r=requireUtils(),n=r.rotr32;function a(c,v,h,m){if(c===0)return i(v,h,m);if(c===1||c===3)return s(v,h,m);if(c===2)return o(v,h,m)}common.ft_1=a;function i(c,v,h){return c&v^~c&h}common.ch32=i;function o(c,v,h){return c&v^c&h^v&h}common.maj32=o;function s(c,v,h){return c^v^h}common.p32=s;function l(c){return n(c,2)^n(c,13)^n(c,22)}common.s0_256=l;function f(c){return n(c,6)^n(c,11)^n(c,25)}common.s1_256=f;function d(c){return n(c,7)^n(c,18)^c>>>3}common.g0_256=d;function u(c){return n(c,17)^n(c,19)^c>>>10}return common.g1_256=u,common}var _1,hasRequired_1;function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var r=requireUtils(),n=requireCommon$1(),a=requireCommon(),i=r.rotl32,o=r.sum32,s=r.sum32_5,l=a.ft_1,f=n.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return r.inherits(u,f),_1=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(v,h){for(var m=this.W,g=0;g<16;g++)m[g]=v[h+g];for(;g<m.length;g++)m[g]=i(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);var _=this.h[0],S=this.h[1],N=this.h[2],O=this.h[3],M=this.h[4];for(g=0;g<m.length;g++){var F=~~(g/20),L=s(i(_,5),l(F,S,N,O),M,m[g],d[F]);M=O,O=N,N=i(S,30),S=_,_=L}this.h[0]=o(this.h[0],_),this.h[1]=o(this.h[1],S),this.h[2]=o(this.h[2],N),this.h[3]=o(this.h[3],O),this.h[4]=o(this.h[4],M)},u.prototype._digest=function(v){return v==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},_1}var _256,hasRequired_256;function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var r=requireUtils(),n=requireCommon$1(),a=requireCommon(),i=requireMinimalisticAssert(),o=r.sum32,s=r.sum32_4,l=r.sum32_5,f=a.ch32,d=a.maj32,u=a.s0_256,c=a.s1_256,v=a.g0_256,h=a.g1_256,m=n.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 _(){if(!(this instanceof _))return new _;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}return r.inherits(_,m),_256=_,_.blockSize=512,_.outSize=256,_.hmacStrength=192,_.padLength=64,_.prototype._update=function(N,O){for(var M=this.W,F=0;F<16;F++)M[F]=N[O+F];for(;F<M.length;F++)M[F]=s(h(M[F-2]),M[F-7],v(M[F-15]),M[F-16]);var L=this.h[0],k=this.h[1],P=this.h[2],U=this.h[3],B=this.h[4],j=this.h[5],$=this.h[6],A=this.h[7];for(i(this.k.length===M.length),F=0;F<M.length;F++){var R=l(A,c(B),f(B,j,$),this.k[F],M[F]),y=o(u(L),d(L,k,P));A=$,$=j,j=B,B=o(U,R),U=P,P=k,k=L,L=o(R,y)}this.h[0]=o(this.h[0],L),this.h[1]=o(this.h[1],k),this.h[2]=o(this.h[2],P),this.h[3]=o(this.h[3],U),this.h[4]=o(this.h[4],B),this.h[5]=o(this.h[5],j),this.h[6]=o(this.h[6],$),this.h[7]=o(this.h[7],A)},_.prototype._digest=function(N){return N==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},_256}var _224,hasRequired_224;function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var r=requireUtils(),n=require_256();function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return r.inherits(a,n),_224=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(o){return o==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},_224}var _512,hasRequired_512;function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var r=requireUtils(),n=requireCommon$1(),a=requireMinimalisticAssert(),i=r.rotr64_hi,o=r.rotr64_lo,s=r.shr64_hi,l=r.shr64_lo,f=r.sum64,d=r.sum64_hi,u=r.sum64_lo,c=r.sum64_4_hi,v=r.sum64_4_lo,h=r.sum64_5_hi,m=r.sum64_5_lo,g=n.BlockHash,_=[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 S(){if(!(this instanceof S))return new S;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=_,this.W=new Array(160)}r.inherits(S,g),_512=S,S.blockSize=1024,S.outSize=512,S.hmacStrength=192,S.padLength=128,S.prototype._prepareBlock=function(y,b){for(var D=this.W,I=0;I<32;I++)D[I]=y[b+I];for(;I<D.length;I+=2){var T=$(D[I-4],D[I-3]),C=A(D[I-4],D[I-3]),x=D[I-14],w=D[I-13],E=B(D[I-30],D[I-29]),q=j(D[I-30],D[I-29]),G=D[I-32],z=D[I-31];D[I]=c(T,C,x,w,E,q,G,z),D[I+1]=v(T,C,x,w,E,q,G,z)}},S.prototype._update=function(y,b){this._prepareBlock(y,b);var D=this.W,I=this.h[0],T=this.h[1],C=this.h[2],x=this.h[3],w=this.h[4],E=this.h[5],q=this.h[6],G=this.h[7],z=this.h[8],H=this.h[9],V=this.h[10],K=this.h[11],Z=this.h[12],re=this.h[13],W=this.h[14],X=this.h[15];a(this.k.length===D.length);for(var J=0;J<D.length;J+=2){var ie=W,ne=X,ae=P(z,H),ue=U(z,H),fe=N(z,H,V,K,Z),se=O(z,H,V,K,Z,re),pe=this.k[J],ce=this.k[J+1],he=D[J],ve=D[J+1],ye=h(ie,ne,ae,ue,fe,se,pe,ce,he,ve),be=m(ie,ne,ae,ue,fe,se,pe,ce,he,ve);ie=L(I,T),ne=k(I,T),ae=M(I,T,C,x,w),ue=F(I,T,C,x,w,E);var _e=d(ie,ne,ae,ue),me=u(ie,ne,ae,ue);W=Z,X=re,Z=V,re=K,V=z,K=H,z=d(q,G,ye,be),H=u(G,G,ye,be),q=w,G=E,w=C,E=x,C=I,x=T,I=d(ye,be,_e,me),T=u(ye,be,_e,me)}f(this.h,0,I,T),f(this.h,2,C,x),f(this.h,4,w,E),f(this.h,6,q,G),f(this.h,8,z,H),f(this.h,10,V,K),f(this.h,12,Z,re),f(this.h,14,W,X)},S.prototype._digest=function(y){return y==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")};function N(R,y,b,D,I){var T=R&b^~R&I;return T<0&&(T+=4294967296),T}function O(R,y,b,D,I,T){var C=y&D^~y&T;return C<0&&(C+=4294967296),C}function M(R,y,b,D,I){var T=R&b^R&I^b&I;return T<0&&(T+=4294967296),T}function F(R,y,b,D,I,T){var C=y&D^y&T^D&T;return C<0&&(C+=4294967296),C}function L(R,y){var b=i(R,y,28),D=i(y,R,2),I=i(y,R,7),T=b^D^I;return T<0&&(T+=4294967296),T}function k(R,y){var b=o(R,y,28),D=o(y,R,2),I=o(y,R,7),T=b^D^I;return T<0&&(T+=4294967296),T}function P(R,y){var b=i(R,y,14),D=i(R,y,18),I=i(y,R,9),T=b^D^I;return T<0&&(T+=4294967296),T}function U(R,y){var b=o(R,y,14),D=o(R,y,18),I=o(y,R,9),T=b^D^I;return T<0&&(T+=4294967296),T}function B(R,y){var b=i(R,y,1),D=i(R,y,8),I=s(R,y,7),T=b^D^I;return T<0&&(T+=4294967296),T}function j(R,y){var b=o(R,y,1),D=o(R,y,8),I=l(R,y,7),T=b^D^I;return T<0&&(T+=4294967296),T}function $(R,y){var b=i(R,y,19),D=i(y,R,29),I=s(R,y,6),T=b^D^I;return T<0&&(T+=4294967296),T}function A(R,y){var b=o(R,y,19),D=o(y,R,29),I=l(R,y,6),T=b^D^I;return T<0&&(T+=4294967296),T}return _512}var _384,hasRequired_384;function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var r=requireUtils(),n=require_512();function a(){if(!(this instanceof a))return new a;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return r.inherits(a,n),_384=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(o){return o==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},_384}var hasRequiredSha;function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var r=requireUtils(),n=requireCommon$1(),a=r.rotl32,i=r.sum32,o=r.sum32_3,s=r.sum32_4,l=n.BlockHash;function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}r.inherits(f,l),ripemd.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(S,N){for(var O=this.h[0],M=this.h[1],F=this.h[2],L=this.h[3],k=this.h[4],P=O,U=M,B=F,j=L,$=k,A=0;A<80;A++){var R=i(a(s(O,d(A,M,F,L),S[v[A]+N],u(A)),m[A]),k);O=k,k=L,L=a(F,10),F=M,M=R,R=i(a(s(P,d(79-A,U,B,j),S[h[A]+N],c(A)),g[A]),$),P=$,$=j,j=a(B,10),B=U,U=R}R=o(this.h[1],F,j),this.h[1]=o(this.h[2],L,$),this.h[2]=o(this.h[3],k,P),this.h[3]=o(this.h[4],O,U),this.h[4]=o(this.h[0],M,B),this.h[0]=R},f.prototype._digest=function(S){return S==="hex"?r.toHex32(this.h,"little"):r.split32(this.h,"little")};function d(_,S,N,O){return _<=15?S^N^O:_<=31?S&N|~S&O:_<=47?(S|~N)^O:_<=63?S&O|N&~O:S^(N|~O)}function u(_){return _<=15?0:_<=31?1518500249:_<=47?1859775393:_<=63?2400959708:2840853838}function c(_){return _<=15?1352829926:_<=31?1548603684:_<=47?1836072691:_<=63?2053994217:0}var v=[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],h=[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],m=[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];return ripemd}var hmac$2,hasRequiredHmac$1;function requireHmac$1(){if(hasRequiredHmac$1)return hmac$2;hasRequiredHmac$1=1;var r=requireUtils(),n=requireMinimalisticAssert();function a(i,o,s){if(!(this instanceof a))return new a(i,o,s);this.Hash=i,this.blockSize=i.blockSize/8,this.outSize=i.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(o,s))}return hmac$2=a,a.prototype._init=function(o){o.length>this.blockSize&&(o=new this.Hash().update(o).digest()),n(o.length<=this.blockSize);for(var s=o.length;s<this.blockSize;s++)o.push(0);for(s=0;s<o.length;s++)o[s]^=54;for(this.inner=new this.Hash().update(o),s=0;s<o.length;s++)o[s]^=106;this.outer=new this.Hash().update(o)},a.prototype.update=function(o,s){return this.inner.update(o,s),this},a.prototype.digest=function(o){return this.outer.update(this.inner.digest()),this.outer.digest(o)},hmac$2}var hasRequiredHash;function requireHash(){return hasRequiredHash||(hasRequiredHash=1,function(r){var n=r;n.utils=requireUtils(),n.common=requireCommon$1(),n.sha=requireSha(),n.ripemd=requireRipemd(),n.hmac=requireHmac$1(),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160}(hash)),hash}var secp256k1,hasRequiredSecp256k1;function requireSecp256k1(){return hasRequiredSecp256k1||(hasRequiredSecp256k1=1,secp256k1={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"]]}}),secp256k1}var hasRequiredCurves;function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,function(r){var n=r,a=requireHash(),i=requireCurve(),o=requireUtils$1(),s=o.assert;function l(u){u.type==="short"?this.curve=new i.short(u):u.type==="edwards"?this.curve=new i.edwards(u):this.curve=new i.mont(u),this.g=this.curve.g,this.n=this.curve.n,this.hash=u.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}n.PresetCurve=l;function f(u,c){Object.defineProperty(n,u,{configurable:!0,enumerable:!0,get:function(){var v=new l(c);return Object.defineProperty(n,u,{configurable:!0,enumerable:!0,value:v}),v}})}f("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:a.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"]}),f("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:a.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var d;try{d=requireSecp256k1()}catch{d=void 0}f("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",d]})}(curves)),curves}var hmacDrbg,hasRequiredHmacDrbg;function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var r=requireHash(),n=requireUtils$2(),a=requireMinimalisticAssert();function i(o){if(!(this instanceof i))return new i(o);this.hash=o.hash,this.predResist=!!o.predResist,this.outLen=this.hash.outSize,this.minEntropy=o.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var s=n.toArray(o.entropy,o.entropyEnc||"hex"),l=n.toArray(o.nonce,o.nonceEnc||"hex"),f=n.toArray(o.pers,o.persEnc||"hex");a(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(s,l,f)}return hmacDrbg=i,i.prototype._init=function(s,l,f){var d=s.concat(l).concat(f);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var u=0;u<this.V.length;u++)this.K[u]=0,this.V[u]=1;this._update(d),this._reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},i.prototype._update=function(s){var l=this._hmac().update(this.V).update([0]);s&&(l=l.update(s)),this.K=l.digest(),this.V=this._hmac().update(this.V).digest(),s&&(this.K=this._hmac().update(this.V).update([1]).update(s).digest(),this.V=this._hmac().update(this.V).digest())},i.prototype.reseed=function(s,l,f,d){typeof l!="string"&&(d=f,f=l,l=null),s=n.toArray(s,l),f=n.toArray(f,d),a(s.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(s.concat(f||[])),this._reseed=1},i.prototype.generate=function(s,l,f,d){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof l!="string"&&(d=f,f=l,l=null),f&&(f=n.toArray(f,d||"hex"),this._update(f));for(var u=[];u.length<s;)this.V=this._hmac().update(this.V).digest(),u=u.concat(this.V);var c=u.slice(0,s);return this._update(f),this._reseed++,n.encode(c,l)},hmacDrbg}var key$1,hasRequiredKey$1;function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var r=requireBn$2(),n=requireUtils$1(),a=n.assert;function i(o,s){this.ec=o,this.priv=null,this.pub=null,s.priv&&this._importPrivate(s.priv,s.privEnc),s.pub&&this._importPublic(s.pub,s.pubEnc)}return key$1=i,i.fromPublic=function(s,l,f){return l instanceof i?l:new i(s,{pub:l,pubEnc:f})},i.fromPrivate=function(s,l,f){return l instanceof i?l:new i(s,{priv:l,privEnc:f})},i.prototype.validate=function(){var s=this.getPublic();return s.isInfinity()?{result:!1,reason:"Invalid public key"}:s.validate()?s.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"}},i.prototype.getPublic=function(s,l){return typeof s=="string"&&(l=s,s=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),l?this.pub.encode(l,s):this.pub},i.prototype.getPrivate=function(s){return s==="hex"?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(s,l){this.priv=new r(s,l||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(s,l){if(s.x||s.y){this.ec.curve.type==="mont"?a(s.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&a(s.x&&s.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(s.x,s.y);return}this.pub=this.ec.curve.decodePoint(s,l)},i.prototype.derive=function(s){return s.validate()||a(s.validate(),"public point not validated"),s.mul(this.priv).getX()},i.prototype.sign=function(s,l,f){return this.ec.sign(s,this,l,f)},i.prototype.verify=function(s,l,f){return this.ec.verify(s,l,this,void 0,f)},i.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}var signature$1,hasRequiredSignature$1;function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var r=requireBn$2(),n=requireUtils$1(),a=n.assert;function i(d,u){if(d instanceof i)return d;this._importDER(d,u)||(a(d.r&&d.s,"Signature without r or s"),this.r=new r(d.r,16),this.s=new r(d.s,16),d.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=d.recoveryParam)}signature$1=i;function o(){this.place=0}function s(d,u){var c=d[u.place++];if(!(c&128))return c;var v=c&15;if(v===0||v>4||d[u.place]===0)return!1;for(var h=0,m=0,g=u.place;m<v;m++,g++)h<<=8,h|=d[g],h>>>=0;return h<=127?!1:(u.place=g,h)}function l(d){for(var u=0,c=d.length-1;!d[u]&&!(d[u+1]&128)&&u<c;)u++;return u===0?d:d.slice(u)}i.prototype._importDER=function(u,c){u=n.toArray(u,c);var v=new o;if(u[v.place++]!==48)return!1;var h=s(u,v);if(h===!1||h+v.place!==u.length||u[v.place++]!==2)return!1;var m=s(u,v);if(m===!1||(u[v.place]&128)!==0)return!1;var g=u.slice(v.place,m+v.place);if(v.place+=m,u[v.place++]!==2)return!1;var _=s(u,v);if(_===!1||u.length!==_+v.place||(u[v.place]&128)!==0)return!1;var S=u.slice(v.place,_+v.place);if(g[0]===0)if(g[1]&128)g=g.slice(1);else return!1;if(S[0]===0)if(S[1]&128)S=S.slice(1);else return!1;return this.r=new r(g),this.s=new r(S),this.recoveryParam=null,!0};function f(d,u){if(u<128){d.push(u);return}var c=1+(Math.log(u)/Math.LN2>>>3);for(d.push(c|128);--c;)d.push(u>>>(c<<3)&255);d.push(u)}return i.prototype.toDER=function(u){var c=this.r.toArray(),v=this.s.toArray();for(c[0]&128&&(c=[0].concat(c)),v[0]&128&&(v=[0].concat(v)),c=l(c),v=l(v);!v[0]&&!(v[1]&128);)v=v.slice(1);var h=[2];f(h,c.length),h=h.concat(c),h.push(2),f(h,v.length);var m=h.concat(v),g=[48];return f(g,m.length),g=g.concat(m),n.encode(g,u)},signature$1}var ec,hasRequiredEc;function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var r=requireBn$2(),n=requireHmacDrbg(),a=requireUtils$1(),i=requireCurves(),o=requireBrorand(),s=a.assert,l=requireKey$1(),f=requireSignature$1();function d(u){if(!(this instanceof d))return new d(u);typeof u=="string"&&(s(Object.prototype.hasOwnProperty.call(i,u),"Unknown curve "+u),u=i[u]),u instanceof i.PresetCurve&&(u={curve:u}),this.curve=u.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=u.curve.g,this.g.precompute(u.curve.n.bitLength()+1),this.hash=u.hash||u.curve.hash}return ec=d,d.prototype.keyPair=function(c){return new l(this,c)},d.prototype.keyFromPrivate=function(c,v){return l.fromPrivate(this,c,v)},d.prototype.keyFromPublic=function(c,v){return l.fromPublic(this,c,v)},d.prototype.genKeyPair=function(c){c||(c={});for(var v=new n({hash:this.hash,pers:c.pers,persEnc:c.persEnc||"utf8",entropy:c.entropy||o(this.hash.hmacStrength),entropyEnc:c.entropy&&c.entropyEnc||"utf8",nonce:this.n.toArray()}),h=this.n.byteLength(),m=this.n.sub(new r(2));;){var g=new r(v.generate(h));if(!(g.cmp(m)>0))return g.iaddn(1),this.keyFromPrivate(g)}},d.prototype._truncateToN=function(c,v,h){var m;if(r.isBN(c)||typeof c=="number")c=new r(c,16),m=c.byteLength();else if(typeof c=="object")m=c.length,c=new r(c,16);else{var g=c.toString();m=g.length+1>>>1,c=new r(g,16)}typeof h!="number"&&(h=m*8);var _=h-this.n.bitLength();return _>0&&(c=c.ushrn(_)),!v&&c.cmp(this.n)>=0?c.sub(this.n):c},d.prototype.sign=function(c,v,h,m){if(typeof h=="object"&&(m=h,h=null),m||(m={}),typeof c!="string"&&typeof c!="number"&&!r.isBN(c)){s(typeof c=="object"&&c&&typeof c.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),s(c.length>>>0===c.length);for(var g=0;g<c.length;g++)s((c[g]&255)===c[g])}v=this.keyFromPrivate(v,h),c=this._truncateToN(c,!1,m.msgBitLength),s(!c.isNeg(),"Can not sign a negative message");var _=this.n.byteLength(),S=v.getPrivate().toArray("be",_),N=c.toArray("be",_);s(new r(N).eq(c),"Can not sign message");for(var O=new n({hash:this.hash,entropy:S,nonce:N,pers:m.pers,persEnc:m.persEnc||"utf8"}),M=this.n.sub(new r(1)),F=0;;F++){var L=m.k?m.k(F):new r(O.generate(this.n.byteLength()));if(L=this._truncateToN(L,!0),!(L.cmpn(1)<=0||L.cmp(M)>=0)){var k=this.g.mul(L);if(!k.isInfinity()){var P=k.getX(),U=P.umod(this.n);if(U.cmpn(0)!==0){var B=L.invm(this.n).mul(U.mul(v.getPrivate()).iadd(c));if(B=B.umod(this.n),B.cmpn(0)!==0){var j=(k.getY().isOdd()?1:0)|(P.cmp(U)!==0?2:0);return m.canonical&&B.cmp(this.nh)>0&&(B=this.n.sub(B),j^=1),new f({r:U,s:B,recoveryParam:j})}}}}}},d.prototype.verify=function(c,v,h,m,g){g||(g={}),c=this._truncateToN(c,!1,g.msgBitLength),h=this.keyFromPublic(h,m),v=new f(v,"hex");var _=v.r,S=v.s;if(_.cmpn(1)<0||_.cmp(this.n)>=0||S.cmpn(1)<0||S.cmp(this.n)>=0)return!1;var N=S.invm(this.n),O=N.mul(c).umod(this.n),M=N.mul(_).umod(this.n),F;return this.curve._maxwellTrick?(F=this.g.jmulAdd(O,h.getPublic(),M),F.isInfinity()?!1:F.eqXToP(_)):(F=this.g.mulAdd(O,h.getPublic(),M),F.isInfinity()?!1:F.getX().umod(this.n).cmp(_)===0)},d.prototype.recoverPubKey=function(u,c,v,h){s((3&v)===v,"The recovery param is more than two bits"),c=new f(c,h);var m=this.n,g=new r(u),_=c.r,S=c.s,N=v&1,O=v>>1;if(_.cmp(this.curve.p.umod(this.curve.n))>=0&&O)throw new Error("Unable to find sencond key candinate");O?_=this.curve.pointFromX(_.add(this.curve.n),N):_=this.curve.pointFromX(_,N);var M=c.r.invm(m),F=m.sub(g).mul(M).umod(m),L=S.mul(M).umod(m);return this.g.mulAdd(F,_,L)},d.prototype.getKeyRecoveryParam=function(u,c,v,h){if(c=new f(c,h),c.recoveryParam!==null)return c.recoveryParam;for(var m=0;m<4;m++){var g;try{g=this.recoverPubKey(u,c,m)}catch{continue}if(g.eq(v))return m}throw new Error("Unable to find valid recovery factor")},ec}var key,hasRequiredKey;function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var r=requireUtils$1(),n=r.assert,a=r.parseBytes,i=r.cachedProperty;function o(s,l){this.eddsa=s,this._secret=a(l.secret),s.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=a(l.pub)}return o.fromPublic=function(l,f){return f instanceof o?f:new o(l,{pub:f})},o.fromSecret=function(l,f){return f instanceof o?f:new o(l,{secret:f})},o.prototype.secret=function(){return this._secret},i(o,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),i(o,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),i(o,"privBytes",function(){var l=this.eddsa,f=this.hash(),d=l.encodingLength-1,u=f.slice(0,l.encodingLength);return u[0]&=248,u[d]&=127,u[d]|=64,u}),i(o,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),i(o,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),i(o,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),o.prototype.sign=function(l){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(l,this)},o.prototype.verify=function(l,f){return this.eddsa.verify(l,f,this)},o.prototype.getSecret=function(l){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),l)},o.prototype.getPublic=function(l){return r.encode(this.pubBytes(),l)},key=o,key}var signature,hasRequiredSignature;function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var r=requireBn$2(),n=requireUtils$1(),a=n.assert,i=n.cachedProperty,o=n.parseBytes;function s(l,f){this.eddsa=l,typeof f!="object"&&(f=o(f)),Array.isArray(f)&&(a(f.length===l.encodingLength*2,"Signature has invalid size"),f={R:f.slice(0,l.encodingLength),S:f.slice(l.encodingLength)}),a(f.R&&f.S,"Signature without R or S"),l.isPoint(f.R)&&(this._R=f.R),f.S instanceof r&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}return i(s,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),i(s,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),i(s,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),i(s,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},signature=s,signature}var eddsa,hasRequiredEddsa;function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var r=requireHash(),n=requireCurves(),a=requireUtils$1(),i=a.assert,o=a.parseBytes,s=requireKey(),l=requireSignature();function f(d){if(i(d==="ed25519","only tested with ed25519 so far"),!(this instanceof f))return new f(d);d=n[d].curve,this.curve=d,this.g=d.g,this.g.precompute(d.n.bitLength()+1),this.pointClass=d.point().constructor,this.encodingLength=Math.ceil(d.n.bitLength()/8),this.hash=r.sha512}return eddsa=f,f.prototype.sign=function(u,c){u=o(u);var v=this.keyFromSecret(c),h=this.hashInt(v.messagePrefix(),u),m=this.g.mul(h),g=this.encodePoint(m),_=this.hashInt(g,v.pubBytes(),u).mul(v.priv()),S=h.add(_).umod(this.curve.n);return this.makeSignature({R:m,S,Rencoded:g})},f.prototype.verify=function(u,c,v){if(u=o(u),c=this.makeSignature(c),c.S().gte(c.eddsa.curve.n)||c.S().isNeg())return!1;var h=this.keyFromPublic(v),m=this.hashInt(c.Rencoded(),h.pubBytes(),u),g=this.g.mul(c.S()),_=c.R().add(h.pub().mul(m));return _.eq(g)},f.prototype.hashInt=function(){for(var u=this.hash(),c=0;c<arguments.length;c++)u.update(arguments[c]);return a.intFromLE(u.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(u){return s.fromPublic(this,u)},f.prototype.keyFromSecret=function(u){return s.fromSecret(this,u)},f.prototype.makeSignature=function(u){return u instanceof l?u:new l(this,u)},f.prototype.encodePoint=function(u){var c=u.getY().toArray("le",this.encodingLength);return c[this.encodingLength-1]|=u.getX().isOdd()?128:0,c},f.prototype.decodePoint=function(u){u=a.parseBytes(u);var c=u.length-1,v=u.slice(0,c).concat(u[c]&-129),h=(u[c]&128)!==0,m=a.intFromLE(v);return this.curve.pointFromY(m,h)},f.prototype.encodeInt=function(u){return u.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(u){return a.intFromLE(u)},f.prototype.isPoint=function(u){return u instanceof this.pointClass},eddsa}var hasRequiredElliptic;function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,function(r){var n=r;n.version=require$$0$1.version,n.utils=requireUtils$1(),n.rand=requireBrorand(),n.curve=requireCurve(),n.curves=requireCurves(),n.ec=requireEc(),n.eddsa=requireEddsa()}(elliptic)),elliptic}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,function(r){(function(n,a){function i(R,y){if(!R)throw new Error(y||"Assertion failed")}function o(R,y){R.super_=y;var b=function(){};b.prototype=y.prototype,R.prototype=new b,R.prototype.constructor=R}function s(R,y,b){if(s.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((y==="le"||y==="be")&&(b=y,y=10),this._init(R||0,y||10,b||"be"))}typeof n=="object"?n.exports=s:a.BN=s,s.BN=s,s.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=requireDist().Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,b){return y.cmp(b)>0?y:b},s.min=function(y,b){return y.cmp(b)<0?y:b},s.prototype._init=function(y,b,D){if(typeof y=="number")return this._initNumber(y,b,D);if(typeof y=="object")return this._initArray(y,b,D);b==="hex"&&(b=16),i(b===(b|0)&&b>=2&&b<=36),y=y.toString().replace(/\s+/g,"");var I=0;y[0]==="-"&&(I++,this.negative=1),I<y.length&&(b===16?this._parseHex(y,I,D):(this._parseBase(y,b,I),D==="le"&&this._initArray(this.toArray(),b,D)))},s.prototype._initNumber=function(y,b,D){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(i(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),D==="le"&&this._initArray(this.toArray(),b,D)},s.prototype._initArray=function(y,b,D){if(i(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T,C,x=0;if(D==="be")for(I=y.length-1,T=0;I>=0;I-=3)C=y[I]|y[I-1]<<8|y[I-2]<<16,this.words[T]|=C<<x&67108863,this.words[T+1]=C>>>26-x&67108863,x+=24,x>=26&&(x-=26,T++);else if(D==="le")for(I=0,T=0;I<y.length;I+=3)C=y[I]|y[I+1]<<8|y[I+2]<<16,this.words[T]|=C<<x&67108863,this.words[T+1]=C>>>26-x&67108863,x+=24,x>=26&&(x-=26,T++);return this._strip()};function f(R,y){var b=R.charCodeAt(y);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;i(!1,"Invalid character in "+R)}function d(R,y,b){var D=f(R,b);return b-1>=y&&(D|=f(R,b-1)<<4),D}s.prototype._parseHex=function(y,b,D){this.length=Math.ceil((y.length-b)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var T=0,C=0,x;if(D==="be")for(I=y.length-1;I>=b;I-=2)x=d(y,b,I)<<T,this.words[C]|=x&67108863,T>=18?(T-=18,C+=1,this.words[C]|=x>>>26):T+=8;else{var w=y.length-b;for(I=w%2===0?b+1:b;I<y.length;I+=2)x=d(y,b,I)<<T,this.words[C]|=x&67108863,T>=18?(T-=18,C+=1,this.words[C]|=x>>>26):T+=8}this._strip()};function u(R,y,b,D){for(var I=0,T=0,C=Math.min(R.length,b),x=y;x<C;x++){var w=R.charCodeAt(x)-48;I*=D,w>=49?T=w-49+10:w>=17?T=w-17+10:T=w,i(w>=0&&T<D,"Invalid character"),I+=T}return I}s.prototype._parseBase=function(y,b,D){this.words=[0],this.length=1;for(var I=0,T=1;T<=67108863;T*=b)I++;I--,T=T/b|0;for(var C=y.length-D,x=C%I,w=Math.min(C,C-x)+D,E=0,q=D;q<w;q+=I)E=u(y,q,q+I,b),this.imuln(T),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(x!==0){var G=1;for(E=u(y,q,y.length,b),q=0;q<x;q++)G*=b;this.imuln(G),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},s.prototype.copy=function(y){y.words=new Array(this.length);for(var b=0;b<this.length;b++)y.words[b]=this.words[b];y.length=this.length,y.negative=this.negative,y.red=this.red};function c(R,y){R.words=y.words,R.length=y.length,R.negative=y.negative,R.red=y.red}if(s.prototype._move=function(y){c(y,this)},s.prototype.clone=function(){var y=new s(null);return this.copy(y),y},s.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch{s.prototype.inspect=v}else s.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","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"],m=[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],g=[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];s.prototype.toString=function(y,b){y=y||10,b=b|0||1;var D;if(y===16||y==="hex"){D="";for(var I=0,T=0,C=0;C<this.length;C++){var x=this.words[C],w=((x<<I|T)&16777215).toString(16);T=x>>>24-I&16777215,I+=2,I>=26&&(I-=26,C--),T!==0||C!==this.length-1?D=h[6-w.length]+w+D:D=w+D}for(T!==0&&(D=T.toString(16)+D);D.length%b!==0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}if(y===(y|0)&&y>=2&&y<=36){var E=m[y],q=g[y];D="";var G=this.clone();for(G.negative=0;!G.isZero();){var z=G.modrn(q).toString(y);G=G.idivn(q),G.isZero()?D=z+D:D=h[E-z.length]+z+D}for(this.isZero()&&(D="0"+D);D.length%b!==0;)D="0"+D;return this.negative!==0&&(D="-"+D),D}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},l&&(s.prototype.toBuffer=function(y,b){return this.toArrayLike(l,y,b)}),s.prototype.toArray=function(y,b){return this.toArrayLike(Array,y,b)};var _=function(y,b){return y.allocUnsafe?y.allocUnsafe(b):new y(b)};s.prototype.toArrayLike=function(y,b,D){this._strip();var I=this.byteLength(),T=D||Math.max(1,I);i(I<=T,"byte array longer than desired length"),i(T>0,"Requested array length <= 0");var C=_(y,T),x=b==="le"?"LE":"BE";return this["_toArrayLike"+x](C,I),C},s.prototype._toArrayLikeLE=function(y,b){for(var D=0,I=0,T=0,C=0;T<this.length;T++){var x=this.words[T]<<C|I;y[D++]=x&255,D<y.length&&(y[D++]=x>>8&255),D<y.length&&(y[D++]=x>>16&255),C===6?(D<y.length&&(y[D++]=x>>24&255),I=0,C=0):(I=x>>>24,C+=2)}if(D<y.length)for(y[D++]=I;D<y.length;)y[D++]=0},s.prototype._toArrayLikeBE=function(y,b){for(var D=y.length-1,I=0,T=0,C=0;T<this.length;T++){var x=this.words[T]<<C|I;y[D--]=x&255,D>=0&&(y[D--]=x>>8&255),D>=0&&(y[D--]=x>>16&255),C===6?(D>=0&&(y[D--]=x>>24&255),I=0,C=0):(I=x>>>24,C+=2)}if(D>=0)for(y[D--]=I;D>=0;)y[D--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var b=y,D=0;return b>=4096&&(D+=13,b>>>=13),b>=64&&(D+=7,b>>>=7),b>=8&&(D+=4,b>>>=4),b>=2&&(D+=2,b>>>=2),D+b},s.prototype._zeroBits=function(y){if(y===0)return 26;var b=y,D=0;return(b&8191)===0&&(D+=13,b>>>=13),(b&127)===0&&(D+=7,b>>>=7),(b&15)===0&&(D+=4,b>>>=4),(b&3)===0&&(D+=2,b>>>=2),(b&1)===0&&D++,D},s.prototype.bitLength=function(){var y=this.words[this.length-1],b=this._countBits(y);return(this.length-1)*26+b};function S(R){for(var y=new Array(R.bitLength()),b=0;b<y.length;b++){var D=b/26|0,I=b%26;y[b]=R.words[D]>>>I&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,b=0;b<this.length;b++){var D=this._zeroBits(this.words[b]);if(y+=D,D!==26)break}return y},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},s.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var b=0;b<y.length;b++)this.words[b]=this.words[b]|y.words[b];return this._strip()},s.prototype.ior=function(y){return i((this.negative|y.negative)===0),this.iuor(y)},s.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var b;this.length>y.length?b=y:b=this;for(var D=0;D<b.length;D++)this.words[D]=this.words[D]&y.words[D];return this.length=b.length,this._strip()},s.prototype.iand=function(y){return i((this.negative|y.negative)===0),this.iuand(y)},s.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var b,D;this.length>y.length?(b=this,D=y):(b=y,D=this);for(var I=0;I<D.length;I++)this.words[I]=b.words[I]^D.words[I];if(this!==b)for(;I<b.length;I++)this.words[I]=b.words[I];return this.length=b.length,this._strip()},s.prototype.ixor=function(y){return i((this.negative|y.negative)===0),this.iuxor(y)},s.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){i(typeof y=="number"&&y>=0);var b=Math.ceil(y/26)|0,D=y%26;this._expand(b),D>0&&b--;for(var I=0;I<b;I++)this.words[I]=~this.words[I]&67108863;return D>0&&(this.words[I]=~this.words[I]&67108863>>26-D),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,b){i(typeof y=="number"&&y>=0);var D=y/26|0,I=y%26;return this._expand(D+1),b?this.words[D]=this.words[D]|1<<I:this.words[D]=this.words[D]&~(1<<I),this._strip()},s.prototype.iadd=function(y){var b;if(this.negative!==0&&y.negative===0)return this.negative=0,b=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,b=this.isub(y),y.negative=1,b._normSign();var D,I;this.length>y.length?(D=this,I=y):(D=y,I=this);for(var T=0,C=0;C<I.length;C++)b=(D.words[C]|0)+(I.words[C]|0)+T,this.words[C]=b&67108863,T=b>>>26;for(;T!==0&&C<D.length;C++)b=(D.words[C]|0)+T,this.words[C]=b&67108863,T=b>>>26;if(this.length=D.length,T!==0)this.words[this.length]=T,this.length++;else if(D!==this)for(;C<D.length;C++)this.words[C]=D.words[C];return this},s.prototype.add=function(y){var b;return y.negative!==0&&this.negative===0?(y.negative=0,b=this.sub(y),y.negative^=1,b):y.negative===0&&this.negative!==0?(this.negative=0,b=y.sub(this),this.negative=1,b):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var b=this.iadd(y);return y.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var D=this.cmp(y);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,T;D>0?(I=this,T=y):(I=y,T=this);for(var C=0,x=0;x<T.length;x++)b=(I.words[x]|0)-(T.words[x]|0)+C,C=b>>26,this.words[x]=b&67108863;for(;C!==0&&x<I.length;x++)b=(I.words[x]|0)+C,C=b>>26,this.words[x]=b&67108863;if(C===0&&x<I.length&&I!==this)for(;x<I.length;x++)this.words[x]=I.words[x];return this.length=Math.max(this.length,x),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(y){return this.clone().isub(y)};function N(R,y,b){b.negative=y.negative^R.negative;var D=R.length+y.length|0;b.length=D,D=D-1|0;var I=R.words[0]|0,T=y.words[0]|0,C=I*T,x=C&67108863,w=C/67108864|0;b.words[0]=x;for(var E=1;E<D;E++){for(var q=w>>>26,G=w&67108863,z=Math.min(E,y.length-1),H=Math.max(0,E-R.length+1);H<=z;H++){var V=E-H|0;I=R.words[V]|0,T=y.words[H]|0,C=I*T+G,q+=C/67108864|0,G=C&67108863}b.words[E]=G|0,w=q|0}return w!==0?b.words[E]=w|0:b.length--,b._strip()}var O=function(y,b,D){var I=y.words,T=b.words,C=D.words,x=0,w,E,q,G=I[0]|0,z=G&8191,H=G>>>13,V=I[1]|0,K=V&8191,Z=V>>>13,re=I[2]|0,W=re&8191,X=re>>>13,J=I[3]|0,ie=J&8191,ne=J>>>13,ae=I[4]|0,ue=ae&8191,fe=ae>>>13,se=I[5]|0,pe=se&8191,ce=se>>>13,he=I[6]|0,ve=he&8191,ye=he>>>13,be=I[7]|0,_e=be&8191,me=be>>>13,Pe=I[8]|0,Ne=Pe&8191,Ee=Pe>>>13,Be=I[9]|0,Ce=Be&8191,Re=Be>>>13,Ge=T[0]|0,Me=Ge&8191,Te=Ge>>>13,Ke=T[1]|0,Fe=Ke&8191,Ie=Ke>>>13,Qe=T[2]|0,qe=Qe&8191,Se=Qe>>>13,je=T[3]|0,Le=je&8191,we=je>>>13,He=T[4]|0,$e=He&8191,ee=He>>>13,Q=T[5]|0,Y=Q&8191,te=Q>>>13,oe=T[6]|0,le=oe&8191,de=oe>>>13,De=T[7]|0,Ae=De&8191,ge=De>>>13,ke=T[8]|0,xe=ke&8191,Oe=ke>>>13,ze=T[9]|0,Ue=ze&8191,Ve=ze>>>13;D.negative=y.negative^b.negative,D.length=19,w=Math.imul(z,Me),E=Math.imul(z,Te),E=E+Math.imul(H,Me)|0,q=Math.imul(H,Te);var Ye=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,w=Math.imul(K,Me),E=Math.imul(K,Te),E=E+Math.imul(Z,Me)|0,q=Math.imul(Z,Te),w=w+Math.imul(z,Fe)|0,E=E+Math.imul(z,Ie)|0,E=E+Math.imul(H,Fe)|0,q=q+Math.imul(H,Ie)|0;var We=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(We>>>26)|0,We&=67108863,w=Math.imul(W,Me),E=Math.imul(W,Te),E=E+Math.imul(X,Me)|0,q=Math.imul(X,Te),w=w+Math.imul(K,Fe)|0,E=E+Math.imul(K,Ie)|0,E=E+Math.imul(Z,Fe)|0,q=q+Math.imul(Z,Ie)|0,w=w+Math.imul(z,qe)|0,E=E+Math.imul(z,Se)|0,E=E+Math.imul(H,qe)|0,q=q+Math.imul(H,Se)|0;var Xe=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,w=Math.imul(ie,Me),E=Math.imul(ie,Te),E=E+Math.imul(ne,Me)|0,q=Math.imul(ne,Te),w=w+Math.imul(W,Fe)|0,E=E+Math.imul(W,Ie)|0,E=E+Math.imul(X,Fe)|0,q=q+Math.imul(X,Ie)|0,w=w+Math.imul(K,qe)|0,E=E+Math.imul(K,Se)|0,E=E+Math.imul(Z,qe)|0,q=q+Math.imul(Z,Se)|0,w=w+Math.imul(z,Le)|0,E=E+Math.imul(z,we)|0,E=E+Math.imul(H,Le)|0,q=q+Math.imul(H,we)|0;var Je=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Je>>>26)|0,Je&=67108863,w=Math.imul(ue,Me),E=Math.imul(ue,Te),E=E+Math.imul(fe,Me)|0,q=Math.imul(fe,Te),w=w+Math.imul(ie,Fe)|0,E=E+Math.imul(ie,Ie)|0,E=E+Math.imul(ne,Fe)|0,q=q+Math.imul(ne,Ie)|0,w=w+Math.imul(W,qe)|0,E=E+Math.imul(W,Se)|0,E=E+Math.imul(X,qe)|0,q=q+Math.imul(X,Se)|0,w=w+Math.imul(K,Le)|0,E=E+Math.imul(K,we)|0,E=E+Math.imul(Z,Le)|0,q=q+Math.imul(Z,we)|0,w=w+Math.imul(z,$e)|0,E=E+Math.imul(z,ee)|0,E=E+Math.imul(H,$e)|0,q=q+Math.imul(H,ee)|0;var Ze=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,w=Math.imul(pe,Me),E=Math.imul(pe,Te),E=E+Math.imul(ce,Me)|0,q=Math.imul(ce,Te),w=w+Math.imul(ue,Fe)|0,E=E+Math.imul(ue,Ie)|0,E=E+Math.imul(fe,Fe)|0,q=q+Math.imul(fe,Ie)|0,w=w+Math.imul(ie,qe)|0,E=E+Math.imul(ie,Se)|0,E=E+Math.imul(ne,qe)|0,q=q+Math.imul(ne,Se)|0,w=w+Math.imul(W,Le)|0,E=E+Math.imul(W,we)|0,E=E+Math.imul(X,Le)|0,q=q+Math.imul(X,we)|0,w=w+Math.imul(K,$e)|0,E=E+Math.imul(K,ee)|0,E=E+Math.imul(Z,$e)|0,q=q+Math.imul(Z,ee)|0,w=w+Math.imul(z,Y)|0,E=E+Math.imul(z,te)|0,E=E+Math.imul(H,Y)|0,q=q+Math.imul(H,te)|0;var er=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(er>>>26)|0,er&=67108863,w=Math.imul(ve,Me),E=Math.imul(ve,Te),E=E+Math.imul(ye,Me)|0,q=Math.imul(ye,Te),w=w+Math.imul(pe,Fe)|0,E=E+Math.imul(pe,Ie)|0,E=E+Math.imul(ce,Fe)|0,q=q+Math.imul(ce,Ie)|0,w=w+Math.imul(ue,qe)|0,E=E+Math.imul(ue,Se)|0,E=E+Math.imul(fe,qe)|0,q=q+Math.imul(fe,Se)|0,w=w+Math.imul(ie,Le)|0,E=E+Math.imul(ie,we)|0,E=E+Math.imul(ne,Le)|0,q=q+Math.imul(ne,we)|0,w=w+Math.imul(W,$e)|0,E=E+Math.imul(W,ee)|0,E=E+Math.imul(X,$e)|0,q=q+Math.imul(X,ee)|0,w=w+Math.imul(K,Y)|0,E=E+Math.imul(K,te)|0,E=E+Math.imul(Z,Y)|0,q=q+Math.imul(Z,te)|0,w=w+Math.imul(z,le)|0,E=E+Math.imul(z,de)|0,E=E+Math.imul(H,le)|0,q=q+Math.imul(H,de)|0;var rr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(rr>>>26)|0,rr&=67108863,w=Math.imul(_e,Me),E=Math.imul(_e,Te),E=E+Math.imul(me,Me)|0,q=Math.imul(me,Te),w=w+Math.imul(ve,Fe)|0,E=E+Math.imul(ve,Ie)|0,E=E+Math.imul(ye,Fe)|0,q=q+Math.imul(ye,Ie)|0,w=w+Math.imul(pe,qe)|0,E=E+Math.imul(pe,Se)|0,E=E+Math.imul(ce,qe)|0,q=q+Math.imul(ce,Se)|0,w=w+Math.imul(ue,Le)|0,E=E+Math.imul(ue,we)|0,E=E+Math.imul(fe,Le)|0,q=q+Math.imul(fe,we)|0,w=w+Math.imul(ie,$e)|0,E=E+Math.imul(ie,ee)|0,E=E+Math.imul(ne,$e)|0,q=q+Math.imul(ne,ee)|0,w=w+Math.imul(W,Y)|0,E=E+Math.imul(W,te)|0,E=E+Math.imul(X,Y)|0,q=q+Math.imul(X,te)|0,w=w+Math.imul(K,le)|0,E=E+Math.imul(K,de)|0,E=E+Math.imul(Z,le)|0,q=q+Math.imul(Z,de)|0,w=w+Math.imul(z,Ae)|0,E=E+Math.imul(z,ge)|0,E=E+Math.imul(H,Ae)|0,q=q+Math.imul(H,ge)|0;var tr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(tr>>>26)|0,tr&=67108863,w=Math.imul(Ne,Me),E=Math.imul(Ne,Te),E=E+Math.imul(Ee,Me)|0,q=Math.imul(Ee,Te),w=w+Math.imul(_e,Fe)|0,E=E+Math.imul(_e,Ie)|0,E=E+Math.imul(me,Fe)|0,q=q+Math.imul(me,Ie)|0,w=w+Math.imul(ve,qe)|0,E=E+Math.imul(ve,Se)|0,E=E+Math.imul(ye,qe)|0,q=q+Math.imul(ye,Se)|0,w=w+Math.imul(pe,Le)|0,E=E+Math.imul(pe,we)|0,E=E+Math.imul(ce,Le)|0,q=q+Math.imul(ce,we)|0,w=w+Math.imul(ue,$e)|0,E=E+Math.imul(ue,ee)|0,E=E+Math.imul(fe,$e)|0,q=q+Math.imul(fe,ee)|0,w=w+Math.imul(ie,Y)|0,E=E+Math.imul(ie,te)|0,E=E+Math.imul(ne,Y)|0,q=q+Math.imul(ne,te)|0,w=w+Math.imul(W,le)|0,E=E+Math.imul(W,de)|0,E=E+Math.imul(X,le)|0,q=q+Math.imul(X,de)|0,w=w+Math.imul(K,Ae)|0,E=E+Math.imul(K,ge)|0,E=E+Math.imul(Z,Ae)|0,q=q+Math.imul(Z,ge)|0,w=w+Math.imul(z,xe)|0,E=E+Math.imul(z,Oe)|0,E=E+Math.imul(H,xe)|0,q=q+Math.imul(H,Oe)|0;var nr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(nr>>>26)|0,nr&=67108863,w=Math.imul(Ce,Me),E=Math.imul(Ce,Te),E=E+Math.imul(Re,Me)|0,q=Math.imul(Re,Te),w=w+Math.imul(Ne,Fe)|0,E=E+Math.imul(Ne,Ie)|0,E=E+Math.imul(Ee,Fe)|0,q=q+Math.imul(Ee,Ie)|0,w=w+Math.imul(_e,qe)|0,E=E+Math.imul(_e,Se)|0,E=E+Math.imul(me,qe)|0,q=q+Math.imul(me,Se)|0,w=w+Math.imul(ve,Le)|0,E=E+Math.imul(ve,we)|0,E=E+Math.imul(ye,Le)|0,q=q+Math.imul(ye,we)|0,w=w+Math.imul(pe,$e)|0,E=E+Math.imul(pe,ee)|0,E=E+Math.imul(ce,$e)|0,q=q+Math.imul(ce,ee)|0,w=w+Math.imul(ue,Y)|0,E=E+Math.imul(ue,te)|0,E=E+Math.imul(fe,Y)|0,q=q+Math.imul(fe,te)|0,w=w+Math.imul(ie,le)|0,E=E+Math.imul(ie,de)|0,E=E+Math.imul(ne,le)|0,q=q+Math.imul(ne,de)|0,w=w+Math.imul(W,Ae)|0,E=E+Math.imul(W,ge)|0,E=E+Math.imul(X,Ae)|0,q=q+Math.imul(X,ge)|0,w=w+Math.imul(K,xe)|0,E=E+Math.imul(K,Oe)|0,E=E+Math.imul(Z,xe)|0,q=q+Math.imul(Z,Oe)|0,w=w+Math.imul(z,Ue)|0,E=E+Math.imul(z,Ve)|0,E=E+Math.imul(H,Ue)|0,q=q+Math.imul(H,Ve)|0;var ir=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ir>>>26)|0,ir&=67108863,w=Math.imul(Ce,Fe),E=Math.imul(Ce,Ie),E=E+Math.imul(Re,Fe)|0,q=Math.imul(Re,Ie),w=w+Math.imul(Ne,qe)|0,E=E+Math.imul(Ne,Se)|0,E=E+Math.imul(Ee,qe)|0,q=q+Math.imul(Ee,Se)|0,w=w+Math.imul(_e,Le)|0,E=E+Math.imul(_e,we)|0,E=E+Math.imul(me,Le)|0,q=q+Math.imul(me,we)|0,w=w+Math.imul(ve,$e)|0,E=E+Math.imul(ve,ee)|0,E=E+Math.imul(ye,$e)|0,q=q+Math.imul(ye,ee)|0,w=w+Math.imul(pe,Y)|0,E=E+Math.imul(pe,te)|0,E=E+Math.imul(ce,Y)|0,q=q+Math.imul(ce,te)|0,w=w+Math.imul(ue,le)|0,E=E+Math.imul(ue,de)|0,E=E+Math.imul(fe,le)|0,q=q+Math.imul(fe,de)|0,w=w+Math.imul(ie,Ae)|0,E=E+Math.imul(ie,ge)|0,E=E+Math.imul(ne,Ae)|0,q=q+Math.imul(ne,ge)|0,w=w+Math.imul(W,xe)|0,E=E+Math.imul(W,Oe)|0,E=E+Math.imul(X,xe)|0,q=q+Math.imul(X,Oe)|0,w=w+Math.imul(K,Ue)|0,E=E+Math.imul(K,Ve)|0,E=E+Math.imul(Z,Ue)|0,q=q+Math.imul(Z,Ve)|0;var ar=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ar>>>26)|0,ar&=67108863,w=Math.imul(Ce,qe),E=Math.imul(Ce,Se),E=E+Math.imul(Re,qe)|0,q=Math.imul(Re,Se),w=w+Math.imul(Ne,Le)|0,E=E+Math.imul(Ne,we)|0,E=E+Math.imul(Ee,Le)|0,q=q+Math.imul(Ee,we)|0,w=w+Math.imul(_e,$e)|0,E=E+Math.imul(_e,ee)|0,E=E+Math.imul(me,$e)|0,q=q+Math.imul(me,ee)|0,w=w+Math.imul(ve,Y)|0,E=E+Math.imul(ve,te)|0,E=E+Math.imul(ye,Y)|0,q=q+Math.imul(ye,te)|0,w=w+Math.imul(pe,le)|0,E=E+Math.imul(pe,de)|0,E=E+Math.imul(ce,le)|0,q=q+Math.imul(ce,de)|0,w=w+Math.imul(ue,Ae)|0,E=E+Math.imul(ue,ge)|0,E=E+Math.imul(fe,Ae)|0,q=q+Math.imul(fe,ge)|0,w=w+Math.imul(ie,xe)|0,E=E+Math.imul(ie,Oe)|0,E=E+Math.imul(ne,xe)|0,q=q+Math.imul(ne,Oe)|0,w=w+Math.imul(W,Ue)|0,E=E+Math.imul(W,Ve)|0,E=E+Math.imul(X,Ue)|0,q=q+Math.imul(X,Ve)|0;var sr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(sr>>>26)|0,sr&=67108863,w=Math.imul(Ce,Le),E=Math.imul(Ce,we),E=E+Math.imul(Re,Le)|0,q=Math.imul(Re,we),w=w+Math.imul(Ne,$e)|0,E=E+Math.imul(Ne,ee)|0,E=E+Math.imul(Ee,$e)|0,q=q+Math.imul(Ee,ee)|0,w=w+Math.imul(_e,Y)|0,E=E+Math.imul(_e,te)|0,E=E+Math.imul(me,Y)|0,q=q+Math.imul(me,te)|0,w=w+Math.imul(ve,le)|0,E=E+Math.imul(ve,de)|0,E=E+Math.imul(ye,le)|0,q=q+Math.imul(ye,de)|0,w=w+Math.imul(pe,Ae)|0,E=E+Math.imul(pe,ge)|0,E=E+Math.imul(ce,Ae)|0,q=q+Math.imul(ce,ge)|0,w=w+Math.imul(ue,xe)|0,E=E+Math.imul(ue,Oe)|0,E=E+Math.imul(fe,xe)|0,q=q+Math.imul(fe,Oe)|0,w=w+Math.imul(ie,Ue)|0,E=E+Math.imul(ie,Ve)|0,E=E+Math.imul(ne,Ue)|0,q=q+Math.imul(ne,Ve)|0;var or=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(or>>>26)|0,or&=67108863,w=Math.imul(Ce,$e),E=Math.imul(Ce,ee),E=E+Math.imul(Re,$e)|0,q=Math.imul(Re,ee),w=w+Math.imul(Ne,Y)|0,E=E+Math.imul(Ne,te)|0,E=E+Math.imul(Ee,Y)|0,q=q+Math.imul(Ee,te)|0,w=w+Math.imul(_e,le)|0,E=E+Math.imul(_e,de)|0,E=E+Math.imul(me,le)|0,q=q+Math.imul(me,de)|0,w=w+Math.imul(ve,Ae)|0,E=E+Math.imul(ve,ge)|0,E=E+Math.imul(ye,Ae)|0,q=q+Math.imul(ye,ge)|0,w=w+Math.imul(pe,xe)|0,E=E+Math.imul(pe,Oe)|0,E=E+Math.imul(ce,xe)|0,q=q+Math.imul(ce,Oe)|0,w=w+Math.imul(ue,Ue)|0,E=E+Math.imul(ue,Ve)|0,E=E+Math.imul(fe,Ue)|0,q=q+Math.imul(fe,Ve)|0;var ur=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(ur>>>26)|0,ur&=67108863,w=Math.imul(Ce,Y),E=Math.imul(Ce,te),E=E+Math.imul(Re,Y)|0,q=Math.imul(Re,te),w=w+Math.imul(Ne,le)|0,E=E+Math.imul(Ne,de)|0,E=E+Math.imul(Ee,le)|0,q=q+Math.imul(Ee,de)|0,w=w+Math.imul(_e,Ae)|0,E=E+Math.imul(_e,ge)|0,E=E+Math.imul(me,Ae)|0,q=q+Math.imul(me,ge)|0,w=w+Math.imul(ve,xe)|0,E=E+Math.imul(ve,Oe)|0,E=E+Math.imul(ye,xe)|0,q=q+Math.imul(ye,Oe)|0,w=w+Math.imul(pe,Ue)|0,E=E+Math.imul(pe,Ve)|0,E=E+Math.imul(ce,Ue)|0,q=q+Math.imul(ce,Ve)|0;var lr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(lr>>>26)|0,lr&=67108863,w=Math.imul(Ce,le),E=Math.imul(Ce,de),E=E+Math.imul(Re,le)|0,q=Math.imul(Re,de),w=w+Math.imul(Ne,Ae)|0,E=E+Math.imul(Ne,ge)|0,E=E+Math.imul(Ee,Ae)|0,q=q+Math.imul(Ee,ge)|0,w=w+Math.imul(_e,xe)|0,E=E+Math.imul(_e,Oe)|0,E=E+Math.imul(me,xe)|0,q=q+Math.imul(me,Oe)|0,w=w+Math.imul(ve,Ue)|0,E=E+Math.imul(ve,Ve)|0,E=E+Math.imul(ye,Ue)|0,q=q+Math.imul(ye,Ve)|0;var cr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(cr>>>26)|0,cr&=67108863,w=Math.imul(Ce,Ae),E=Math.imul(Ce,ge),E=E+Math.imul(Re,Ae)|0,q=Math.imul(Re,ge),w=w+Math.imul(Ne,xe)|0,E=E+Math.imul(Ne,Oe)|0,E=E+Math.imul(Ee,xe)|0,q=q+Math.imul(Ee,Oe)|0,w=w+Math.imul(_e,Ue)|0,E=E+Math.imul(_e,Ve)|0,E=E+Math.imul(me,Ue)|0,q=q+Math.imul(me,Ve)|0;var fr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(fr>>>26)|0,fr&=67108863,w=Math.imul(Ce,xe),E=Math.imul(Ce,Oe),E=E+Math.imul(Re,xe)|0,q=Math.imul(Re,Oe),w=w+Math.imul(Ne,Ue)|0,E=E+Math.imul(Ne,Ve)|0,E=E+Math.imul(Ee,Ue)|0,q=q+Math.imul(Ee,Ve)|0;var dr=(x+w|0)+((E&8191)<<13)|0;x=(q+(E>>>13)|0)+(dr>>>26)|0,dr&=67108863,w=Math.imul(Ce,Ue),E=Math.imul(Ce,Ve),E=E+Math.imul(Re,Ue)|0,q=Math.imul(Re,Ve);var hr=(x+w|0)+((E&8191)<<13)|0;return x=(q+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,C[0]=Ye,C[1]=We,C[2]=Xe,C[3]=Je,C[4]=Ze,C[5]=er,C[6]=rr,C[7]=tr,C[8]=nr,C[9]=ir,C[10]=ar,C[11]=sr,C[12]=or,C[13]=ur,C[14]=lr,C[15]=cr,C[16]=fr,C[17]=dr,C[18]=hr,x!==0&&(C[19]=x,D.length++),D};Math.imul||(O=N);function M(R,y,b){b.negative=y.negative^R.negative,b.length=R.length+y.length;for(var D=0,I=0,T=0;T<b.length-1;T++){var C=I;I=0;for(var x=D&67108863,w=Math.min(T,y.length-1),E=Math.max(0,T-R.length+1);E<=w;E++){var q=T-E,G=R.words[q]|0,z=y.words[E]|0,H=G*z,V=H&67108863;C=C+(H/67108864|0)|0,V=V+x|0,x=V&67108863,C=C+(V>>>26)|0,I+=C>>>26,C&=67108863}b.words[T]=x,D=C,C=I}return D!==0?b.words[T]=D:b.length--,b._strip()}function F(R,y,b){return M(R,y,b)}s.prototype.mulTo=function(y,b){var D,I=this.length+y.length;return this.length===10&&y.length===10?D=O(this,y,b):I<63?D=N(this,y,b):I<1024?D=M(this,y,b):D=F(this,y,b),D},s.prototype.mul=function(y){var b=new s(null);return b.words=new Array(this.length+y.length),this.mulTo(y,b)},s.prototype.mulf=function(y){var b=new s(null);return b.words=new Array(this.length+y.length),F(this,y,b)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var b=y<0;b&&(y=-y),i(typeof y=="number"),i(y<67108864);for(var D=0,I=0;I<this.length;I++){var T=(this.words[I]|0)*y,C=(T&67108863)+(D&67108863);D>>=26,D+=T/67108864|0,D+=C>>>26,this.words[I]=C&67108863}return D!==0&&(this.words[I]=D,this.length++),this.length=y===0?1:this.length,b?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var b=S(y);if(b.length===0)return new s(1);for(var D=this,I=0;I<b.length&&b[I]===0;I++,D=D.sqr());if(++I<b.length)for(var T=D.sqr();I<b.length;I++,T=T.sqr())b[I]!==0&&(D=D.mul(T));return D},s.prototype.iushln=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26,I=67108863>>>26-b<<26-b,T;if(b!==0){var C=0;for(T=0;T<this.length;T++){var x=this.words[T]&I,w=(this.words[T]|0)-x<<b;this.words[T]=w|C,C=x>>>26-b}C&&(this.words[T]=C,this.length++)}if(D!==0){for(T=this.length-1;T>=0;T--)this.words[T+D]=this.words[T];for(T=0;T<D;T++)this.words[T]=0;this.length+=D}return this._strip()},s.prototype.ishln=function(y){return i(this.negative===0),this.iushln(y)},s.prototype.iushrn=function(y,b,D){i(typeof y=="number"&&y>=0);var I;b?I=(b-b%26)/26:I=0;var T=y%26,C=Math.min((y-T)/26,this.length),x=67108863^67108863>>>T<<T,w=D;if(I-=C,I=Math.max(0,I),w){for(var E=0;E<C;E++)w.words[E]=this.words[E];w.length=C}if(C!==0)if(this.length>C)for(this.length-=C,E=0;E<this.length;E++)this.words[E]=this.words[E+C];else this.words[0]=0,this.length=1;var q=0;for(E=this.length-1;E>=0&&(q!==0||E>=I);E--){var G=this.words[E]|0;this.words[E]=q<<26-T|G>>>T,q=G&x}return w&&q!==0&&(w.words[w.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,b,D){return i(this.negative===0),this.iushrn(y,b,D)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26,I=1<<b;if(this.length<=D)return!1;var T=this.words[D];return!!(T&I)},s.prototype.imaskn=function(y){i(typeof y=="number"&&y>=0);var b=y%26,D=(y-b)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(b!==0&&D++,this.length=Math.min(D,this.length),b!==0){var I=67108863^67108863>>>b<<b;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(y){return this.clone().imaskn(y)},s.prototype.iaddn=function(y){return i(typeof y=="number"),i(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},s.prototype._iaddn=function(y){this.words[0]+=y;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},s.prototype.isubn=function(y){if(i(typeof y=="number"),i(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},s.prototype.addn=function(y){return this.clone().iaddn(y)},s.prototype.subn=function(y){return this.clone().isubn(y)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(y,b,D){var I=y.length+D,T;this._expand(I);var C,x=0;for(T=0;T<y.length;T++){C=(this.words[T+D]|0)+x;var w=(y.words[T]|0)*b;C-=w&67108863,x=(C>>26)-(w/67108864|0),this.words[T+D]=C&67108863}for(;T<this.length-D;T++)C=(this.words[T+D]|0)+x,x=C>>26,this.words[T+D]=C&67108863;if(x===0)return this._strip();for(i(x===-1),x=0,T=0;T<this.length;T++)C=-(this.words[T]|0)+x,x=C>>26,this.words[T]=C&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,b){var D=this.length-y.length,I=this.clone(),T=y,C=T.words[T.length-1]|0,x=this._countBits(C);D=26-x,D!==0&&(T=T.ushln(D),I.iushln(D),C=T.words[T.length-1]|0);var w=I.length-T.length,E;if(b!=="mod"){E=new s(null),E.length=w+1,E.words=new Array(E.length);for(var q=0;q<E.length;q++)E.words[q]=0}var G=I.clone()._ishlnsubmul(T,1,w);G.negative===0&&(I=G,E&&(E.words[w]=1));for(var z=w-1;z>=0;z--){var H=(I.words[T.length+z]|0)*67108864+(I.words[T.length+z-1]|0);for(H=Math.min(H/C|0,67108863),I._ishlnsubmul(T,H,z);I.negative!==0;)H--,I.negative=0,I._ishlnsubmul(T,1,z),I.isZero()||(I.negative^=1);E&&(E.words[z]=H)}return E&&E._strip(),I._strip(),b!=="div"&&D!==0&&I.iushrn(D),{div:E||null,mod:I}},s.prototype.divmod=function(y,b,D){if(i(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,T,C;return this.negative!==0&&y.negative===0?(C=this.neg().divmod(y,b),b!=="mod"&&(I=C.div.neg()),b!=="div"&&(T=C.mod.neg(),D&&T.negative!==0&&T.iadd(y)),{div:I,mod:T}):this.negative===0&&y.negative!==0?(C=this.divmod(y.neg(),b),b!=="mod"&&(I=C.div.neg()),{div:I,mod:C.mod}):(this.negative&y.negative)!==0?(C=this.neg().divmod(y.neg(),b),b!=="div"&&(T=C.mod.neg(),D&&T.negative!==0&&T.isub(y)),{div:C.div,mod:T}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?b==="div"?{div:this.divn(y.words[0]),mod:null}:b==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,b)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var b=this.divmod(y);if(b.mod.isZero())return b.div;var D=b.div.negative!==0?b.mod.isub(y):b.mod,I=y.ushrn(1),T=y.andln(1),C=D.cmp(I);return C<0||T===1&&C===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},s.prototype.modrn=function(y){var b=y<0;b&&(y=-y),i(y<=67108863);for(var D=(1<<26)%y,I=0,T=this.length-1;T>=0;T--)I=(D*I+(this.words[T]|0))%y;return b?-I:I},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var b=y<0;b&&(y=-y),i(y<=67108863);for(var D=0,I=this.length-1;I>=0;I--){var T=(this.words[I]|0)+D*67108864;this.words[I]=T/y|0,D=T%y}return this._strip(),b?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){i(y.negative===0),i(!y.isZero());var b=this,D=y.clone();b.negative!==0?b=b.umod(y):b=b.clone();for(var I=new s(1),T=new s(0),C=new s(0),x=new s(1),w=0;b.isEven()&&D.isEven();)b.iushrn(1),D.iushrn(1),++w;for(var E=D.clone(),q=b.clone();!b.isZero();){for(var G=0,z=1;(b.words[0]&z)===0&&G<26;++G,z<<=1);if(G>0)for(b.iushrn(G);G-- >0;)(I.isOdd()||T.isOdd())&&(I.iadd(E),T.isub(q)),I.iushrn(1),T.iushrn(1);for(var H=0,V=1;(D.words[0]&V)===0&&H<26;++H,V<<=1);if(H>0)for(D.iushrn(H);H-- >0;)(C.isOdd()||x.isOdd())&&(C.iadd(E),x.isub(q)),C.iushrn(1),x.iushrn(1);b.cmp(D)>=0?(b.isub(D),I.isub(C),T.isub(x)):(D.isub(b),C.isub(I),x.isub(T))}return{a:C,b:x,gcd:D.iushln(w)}},s.prototype._invmp=function(y){i(y.negative===0),i(!y.isZero());var b=this,D=y.clone();b.negative!==0?b=b.umod(y):b=b.clone();for(var I=new s(1),T=new s(0),C=D.clone();b.cmpn(1)>0&&D.cmpn(1)>0;){for(var x=0,w=1;(b.words[0]&w)===0&&x<26;++x,w<<=1);if(x>0)for(b.iushrn(x);x-- >0;)I.isOdd()&&I.iadd(C),I.iushrn(1);for(var E=0,q=1;(D.words[0]&q)===0&&E<26;++E,q<<=1);if(E>0)for(D.iushrn(E);E-- >0;)T.isOdd()&&T.iadd(C),T.iushrn(1);b.cmp(D)>=0?(b.isub(D),I.isub(T)):(D.isub(b),T.isub(I))}var G;return b.cmpn(1)===0?G=I:G=T,G.cmpn(0)<0&&G.iadd(y),G},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var b=this.clone(),D=y.clone();b.negative=0,D.negative=0;for(var I=0;b.isEven()&&D.isEven();I++)b.iushrn(1),D.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;D.isEven();)D.iushrn(1);var T=b.cmp(D);if(T<0){var C=b;b=D,D=C}else if(T===0||D.cmpn(1)===0)break;b.isub(D)}while(!0);return D.iushln(I)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){i(typeof y=="number");var b=y%26,D=(y-b)/26,I=1<<b;if(this.length<=D)return this._expand(D+1),this.words[D]|=I,this;for(var T=I,C=D;T!==0&&C<this.length;C++){var x=this.words[C]|0;x+=T,T=x>>>26,x&=67108863,this.words[C]=x}return T!==0&&(this.words[C]=T,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var b=y<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var D;if(this.length>1)D=1;else{b&&(y=-y),i(y<=67108863,"Number is too big");var I=this.words[0]|0;D=I===y?0:I<y?-1:1}return this.negative!==0?-D|0:D},s.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return-1;if(this.negative===0&&y.negative!==0)return 1;var b=this.ucmp(y);return this.negative!==0?-b|0:b},s.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return-1;for(var b=0,D=this.length-1;D>=0;D--){var I=this.words[D]|0,T=y.words[D]|0;if(I!==T){I<T?b=-1:I>T&&(b=1);break}}return b},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new $(y)},s.prototype.toRed=function(y){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return i(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return i(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var L={k256:null,p224:null,p192:null,p25519:null};function k(R,y){this.name=R,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},k.prototype.ireduce=function(y){var b=y,D;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),D=b.bitLength();while(D>this.n);var I=D<this.n?-1:b.ucmp(this.p);return I===0?(b.words[0]=0,b.length=1):I>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},k.prototype.split=function(y,b){y.iushrn(this.n,0,b)},k.prototype.imulK=function(y){return y.imul(this.k)};function P(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(P,k),P.prototype.split=function(y,b){for(var D=4194303,I=Math.min(y.length,9),T=0;T<I;T++)b.words[T]=y.words[T];if(b.length=I,y.length<=9){y.words[0]=0,y.length=1;return}var C=y.words[9];for(b.words[b.length++]=C&D,T=10;T<y.length;T++){var x=y.words[T]|0;y.words[T-10]=(x&D)<<4|C>>>22,C=x}C>>>=22,y.words[T-10]=C,C===0&&y.length>10?y.length-=10:y.length-=9},P.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var b=0,D=0;D<y.length;D++){var I=y.words[D]|0;b+=I*977,y.words[D]=b&67108863,b=I*64+(b/67108864|0)}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function U(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(U,k);function B(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(B,k);function j(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(j,k),j.prototype.imulK=function(y){for(var b=0,D=0;D<y.length;D++){var I=(y.words[D]|0)*19+b,T=I&67108863;I>>>=26,y.words[D]=T,b=I}return b!==0&&(y.words[y.length++]=b),y},s._prime=function(y){if(L[y])return L[y];var b;if(y==="k256")b=new P;else if(y==="p224")b=new U;else if(y==="p192")b=new B;else if(y==="p25519")b=new j;else throw new Error("Unknown prime "+y);return L[y]=b,b};function $(R){if(typeof R=="string"){var y=s._prime(R);this.m=y.p,this.prime=y}else i(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}$.prototype._verify1=function(y){i(y.negative===0,"red works only with positives"),i(y.red,"red works only with red numbers")},$.prototype._verify2=function(y,b){i((y.negative|b.negative)===0,"red works only with positives"),i(y.red&&y.red===b.red,"red works only with red numbers")},$.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},$.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},$.prototype.add=function(y,b){this._verify2(y,b);var D=y.add(b);return D.cmp(this.m)>=0&&D.isub(this.m),D._forceRed(this)},$.prototype.iadd=function(y,b){this._verify2(y,b);var D=y.iadd(b);return D.cmp(this.m)>=0&&D.isub(this.m),D},$.prototype.sub=function(y,b){this._verify2(y,b);var D=y.sub(b);return D.cmpn(0)<0&&D.iadd(this.m),D._forceRed(this)},$.prototype.isub=function(y,b){this._verify2(y,b);var D=y.isub(b);return D.cmpn(0)<0&&D.iadd(this.m),D},$.prototype.shl=function(y,b){return this._verify1(y),this.imod(y.ushln(b))},$.prototype.imul=function(y,b){return this._verify2(y,b),this.imod(y.imul(b))},$.prototype.mul=function(y,b){return this._verify2(y,b),this.imod(y.mul(b))},$.prototype.isqr=function(y){return this.imul(y,y.clone())},$.prototype.sqr=function(y){return this.mul(y,y)},$.prototype.sqrt=function(y){if(y.isZero())return y.clone();var b=this.m.andln(3);if(i(b%2===1),b===3){var D=this.m.add(new s(1)).iushrn(2);return this.pow(y,D)}for(var I=this.m.subn(1),T=0;!I.isZero()&&I.andln(1)===0;)T++,I.iushrn(1);i(!I.isZero());var C=new s(1).toRed(this),x=C.redNeg(),w=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new s(2*E*E).toRed(this);this.pow(E,w).cmp(x)!==0;)E.redIAdd(x);for(var q=this.pow(E,I),G=this.pow(y,I.addn(1).iushrn(1)),z=this.pow(y,I),H=T;z.cmp(C)!==0;){for(var V=z,K=0;V.cmp(C)!==0;K++)V=V.redSqr();i(K<H);var Z=this.pow(q,new s(1).iushln(H-K-1));G=G.redMul(Z),q=Z.redSqr(),z=z.redMul(q),H=K}return G},$.prototype.invm=function(y){var b=y._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},$.prototype.pow=function(y,b){if(b.isZero())return new s(1).toRed(this);if(b.cmpn(1)===0)return y.clone();var D=4,I=new Array(1<<D);I[0]=new s(1).toRed(this),I[1]=y;for(var T=2;T<I.length;T++)I[T]=this.mul(I[T-1],y);var C=I[0],x=0,w=0,E=b.bitLength()%26;for(E===0&&(E=26),T=b.length-1;T>=0;T--){for(var q=b.words[T],G=E-1;G>=0;G--){var z=q>>G&1;if(C!==I[0]&&(C=this.sqr(C)),z===0&&x===0){w=0;continue}x<<=1,x|=z,w++,!(w!==D&&(T!==0||G!==0))&&(C=this.mul(C,I[x]),w=0,x=0)}E=26}return C},$.prototype.convertTo=function(y){var b=y.umod(this.m);return b===y?b.clone():b},$.prototype.convertFrom=function(y){var b=y.clone();return b.red=null,b},s.mont=function(y){return new A(y)};function A(R){$.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}o(A,$),A.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},A.prototype.convertFrom=function(y){var b=this.imod(y.mul(this.rinv));return b.red=null,b},A.prototype.imul=function(y,b){if(y.isZero()||b.isZero())return y.words[0]=0,y.length=1,y;var D=y.imul(b),I=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=D.isub(I).iushrn(this.shift),C=T;return T.cmp(this.m)>=0?C=T.isub(this.m):T.cmpn(0)<0&&(C=T.iadd(this.m)),C._forceRed(this)},A.prototype.mul=function(y,b){if(y.isZero()||b.isZero())return new s(0)._forceRed(this);var D=y.mul(b),I=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=D.isub(I).iushrn(this.shift),C=T;return T.cmp(this.m)>=0?C=T.isub(this.m):T.cmpn(0)<0&&(C=T.iadd(this.m)),C._forceRed(this)},A.prototype.invm=function(y){var b=this.imod(y._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(r,bn)}(bn$1)),bn$1.exports}var asn1$1={},asn1={},api$1={},vmBrowserify={},hasRequiredVmBrowserify;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,function(exports){var indexOf=function(r,n){if(r.indexOf)return r.indexOf(n);for(var a=0;a<r.length;a++)if(r[a]===n)return a;return-1},Object_keys=function(r){if(Object.keys)return Object.keys(r);var n=[];for(var a in r)n.push(a);return n},forEach=function(r,n){if(r.forEach)return r.forEach(n);for(var a=0;a<r.length;a++)n(r[a],a,r)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(r,n,a){Object.defineProperty(r,n,{writable:!0,enumerable:!1,configurable:!0,value:a})}}catch{return function(n,a,i){n[a]=i}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(n){if(!(this instanceof Script))return new Script(n);this.code=n};Script.prototype.runInContext=function(r){if(!(r instanceof Context))throw new TypeError("needs a 'context' argument.");var n=document.createElement("iframe");n.style||(n.style={}),n.style.display="none",document.body.appendChild(n);var a=n.contentWindow,i=a.eval,o=a.execScript;!i&&o&&(o.call(a,"null"),i=a.eval),forEach(Object_keys(r),function(f){a[f]=r[f]}),forEach(globals,function(f){r[f]&&(a[f]=r[f])});var s=Object_keys(a),l=i.call(a,this.code);return forEach(Object_keys(a),function(f){(f in r||indexOf(s,f)===-1)&&(r[f]=a[f])}),forEach(globals,function(f){f in r||defineProp(r,f,a[f])}),document.body.removeChild(n),l},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(r){var n=Script.createContext(r),a=this.runInContext(n);return r&&forEach(Object_keys(n),function(i){r[i]=n[i]}),a},forEach(Object_keys(Script.prototype),function(r){exports[r]=Script[r]=function(n){var a=Script(n);return a[r].apply(a,[].slice.call(arguments,1))}}),exports.isContext=function(r){return r instanceof Context},exports.createScript=function(r){return exports.Script(r)},exports.createContext=Script.createContext=function(r){var n=new Context;return typeof r=="object"&&forEach(Object_keys(r),function(a){n[a]=r[a]}),n}}(vmBrowserify)),vmBrowserify}var hasRequiredApi$1;function requireApi$1(){return hasRequiredApi$1||(hasRequiredApi$1=1,function(r){var n=requireAsn1$1(),a=requireInherits_browser(),i=r;i.define=function(l,f){return new o(l,f)};function o(s,l){this.name=s,this.body=l,this.decoders={},this.encoders={}}o.prototype._createNamed=function(l){var f;try{f=requireVmBrowserify().runInThisContext("(function "+this.name+`(entity) {
37
+ this._initNamed(entity);
38
+ })`)}catch{f=function(u){this._initNamed(u)}}return a(f,l),f.prototype._initNamed=function(u){l.call(this,u)},new f(this)},o.prototype._getDecoder=function(l){return l=l||"der",this.decoders.hasOwnProperty(l)||(this.decoders[l]=this._createNamed(n.decoders[l])),this.decoders[l]},o.prototype.decode=function(l,f,d){return this._getDecoder(f).decode(l,d)},o.prototype._getEncoder=function(l){return l=l||"der",this.encoders.hasOwnProperty(l)||(this.encoders[l]=this._createNamed(n.encoders[l])),this.encoders[l]},o.prototype.encode=function(l,f,d){return this._getEncoder(f).encode(l,d)}}(api$1)),api$1}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var r=requireInherits_browser();function n(i){this._reporterState={obj:null,path:[],options:i||{},errors:[]}}reporter.Reporter=n,n.prototype.isError=function(o){return o instanceof a},n.prototype.save=function(){var o=this._reporterState;return{obj:o.obj,pathLen:o.path.length}},n.prototype.restore=function(o){var s=this._reporterState;s.obj=o.obj,s.path=s.path.slice(0,o.pathLen)},n.prototype.enterKey=function(o){return this._reporterState.path.push(o)},n.prototype.exitKey=function(o){var s=this._reporterState;s.path=s.path.slice(0,o-1)},n.prototype.leaveKey=function(o,s,l){var f=this._reporterState;this.exitKey(o),f.obj!==null&&(f.obj[s]=l)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var o=this._reporterState,s=o.obj;return o.obj={},s},n.prototype.leaveObject=function(o){var s=this._reporterState,l=s.obj;return s.obj=o,l},n.prototype.error=function(o){var s,l=this._reporterState,f=o instanceof a;if(f?s=o:s=new a(l.path.map(function(d){return"["+JSON.stringify(d)+"]"}).join(""),o.message||o,o.stack),!l.options.partial)throw s;return f||l.errors.push(s),s},n.prototype.wrapResult=function(o){var s=this._reporterState;return s.options.partial?{result:this.isError(o)?null:o,errors:s.errors}:o};function a(i,o){this.path=i,this.rethrow(o)}return r(a,Error),a.prototype.rethrow=function(o){if(this.message=o+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(s){this.stack=s.stack}return this},reporter}var buffer={},hasRequiredBuffer;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var r=requireInherits_browser(),n=requireBase().Reporter,a=requireDist().Buffer;function i(s,l){if(n.call(this,l),!a.isBuffer(s)){this.error("Input not Buffer");return}this.base=s,this.offset=0,this.length=s.length}r(i,n),buffer.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},i.prototype.restore=function(l){var f=new i(this.base);return f.offset=l.offset,f.length=this.offset,this.offset=l.offset,n.prototype.restore.call(this,l.reporter),f},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(l||"DecoderBuffer overrun")},i.prototype.skip=function(l,f){if(!(this.offset+l<=this.length))return this.error(f||"DecoderBuffer overrun");var d=new i(this.base);return d._reporterState=this._reporterState,d.offset=this.offset,d.length=this.offset+l,this.offset+=l,d},i.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)};function o(s,l){if(Array.isArray(s))this.length=0,this.value=s.map(function(f){return f instanceof o||(f=new o(f,l)),this.length+=f.length,f},this);else if(typeof s=="number"){if(!(0<=s&&s<=255))return l.error("non-byte EncoderBuffer value");this.value=s,this.length=1}else if(typeof s=="string")this.value=s,this.length=a.byteLength(s);else if(a.isBuffer(s))this.value=s,this.length=s.length;else return l.error("Unsupported type: "+typeof s)}return buffer.EncoderBuffer=o,o.prototype.join=function(l,f){return l||(l=new a(this.length)),f||(f=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(d){d.join(l,f),f+=d.length}):(typeof this.value=="number"?l[f]=this.value:typeof this.value=="string"?l.write(this.value,f):a.isBuffer(this.value)&&this.value.copy(l,f),f+=this.length)),l},buffer}var node$1,hasRequiredNode;function requireNode(){if(hasRequiredNode)return node$1;hasRequiredNode=1;var r=requireBase().Reporter,n=requireBase().EncoderBuffer,a=requireBase().DecoderBuffer,i=requireMinimalisticAssert(),o=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o),l=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function f(u,c){var v={};this._baseState=v,v.enc=u,v.parent=c||null,v.children=null,v.tag=null,v.args=null,v.reverseArgs=null,v.choice=null,v.optional=!1,v.any=!1,v.obj=!1,v.use=null,v.useDecoder=null,v.key=null,v.default=null,v.explicit=null,v.implicit=null,v.contains=null,v.parent||(v.children=[],this._wrap())}node$1=f;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return f.prototype.clone=function(){var c=this._baseState,v={};d.forEach(function(m){v[m]=c[m]});var h=new this.constructor(v.parent);return h._baseState=v,h},f.prototype._wrap=function(){var c=this._baseState;s.forEach(function(v){this[v]=function(){var m=new this.constructor(this);return c.children.push(m),m[v].apply(m,arguments)}},this)},f.prototype._init=function(c){var v=this._baseState;i(v.parent===null),c.call(this),v.children=v.children.filter(function(h){return h._baseState.parent===this},this),i.equal(v.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(c){var v=this._baseState,h=c.filter(function(m){return m instanceof this.constructor},this);c=c.filter(function(m){return!(m instanceof this.constructor)},this),h.length!==0&&(i(v.children===null),v.children=h,h.forEach(function(m){m._baseState.parent=this},this)),c.length!==0&&(i(v.args===null),v.args=c,v.reverseArgs=c.map(function(m){if(typeof m!="object"||m.constructor!==Object)return m;var g={};return Object.keys(m).forEach(function(_){_==(_|0)&&(_|=0);var S=m[_];g[S]=_}),g}))},l.forEach(function(u){f.prototype[u]=function(){var v=this._baseState;throw new Error(u+" not implemented for encoding: "+v.enc)}}),o.forEach(function(u){f.prototype[u]=function(){var v=this._baseState,h=Array.prototype.slice.call(arguments);return i(v.tag===null),v.tag=u,this._useArgs(h),this}}),f.prototype.use=function(c){i(c);var v=this._baseState;return i(v.use===null),v.use=c,this},f.prototype.optional=function(){var c=this._baseState;return c.optional=!0,this},f.prototype.def=function(c){var v=this._baseState;return i(v.default===null),v.default=c,v.optional=!0,this},f.prototype.explicit=function(c){var v=this._baseState;return i(v.explicit===null&&v.implicit===null),v.explicit=c,this},f.prototype.implicit=function(c){var v=this._baseState;return i(v.explicit===null&&v.implicit===null),v.implicit=c,this},f.prototype.obj=function(){var c=this._baseState,v=Array.prototype.slice.call(arguments);return c.obj=!0,v.length!==0&&this._useArgs(v),this},f.prototype.key=function(c){var v=this._baseState;return i(v.key===null),v.key=c,this},f.prototype.any=function(){var c=this._baseState;return c.any=!0,this},f.prototype.choice=function(c){var v=this._baseState;return i(v.choice===null),v.choice=c,this._useArgs(Object.keys(c).map(function(h){return c[h]})),this},f.prototype.contains=function(c){var v=this._baseState;return i(v.use===null),v.contains=c,this},f.prototype._decode=function(c,v){var h=this._baseState;if(h.parent===null)return c.wrapResult(h.children[0]._decode(c,v));var m=h.default,g=!0,_=null;if(h.key!==null&&(_=c.enterKey(h.key)),h.optional){var S=null;if(h.explicit!==null?S=h.explicit:h.implicit!==null?S=h.implicit:h.tag!==null&&(S=h.tag),S===null&&!h.any){var N=c.save();try{h.choice===null?this._decodeGeneric(h.tag,c,v):this._decodeChoice(c,v),g=!0}catch{g=!1}c.restore(N)}else if(g=this._peekTag(c,S,h.any),c.isError(g))return g}var O;if(h.obj&&g&&(O=c.enterObject()),g){if(h.explicit!==null){var M=this._decodeTag(c,h.explicit);if(c.isError(M))return M;c=M}var F=c.offset;if(h.use===null&&h.choice===null){if(h.any)var N=c.save();var L=this._decodeTag(c,h.implicit!==null?h.implicit:h.tag,h.any);if(c.isError(L))return L;h.any?m=c.raw(N):c=L}if(v&&v.track&&h.tag!==null&&v.track(c.path(),F,c.length,"tagged"),v&&v.track&&h.tag!==null&&v.track(c.path(),c.offset,c.length,"content"),h.any?m=m:h.choice===null?m=this._decodeGeneric(h.tag,c,v):m=this._decodeChoice(c,v),c.isError(m))return m;if(!h.any&&h.choice===null&&h.children!==null&&h.children.forEach(function(U){U._decode(c,v)}),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){var k=new a(m);m=this._getUse(h.contains,c._reporterState.obj)._decode(k,v)}}return h.obj&&g&&(m=c.leaveObject(O)),h.key!==null&&(m!==null||g===!0)?c.leaveKey(_,h.key,m):_!==null&&c.exitKey(_),m},f.prototype._decodeGeneric=function(c,v,h){var m=this._baseState;return c==="seq"||c==="set"?null:c==="seqof"||c==="setof"?this._decodeList(v,c,m.args[0],h):/str$/.test(c)?this._decodeStr(v,c,h):c==="objid"&&m.args?this._decodeObjid(v,m.args[0],m.args[1],h):c==="objid"?this._decodeObjid(v,null,null,h):c==="gentime"||c==="utctime"?this._decodeTime(v,c,h):c==="null_"?this._decodeNull(v,h):c==="bool"?this._decodeBool(v,h):c==="objDesc"?this._decodeStr(v,c,h):c==="int"||c==="enum"?this._decodeInt(v,m.args&&m.args[0],h):m.use!==null?this._getUse(m.use,v._reporterState.obj)._decode(v,h):v.error("unknown tag: "+c)},f.prototype._getUse=function(c,v){var h=this._baseState;return h.useDecoder=this._use(c,v),i(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},f.prototype._decodeChoice=function(c,v){var h=this._baseState,m=null,g=!1;return Object.keys(h.choice).some(function(_){var S=c.save(),N=h.choice[_];try{var O=N._decode(c,v);if(c.isError(O))return!1;m={type:_,value:O},g=!0}catch{return c.restore(S),!1}return!0},this),g?m:c.error("Choice not matched")},f.prototype._createEncoderBuffer=function(c){return new n(c,this.reporter)},f.prototype._encode=function(c,v,h){var m=this._baseState;if(!(m.default!==null&&m.default===c)){var g=this._encodeValue(c,v,h);if(g!==void 0&&!this._skipDefault(g,v,h))return g}},f.prototype._encodeValue=function(c,v,h){var m=this._baseState;if(m.parent===null)return m.children[0]._encode(c,v||new r);var N=null;if(this.reporter=v,m.optional&&c===void 0)if(m.default!==null)c=m.default;else return;var g=null,_=!1;if(m.any)N=this._createEncoderBuffer(c);else if(m.choice)N=this._encodeChoice(c,v);else if(m.contains)g=this._getUse(m.contains,h)._encode(c,v),_=!0;else if(m.children)g=m.children.map(function(F){if(F._baseState.tag==="null_")return F._encode(null,v,c);if(F._baseState.key===null)return v.error("Child should have a key");var L=v.enterKey(F._baseState.key);if(typeof c!="object")return v.error("Child expected, but input is not object");var k=F._encode(c[F._baseState.key],v,c);return v.leaveKey(L),k},this).filter(function(F){return F}),g=this._createEncoderBuffer(g);else if(m.tag==="seqof"||m.tag==="setof"){if(!(m.args&&m.args.length===1))return v.error("Too many args for : "+m.tag);if(!Array.isArray(c))return v.error("seqof/setof, but data is not Array");var S=this.clone();S._baseState.implicit=null,g=this._createEncoderBuffer(c.map(function(F){var L=this._baseState;return this._getUse(L.args[0],c)._encode(F,v)},S))}else m.use!==null?N=this._getUse(m.use,h)._encode(c,v):(g=this._encodePrimitive(m.tag,c),_=!0);var N;if(!m.any&&m.choice===null){var O=m.implicit!==null?m.implicit:m.tag,M=m.implicit===null?"universal":"context";O===null?m.use===null&&v.error("Tag could be omitted only for .use()"):m.use===null&&(N=this._encodeComposite(O,_,M,g))}return m.explicit!==null&&(N=this._encodeComposite(m.explicit,!1,"context",N)),N},f.prototype._encodeChoice=function(c,v){var h=this._baseState,m=h.choice[c.type];return m||i(!1,c.type+" not found in "+JSON.stringify(Object.keys(h.choice))),m._encode(c.value,v)},f.prototype._encodePrimitive=function(c,v){var h=this._baseState;if(/str$/.test(c))return this._encodeStr(v,c);if(c==="objid"&&h.args)return this._encodeObjid(v,h.reverseArgs[0],h.args[1]);if(c==="objid")return this._encodeObjid(v,null,null);if(c==="gentime"||c==="utctime")return this._encodeTime(v,c);if(c==="null_")return this._encodeNull();if(c==="int"||c==="enum")return this._encodeInt(v,h.args&&h.reverseArgs[0]);if(c==="bool")return this._encodeBool(v);if(c==="objDesc")return this._encodeStr(v,c);throw new Error("Unsupported tag: "+c)},f.prototype._isNumstr=function(c){return/^[0-9 ]*$/.test(c)},f.prototype._isPrintstr=function(c){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(c)},node$1}var hasRequiredBase;function requireBase(){return hasRequiredBase||(hasRequiredBase=1,function(r){var n=r;n.Reporter=requireReporter().Reporter,n.DecoderBuffer=requireBuffer().DecoderBuffer,n.EncoderBuffer=requireBuffer().EncoderBuffer,n.Node=requireNode()}(base)),base}var constants={},der={},hasRequiredDer$2;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,function(r){var n=requireConstants();r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.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"},r.tagByName=n._reverse(r.tag)}(der)),der}var hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,function(r){var n=r;n._reverse=function(i){var o={};return Object.keys(i).forEach(function(s){(s|0)==s&&(s=s|0);var l=i[s];o[l]=s}),o},n.der=requireDer$2()}(constants)),constants}var decoders={},der_1$1,hasRequiredDer$1;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var r=requireInherits_browser(),n=requireAsn1$1(),a=n.base,i=n.bignum,o=n.constants.der;function s(u){this.enc="der",this.name=u.name,this.entity=u,this.tree=new l,this.tree._init(u.body)}der_1$1=s,s.prototype.decode=function(c,v){return c instanceof a.DecoderBuffer||(c=new a.DecoderBuffer(c,v)),this.tree._decode(c,v)};function l(u){a.Node.call(this,"der",u)}r(l,a.Node),l.prototype._peekTag=function(c,v,h){if(c.isEmpty())return!1;var m=c.save(),g=f(c,'Failed to peek tag: "'+v+'"');return c.isError(g)?g:(c.restore(m),g.tag===v||g.tagStr===v||g.tagStr+"of"===v||h)},l.prototype._decodeTag=function(c,v,h){var m=f(c,'Failed to decode tag of "'+v+'"');if(c.isError(m))return m;var g=d(c,m.primitive,'Failed to get length of "'+v+'"');if(c.isError(g))return g;if(!h&&m.tag!==v&&m.tagStr!==v&&m.tagStr+"of"!==v)return c.error('Failed to match tag: "'+v+'"');if(m.primitive||g!==null)return c.skip(g,'Failed to match body of: "'+v+'"');var _=c.save(),S=this._skipUntilEnd(c,'Failed to skip indefinite length body: "'+this.tag+'"');return c.isError(S)?S:(g=c.offset-_.offset,c.restore(_),c.skip(g,'Failed to match body of: "'+v+'"'))},l.prototype._skipUntilEnd=function(c,v){for(;;){var h=f(c,v);if(c.isError(h))return h;var m=d(c,h.primitive,v);if(c.isError(m))return m;var g;if(h.primitive||m!==null?g=c.skip(m):g=this._skipUntilEnd(c,v),c.isError(g))return g;if(h.tagStr==="end")break}},l.prototype._decodeList=function(c,v,h,m){for(var g=[];!c.isEmpty();){var _=this._peekTag(c,"end");if(c.isError(_))return _;var S=h.decode(c,"der",m);if(c.isError(S)&&_)break;g.push(S)}return g},l.prototype._decodeStr=function(c,v){if(v==="bitstr"){var h=c.readUInt8();return c.isError(h)?h:{unused:h,data:c.raw()}}else if(v==="bmpstr"){var m=c.raw();if(m.length%2===1)return c.error("Decoding of string type: bmpstr length mismatch");for(var g="",_=0;_<m.length/2;_++)g+=String.fromCharCode(m.readUInt16BE(_*2));return g}else if(v==="numstr"){var S=c.raw().toString("ascii");return this._isNumstr(S)?S:c.error("Decoding of string type: numstr unsupported characters")}else{if(v==="octstr")return c.raw();if(v==="objDesc")return c.raw();if(v==="printstr"){var N=c.raw().toString("ascii");return this._isPrintstr(N)?N:c.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(v)?c.raw().toString():c.error("Decoding of string type: "+v+" unsupported")}},l.prototype._decodeObjid=function(c,v,h){for(var m,g=[],_=0;!c.isEmpty();){var S=c.readUInt8();_<<=7,_|=S&127,(S&128)===0&&(g.push(_),_=0)}S&128&&g.push(_);var N=g[0]/40|0,O=g[0]%40;if(h?m=g:m=[N,O].concat(g.slice(1)),v){var M=v[m.join(" ")];M===void 0&&(M=v[m.join(".")]),M!==void 0&&(m=M)}return m},l.prototype._decodeTime=function(c,v){var h=c.raw().toString();if(v==="gentime")var m=h.slice(0,4)|0,g=h.slice(4,6)|0,_=h.slice(6,8)|0,S=h.slice(8,10)|0,N=h.slice(10,12)|0,O=h.slice(12,14)|0;else if(v==="utctime"){var m=h.slice(0,2)|0,g=h.slice(2,4)|0,_=h.slice(4,6)|0,S=h.slice(6,8)|0,N=h.slice(8,10)|0,O=h.slice(10,12)|0;m<70?m=2e3+m:m=1900+m}else return c.error("Decoding "+v+" time is not supported yet");return Date.UTC(m,g-1,_,S,N,O,0)},l.prototype._decodeNull=function(c){return null},l.prototype._decodeBool=function(c){var v=c.readUInt8();return c.isError(v)?v:v!==0},l.prototype._decodeInt=function(c,v){var h=c.raw(),m=new i(h);return v&&(m=v[m.toString(10)]||m),m},l.prototype._use=function(c,v){return typeof c=="function"&&(c=c(v)),c._getDecoder("der").tree};function f(u,c){var v=u.readUInt8(c);if(u.isError(v))return v;var h=o.tagClass[v>>6],m=(v&32)===0;if((v&31)===31){var g=v;for(v=0;(g&128)===128;){if(g=u.readUInt8(c),u.isError(g))return g;v<<=7,v|=g&127}}else v&=31;var _=o.tag[v];return{cls:h,primitive:m,tag:v,tagStr:_}}function d(u,c,v){var h=u.readUInt8(v);if(u.isError(h))return h;if(!c&&h===128)return null;if((h&128)===0)return h;var m=h&127;if(m>4)return u.error("length octect is too long");h=0;for(var g=0;g<m;g++){h<<=8;var _=u.readUInt8(v);if(u.isError(_))return _;h|=_}return h}return der_1$1}var pem$1,hasRequiredPem$1;function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var r=requireInherits_browser(),n=requireDist().Buffer,a=requireDer$1();function i(o){a.call(this,o),this.enc="pem"}return r(i,a),pem$1=i,i.prototype.decode=function(s,l){for(var f=s.toString().split(/[\r\n]+/g),d=l.label.toUpperCase(),u=/^-----(BEGIN|END) ([^-]+)-----$/,c=-1,v=-1,h=0;h<f.length;h++){var m=f[h].match(u);if(m!==null&&m[2]===d)if(c===-1){if(m[1]!=="BEGIN")break;c=h}else{if(m[1]!=="END")break;v=h;break}}if(c===-1||v===-1)throw new Error("PEM section not found for: "+d);var g=f.slice(c+1,v).join("");g.replace(/[^a-z0-9\+\/=]+/gi,"");var _=new n(g,"base64");return a.prototype.decode.call(this,_,l)},pem$1}var hasRequiredDecoders;function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,function(r){var n=r;n.der=requireDer$1(),n.pem=requirePem$1()}(decoders)),decoders}var encoders={},der_1,hasRequiredDer;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var r=requireInherits_browser(),n=requireDist().Buffer,a=requireAsn1$1(),i=a.base,o=a.constants.der;function s(u){this.enc="der",this.name=u.name,this.entity=u,this.tree=new l,this.tree._init(u.body)}der_1=s,s.prototype.encode=function(c,v){return this.tree._encode(c,v).join()};function l(u){i.Node.call(this,"der",u)}r(l,i.Node),l.prototype._encodeComposite=function(c,v,h,m){var g=d(c,v,h,this.reporter);if(m.length<128){var N=new n(2);return N[0]=g,N[1]=m.length,this._createEncoderBuffer([N,m])}for(var _=1,S=m.length;S>=256;S>>=8)_++;var N=new n(2+_);N[0]=g,N[1]=128|_;for(var S=1+_,O=m.length;O>0;S--,O>>=8)N[S]=O&255;return this._createEncoderBuffer([N,m])},l.prototype._encodeStr=function(c,v){if(v==="bitstr")return this._createEncoderBuffer([c.unused|0,c.data]);if(v==="bmpstr"){for(var h=new n(c.length*2),m=0;m<c.length;m++)h.writeUInt16BE(c.charCodeAt(m),m*2);return this._createEncoderBuffer(h)}else return v==="numstr"?this._isNumstr(c)?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: numstr supports only digits and space"):v==="printstr"?this._isPrintstr(c)?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(v)?this._createEncoderBuffer(c):v==="objDesc"?this._createEncoderBuffer(c):this.reporter.error("Encoding of string type: "+v+" unsupported")},l.prototype._encodeObjid=function(c,v,h){if(typeof c=="string"){if(!v)return this.reporter.error("string objid given, but no values map found");if(!v.hasOwnProperty(c))return this.reporter.error("objid not found in values map");c=v[c].split(/[\s\.]+/g);for(var m=0;m<c.length;m++)c[m]|=0}else if(Array.isArray(c)){c=c.slice();for(var m=0;m<c.length;m++)c[m]|=0}if(!Array.isArray(c))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(c));if(!h){if(c[1]>=40)return this.reporter.error("Second objid identifier OOB");c.splice(0,2,c[0]*40+c[1])}for(var g=0,m=0;m<c.length;m++){var _=c[m];for(g++;_>=128;_>>=7)g++}for(var S=new n(g),N=S.length-1,m=c.length-1;m>=0;m--){var _=c[m];for(S[N--]=_&127;(_>>=7)>0;)S[N--]=128|_&127}return this._createEncoderBuffer(S)};function f(u){return u<10?"0"+u:u}l.prototype._encodeTime=function(c,v){var h,m=new Date(c);return v==="gentime"?h=[f(m.getFullYear()),f(m.getUTCMonth()+1),f(m.getUTCDate()),f(m.getUTCHours()),f(m.getUTCMinutes()),f(m.getUTCSeconds()),"Z"].join(""):v==="utctime"?h=[f(m.getFullYear()%100),f(m.getUTCMonth()+1),f(m.getUTCDate()),f(m.getUTCHours()),f(m.getUTCMinutes()),f(m.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+v+" time is not supported yet"),this._encodeStr(h,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(c,v){if(typeof c=="string"){if(!v)return this.reporter.error("String int or enum given, but no values map");if(!v.hasOwnProperty(c))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(c));c=v[c]}if(typeof c!="number"&&!n.isBuffer(c)){var h=c.toArray();!c.sign&&h[0]&128&&h.unshift(0),c=new n(h)}if(n.isBuffer(c)){var m=c.length;c.length===0&&m++;var _=new n(m);return c.copy(_),c.length===0&&(_[0]=0),this._createEncoderBuffer(_)}if(c<128)return this._createEncoderBuffer(c);if(c<256)return this._createEncoderBuffer([0,c]);for(var m=1,g=c;g>=256;g>>=8)m++;for(var _=new Array(m),g=_.length-1;g>=0;g--)_[g]=c&255,c>>=8;return _[0]&128&&_.unshift(0),this._createEncoderBuffer(new n(_))},l.prototype._encodeBool=function(c){return this._createEncoderBuffer(c?255:0)},l.prototype._use=function(c,v){return typeof c=="function"&&(c=c(v)),c._getEncoder("der").tree},l.prototype._skipDefault=function(c,v,h){var m=this._baseState,g;if(m.default===null)return!1;var _=c.join();if(m.defaultBuffer===void 0&&(m.defaultBuffer=this._encodeValue(m.default,v,h).join()),_.length!==m.defaultBuffer.length)return!1;for(g=0;g<_.length;g++)if(_[g]!==m.defaultBuffer[g])return!1;return!0};function d(u,c,v,h){var m;if(u==="seqof"?u="seq":u==="setof"&&(u="set"),o.tagByName.hasOwnProperty(u))m=o.tagByName[u];else if(typeof u=="number"&&(u|0)===u)m=u;else return h.error("Unknown tag: "+u);return m>=31?h.error("Multi-octet tag encoding unsupported"):(c||(m|=32),m|=o.tagClassByName[v||"universal"]<<6,m)}return der_1}var pem,hasRequiredPem;function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var r=requireInherits_browser(),n=requireDer();function a(i){n.call(this,i),this.enc="pem"}return r(a,n),pem=a,a.prototype.encode=function(o,s){for(var l=n.prototype.encode.call(this,o),f=l.toString("base64"),d=["-----BEGIN "+s.label+"-----"],u=0;u<f.length;u+=64)d.push(f.slice(u,u+64));return d.push("-----END "+s.label+"-----"),d.join(`
39
+ `)},pem}var hasRequiredEncoders;function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,function(r){var n=r;n.der=requireDer(),n.pem=requirePem()}(encoders)),encoders}var hasRequiredAsn1$1;function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,function(r){var n=r;n.bignum=requireBn$2(),n.define=requireApi$1().define,n.base=requireBase(),n.constants=requireConstants(),n.decoders=requireDecoders(),n.encoders=requireEncoders()}(asn1)),asn1}var certificate,hasRequiredCertificate;function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var r=requireAsn1$1(),n=r.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=r.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),i=r.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())}),s=r.define("RelativeDistinguishedName",function(){this.setof(a)}),l=r.define("RDNSequence",function(){this.seqof(s)}),f=r.define("Name",function(){this.choice({rdnSequence:this.use(l)})}),d=r.define("Validity",function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))}),u=r.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),c=r.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(i),this.key("issuer").use(f),this.key("validity").use(d),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(u).optional())}),v=r.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(c),this.key("signatureAlgorithm").use(i),this.key("signatureValue").bitstr())});return certificate=v,certificate}var hasRequiredAsn1;function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var r=requireAsn1$1();asn1$1.certificate=requireCertificate();var n=r.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())});asn1$1.RSAPrivateKey=n;var a=r.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});asn1$1.RSAPublicKey=a;var i=r.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())}),o=r.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())});asn1$1.PublicKey=o;var s=r.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())});asn1$1.PrivateKey=s;var l=r.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())});asn1$1.EncryptedPrivateKey=l;var f=r.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())});asn1$1.DSAPrivateKey=f,asn1$1.DSAparam=r.define("DSAparam",function(){this.int()});var d=r.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),u=r.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())});return asn1$1.ECPrivateKey=u,asn1$1.signature=r.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}),asn1$1}var require$$1={"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"},fixProc,hasRequiredFixProc;function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var r=/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,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,i=requireEvp_bytestokey(),o=requireBrowser$7(),s=requireSafeBuffer$1().Buffer;return fixProc=function(l,f){var d=l.toString(),u=d.match(r),c;if(u){var h="aes"+u[1],m=s.from(u[2],"hex"),g=s.from(u[3].replace(/[\r\n]/g,""),"base64"),_=i(f,m.slice(0,8),parseInt(u[1],10)).key,S=[],N=o.createDecipheriv(h,_,m);S.push(N.update(g)),S.push(N.final()),c=s.concat(S)}else{var v=d.match(a);c=s.from(v[2].replace(/[\r\n]/g,""),"base64")}var O=d.match(n)[1];return{tag:O,data:c}},fixProc}var parseAsn1,hasRequiredParseAsn1;function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var r=requireAsn1(),n=require$$1,a=requireFixProc(),i=requireBrowser$7(),o=requireBrowser$8(),s=requireSafeBuffer$1().Buffer;function l(d,u){var c=d.algorithm.decrypt.kde.kdeparams.salt,v=parseInt(d.algorithm.decrypt.kde.kdeparams.iters.toString(),10),h=n[d.algorithm.decrypt.cipher.algo.join(".")],m=d.algorithm.decrypt.cipher.iv,g=d.subjectPrivateKey,_=parseInt(h.split("-")[1],10)/8,S=o.pbkdf2Sync(u,c,v,_,"sha1"),N=i.createDecipheriv(h,S,m),O=[];return O.push(N.update(g)),O.push(N.final()),s.concat(O)}function f(d){var u;typeof d=="object"&&!s.isBuffer(d)&&(u=d.passphrase,d=d.key),typeof d=="string"&&(d=s.from(d));var c=a(d,u),v=c.tag,h=c.data,m,g;switch(v){case"CERTIFICATE":g=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(g||(g=r.PublicKey.decode(h,"der")),m=g.algorithm.algorithm.join("."),m){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(g.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return g.subjectPrivateKey=g.subjectPublicKey,{type:"ec",data:g};case"1.2.840.10040.4.1":return g.algorithm.params.pub_key=r.DSAparam.decode(g.subjectPublicKey.data,"der"),{type:"dsa",data:g.algorithm.params};default:throw new Error("unknown key id "+m)}case"ENCRYPTED PRIVATE KEY":h=r.EncryptedPrivateKey.decode(h,"der"),h=l(h,u);case"PRIVATE KEY":switch(g=r.PrivateKey.decode(h,"der"),m=g.algorithm.algorithm.join("."),m){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(g.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:g.algorithm.curve,privateKey:r.ECPrivateKey.decode(g.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return g.algorithm.params.priv_key=r.DSAparam.decode(g.subjectPrivateKey,"der"),{type:"dsa",params:g.algorithm.params};default:throw new Error("unknown key id "+m)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return h=r.ECPrivateKey.decode(h,"der"),{curve:h.parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+v)}}return f.signature=r.signature,parseAsn1=f,parseAsn1}var require$$4={"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"},hasRequiredSign;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var r=requireSafeBuffer$1().Buffer,n=requireBrowser$9(),a=requireBrowserifyRsa(),i=requireElliptic().ec,o=requireBn(),s=requireParseAsn1(),l=require$$4,f=1;function d(N,O,M,F,L){var k=s(O);if(k.curve){if(F!=="ecdsa"&&F!=="ecdsa/rsa")throw new Error("wrong private key type");return u(N,k)}else if(k.type==="dsa"){if(F!=="dsa")throw new Error("wrong private key type");return c(N,k,M)}if(F!=="rsa"&&F!=="ecdsa/rsa")throw new Error("wrong private key type");if(O.padding!==void 0&&O.padding!==f)throw new Error("illegal or unsupported padding mode");N=r.concat([L,N]);for(var P=k.modulus.byteLength(),U=[0,1];N.length+U.length+1<P;)U.push(255);U.push(0);for(var B=-1;++B<N.length;)U.push(N[B]);var j=a(U,k);return j}function u(N,O){var M=l[O.curve.join(".")];if(!M)throw new Error("unknown curve "+O.curve.join("."));var F=new i(M),L=F.keyFromPrivate(O.privateKey),k=L.sign(N);return r.from(k.toDER())}function c(N,O,M){for(var F=O.params.priv_key,L=O.params.p,k=O.params.q,P=O.params.g,U=new o(0),B,j=m(N,k).mod(k),$=!1,A=h(F,k,N,M);$===!1;)B=_(k,A,M),U=S(P,B,L,k),$=B.invm(k).imul(j.add(F.mul(U))).mod(k),$.cmpn(0)===0&&($=!1,U=new o(0));return v(U,$)}function v(N,O){N=N.toArray(),O=O.toArray(),N[0]&128&&(N=[0].concat(N)),O[0]&128&&(O=[0].concat(O));var M=N.length+O.length+4,F=[48,M,2,N.length];return F=F.concat(N,[2,O.length],O),r.from(F)}function h(N,O,M,F){if(N=r.from(N.toArray()),N.length<O.byteLength()){var L=r.alloc(O.byteLength()-N.length);N=r.concat([L,N])}var k=M.length,P=g(M,O),U=r.alloc(k);U.fill(1);var B=r.alloc(k);return B=n(F,B).update(U).update(r.from([0])).update(N).update(P).digest(),U=n(F,B).update(U).digest(),B=n(F,B).update(U).update(r.from([1])).update(N).update(P).digest(),U=n(F,B).update(U).digest(),{k:B,v:U}}function m(N,O){var M=new o(N),F=(N.length<<3)-O.bitLength();return F>0&&M.ishrn(F),M}function g(N,O){N=m(N,O),N=N.mod(O);var M=r.from(N.toArray());if(M.length<O.byteLength()){var F=r.alloc(O.byteLength()-M.length);M=r.concat([F,M])}return M}function _(N,O,M){var F,L;do{for(F=r.alloc(0);F.length*8<N.bitLength();)O.v=n(M,O.k).update(O.v).digest(),F=r.concat([F,O.v]);L=m(F,N),O.k=n(M,O.k).update(O.v).update(r.from([0])).digest(),O.v=n(M,O.k).update(O.v).digest()}while(L.cmp(N)!==-1);return L}function S(N,O,M,F){return N.toRed(o.mont(M)).redPow(O).fromRed().mod(F)}return sign.exports=d,sign.exports.getKey=h,sign.exports.makeKey=_,sign.exports}var verify_1,hasRequiredVerify;function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var r=requireSafeBuffer$1().Buffer,n=requireBn(),a=requireElliptic().ec,i=requireParseAsn1(),o=require$$4;function s(u,c,v,h,m){var g=i(v);if(g.type==="ec"){if(h!=="ecdsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");return l(u,c,g)}else if(g.type==="dsa"){if(h!=="dsa")throw new Error("wrong public key type");return f(u,c,g)}if(h!=="rsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");c=r.concat([m,c]);for(var _=g.modulus.byteLength(),S=[1],N=0;c.length+S.length+2<_;)S.push(255),N+=1;S.push(0);for(var O=-1;++O<c.length;)S.push(c[O]);S=r.from(S);var M=n.mont(g.modulus);u=new n(u).toRed(M),u=u.redPow(new n(g.publicExponent)),u=r.from(u.fromRed().toArray());var F=N<8?1:0;for(_=Math.min(u.length,S.length),u.length!==S.length&&(F=1),O=-1;++O<_;)F|=u[O]^S[O];return F===0}function l(u,c,v){var h=o[v.data.algorithm.curve.join(".")];if(!h)throw new Error("unknown curve "+v.data.algorithm.curve.join("."));var m=new a(h),g=v.data.subjectPrivateKey.data;return m.verify(c,u,g)}function f(u,c,v){var h=v.data.p,m=v.data.q,g=v.data.g,_=v.data.pub_key,S=i.signature.decode(u,"der"),N=S.s,O=S.r;d(N,m),d(O,m);var M=n.mont(h),F=N.invm(m),L=g.toRed(M).redPow(new n(c).mul(F).mod(m)).fromRed().mul(_.toRed(M).redPow(O.mul(F).mod(m)).fromRed()).mod(h).mod(m);return L.cmp(O)===0}function d(u,c){if(u.cmpn(0)<=0)throw new Error("invalid sig");if(u.cmp(c)>=0)throw new Error("invalid sig")}return verify_1=s,verify_1}var browser$4,hasRequiredBrowser$4;function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var r=requireSafeBuffer$1().Buffer,n=requireBrowser$a(),a=requireReadableBrowser(),i=requireInherits_browser(),o=requireSign(),s=requireVerify(),l=require$$6;Object.keys(l).forEach(function(v){l[v].id=r.from(l[v].id,"hex"),l[v.toLowerCase()]=l[v]});function f(v){a.Writable.call(this);var h=l[v];if(!h)throw new Error("Unknown message digest");this._hashType=h.hash,this._hash=n(h.hash),this._tag=h.id,this._signType=h.sign}i(f,a.Writable),f.prototype._write=function(h,m,g){this._hash.update(h),g()},f.prototype.update=function(h,m){return this._hash.update(typeof h=="string"?r.from(h,m):h),this},f.prototype.sign=function(h,m){this.end();var g=this._hash.digest(),_=o(g,h,this._hashType,this._signType,this._tag);return m?_.toString(m):_};function d(v){a.Writable.call(this);var h=l[v];if(!h)throw new Error("Unknown message digest");this._hash=n(h.hash),this._tag=h.id,this._signType=h.sign}i(d,a.Writable),d.prototype._write=function(h,m,g){this._hash.update(h),g()},d.prototype.update=function(h,m){return this._hash.update(typeof h=="string"?r.from(h,m):h),this},d.prototype.verify=function(h,m,g){var _=typeof m=="string"?r.from(m,g):m;this.end();var S=this._hash.digest();return s(_,S,h,this._signType,this._tag)};function u(v){return new f(v)}function c(v){return new d(v)}return browser$4={Sign:u,Verify:c,createSign:u,createVerify:c},browser$4}var browser$3,hasRequiredBrowser$3;function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var r=requireElliptic(),n=requireBn$2();browser$3=function(l){return new i(l)};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}};a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1;function i(s){this.curveType=a[s],this.curveType||(this.curveType={name:s}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}i.prototype.generateKeys=function(s,l){return this.keys=this.curve.genKeyPair(),this.getPublicKey(s,l)},i.prototype.computeSecret=function(s,l,f){l=l||"utf8",Buffer.isBuffer(s)||(s=new Buffer(s,l));var d=this.curve.keyFromPublic(s).getPublic(),u=d.mul(this.keys.getPrivate()).getX();return o(u,f,this.curveType.byteLength)},i.prototype.getPublicKey=function(s,l){var f=this.keys.getPublic(l==="compressed",!0);return l==="hybrid"&&(f[f.length-1]%2?f[0]=7:f[0]=6),o(f,s)},i.prototype.getPrivateKey=function(s){return o(this.keys.getPrivate(),s)},i.prototype.setPublicKey=function(s,l){return l=l||"utf8",Buffer.isBuffer(s)||(s=new Buffer(s,l)),this.keys._importPublic(s),this},i.prototype.setPrivateKey=function(s,l){l=l||"utf8",Buffer.isBuffer(s)||(s=new Buffer(s,l));var f=new n(s);return f=f.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(f),this};function o(s,l,f){Array.isArray(s)||(s=s.toArray());var d=new Buffer(s);if(f&&d.length<f){var u=new Buffer(f-d.length);u.fill(0),d=Buffer.concat([u,d])}return l?d.toString(l):d}return browser$3}var browser$2={},mgf,hasRequiredMgf;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var r=requireBrowser$a(),n=requireSafeBuffer$1().Buffer;mgf=function(i,o){for(var s=n.alloc(0),l=0,f;s.length<o;)f=a(l++),s=n.concat([s,r("sha1").update(i).update(f).digest()]);return s.slice(0,o)};function a(i){var o=n.allocUnsafe(4);return o.writeUInt32BE(i,0),o}return mgf}var xor,hasRequiredXor;function requireXor(){return hasRequiredXor||(hasRequiredXor=1,xor=function(n,a){for(var i=n.length,o=-1;++o<i;)n[o]^=a[o];return n}),xor}var withPublic_1,hasRequiredWithPublic;function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var r=requireBn$2(),n=requireSafeBuffer$1().Buffer;function a(i,o){return n.from(i.toRed(r.mont(o.modulus)).redPow(new r(o.publicExponent)).fromRed().toArray())}return withPublic_1=a,withPublic_1}var publicEncrypt,hasRequiredPublicEncrypt;function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var r=requireParseAsn1(),n=requireBrowser$b(),a=requireBrowser$a(),i=requireMgf(),o=requireXor(),s=requireBn$2(),l=requireWithPublic(),f=requireBrowserifyRsa(),d=requireSafeBuffer$1().Buffer;publicEncrypt=function(m,g,_){var S;m.padding?S=m.padding:_?S=1:S=4;var N=r(m),O;if(S===4)O=u(N,g);else if(S===1)O=c(N,g,_);else if(S===3){if(O=new s(g),O.cmp(N.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return _?f(O,N):l(O,N)};function u(h,m){var g=h.modulus.byteLength(),_=m.length,S=a("sha1").update(d.alloc(0)).digest(),N=S.length,O=2*N;if(_>g-O-2)throw new Error("message too long");var M=d.alloc(g-_-O-2),F=g-N-1,L=n(N),k=o(d.concat([S,M,d.alloc(1,1),m],F),i(L,F)),P=o(L,i(k,N));return new s(d.concat([d.alloc(1),P,k],g))}function c(h,m,g){var _=m.length,S=h.modulus.byteLength();if(_>S-11)throw new Error("message too long");var N;return g?N=d.alloc(S-_-3,255):N=v(S-_-3),new s(d.concat([d.from([0,g?1:2]),N,d.alloc(1),m],S))}function v(h){for(var m=d.allocUnsafe(h),g=0,_=n(h*2),S=0,N;g<h;)S===_.length&&(_=n(h*2),S=0),N=_[S++],N&&(m[g++]=N);return m}return publicEncrypt}var privateDecrypt,hasRequiredPrivateDecrypt;function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var r=requireParseAsn1(),n=requireMgf(),a=requireXor(),i=requireBn$2(),o=requireBrowserifyRsa(),s=requireBrowser$a(),l=requireWithPublic(),f=requireSafeBuffer$1().Buffer;privateDecrypt=function(h,m,g){var _;h.padding?_=h.padding:g?_=1:_=4;var S=r(h),N=S.modulus.byteLength();if(m.length>N||new i(m).cmp(S.modulus)>=0)throw new Error("decryption error");var O;g?O=l(new i(m),S):O=o(m,S);var M=f.alloc(N-O.length);if(O=f.concat([M,O],N),_===4)return d(S,O);if(_===1)return u(S,O,g);if(_===3)return O;throw new Error("unknown padding")};function d(v,h){var m=v.modulus.byteLength(),g=s("sha1").update(f.alloc(0)).digest(),_=g.length;if(h[0]!==0)throw new Error("decryption error");var S=h.slice(1,_+1),N=h.slice(_+1),O=a(S,n(N,_)),M=a(N,n(O,m-_-1));if(c(g,M.slice(0,_)))throw new Error("decryption error");for(var F=_;M[F]===0;)F++;if(M[F++]!==1)throw new Error("decryption error");return M.slice(F)}function u(v,h,m){for(var g=h.slice(0,2),_=2,S=0;h[_++]!==0;)if(_>=h.length){S++;break}var N=h.slice(2,_-1);if((g.toString("hex")!=="0002"&&!m||g.toString("hex")!=="0001"&&m)&&S++,N.length<8&&S++,S)throw new Error("decryption error");return h.slice(_)}function c(v,h){v=f.from(v),h=f.from(h);var m=0,g=v.length;v.length!==h.length&&(m++,g=Math.min(v.length,h.length));for(var _=-1;++_<g;)m+=v[_]^h[_];return m}return privateDecrypt}var hasRequiredBrowser$2;function requireBrowser$2(){return hasRequiredBrowser$2||(hasRequiredBrowser$2=1,function(r){r.publicEncrypt=requirePublicEncrypt(),r.privateDecrypt=requirePrivateDecrypt(),r.privateEncrypt=function(a,i){return r.publicEncrypt(a,i,!0)},r.publicDecrypt=function(a,i){return r.privateDecrypt(a,i,!0)}}(browser$2)),browser$2}var browser$1={},hasRequiredBrowser$1;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$1;hasRequiredBrowser$1=1;function r(){throw new Error(`secure random number generation not supported by this browser
40
+ use chrome, FireFox or Internet Explorer 11`)}var n=requireSafeBuffer$1(),a=requireBrowser$b(),i=n.Buffer,o=n.kMaxLength,s=commonjsGlobal.crypto||commonjsGlobal.msCrypto,l=Math.pow(2,32)-1;function f(h,m){if(typeof h!="number"||h!==h)throw new TypeError("offset must be a number");if(h>l||h<0)throw new TypeError("offset must be a uint32");if(h>o||h>m)throw new RangeError("offset out of range")}function d(h,m,g){if(typeof h!="number"||h!==h)throw new TypeError("size must be a number");if(h>l||h<0)throw new TypeError("size must be a uint32");if(h+m>g||h>o)throw new RangeError("buffer too small")}s&&s.getRandomValues||!process$1.browser?(browser$1.randomFill=u,browser$1.randomFillSync=v):(browser$1.randomFill=r,browser$1.randomFillSync=r);function u(h,m,g,_){if(!i.isBuffer(h)&&!(h instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof m=="function")_=m,m=0,g=h.length;else if(typeof g=="function")_=g,g=h.length-m;else if(typeof _!="function")throw new TypeError('"cb" argument must be a function');return f(m,h.length),d(g,m,h.length),c(h,m,g,_)}function c(h,m,g,_){if(process$1.browser){var S=h.buffer,N=new Uint8Array(S,m,g);if(s.getRandomValues(N),_){process$1.nextTick(function(){_(null,h)});return}return h}if(_){a(g,function(M,F){if(M)return _(M);F.copy(h,m),_(null,h)});return}var O=a(g);return O.copy(h,m),h}function v(h,m,g){if(typeof m>"u"&&(m=0),!i.isBuffer(h)&&!(h instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(m,h.length),g===void 0&&(g=h.length-m),d(g,m,h.length),c(h,m,g)}return browser$1}var hasRequiredCryptoBrowserify;function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$a(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$9();var r=requireAlgos(),n=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);cryptoBrowserify.getHashes=function(){return a};var i=requireBrowser$8();cryptoBrowserify.pbkdf2=i.pbkdf2,cryptoBrowserify.pbkdf2Sync=i.pbkdf2Sync;var o=requireBrowser$6();cryptoBrowserify.Cipher=o.Cipher,cryptoBrowserify.createCipher=o.createCipher,cryptoBrowserify.Cipheriv=o.Cipheriv,cryptoBrowserify.createCipheriv=o.createCipheriv,cryptoBrowserify.Decipher=o.Decipher,cryptoBrowserify.createDecipher=o.createDecipher,cryptoBrowserify.Decipheriv=o.Decipheriv,cryptoBrowserify.createDecipheriv=o.createDecipheriv,cryptoBrowserify.getCiphers=o.getCiphers,cryptoBrowserify.listCiphers=o.listCiphers;var s=requireBrowser$5();cryptoBrowserify.DiffieHellmanGroup=s.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=s.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=s.getDiffieHellman,cryptoBrowserify.createDiffieHellman=s.createDiffieHellman,cryptoBrowserify.DiffieHellman=s.DiffieHellman;var l=requireBrowser$4();cryptoBrowserify.createSign=l.createSign,cryptoBrowserify.Sign=l.Sign,cryptoBrowserify.createVerify=l.createVerify,cryptoBrowserify.Verify=l.Verify,cryptoBrowserify.createECDH=requireBrowser$3();var f=requireBrowser$2();cryptoBrowserify.publicEncrypt=f.publicEncrypt,cryptoBrowserify.privateEncrypt=f.privateEncrypt,cryptoBrowserify.publicDecrypt=f.publicDecrypt,cryptoBrowserify.privateDecrypt=f.privateDecrypt;var d=requireBrowser$1();return cryptoBrowserify.randomFill=d.randomFill,cryptoBrowserify.randomFillSync=d.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
41
+ we accept pull requests
42
+ https://github.com/browserify/crypto-browserify`)},cryptoBrowserify.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},cryptoBrowserify}var core=core$1.exports,hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(r,n){(function(a,i){r.exports=i()})(core,function(){var a=a||function(i,o){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof commonjsGlobal<"u"&&commonjsGlobal.crypto&&(s=commonjsGlobal.crypto),!s&&typeof commonjsRequire=="function")try{s=requireCryptoBrowserify()}catch{}var l=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},f=Object.create||function(){function O(){}return function(M){var F;return O.prototype=M,F=new O,O.prototype=null,F}}(),d={},u=d.lib={},c=u.Base=function(){return{extend:function(O){var M=f(this);return O&&M.mixIn(O),(!M.hasOwnProperty("init")||this.init===M.init)&&(M.init=function(){M.$super.init.apply(this,arguments)}),M.init.prototype=M,M.$super=this,M},create:function(){var O=this.extend();return O.init.apply(O,arguments),O},init:function(){},mixIn:function(O){for(var M in O)O.hasOwnProperty(M)&&(this[M]=O[M]);O.hasOwnProperty("toString")&&(this.toString=O.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=u.WordArray=c.extend({init:function(O,M){O=this.words=O||[],M!=o?this.sigBytes=M:this.sigBytes=O.length*4},toString:function(O){return(O||m).stringify(this)},concat:function(O){var M=this.words,F=O.words,L=this.sigBytes,k=O.sigBytes;if(this.clamp(),L%4)for(var P=0;P<k;P++){var U=F[P>>>2]>>>24-P%4*8&255;M[L+P>>>2]|=U<<24-(L+P)%4*8}else for(var B=0;B<k;B+=4)M[L+B>>>2]=F[B>>>2];return this.sigBytes+=k,this},clamp:function(){var O=this.words,M=this.sigBytes;O[M>>>2]&=4294967295<<32-M%4*8,O.length=i.ceil(M/4)},clone:function(){var O=c.clone.call(this);return O.words=this.words.slice(0),O},random:function(O){for(var M=[],F=0;F<O;F+=4)M.push(l());return new v.init(M,O)}}),h=d.enc={},m=h.Hex={stringify:function(O){for(var M=O.words,F=O.sigBytes,L=[],k=0;k<F;k++){var P=M[k>>>2]>>>24-k%4*8&255;L.push((P>>>4).toString(16)),L.push((P&15).toString(16))}return L.join("")},parse:function(O){for(var M=O.length,F=[],L=0;L<M;L+=2)F[L>>>3]|=parseInt(O.substr(L,2),16)<<24-L%8*4;return new v.init(F,M/2)}},g=h.Latin1={stringify:function(O){for(var M=O.words,F=O.sigBytes,L=[],k=0;k<F;k++){var P=M[k>>>2]>>>24-k%4*8&255;L.push(String.fromCharCode(P))}return L.join("")},parse:function(O){for(var M=O.length,F=[],L=0;L<M;L++)F[L>>>2]|=(O.charCodeAt(L)&255)<<24-L%4*8;return new v.init(F,M)}},_=h.Utf8={stringify:function(O){try{return decodeURIComponent(escape(g.stringify(O)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(O){return g.parse(unescape(encodeURIComponent(O)))}},S=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(O){typeof O=="string"&&(O=_.parse(O)),this._data.concat(O),this._nDataBytes+=O.sigBytes},_process:function(O){var M,F=this._data,L=F.words,k=F.sigBytes,P=this.blockSize,U=P*4,B=k/U;O?B=i.ceil(B):B=i.max((B|0)-this._minBufferSize,0);var j=B*P,$=i.min(j*4,k);if(j){for(var A=0;A<j;A+=P)this._doProcessBlock(L,A);M=L.splice(0,j),F.sigBytes-=$}return new v.init(M,$)},clone:function(){var O=c.clone.call(this);return O._data=this._data.clone(),O},_minBufferSize:0});u.Hasher=S.extend({cfg:c.extend(),init:function(O){this.cfg=this.cfg.extend(O),this.reset()},reset:function(){S.reset.call(this),this._doReset()},update:function(O){return this._append(O),this._process(),this},finalize:function(O){O&&this._append(O);var M=this._doFinalize();return M},blockSize:16,_createHelper:function(O){return function(M,F){return new O.init(F).finalize(M)}},_createHmacHelper:function(O){return function(M,F){return new N.HMAC.init(O,F).finalize(M)}}});var N=d.algo={};return d}(Math);return a})}(core$1)),core$1.exports}var x64Core$1={exports:{}},x64Core=x64Core$1.exports,hasRequiredX64Core;function requireX64Core(){return hasRequiredX64Core||(hasRequiredX64Core=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(x64Core,function(a){return function(i){var o=a,s=o.lib,l=s.Base,f=s.WordArray,d=o.x64={};d.Word=l.extend({init:function(u,c){this.high=u,this.low=c}}),d.WordArray=l.extend({init:function(u,c){u=this.words=u||[],c!=i?this.sigBytes=c:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,c=u.length,v=[],h=0;h<c;h++){var m=u[h];v.push(m.high),v.push(m.low)}return f.create(v,this.sigBytes)},clone:function(){for(var u=l.clone.call(this),c=u.words=this.words.slice(0),v=c.length,h=0;h<v;h++)c[h]=c[h].clone();return u}})}(),a})}(x64Core$1)),x64Core$1.exports}var libTypedarrays$1={exports:{}},libTypedarrays=libTypedarrays$1.exports,hasRequiredLibTypedarrays;function requireLibTypedarrays(){return hasRequiredLibTypedarrays||(hasRequiredLibTypedarrays=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(libTypedarrays,function(a){return function(){if(typeof ArrayBuffer=="function"){var i=a,o=i.lib,s=o.WordArray,l=s.init,f=s.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var u=d.byteLength,c=[],v=0;v<u;v++)c[v>>>2]|=d[v]<<24-v%4*8;l.call(this,c,u)}else l.apply(this,arguments)};f.prototype=s}}(),a.lib.WordArray})}(libTypedarrays$1)),libTypedarrays$1.exports}var encUtf16$1={exports:{}},encUtf16=encUtf16$1.exports,hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(encUtf16,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=i.enc;l.Utf16=l.Utf16BE={stringify:function(d){for(var u=d.words,c=d.sigBytes,v=[],h=0;h<c;h+=2){var m=u[h>>>2]>>>16-h%4*8&65535;v.push(String.fromCharCode(m))}return v.join("")},parse:function(d){for(var u=d.length,c=[],v=0;v<u;v++)c[v>>>1]|=d.charCodeAt(v)<<16-v%2*16;return s.create(c,u*2)}},l.Utf16LE={stringify:function(d){for(var u=d.words,c=d.sigBytes,v=[],h=0;h<c;h+=2){var m=f(u[h>>>2]>>>16-h%4*8&65535);v.push(String.fromCharCode(m))}return v.join("")},parse:function(d){for(var u=d.length,c=[],v=0;v<u;v++)c[v>>>1]|=f(d.charCodeAt(v)<<16-v%2*16);return s.create(c,u*2)}};function f(d){return d<<8&4278255360|d>>>8&16711935}}(),a.enc.Utf16})}(encUtf16$1)),encUtf16$1.exports}var encBase64$1={exports:{}},encBase64=encBase64$1.exports,hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(encBase64,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=i.enc;l.Base64={stringify:function(d){var u=d.words,c=d.sigBytes,v=this._map;d.clamp();for(var h=[],m=0;m<c;m+=3)for(var g=u[m>>>2]>>>24-m%4*8&255,_=u[m+1>>>2]>>>24-(m+1)%4*8&255,S=u[m+2>>>2]>>>24-(m+2)%4*8&255,N=g<<16|_<<8|S,O=0;O<4&&m+O*.75<c;O++)h.push(v.charAt(N>>>6*(3-O)&63));var M=v.charAt(64);if(M)for(;h.length%4;)h.push(M);return h.join("")},parse:function(d){var u=d.length,c=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var h=0;h<c.length;h++)v[c.charCodeAt(h)]=h}var m=c.charAt(64);if(m){var g=d.indexOf(m);g!==-1&&(u=g)}return f(d,u,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function f(d,u,c){for(var v=[],h=0,m=0;m<u;m++)if(m%4){var g=c[d.charCodeAt(m-1)]<<m%4*2,_=c[d.charCodeAt(m)]>>>6-m%4*2,S=g|_;v[h>>>2]|=S<<24-h%4*8,h++}return s.create(v,h)}}(),a.enc.Base64})}(encBase64$1)),encBase64$1.exports}var encBase64url$1={exports:{}},encBase64url=encBase64url$1.exports,hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(encBase64url,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=i.enc;l.Base64url={stringify:function(d,u){u===void 0&&(u=!0);var c=d.words,v=d.sigBytes,h=u?this._safe_map:this._map;d.clamp();for(var m=[],g=0;g<v;g+=3)for(var _=c[g>>>2]>>>24-g%4*8&255,S=c[g+1>>>2]>>>24-(g+1)%4*8&255,N=c[g+2>>>2]>>>24-(g+2)%4*8&255,O=_<<16|S<<8|N,M=0;M<4&&g+M*.75<v;M++)m.push(h.charAt(O>>>6*(3-M)&63));var F=h.charAt(64);if(F)for(;m.length%4;)m.push(F);return m.join("")},parse:function(d,u){u===void 0&&(u=!0);var c=d.length,v=u?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var m=0;m<v.length;m++)h[v.charCodeAt(m)]=m}var g=v.charAt(64);if(g){var _=d.indexOf(g);_!==-1&&(c=_)}return f(d,c,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function f(d,u,c){for(var v=[],h=0,m=0;m<u;m++)if(m%4){var g=c[d.charCodeAt(m-1)]<<m%4*2,_=c[d.charCodeAt(m)]>>>6-m%4*2,S=g|_;v[h>>>2]|=S<<24-h%4*8,h++}return s.create(v,h)}}(),a.enc.Base64url})}(encBase64url$1)),encBase64url$1.exports}var md5$1={exports:{}},md5=md5$1.exports,hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(md5,function(a){return function(i){var o=a,s=o.lib,l=s.WordArray,f=s.Hasher,d=o.algo,u=[];(function(){for(var _=0;_<64;_++)u[_]=i.abs(i.sin(_+1))*4294967296|0})();var c=d.MD5=f.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(_,S){for(var N=0;N<16;N++){var O=S+N,M=_[O];_[O]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}var F=this._hash.words,L=_[S+0],k=_[S+1],P=_[S+2],U=_[S+3],B=_[S+4],j=_[S+5],$=_[S+6],A=_[S+7],R=_[S+8],y=_[S+9],b=_[S+10],D=_[S+11],I=_[S+12],T=_[S+13],C=_[S+14],x=_[S+15],w=F[0],E=F[1],q=F[2],G=F[3];w=v(w,E,q,G,L,7,u[0]),G=v(G,w,E,q,k,12,u[1]),q=v(q,G,w,E,P,17,u[2]),E=v(E,q,G,w,U,22,u[3]),w=v(w,E,q,G,B,7,u[4]),G=v(G,w,E,q,j,12,u[5]),q=v(q,G,w,E,$,17,u[6]),E=v(E,q,G,w,A,22,u[7]),w=v(w,E,q,G,R,7,u[8]),G=v(G,w,E,q,y,12,u[9]),q=v(q,G,w,E,b,17,u[10]),E=v(E,q,G,w,D,22,u[11]),w=v(w,E,q,G,I,7,u[12]),G=v(G,w,E,q,T,12,u[13]),q=v(q,G,w,E,C,17,u[14]),E=v(E,q,G,w,x,22,u[15]),w=h(w,E,q,G,k,5,u[16]),G=h(G,w,E,q,$,9,u[17]),q=h(q,G,w,E,D,14,u[18]),E=h(E,q,G,w,L,20,u[19]),w=h(w,E,q,G,j,5,u[20]),G=h(G,w,E,q,b,9,u[21]),q=h(q,G,w,E,x,14,u[22]),E=h(E,q,G,w,B,20,u[23]),w=h(w,E,q,G,y,5,u[24]),G=h(G,w,E,q,C,9,u[25]),q=h(q,G,w,E,U,14,u[26]),E=h(E,q,G,w,R,20,u[27]),w=h(w,E,q,G,T,5,u[28]),G=h(G,w,E,q,P,9,u[29]),q=h(q,G,w,E,A,14,u[30]),E=h(E,q,G,w,I,20,u[31]),w=m(w,E,q,G,j,4,u[32]),G=m(G,w,E,q,R,11,u[33]),q=m(q,G,w,E,D,16,u[34]),E=m(E,q,G,w,C,23,u[35]),w=m(w,E,q,G,k,4,u[36]),G=m(G,w,E,q,B,11,u[37]),q=m(q,G,w,E,A,16,u[38]),E=m(E,q,G,w,b,23,u[39]),w=m(w,E,q,G,T,4,u[40]),G=m(G,w,E,q,L,11,u[41]),q=m(q,G,w,E,U,16,u[42]),E=m(E,q,G,w,$,23,u[43]),w=m(w,E,q,G,y,4,u[44]),G=m(G,w,E,q,I,11,u[45]),q=m(q,G,w,E,x,16,u[46]),E=m(E,q,G,w,P,23,u[47]),w=g(w,E,q,G,L,6,u[48]),G=g(G,w,E,q,A,10,u[49]),q=g(q,G,w,E,C,15,u[50]),E=g(E,q,G,w,j,21,u[51]),w=g(w,E,q,G,I,6,u[52]),G=g(G,w,E,q,U,10,u[53]),q=g(q,G,w,E,b,15,u[54]),E=g(E,q,G,w,k,21,u[55]),w=g(w,E,q,G,R,6,u[56]),G=g(G,w,E,q,x,10,u[57]),q=g(q,G,w,E,$,15,u[58]),E=g(E,q,G,w,T,21,u[59]),w=g(w,E,q,G,B,6,u[60]),G=g(G,w,E,q,D,10,u[61]),q=g(q,G,w,E,P,15,u[62]),E=g(E,q,G,w,y,21,u[63]),F[0]=F[0]+w|0,F[1]=F[1]+E|0,F[2]=F[2]+q|0,F[3]=F[3]+G|0},_doFinalize:function(){var _=this._data,S=_.words,N=this._nDataBytes*8,O=_.sigBytes*8;S[O>>>5]|=128<<24-O%32;var M=i.floor(N/4294967296),F=N;S[(O+64>>>9<<4)+15]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,S[(O+64>>>9<<4)+14]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,_.sigBytes=(S.length+1)*4,this._process();for(var L=this._hash,k=L.words,P=0;P<4;P++){var U=k[P];k[P]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360}return L},clone:function(){var _=f.clone.call(this);return _._hash=this._hash.clone(),_}});function v(_,S,N,O,M,F,L){var k=_+(S&N|~S&O)+M+L;return(k<<F|k>>>32-F)+S}function h(_,S,N,O,M,F,L){var k=_+(S&O|N&~O)+M+L;return(k<<F|k>>>32-F)+S}function m(_,S,N,O,M,F,L){var k=_+(S^N^O)+M+L;return(k<<F|k>>>32-F)+S}function g(_,S,N,O,M,F,L){var k=_+(N^(S|~O))+M+L;return(k<<F|k>>>32-F)+S}o.MD5=f._createHelper(c),o.HmacMD5=f._createHmacHelper(c)}(Math),a.MD5})}(md5$1)),md5$1.exports}var sha1$1={exports:{}},sha1=sha1$1.exports,hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(sha1,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=o.Hasher,f=i.algo,d=[],u=f.SHA1=l.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,v){for(var h=this._hash.words,m=h[0],g=h[1],_=h[2],S=h[3],N=h[4],O=0;O<80;O++){if(O<16)d[O]=c[v+O]|0;else{var M=d[O-3]^d[O-8]^d[O-14]^d[O-16];d[O]=M<<1|M>>>31}var F=(m<<5|m>>>27)+N+d[O];O<20?F+=(g&_|~g&S)+1518500249:O<40?F+=(g^_^S)+1859775393:O<60?F+=(g&_|g&S|_&S)-1894007588:F+=(g^_^S)-899497514,N=S,S=_,_=g<<30|g>>>2,g=m,m=F}h[0]=h[0]+m|0,h[1]=h[1]+g|0,h[2]=h[2]+_|0,h[3]=h[3]+S|0,h[4]=h[4]+N|0},_doFinalize:function(){var c=this._data,v=c.words,h=this._nDataBytes*8,m=c.sigBytes*8;return v[m>>>5]|=128<<24-m%32,v[(m+64>>>9<<4)+14]=Math.floor(h/4294967296),v[(m+64>>>9<<4)+15]=h,c.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var c=l.clone.call(this);return c._hash=this._hash.clone(),c}});i.SHA1=l._createHelper(u),i.HmacSHA1=l._createHmacHelper(u)}(),a.SHA1})}(sha1$1)),sha1$1.exports}var sha256$1={exports:{}},sha256=sha256$1.exports,hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(sha256,function(a){return function(i){var o=a,s=o.lib,l=s.WordArray,f=s.Hasher,d=o.algo,u=[],c=[];(function(){function m(N){for(var O=i.sqrt(N),M=2;M<=O;M++)if(!(N%M))return!1;return!0}function g(N){return(N-(N|0))*4294967296|0}for(var _=2,S=0;S<64;)m(_)&&(S<8&&(u[S]=g(i.pow(_,1/2))),c[S]=g(i.pow(_,1/3)),S++),_++})();var v=[],h=d.SHA256=f.extend({_doReset:function(){this._hash=new l.init(u.slice(0))},_doProcessBlock:function(m,g){for(var _=this._hash.words,S=_[0],N=_[1],O=_[2],M=_[3],F=_[4],L=_[5],k=_[6],P=_[7],U=0;U<64;U++){if(U<16)v[U]=m[g+U]|0;else{var B=v[U-15],j=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,$=v[U-2],A=($<<15|$>>>17)^($<<13|$>>>19)^$>>>10;v[U]=j+v[U-7]+A+v[U-16]}var R=F&L^~F&k,y=S&N^S&O^N&O,b=(S<<30|S>>>2)^(S<<19|S>>>13)^(S<<10|S>>>22),D=(F<<26|F>>>6)^(F<<21|F>>>11)^(F<<7|F>>>25),I=P+D+R+c[U]+v[U],T=b+y;P=k,k=L,L=F,F=M+I|0,M=O,O=N,N=S,S=I+T|0}_[0]=_[0]+S|0,_[1]=_[1]+N|0,_[2]=_[2]+O|0,_[3]=_[3]+M|0,_[4]=_[4]+F|0,_[5]=_[5]+L|0,_[6]=_[6]+k|0,_[7]=_[7]+P|0},_doFinalize:function(){var m=this._data,g=m.words,_=this._nDataBytes*8,S=m.sigBytes*8;return g[S>>>5]|=128<<24-S%32,g[(S+64>>>9<<4)+14]=i.floor(_/4294967296),g[(S+64>>>9<<4)+15]=_,m.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var m=f.clone.call(this);return m._hash=this._hash.clone(),m}});o.SHA256=f._createHelper(h),o.HmacSHA256=f._createHmacHelper(h)}(Math),a.SHA256})}(sha256$1)),sha256$1.exports}var sha224$1={exports:{}},sha224=sha224$1.exports,hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireSha256())})(sha224,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=i.algo,f=l.SHA256,d=l.SHA224=f.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=f._doFinalize.call(this);return u.sigBytes-=4,u}});i.SHA224=f._createHelper(d),i.HmacSHA224=f._createHmacHelper(d)}(),a.SHA224})}(sha224$1)),sha224$1.exports}var sha512$1={exports:{}},sha512=sha512$1.exports,hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireX64Core())})(sha512,function(a){return function(){var i=a,o=i.lib,s=o.Hasher,l=i.x64,f=l.Word,d=l.WordArray,u=i.algo;function c(){return f.create.apply(f,arguments)}var v=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],h=[];(function(){for(var g=0;g<80;g++)h[g]=c()})();var m=u.SHA512=s.extend({_doReset:function(){this._hash=new d.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(g,_){for(var S=this._hash.words,N=S[0],O=S[1],M=S[2],F=S[3],L=S[4],k=S[5],P=S[6],U=S[7],B=N.high,j=N.low,$=O.high,A=O.low,R=M.high,y=M.low,b=F.high,D=F.low,I=L.high,T=L.low,C=k.high,x=k.low,w=P.high,E=P.low,q=U.high,G=U.low,z=B,H=j,V=$,K=A,Z=R,re=y,W=b,X=D,J=I,ie=T,ne=C,ae=x,ue=w,fe=E,se=q,pe=G,ce=0;ce<80;ce++){var he,ve,ye=h[ce];if(ce<16)ve=ye.high=g[_+ce*2]|0,he=ye.low=g[_+ce*2+1]|0;else{var be=h[ce-15],_e=be.high,me=be.low,Pe=(_e>>>1|me<<31)^(_e>>>8|me<<24)^_e>>>7,Ne=(me>>>1|_e<<31)^(me>>>8|_e<<24)^(me>>>7|_e<<25),Ee=h[ce-2],Be=Ee.high,Ce=Ee.low,Re=(Be>>>19|Ce<<13)^(Be<<3|Ce>>>29)^Be>>>6,Ge=(Ce>>>19|Be<<13)^(Ce<<3|Be>>>29)^(Ce>>>6|Be<<26),Me=h[ce-7],Te=Me.high,Ke=Me.low,Fe=h[ce-16],Ie=Fe.high,Qe=Fe.low;he=Ne+Ke,ve=Pe+Te+(he>>>0<Ne>>>0?1:0),he=he+Ge,ve=ve+Re+(he>>>0<Ge>>>0?1:0),he=he+Qe,ve=ve+Ie+(he>>>0<Qe>>>0?1:0),ye.high=ve,ye.low=he}var qe=J&ne^~J&ue,Se=ie&ae^~ie&fe,je=z&V^z&Z^V&Z,Le=H&K^H&re^K&re,we=(z>>>28|H<<4)^(z<<30|H>>>2)^(z<<25|H>>>7),He=(H>>>28|z<<4)^(H<<30|z>>>2)^(H<<25|z>>>7),$e=(J>>>14|ie<<18)^(J>>>18|ie<<14)^(J<<23|ie>>>9),ee=(ie>>>14|J<<18)^(ie>>>18|J<<14)^(ie<<23|J>>>9),Q=v[ce],Y=Q.high,te=Q.low,oe=pe+ee,le=se+$e+(oe>>>0<pe>>>0?1:0),oe=oe+Se,le=le+qe+(oe>>>0<Se>>>0?1:0),oe=oe+te,le=le+Y+(oe>>>0<te>>>0?1:0),oe=oe+he,le=le+ve+(oe>>>0<he>>>0?1:0),de=He+Le,De=we+je+(de>>>0<He>>>0?1:0);se=ue,pe=fe,ue=ne,fe=ae,ne=J,ae=ie,ie=X+oe|0,J=W+le+(ie>>>0<X>>>0?1:0)|0,W=Z,X=re,Z=V,re=K,V=z,K=H,H=oe+de|0,z=le+De+(H>>>0<oe>>>0?1:0)|0}j=N.low=j+H,N.high=B+z+(j>>>0<H>>>0?1:0),A=O.low=A+K,O.high=$+V+(A>>>0<K>>>0?1:0),y=M.low=y+re,M.high=R+Z+(y>>>0<re>>>0?1:0),D=F.low=D+X,F.high=b+W+(D>>>0<X>>>0?1:0),T=L.low=T+ie,L.high=I+J+(T>>>0<ie>>>0?1:0),x=k.low=x+ae,k.high=C+ne+(x>>>0<ae>>>0?1:0),E=P.low=E+fe,P.high=w+ue+(E>>>0<fe>>>0?1:0),G=U.low=G+pe,U.high=q+se+(G>>>0<pe>>>0?1:0)},_doFinalize:function(){var g=this._data,_=g.words,S=this._nDataBytes*8,N=g.sigBytes*8;_[N>>>5]|=128<<24-N%32,_[(N+128>>>10<<5)+30]=Math.floor(S/4294967296),_[(N+128>>>10<<5)+31]=S,g.sigBytes=_.length*4,this._process();var O=this._hash.toX32();return O},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});i.SHA512=s._createHelper(m),i.HmacSHA512=s._createHmacHelper(m)}(),a.SHA512})}(sha512$1)),sha512$1.exports}var sha384$1={exports:{}},sha384=sha384$1.exports,hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireX64Core(),requireSha512())})(sha384,function(a){return function(){var i=a,o=i.x64,s=o.Word,l=o.WordArray,f=i.algo,d=f.SHA512,u=f.SHA384=d.extend({_doReset:function(){this._hash=new l.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var c=d._doFinalize.call(this);return c.sigBytes-=16,c}});i.SHA384=d._createHelper(u),i.HmacSHA384=d._createHmacHelper(u)}(),a.SHA384})}(sha384$1)),sha384$1.exports}var sha3$1={exports:{}},sha3=sha3$1.exports,hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireX64Core())})(sha3,function(a){return function(i){var o=a,s=o.lib,l=s.WordArray,f=s.Hasher,d=o.x64,u=d.Word,c=o.algo,v=[],h=[],m=[];(function(){for(var S=1,N=0,O=0;O<24;O++){v[S+5*N]=(O+1)*(O+2)/2%64;var M=N%5,F=(2*S+3*N)%5;S=M,N=F}for(var S=0;S<5;S++)for(var N=0;N<5;N++)h[S+5*N]=N+(2*S+3*N)%5*5;for(var L=1,k=0;k<24;k++){for(var P=0,U=0,B=0;B<7;B++){if(L&1){var j=(1<<B)-1;j<32?U^=1<<j:P^=1<<j-32}L&128?L=L<<1^113:L<<=1}m[k]=u.create(P,U)}})();var g=[];(function(){for(var S=0;S<25;S++)g[S]=u.create()})();var _=c.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var S=this._state=[],N=0;N<25;N++)S[N]=new u.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(S,N){for(var O=this._state,M=this.blockSize/2,F=0;F<M;F++){var L=S[N+2*F],k=S[N+2*F+1];L=(L<<8|L>>>24)&16711935|(L<<24|L>>>8)&4278255360,k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;var P=O[F];P.high^=k,P.low^=L}for(var U=0;U<24;U++){for(var B=0;B<5;B++){for(var j=0,$=0,A=0;A<5;A++){var P=O[B+5*A];j^=P.high,$^=P.low}var R=g[B];R.high=j,R.low=$}for(var B=0;B<5;B++)for(var y=g[(B+4)%5],b=g[(B+1)%5],D=b.high,I=b.low,j=y.high^(D<<1|I>>>31),$=y.low^(I<<1|D>>>31),A=0;A<5;A++){var P=O[B+5*A];P.high^=j,P.low^=$}for(var T=1;T<25;T++){var j,$,P=O[T],C=P.high,x=P.low,w=v[T];w<32?(j=C<<w|x>>>32-w,$=x<<w|C>>>32-w):(j=x<<w-32|C>>>64-w,$=C<<w-32|x>>>64-w);var E=g[h[T]];E.high=j,E.low=$}var q=g[0],G=O[0];q.high=G.high,q.low=G.low;for(var B=0;B<5;B++)for(var A=0;A<5;A++){var T=B+5*A,P=O[T],z=g[T],H=g[(B+1)%5+5*A],V=g[(B+2)%5+5*A];P.high=z.high^~H.high&V.high,P.low=z.low^~H.low&V.low}var P=O[0],K=m[U];P.high^=K.high,P.low^=K.low}},_doFinalize:function(){var S=this._data,N=S.words;this._nDataBytes*8;var O=S.sigBytes*8,M=this.blockSize*32;N[O>>>5]|=1<<24-O%32,N[(i.ceil((O+1)/M)*M>>>5)-1]|=128,S.sigBytes=N.length*4,this._process();for(var F=this._state,L=this.cfg.outputLength/8,k=L/8,P=[],U=0;U<k;U++){var B=F[U],j=B.high,$=B.low;j=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360,$=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360,P.push($),P.push(j)}return new l.init(P,L)},clone:function(){for(var S=f.clone.call(this),N=S._state=this._state.slice(0),O=0;O<25;O++)N[O]=N[O].clone();return S}});o.SHA3=f._createHelper(_),o.HmacSHA3=f._createHmacHelper(_)}(Math),a.SHA3})}(sha3$1)),sha3$1.exports}var ripemd160$1={exports:{}},ripemd160=ripemd160$1.exports,hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(ripemd160,function(a){/** @preserve
43
+ (c) 2012 by Cédric Mesnil. All rights reserved.
44
+
45
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
46
+
47
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
48
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
49
+
50
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51
+ */return function(i){var o=a,s=o.lib,l=s.WordArray,f=s.Hasher,d=o.algo,u=l.create([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=l.create([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]),v=l.create([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]),h=l.create([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]),m=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),_=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(k,P){for(var U=0;U<16;U++){var B=P+U,j=k[B];k[B]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360}var $=this._hash.words,A=m.words,R=g.words,y=u.words,b=c.words,D=v.words,I=h.words,T,C,x,w,E,q,G,z,H,V;q=T=$[0],G=C=$[1],z=x=$[2],H=w=$[3],V=E=$[4];for(var K,U=0;U<80;U+=1)K=T+k[P+y[U]]|0,U<16?K+=S(C,x,w)+A[0]:U<32?K+=N(C,x,w)+A[1]:U<48?K+=O(C,x,w)+A[2]:U<64?K+=M(C,x,w)+A[3]:K+=F(C,x,w)+A[4],K=K|0,K=L(K,D[U]),K=K+E|0,T=E,E=w,w=L(x,10),x=C,C=K,K=q+k[P+b[U]]|0,U<16?K+=F(G,z,H)+R[0]:U<32?K+=M(G,z,H)+R[1]:U<48?K+=O(G,z,H)+R[2]:U<64?K+=N(G,z,H)+R[3]:K+=S(G,z,H)+R[4],K=K|0,K=L(K,I[U]),K=K+V|0,q=V,V=H,H=L(z,10),z=G,G=K;K=$[1]+x+H|0,$[1]=$[2]+w+V|0,$[2]=$[3]+E+q|0,$[3]=$[4]+T+G|0,$[4]=$[0]+C+z|0,$[0]=K},_doFinalize:function(){var k=this._data,P=k.words,U=this._nDataBytes*8,B=k.sigBytes*8;P[B>>>5]|=128<<24-B%32,P[(B+64>>>9<<4)+14]=(U<<8|U>>>24)&16711935|(U<<24|U>>>8)&4278255360,k.sigBytes=(P.length+1)*4,this._process();for(var j=this._hash,$=j.words,A=0;A<5;A++){var R=$[A];$[A]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return j},clone:function(){var k=f.clone.call(this);return k._hash=this._hash.clone(),k}});function S(k,P,U){return k^P^U}function N(k,P,U){return k&P|~k&U}function O(k,P,U){return(k|~P)^U}function M(k,P,U){return k&U|P&~U}function F(k,P,U){return k^(P|~U)}function L(k,P){return k<<P|k>>>32-P}o.RIPEMD160=f._createHelper(_),o.HmacRIPEMD160=f._createHmacHelper(_)}(),a.RIPEMD160})}(ripemd160$1)),ripemd160$1.exports}var hmac$1={exports:{}},hmac=hmac$1.exports,hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(r,n){(function(a,i){r.exports=i(requireCore())})(hmac,function(a){(function(){var i=a,o=i.lib,s=o.Base,l=i.enc,f=l.Utf8,d=i.algo;d.HMAC=s.extend({init:function(u,c){u=this._hasher=new u.init,typeof c=="string"&&(c=f.parse(c));var v=u.blockSize,h=v*4;c.sigBytes>h&&(c=u.finalize(c)),c.clamp();for(var m=this._oKey=c.clone(),g=this._iKey=c.clone(),_=m.words,S=g.words,N=0;N<v;N++)_[N]^=1549556828,S[N]^=909522486;m.sigBytes=g.sigBytes=h,this.reset()},reset:function(){var u=this._hasher;u.reset(),u.update(this._iKey)},update:function(u){return this._hasher.update(u),this},finalize:function(u){var c=this._hasher,v=c.finalize(u);c.reset();var h=c.finalize(this._oKey.clone().concat(v));return h}})})()})}(hmac$1)),hmac$1.exports}var pbkdf2$1={exports:{}},pbkdf2=pbkdf2$1.exports,hasRequiredPbkdf2;function requirePbkdf2(){return hasRequiredPbkdf2||(hasRequiredPbkdf2=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireSha256(),requireHmac())})(pbkdf2,function(a){return function(){var i=a,o=i.lib,s=o.Base,l=o.WordArray,f=i.algo,d=f.SHA256,u=f.HMAC,c=f.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:d,iterations:25e4}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,h){for(var m=this.cfg,g=u.create(m.hasher,v),_=l.create(),S=l.create([1]),N=_.words,O=S.words,M=m.keySize,F=m.iterations;N.length<M;){var L=g.update(h).finalize(S);g.reset();for(var k=L.words,P=k.length,U=L,B=1;B<F;B++){U=g.finalize(U),g.reset();for(var j=U.words,$=0;$<P;$++)k[$]^=j[$]}_.concat(L),O[0]++}return _.sigBytes=M*4,_}});i.PBKDF2=function(v,h,m){return c.create(m).compute(v,h)}}(),a.PBKDF2})}(pbkdf2$1)),pbkdf2$1.exports}var evpkdf$1={exports:{}},evpkdf=evpkdf$1.exports,hasRequiredEvpkdf;function requireEvpkdf(){return hasRequiredEvpkdf||(hasRequiredEvpkdf=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireSha1(),requireHmac())})(evpkdf,function(a){return function(){var i=a,o=i.lib,s=o.Base,l=o.WordArray,f=i.algo,d=f.MD5,u=f.EvpKDF=s.extend({cfg:s.extend({keySize:128/32,hasher:d,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,v){for(var h,m=this.cfg,g=m.hasher.create(),_=l.create(),S=_.words,N=m.keySize,O=m.iterations;S.length<N;){h&&g.update(h),h=g.update(c).finalize(v),g.reset();for(var M=1;M<O;M++)h=g.finalize(h),g.reset();_.concat(h)}return _.sigBytes=N*4,_}});i.EvpKDF=function(c,v,h){return u.create(h).compute(c,v)}}(),a.EvpKDF})}(evpkdf$1)),evpkdf$1.exports}var cipherCore$1={exports:{}},cipherCore=cipherCore$1.exports,hasRequiredCipherCore;function requireCipherCore(){return hasRequiredCipherCore||(hasRequiredCipherCore=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEvpkdf())})(cipherCore,function(a){a.lib.Cipher||function(i){var o=a,s=o.lib,l=s.Base,f=s.WordArray,d=s.BufferedBlockAlgorithm,u=o.enc;u.Utf8;var c=u.Base64,v=o.algo,h=v.EvpKDF,m=s.Cipher=d.extend({cfg:l.extend(),createEncryptor:function(j,$){return this.create(this._ENC_XFORM_MODE,j,$)},createDecryptor:function(j,$){return this.create(this._DEC_XFORM_MODE,j,$)},init:function(j,$,A){this.cfg=this.cfg.extend(A),this._xformMode=j,this._key=$,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(j){return this._append(j),this._process()},finalize:function(j){j&&this._append(j);var $=this._doFinalize();return $},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function j($){return typeof $=="string"?B:k}return function($){return{encrypt:function(A,R,y){return j(R).encrypt($,A,R,y)},decrypt:function(A,R,y){return j(R).decrypt($,A,R,y)}}}}()});s.StreamCipher=m.extend({_doFinalize:function(){var j=this._process(!0);return j},blockSize:1});var g=o.mode={},_=s.BlockCipherMode=l.extend({createEncryptor:function(j,$){return this.Encryptor.create(j,$)},createDecryptor:function(j,$){return this.Decryptor.create(j,$)},init:function(j,$){this._cipher=j,this._iv=$}}),S=g.CBC=function(){var j=_.extend();j.Encryptor=j.extend({processBlock:function(A,R){var y=this._cipher,b=y.blockSize;$.call(this,A,R,b),y.encryptBlock(A,R),this._prevBlock=A.slice(R,R+b)}}),j.Decryptor=j.extend({processBlock:function(A,R){var y=this._cipher,b=y.blockSize,D=A.slice(R,R+b);y.decryptBlock(A,R),$.call(this,A,R,b),this._prevBlock=D}});function $(A,R,y){var b,D=this._iv;D?(b=D,this._iv=i):b=this._prevBlock;for(var I=0;I<y;I++)A[R+I]^=b[I]}return j}(),N=o.pad={},O=N.Pkcs7={pad:function(j,$){for(var A=$*4,R=A-j.sigBytes%A,y=R<<24|R<<16|R<<8|R,b=[],D=0;D<R;D+=4)b.push(y);var I=f.create(b,R);j.concat(I)},unpad:function(j){var $=j.words[j.sigBytes-1>>>2]&255;j.sigBytes-=$}};s.BlockCipher=m.extend({cfg:m.cfg.extend({mode:S,padding:O}),reset:function(){var j;m.reset.call(this);var $=this.cfg,A=$.iv,R=$.mode;this._xformMode==this._ENC_XFORM_MODE?j=R.createEncryptor:(j=R.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==j?this._mode.init(this,A&&A.words):(this._mode=j.call(R,this,A&&A.words),this._mode.__creator=j)},_doProcessBlock:function(j,$){this._mode.processBlock(j,$)},_doFinalize:function(){var j,$=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?($.pad(this._data,this.blockSize),j=this._process(!0)):(j=this._process(!0),$.unpad(j)),j},blockSize:128/32});var M=s.CipherParams=l.extend({init:function(j){this.mixIn(j)},toString:function(j){return(j||this.formatter).stringify(this)}}),F=o.format={},L=F.OpenSSL={stringify:function(j){var $,A=j.ciphertext,R=j.salt;return R?$=f.create([1398893684,1701076831]).concat(R).concat(A):$=A,$.toString(c)},parse:function(j){var $,A=c.parse(j),R=A.words;return R[0]==1398893684&&R[1]==1701076831&&($=f.create(R.slice(2,4)),R.splice(0,4),A.sigBytes-=16),M.create({ciphertext:A,salt:$})}},k=s.SerializableCipher=l.extend({cfg:l.extend({format:L}),encrypt:function(j,$,A,R){R=this.cfg.extend(R);var y=j.createEncryptor(A,R),b=y.finalize($),D=y.cfg;return M.create({ciphertext:b,key:A,iv:D.iv,algorithm:j,mode:D.mode,padding:D.padding,blockSize:j.blockSize,formatter:R.format})},decrypt:function(j,$,A,R){R=this.cfg.extend(R),$=this._parse($,R.format);var y=j.createDecryptor(A,R).finalize($.ciphertext);return y},_parse:function(j,$){return typeof j=="string"?$.parse(j,this):j}}),P=o.kdf={},U=P.OpenSSL={execute:function(j,$,A,R,y){if(R||(R=f.random(64/8)),y)var b=h.create({keySize:$+A,hasher:y}).compute(j,R);else var b=h.create({keySize:$+A}).compute(j,R);var D=f.create(b.words.slice($),A*4);return b.sigBytes=$*4,M.create({key:b,iv:D,salt:R})}},B=s.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:U}),encrypt:function(j,$,A,R){R=this.cfg.extend(R);var y=R.kdf.execute(A,j.keySize,j.ivSize,R.salt,R.hasher);R.iv=y.iv;var b=k.encrypt.call(this,j,$,y.key,R);return b.mixIn(y),b},decrypt:function(j,$,A,R){R=this.cfg.extend(R),$=this._parse($,R.format);var y=R.kdf.execute(A,j.keySize,j.ivSize,$.salt,R.hasher);R.iv=y.iv;var b=k.decrypt.call(this,j,$,y.key,R);return b}})}()})}(cipherCore$1)),cipherCore$1.exports}var modeCfb$1={exports:{}},modeCfb=modeCfb$1.exports,hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(modeCfb,function(a){return a.mode.CFB=function(){var i=a.lib.BlockCipherMode.extend();i.Encryptor=i.extend({processBlock:function(s,l){var f=this._cipher,d=f.blockSize;o.call(this,s,l,d,f),this._prevBlock=s.slice(l,l+d)}}),i.Decryptor=i.extend({processBlock:function(s,l){var f=this._cipher,d=f.blockSize,u=s.slice(l,l+d);o.call(this,s,l,d,f),this._prevBlock=u}});function o(s,l,f,d){var u,c=this._iv;c?(u=c.slice(0),this._iv=void 0):u=this._prevBlock,d.encryptBlock(u,0);for(var v=0;v<f;v++)s[l+v]^=u[v]}return i}(),a.mode.CFB})}(modeCfb$1)),modeCfb$1.exports}var modeCtr$1={exports:{}},modeCtr=modeCtr$1.exports,hasRequiredModeCtr;function requireModeCtr(){return hasRequiredModeCtr||(hasRequiredModeCtr=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(modeCtr,function(a){return a.mode.CTR=function(){var i=a.lib.BlockCipherMode.extend(),o=i.Encryptor=i.extend({processBlock:function(s,l){var f=this._cipher,d=f.blockSize,u=this._iv,c=this._counter;u&&(c=this._counter=u.slice(0),this._iv=void 0);var v=c.slice(0);f.encryptBlock(v,0),c[d-1]=c[d-1]+1|0;for(var h=0;h<d;h++)s[l+h]^=v[h]}});return i.Decryptor=o,i}(),a.mode.CTR})}(modeCtr$1)),modeCtr$1.exports}var modeCtrGladman$1={exports:{}},modeCtrGladman=modeCtrGladman$1.exports,hasRequiredModeCtrGladman;function requireModeCtrGladman(){return hasRequiredModeCtrGladman||(hasRequiredModeCtrGladman=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(modeCtrGladman,function(a){/** @preserve
52
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
53
+ * derived from CryptoJS.mode.CTR
54
+ * Jan Hruby jhruby.web@gmail.com
55
+ */return a.mode.CTRGladman=function(){var i=a.lib.BlockCipherMode.extend();function o(f){if((f>>24&255)===255){var d=f>>16&255,u=f>>8&255,c=f&255;d===255?(d=0,u===255?(u=0,c===255?c=0:++c):++u):++d,f=0,f+=d<<16,f+=u<<8,f+=c}else f+=1<<24;return f}function s(f){return(f[0]=o(f[0]))===0&&(f[1]=o(f[1])),f}var l=i.Encryptor=i.extend({processBlock:function(f,d){var u=this._cipher,c=u.blockSize,v=this._iv,h=this._counter;v&&(h=this._counter=v.slice(0),this._iv=void 0),s(h);var m=h.slice(0);u.encryptBlock(m,0);for(var g=0;g<c;g++)f[d+g]^=m[g]}});return i.Decryptor=l,i}(),a.mode.CTRGladman})}(modeCtrGladman$1)),modeCtrGladman$1.exports}var modeOfb$1={exports:{}},modeOfb=modeOfb$1.exports,hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(modeOfb,function(a){return a.mode.OFB=function(){var i=a.lib.BlockCipherMode.extend(),o=i.Encryptor=i.extend({processBlock:function(s,l){var f=this._cipher,d=f.blockSize,u=this._iv,c=this._keystream;u&&(c=this._keystream=u.slice(0),this._iv=void 0),f.encryptBlock(c,0);for(var v=0;v<d;v++)s[l+v]^=c[v]}});return i.Decryptor=o,i}(),a.mode.OFB})}(modeOfb$1)),modeOfb$1.exports}var modeEcb$1={exports:{}},modeEcb=modeEcb$1.exports,hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(modeEcb,function(a){return a.mode.ECB=function(){var i=a.lib.BlockCipherMode.extend();return i.Encryptor=i.extend({processBlock:function(o,s){this._cipher.encryptBlock(o,s)}}),i.Decryptor=i.extend({processBlock:function(o,s){this._cipher.decryptBlock(o,s)}}),i}(),a.mode.ECB})}(modeEcb$1)),modeEcb$1.exports}var padAnsix923$1={exports:{}},padAnsix923=padAnsix923$1.exports,hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(padAnsix923,function(a){return a.pad.AnsiX923={pad:function(i,o){var s=i.sigBytes,l=o*4,f=l-s%l,d=s+f-1;i.clamp(),i.words[d>>>2]|=f<<24-d%4*8,i.sigBytes+=f},unpad:function(i){var o=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=o}},a.pad.Ansix923})}(padAnsix923$1)),padAnsix923$1.exports}var padIso10126$1={exports:{}},padIso10126=padIso10126$1.exports,hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(padIso10126,function(a){return a.pad.Iso10126={pad:function(i,o){var s=o*4,l=s-i.sigBytes%s;i.concat(a.lib.WordArray.random(l-1)).concat(a.lib.WordArray.create([l<<24],1))},unpad:function(i){var o=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=o}},a.pad.Iso10126})}(padIso10126$1)),padIso10126$1.exports}var padIso97971$1={exports:{}},padIso97971=padIso97971$1.exports,hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(padIso97971,function(a){return a.pad.Iso97971={pad:function(i,o){i.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(i,o)},unpad:function(i){a.pad.ZeroPadding.unpad(i),i.sigBytes--}},a.pad.Iso97971})}(padIso97971$1)),padIso97971$1.exports}var padZeropadding$1={exports:{}},padZeropadding=padZeropadding$1.exports,hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(padZeropadding,function(a){return a.pad.ZeroPadding={pad:function(i,o){var s=o*4;i.clamp(),i.sigBytes+=s-(i.sigBytes%s||s)},unpad:function(i){for(var o=i.words,s=i.sigBytes-1,s=i.sigBytes-1;s>=0;s--)if(o[s>>>2]>>>24-s%4*8&255){i.sigBytes=s+1;break}}},a.pad.ZeroPadding})}(padZeropadding$1)),padZeropadding$1.exports}var padNopadding$1={exports:{}},padNopadding=padNopadding$1.exports,hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(padNopadding,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})}(padNopadding$1)),padNopadding$1.exports}var formatHex$1={exports:{}},formatHex=formatHex$1.exports,hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireCipherCore())})(formatHex,function(a){return function(i){var o=a,s=o.lib,l=s.CipherParams,f=o.enc,d=f.Hex,u=o.format;u.Hex={stringify:function(c){return c.ciphertext.toString(d)},parse:function(c){var v=d.parse(c);return l.create({ciphertext:v})}}}(),a.format.Hex})}(formatHex$1)),formatHex$1.exports}var aes$1={exports:{}},aes=aes$1.exports,hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(aes,function(a){return function(){var i=a,o=i.lib,s=o.BlockCipher,l=i.algo,f=[],d=[],u=[],c=[],v=[],h=[],m=[],g=[],_=[],S=[];(function(){for(var M=[],F=0;F<256;F++)F<128?M[F]=F<<1:M[F]=F<<1^283;for(var L=0,k=0,F=0;F<256;F++){var P=k^k<<1^k<<2^k<<3^k<<4;P=P>>>8^P&255^99,f[L]=P,d[P]=L;var U=M[L],B=M[U],j=M[B],$=M[P]*257^P*16843008;u[L]=$<<24|$>>>8,c[L]=$<<16|$>>>16,v[L]=$<<8|$>>>24,h[L]=$;var $=j*16843009^B*65537^U*257^L*16843008;m[P]=$<<24|$>>>8,g[P]=$<<16|$>>>16,_[P]=$<<8|$>>>24,S[P]=$,L?(L=U^M[M[M[j^U]]],k^=M[M[k]]):L=k=1}})();var N=[0,1,2,4,8,16,32,64,128,27,54],O=l.AES=s.extend({_doReset:function(){var M;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var F=this._keyPriorReset=this._key,L=F.words,k=F.sigBytes/4,P=this._nRounds=k+6,U=(P+1)*4,B=this._keySchedule=[],j=0;j<U;j++)j<k?B[j]=L[j]:(M=B[j-1],j%k?k>6&&j%k==4&&(M=f[M>>>24]<<24|f[M>>>16&255]<<16|f[M>>>8&255]<<8|f[M&255]):(M=M<<8|M>>>24,M=f[M>>>24]<<24|f[M>>>16&255]<<16|f[M>>>8&255]<<8|f[M&255],M^=N[j/k|0]<<24),B[j]=B[j-k]^M);for(var $=this._invKeySchedule=[],A=0;A<U;A++){var j=U-A;if(A%4)var M=B[j];else var M=B[j-4];A<4||j<=4?$[A]=M:$[A]=m[f[M>>>24]]^g[f[M>>>16&255]]^_[f[M>>>8&255]]^S[f[M&255]]}}},encryptBlock:function(M,F){this._doCryptBlock(M,F,this._keySchedule,u,c,v,h,f)},decryptBlock:function(M,F){var L=M[F+1];M[F+1]=M[F+3],M[F+3]=L,this._doCryptBlock(M,F,this._invKeySchedule,m,g,_,S,d);var L=M[F+1];M[F+1]=M[F+3],M[F+3]=L},_doCryptBlock:function(M,F,L,k,P,U,B,j){for(var $=this._nRounds,A=M[F]^L[0],R=M[F+1]^L[1],y=M[F+2]^L[2],b=M[F+3]^L[3],D=4,I=1;I<$;I++){var T=k[A>>>24]^P[R>>>16&255]^U[y>>>8&255]^B[b&255]^L[D++],C=k[R>>>24]^P[y>>>16&255]^U[b>>>8&255]^B[A&255]^L[D++],x=k[y>>>24]^P[b>>>16&255]^U[A>>>8&255]^B[R&255]^L[D++],w=k[b>>>24]^P[A>>>16&255]^U[R>>>8&255]^B[y&255]^L[D++];A=T,R=C,y=x,b=w}var T=(j[A>>>24]<<24|j[R>>>16&255]<<16|j[y>>>8&255]<<8|j[b&255])^L[D++],C=(j[R>>>24]<<24|j[y>>>16&255]<<16|j[b>>>8&255]<<8|j[A&255])^L[D++],x=(j[y>>>24]<<24|j[b>>>16&255]<<16|j[A>>>8&255]<<8|j[R&255])^L[D++],w=(j[b>>>24]<<24|j[A>>>16&255]<<16|j[R>>>8&255]<<8|j[y&255])^L[D++];M[F]=T,M[F+1]=C,M[F+2]=x,M[F+3]=w},keySize:256/32});i.AES=s._createHelper(O)}(),a.AES})}(aes$1)),aes$1.exports}var tripledes$1={exports:{}},tripledes=tripledes$1.exports,hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(tripledes,function(a){return function(){var i=a,o=i.lib,s=o.WordArray,l=o.BlockCipher,f=i.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],v=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=f.DES=l.extend({_doReset:function(){for(var N=this._key,O=N.words,M=[],F=0;F<56;F++){var L=d[F]-1;M[F]=O[L>>>5]>>>31-L%32&1}for(var k=this._subKeys=[],P=0;P<16;P++){for(var U=k[P]=[],B=c[P],F=0;F<24;F++)U[F/6|0]|=M[(u[F]-1+B)%28]<<31-F%6,U[4+(F/6|0)]|=M[28+(u[F+24]-1+B)%28]<<31-F%6;U[0]=U[0]<<1|U[0]>>>31;for(var F=1;F<7;F++)U[F]=U[F]>>>(F-1)*4+3;U[7]=U[7]<<5|U[7]>>>27}for(var j=this._invSubKeys=[],F=0;F<16;F++)j[F]=k[15-F]},encryptBlock:function(N,O){this._doCryptBlock(N,O,this._subKeys)},decryptBlock:function(N,O){this._doCryptBlock(N,O,this._invSubKeys)},_doCryptBlock:function(N,O,M){this._lBlock=N[O],this._rBlock=N[O+1],g.call(this,4,252645135),g.call(this,16,65535),_.call(this,2,858993459),_.call(this,8,16711935),g.call(this,1,1431655765);for(var F=0;F<16;F++){for(var L=M[F],k=this._lBlock,P=this._rBlock,U=0,B=0;B<8;B++)U|=v[B][((P^L[B])&h[B])>>>0];this._lBlock=P,this._rBlock=k^U}var j=this._lBlock;this._lBlock=this._rBlock,this._rBlock=j,g.call(this,1,1431655765),_.call(this,8,16711935),_.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),N[O]=this._lBlock,N[O+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(N,O){var M=(this._lBlock>>>N^this._rBlock)&O;this._rBlock^=M,this._lBlock^=M<<N}function _(N,O){var M=(this._rBlock>>>N^this._lBlock)&O;this._lBlock^=M,this._rBlock^=M<<N}i.DES=l._createHelper(m);var S=f.TripleDES=l.extend({_doReset:function(){var N=this._key,O=N.words;if(O.length!==2&&O.length!==4&&O.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var M=O.slice(0,2),F=O.length<4?O.slice(0,2):O.slice(2,4),L=O.length<6?O.slice(0,2):O.slice(4,6);this._des1=m.createEncryptor(s.create(M)),this._des2=m.createEncryptor(s.create(F)),this._des3=m.createEncryptor(s.create(L))},encryptBlock:function(N,O){this._des1.encryptBlock(N,O),this._des2.decryptBlock(N,O),this._des3.encryptBlock(N,O)},decryptBlock:function(N,O){this._des3.decryptBlock(N,O),this._des2.encryptBlock(N,O),this._des1.decryptBlock(N,O)},keySize:192/32,ivSize:64/32,blockSize:64/32});i.TripleDES=l._createHelper(S)}(),a.TripleDES})}(tripledes$1)),tripledes$1.exports}var rc4$1={exports:{}},rc4=rc4$1.exports,hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rc4,function(a){return function(){var i=a,o=i.lib,s=o.StreamCipher,l=i.algo,f=l.RC4=s.extend({_doReset:function(){for(var c=this._key,v=c.words,h=c.sigBytes,m=this._S=[],g=0;g<256;g++)m[g]=g;for(var g=0,_=0;g<256;g++){var S=g%h,N=v[S>>>2]>>>24-S%4*8&255;_=(_+m[g]+N)%256;var O=m[g];m[g]=m[_],m[_]=O}this._i=this._j=0},_doProcessBlock:function(c,v){c[v]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var c=this._S,v=this._i,h=this._j,m=0,g=0;g<4;g++){v=(v+1)%256,h=(h+c[v])%256;var _=c[v];c[v]=c[h],c[h]=_,m|=c[(c[v]+c[h])%256]<<24-g*8}return this._i=v,this._j=h,m}i.RC4=s._createHelper(f);var u=l.RC4Drop=f.extend({cfg:f.cfg.extend({drop:192}),_doReset:function(){f._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)d.call(this)}});i.RC4Drop=s._createHelper(u)}(),a.RC4})}(rc4$1)),rc4$1.exports}var rabbit$1={exports:{}},rabbit=rabbit$1.exports,hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbit,function(a){return function(){var i=a,o=i.lib,s=o.StreamCipher,l=i.algo,f=[],d=[],u=[],c=l.Rabbit=s.extend({_doReset:function(){for(var h=this._key.words,m=this.cfg.iv,g=0;g<4;g++)h[g]=(h[g]<<8|h[g]>>>24)&16711935|(h[g]<<24|h[g]>>>8)&4278255360;var _=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],S=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var g=0;g<4;g++)v.call(this);for(var g=0;g<8;g++)S[g]^=_[g+4&7];if(m){var N=m.words,O=N[0],M=N[1],F=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,L=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,k=F>>>16|L&4294901760,P=L<<16|F&65535;S[0]^=F,S[1]^=k,S[2]^=L,S[3]^=P,S[4]^=F,S[5]^=k,S[6]^=L,S[7]^=P;for(var g=0;g<4;g++)v.call(this)}},_doProcessBlock:function(h,m){var g=this._X;v.call(this),f[0]=g[0]^g[5]>>>16^g[3]<<16,f[1]=g[2]^g[7]>>>16^g[5]<<16,f[2]=g[4]^g[1]>>>16^g[7]<<16,f[3]=g[6]^g[3]>>>16^g[1]<<16;for(var _=0;_<4;_++)f[_]=(f[_]<<8|f[_]>>>24)&16711935|(f[_]<<24|f[_]>>>8)&4278255360,h[m+_]^=f[_]},blockSize:128/32,ivSize:64/32});function v(){for(var h=this._X,m=this._C,g=0;g<8;g++)d[g]=m[g];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<d[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<d[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<d[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<d[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<d[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<d[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<d[6]>>>0?1:0)|0,this._b=m[7]>>>0<d[7]>>>0?1:0;for(var g=0;g<8;g++){var _=h[g]+m[g],S=_&65535,N=_>>>16,O=((S*S>>>17)+S*N>>>15)+N*N,M=((_&4294901760)*_|0)+((_&65535)*_|0);u[g]=O^M}h[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,h[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,h[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,h[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,h[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,h[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,h[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,h[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}i.Rabbit=s._createHelper(c)}(),a.Rabbit})}(rabbit$1)),rabbit$1.exports}var rabbitLegacy$1={exports:{}},rabbitLegacy=rabbitLegacy$1.exports,hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(rabbitLegacy,function(a){return function(){var i=a,o=i.lib,s=o.StreamCipher,l=i.algo,f=[],d=[],u=[],c=l.RabbitLegacy=s.extend({_doReset:function(){var h=this._key.words,m=this.cfg.iv,g=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],_=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var S=0;S<4;S++)v.call(this);for(var S=0;S<8;S++)_[S]^=g[S+4&7];if(m){var N=m.words,O=N[0],M=N[1],F=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,L=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,k=F>>>16|L&4294901760,P=L<<16|F&65535;_[0]^=F,_[1]^=k,_[2]^=L,_[3]^=P,_[4]^=F,_[5]^=k,_[6]^=L,_[7]^=P;for(var S=0;S<4;S++)v.call(this)}},_doProcessBlock:function(h,m){var g=this._X;v.call(this),f[0]=g[0]^g[5]>>>16^g[3]<<16,f[1]=g[2]^g[7]>>>16^g[5]<<16,f[2]=g[4]^g[1]>>>16^g[7]<<16,f[3]=g[6]^g[3]>>>16^g[1]<<16;for(var _=0;_<4;_++)f[_]=(f[_]<<8|f[_]>>>24)&16711935|(f[_]<<24|f[_]>>>8)&4278255360,h[m+_]^=f[_]},blockSize:128/32,ivSize:64/32});function v(){for(var h=this._X,m=this._C,g=0;g<8;g++)d[g]=m[g];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<d[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<d[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<d[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<d[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<d[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<d[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<d[6]>>>0?1:0)|0,this._b=m[7]>>>0<d[7]>>>0?1:0;for(var g=0;g<8;g++){var _=h[g]+m[g],S=_&65535,N=_>>>16,O=((S*S>>>17)+S*N>>>15)+N*N,M=((_&4294901760)*_|0)+((_&65535)*_|0);u[g]=O^M}h[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,h[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,h[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,h[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,h[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,h[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,h[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,h[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}i.RabbitLegacy=s._createHelper(c)}(),a.RabbitLegacy})}(rabbitLegacy$1)),rabbitLegacy$1.exports}var blowfish$1={exports:{}},blowfish=blowfish$1.exports,hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(blowfish,function(a){return function(){var i=a,o=i.lib,s=o.BlockCipher,l=i.algo;const f=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],u=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function v(S,N){let O=N>>24&255,M=N>>16&255,F=N>>8&255,L=N&255,k=S.sbox[0][O]+S.sbox[1][M];return k=k^S.sbox[2][F],k=k+S.sbox[3][L],k}function h(S,N,O){let M=N,F=O,L;for(let k=0;k<f;++k)M=M^S.pbox[k],F=v(S,M)^F,L=M,M=F,F=L;return L=M,M=F,F=L,F=F^S.pbox[f],M=M^S.pbox[f+1],{left:M,right:F}}function m(S,N,O){let M=N,F=O,L;for(let k=f+1;k>1;--k)M=M^S.pbox[k],F=v(S,M)^F,L=M,M=F,F=L;return L=M,M=F,F=L,F=F^S.pbox[1],M=M^S.pbox[0],{left:M,right:F}}function g(S,N,O){for(let P=0;P<4;P++){S.sbox[P]=[];for(let U=0;U<256;U++)S.sbox[P][U]=u[P][U]}let M=0;for(let P=0;P<f+2;P++)S.pbox[P]=d[P]^N[M],M++,M>=O&&(M=0);let F=0,L=0,k=0;for(let P=0;P<f+2;P+=2)k=h(S,F,L),F=k.left,L=k.right,S.pbox[P]=F,S.pbox[P+1]=L;for(let P=0;P<4;P++)for(let U=0;U<256;U+=2)k=h(S,F,L),F=k.left,L=k.right,S.sbox[P][U]=F,S.sbox[P][U+1]=L;return!0}var _=l.Blowfish=s.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var S=this._keyPriorReset=this._key,N=S.words,O=S.sigBytes/4;g(c,N,O)}},encryptBlock:function(S,N){var O=h(c,S[N],S[N+1]);S[N]=O.left,S[N+1]=O.right},decryptBlock:function(S,N){var O=m(c,S[N],S[N+1]);S[N]=O.left,S[N+1]=O.right},blockSize:64/32,keySize:128/32,ivSize:64/32});i.Blowfish=s._createHelper(_)}(),a.Blowfish})}(blowfish$1)),blowfish$1.exports}var cryptoJs=cryptoJs$1.exports,hasRequiredCryptoJs;function requireCryptoJs(){return hasRequiredCryptoJs||(hasRequiredCryptoJs=1,function(r,n){(function(a,i,o){r.exports=i(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy(),requireBlowfish())})(cryptoJs,function(a){return a})}(cryptoJs$1)),cryptoJs$1.exports}requireCryptoJs();requireBrowser$b();const APOLLO_SUBSCRIPTION_PROTOCOL="graphql-ws",AUTO_SUBSCRIPTION_PROTOCOL="auto",DEFAULT_SUBSCRIPTION_PROTOCOL=AUTO_SUBSCRIPTION_PROTOCOL,GRAPHQL_WS_SUBSCRIPTION_PROTOCOL="graphql-transport-ws",GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL="graphql-sse",ATTACHMENT_KIND_CONNECTION_SETTINGS="connection-settings",ATTACHMENT_KIND_DOCUMENT_CONTENT="document-content",ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT="origin-document-content",ATTACHMENT_KIND_VARIABLE_COLLECTION="variable-collection",ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION="origin-variable-collection",ATTACHMENT_KIND_FILE_CONTENT="file-content",ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA="variable-json-schema",ITEM_KIND_API="api",ITEM_KIND_NEW_API="new-api",ITEM_KIND_API_DOCUMENT="api-document",ITEM_KIND_BASIC_DOCUMENT="document",ITEM_KIND_HISTORICAL_DOCUMENT="historical-document",ITEM_KIND_NEW_DOCUMENT="new-document",ITEM_KIND_FILE="file";function isApiItem(r){return r?.kind===ITEM_KIND_API}function isNewApiItem(r){return r?.kind===ITEM_KIND_NEW_API}function isDocumentItem(r){return isApiDocumentItem(r)||isBasicDocumentItem(r)||isHistoricalDocumentItem(r)||isNewDocumentItem(r)}function isApiDocumentItem(r){return r?.kind===ITEM_KIND_API_DOCUMENT}function isBasicDocumentItem(r){return r?.kind===ITEM_KIND_BASIC_DOCUMENT}function isHistoricalDocumentItem(r){return r?.kind===ITEM_KIND_HISTORICAL_DOCUMENT}function isNewDocumentItem(r){return r?.kind===ITEM_KIND_NEW_DOCUMENT}function isFileItem(r){return r?.kind===ITEM_KIND_FILE}function isConnectionSettingsAttachment(r){return r?.kind===ATTACHMENT_KIND_CONNECTION_SETTINGS}function isDocumentContentAttachment(r){return r?.kind===ATTACHMENT_KIND_DOCUMENT_CONTENT||r?.kind===ATTACHMENT_KIND_ORIGIN_DOCUMENT_CONTENT}function isVariableCollectionAttachment(r){return r?.kind===ATTACHMENT_KIND_VARIABLE_COLLECTION||r?.kind===ATTACHMENT_KIND_ORIGIN_VARIABLE_COLLECTION}function mergeDocumentItemAndContent(r,n){const{body:a,hash:i,variables:o}=n;return{...r,body:a,hash:i,variables:o}}function calculateVariableJsonSchemaHash(r){const n=createHash(JSON.stringify(r.schema));return{...r,hash:n}}function interpolateHttpConnectionSettings(r,n){const a=r?.http;return a?{...a,authentication:interpolateAuthentication(a.authentication,n),endpoint:interpolateValue(a.endpoint,n),sdlEndpoint:a.sdlEndpoint?interpolateValue(a.sdlEndpoint,n):a.sdlEndpoint,sseSubscriptionEndpoint:a.sseSubscriptionEndpoint?interpolateValue(a.sseSubscriptionEndpoint,n):a.sseSubscriptionEndpoint,subscriptionEndpoint:a.subscriptionEndpoint?interpolateValue(a.subscriptionEndpoint,n):a.subscriptionEndpoint,headers:a.headers?a.headers.map(i=>({...i,name:interpolateValue(i.name,n),value:interpolateValue(i.value,n)})):a.headers}:null}function interpolateAuthentication(r,n){if(r)return r?{...r,basicOptions:r.basicOptions?{password:interpolateValue(r.basicOptions.password,n),username:interpolateValue(r.basicOptions.username,n)}:void 0,bearerOptions:r.bearerOptions?{prefix:r.bearerOptions.prefix?interpolateValue(r.bearerOptions.token,n):void 0,token:interpolateValue(r.bearerOptions.token,n)}:void 0,oAuth2Options:interpolateOAuth2Authentication(r.oAuth2Options,n),headerValue:r.headerValue?interpolateValue(r.headerValue,n):void 0}:void 0}function interpolateOAuth2Authentication(r,n){return r?{...r,accessTokenUrl:interpolateValue(r.accessTokenUrl,n),audience:interpolateValue(r.audience,n),authorizationUrl:interpolateValue(r.authorizationUrl,n),clientId:interpolateValue(r.clientId,n),clientSecret:interpolateValue(r.clientSecret,n),origin:interpolateValue(r.origin,n),password:interpolateValue(r.password,n),prefix:interpolateValue(r.prefix,n),redirectUrl:interpolateValue(r.redirectUrl,n),resource:interpolateValue(r.resource,n),scope:interpolateValue(r.scope,n),state:interpolateValue(r.state,n),username:interpolateValue(r.username,n),sessionId:r.sessionId?interpolateValue(r.sessionId,n):void 0}:void 0}function interpolateValue(r,n){let a=r;const i=r.matchAll(INTERPOLATION_VARIABLE_NAME_PATTERN);for(const o of i)a=a.replace(o[0],n.get(o[1])??o[0]);return a}function resolveVariables(r){const n=new Map;for(const{name:a,value:i,currentValue:o,enabled:s}of r)s&&n.set(a,o||i);return n}async function getConnectionSettings(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async a=>{const i=await a.store.item.get(r);return isApiItem(i)||isNewApiItem(i)||isDocumentItem(i)?getConnectionSettingsTransactional(a,i):a.abort("Item does not exist or is not of type API nor Document.")},n)}async function getInterpolatedHttpConnection(r,n,a){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async i=>{const o=await i.store.item.get(r);if(!(isApiItem(o)||isNewApiItem(o)||isDocumentItem(o)))return i.abort("Item does not exist or is not of type API nor Document.");if(!n)return(await getConnectionSettingsTransactional(i,o))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(i,o),getVariableCollectionByIdTransactional(i,n)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},a)}async function getInterpolatedHttpConnectionForActiveEnvironment(r,n){return openDatabaseWithTransactionScope(["attachment","item","workspace"],"readonly",async a=>{const i=await a.store.item.get(r);if(!(isApiItem(i)||isNewApiItem(i)||isDocumentItem(i)))return a.abort("Item does not exist or is not of type API nor Document.");let o=null;if(i.workspaceId&&(o=(await a.store.workspace.get(i.workspaceId))?.appState?.activeEnvironmentId??null),!o)return(await getConnectionSettingsTransactional(a,i))?.http;const[s,l]=await Promise.all([getConnectionSettingsTransactional(a,i),getVariableCollectionByIdTransactional(a,o)]);return s&&l?interpolateHttpConnectionSettings(s,resolveVariables(l.variables))??void 0:s?.http},n)}async function getConnectionSettingsTransactional(r,n){const a=await r.store.attachment.get([isApiDocumentItem(n)?n.apiId:n.id,ATTACHMENT_KIND_CONNECTION_SETTINGS]);if(isConnectionSettingsAttachment(a))return a}async function getVariableCollection(r){return openDatabaseScope(async n=>{const a=await n.get("attachment",[r,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(a))return a})}async function getVariableCollectionByIdTransactional(r,n){const a=await r.store.attachment.get([n,ATTACHMENT_KIND_VARIABLE_COLLECTION]);if(isVariableCollectionAttachment(a))return a}async function getFileContents(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",a=>Promise.all(r.map(async i=>{const o=await a.store.item.get(i);return isFileItem(o)?await a.store.attachment.get([i,ATTACHMENT_KIND_FILE_CONTENT]):a.abort("Item does not exist or is not of type API nor Document.")})),n)}async function getResolvedVariables(r){return resolveVariables(r?(await getVariableCollection(r))?.variables??[]:[])}function getDocumentItemAndContent(r,n){return openDatabaseWithTransactionScope(["attachment","item"],"readonly",async a=>{const[i,o]=await Promise.all([a.store.item.get(r),a.store.attachment.get([r,ATTACHMENT_KIND_DOCUMENT_CONTENT])]);if(isDocumentItem(i)&&isDocumentContentAttachment(o))return mergeDocumentItemAndContent(i,o)},n)}function getAllFileItemInfos(r){return openDatabaseWithTransactionScope(["item"],"readonly",n=>getFileInfosTransactional(n,r))}function getFileItemInfosByNames(r,...n){return openDatabaseWithTransactionScope(["item"],"readonly",a=>getFileInfosTransactional(a,r,i=>n.includes(i)))}async function getFileInfosTransactional(r,n,a){const i=[],o={};for await(const s of r.index.item.kind.iterate([n,ITEM_KIND_FILE])){const l=s.value;if(isFileItem(l)){l.parentId&&!o[l.parentId]&&(o[l.parentId]=await getItemNamePathTransactional(r,l.path).then(d=>d?.join("/")??""));const f=`${l.parentId&&o[l.parentId]?.length?`${o[l.parentId]}/`:""}${l.name}`;(a?.(f)??!0)&&i.push({id:l.id,workspaceId:l.workspaceId,name:f,size:l.size})}}return i}async function getItemNamePathTransactional(r,n){return Promise.all(n.slice(0,-1).map(async a=>{const i=await r.store.item.get(a);if(!i)throw new Error("Parent does not exist");return i.name}))}async function setVariableJsonSchema(r,n,a){return openDatabaseWithTransactionScope(["attachment","item"],"readwrite",async i=>{let o=await i.store.item.get(r);if(!isDocumentItem(o))return i.abort("Item does not exist or is not of type Document.");const s=calculateVariableJsonSchemaHash({itemId:r,workspaceId:o.workspaceId,kind:ATTACHMENT_KIND_VARIABLE_JSON_SCHEMA,schema:n});return await i.store.attachment.put(s),s},a)}function tryAcquireLock(r,n,a){return openDatabaseWithTransactionScope(["mutex"],"readwrite",async i=>{const o=await i.store.mutex.get(r),s=()=>i.store.mutex.put({resource:r,owner:n,expiresAt:now()+a});return o?o.owner===n||o.expiresAt<now()?(await s(),!0):!1:(await s(),!0)})}function releaseLock(r){return openDatabaseScope(n=>n.delete("mutex",r))}var GraphQLSchemaAttachmentKind=(r=>(r.SDL_SCHEMA="sdl-schema",r.STATISTICS="statistics",r.ITEMS="items",r))(GraphQLSchemaAttachmentKind||{}),GraphQLSchemaKind=(r=>(r.SDL_FETCH="sdl-fetch",r.SDL_PROBE="sdl-probe",r.INTROSPECTION="introspection",r))(GraphQLSchemaKind||{});function isGraphQLSchemaItemsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.ITEMS}function isGraphQLSchemaStatisticsAttachmentEntity(r){return!!r&&r.kind===GraphQLSchemaAttachmentKind.STATISTICS}function setGraphQLSchemaEntity(r,n,a,i,o){return openDatabaseWithTransactionScope(["schema","schema-attachment"],"readwrite",async s=>{const l={endpoint:r,updatedAt:now(),hash:calculateGraphQLSchemaEntityHash(r,a),indexed:!1,hasUploadType:!!n.getType("Upload"),queryTypeName:n.getQueryType()?.name??null,mutationTypeName:n.getMutationType()?.name??null,subscriptionTypeName:n.getSubscriptionType()?.name??null,supportsSemanticIntrospection:o,schemaKind:i};return await Promise.all([s.store.schema.put(l),s.store.schemaAttachment.put({endpoint:r,kind:GraphQLSchemaAttachmentKind.SDL_SCHEMA,value:a}),s.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.ITEMS]),s.store.schemaAttachment.delete([r,GraphQLSchemaAttachmentKind.STATISTICS]),s.done]),l})}function getGraphQLSchemaEntity(r){const n=harmonizeSchemaUrl(r);return getEntityByKey("schema",n)}async function getGraphQLSchemaItems(r){const n=harmonizeSchemaUrl(r),a=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.ITEMS]);return isGraphQLSchemaItemsAttachmentEntity(a)?a.value:void 0}async function getGraphQLSchemaStatistics(r){const n=harmonizeSchemaUrl(r),a=await getEntityByKey("schema-attachment",[n,GraphQLSchemaAttachmentKind.STATISTICS]);return isGraphQLSchemaStatisticsAttachmentEntity(a)?a.value:void 0}function calculateGraphQLSchemaEntityHash(r,n){return createHash(JSON.stringify(["graphql-schema-entity",r,n]))}RelativeDateTimeRange.last30Minutes;RelativeDateTimeRange.last30Minutes,RelativeDateTimeRange.today,RelativeDateTimeRange.today,RelativeDateTimeRange.today;function isAsyncIterable$1(r){return r!==null&&typeof r=="object"&&isFunction(Object(r)[Symbol.asyncIterator])}function isPlainObject(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function isFunction(r){return typeof r=="function"}function requireLock(r,n,a){const i=FIVE_SECONDS,o=createId("mutex");return acquireLock(r,o,i).then(async()=>{const s=new TimeoutAbortController(i);try{const[l]=await Promise.all([n(s.signal.toAbortSignal()).then(f=>(s.cancel(),f)),s.signal.toPromise()]);return l}catch(l){throw isTimeoutAbortError(l)?new LockExpiredError(r):l}finally{s.cancel(),await releaseLock(r)}})}async function acquireLock(r,n,a){for(;!await tryAcquireLock(r,n,a);)await delay(FIFTY_MILLISECONDS)}class LockExpiredError extends Error{constructor(n){super(`Lock for resource "${n}" has been expired`)}}async function tryGetUserSessionAndRefresh(r){const n=await getCurrentTenant();if(!n)return null;let a=await getUserSession(n);if(!a)return null;if(isSessionExpired(a)&&(a=await refreshSession(a),isSessionExpired(a)))throw new UserSessionExpiredError;return a}async function refreshSession(r,n){return requireLock("refresh-session",a);async function a(i){const o=i;let s=await getUserSession(r)||r;if(!isSessionExpired(s)&&s.requiresSignIn)return s;const l=new Headers,f=new URLSearchParams;l.append(HEADER_CONTENT_TYPE,"application/x-www-form-urlencoded"),f.append("client_id","3c9f56bd-0e2c-4358-9bf5-ff3a0efa9bf5"),f.append("grant_type","refresh_token"),f.append("refresh_token",s.refreshToken);try{const d=await fetch(`${s.issuer}/connect/token`,{method:"POST",headers:l,body:f,signal:o});if(d.ok){const u=await d.json();if(isToken(u))return replaceUserSession({...s,requiresSignIn:!1,idToken:u.id_token,accessToken:u.access_token,refreshToken:u.refresh_token,expiresAt:now()+u.expires_in*ONE_SECOND})}else if(d.status===400&&(s=await getUserSession(r)||r,isSessionExpired(s)))return replaceUserSession({...s,requiresSignIn:!0,lastTriedToRefresh:now()});return s}catch(d){console.error(d)}return s=await getUserSession(r)||r,isSessionExpired(s)?replaceUserSession({...s,lastTriedToRefresh:now()}):s}}function isToken(r){return isPlainObject(r)&&"access_token"in r}class UserSessionExpiredError extends Error{constructor(){super("User session has been expired")}}async function getHttpOptions(r){const n=await tryGetUserSessionAndRefresh(),a=isURL(r)?r:new URL(r,n?.apiUrl??"https://api.chillicream.com").href,i=getHeaders(n?.accessToken);return{uri:a,headers:i}}function getHeaders(r){const n=new Headers;if(n.set("CCC-Agent",APP_AGENT),n.set("GraphQL-Agent",APP_AGENT),n.set("GraphQL-Client-Id",APP_GRAPHQL_CLIENT_ID),n.set("GraphQL-Client-Version",APP_VERSION),n.set("GraphQL-Defer-RFC","v2"),r)n.set("Authorization",`Bearer ${r}`);else throw new UserSessionExpiredError;return n}var RelayConcreteNode_1,hasRequiredRelayConcreteNode;function requireRelayConcreteNode(){if(hasRequiredRelayConcreteNode)return RelayConcreteNode_1;hasRequiredRelayConcreteNode=1;var r={ACTOR_CHANGE:"ActorChange",CATCH_FIELD:"CatchField",CONDITION:"Condition",CLIENT_COMPONENT:"ClientComponent",CLIENT_EDGE_TO_SERVER_OBJECT:"ClientEdgeToServerObject",CLIENT_EDGE_TO_CLIENT_OBJECT:"ClientEdgeToClientObject",CLIENT_EXTENSION:"ClientExtension",DEFER:"Defer",CONNECTION:"Connection",FRAGMENT:"Fragment",FRAGMENT_SPREAD:"FragmentSpread",INLINE_DATA_FRAGMENT_SPREAD:"InlineDataFragmentSpread",INLINE_DATA_FRAGMENT:"InlineDataFragment",INLINE_FRAGMENT:"InlineFragment",LINKED_FIELD:"LinkedField",LINKED_HANDLE:"LinkedHandle",LITERAL:"Literal",LIST_VALUE:"ListValue",LOCAL_ARGUMENT:"LocalArgument",MODULE_IMPORT:"ModuleImport",ALIASED_FRAGMENT_SPREAD:"AliasedFragmentSpread",ALIASED_INLINE_FRAGMENT_SPREAD:"AliasedInlineFragmentSpread",RELAY_RESOLVER:"RelayResolver",RELAY_LIVE_RESOLVER:"RelayLiveResolver",REQUIRED_FIELD:"RequiredField",OBJECT_VALUE:"ObjectValue",OPERATION:"Operation",REQUEST:"Request",ROOT_ARGUMENT:"RootArgument",SCALAR_FIELD:"ScalarField",SCALAR_HANDLE:"ScalarHandle",SPLIT_OPERATION:"SplitOperation",STREAM:"Stream",TYPE_DISCRIMINATOR:"TypeDiscriminator",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"};return RelayConcreteNode_1=r,RelayConcreteNode_1}var browser,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;var r=function(n,a,i,o,s,l,f,d){if(!n){var u;if(a===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[i,o,s,l,f,d],v=0;u=new Error(a.replace(/%s/g,function(){return c[v++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};return browser=r,browser}var emptyFunction_1,hasRequiredEmptyFunction;function requireEmptyFunction(){if(hasRequiredEmptyFunction)return emptyFunction_1;hasRequiredEmptyFunction=1;function r(a){return function(){return a}}var n=function(){};return n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(a){return a},emptyFunction_1=n,emptyFunction_1}var warning_1,hasRequiredWarning;function requireWarning(){if(hasRequiredWarning)return warning_1;hasRequiredWarning=1;var r=requireEmptyFunction(),n=r;return warning_1=n,warning_1}var GraphQLTag,hasRequiredGraphQLTag;function requireGraphQLTag(){if(hasRequiredGraphQLTag)return GraphQLTag;hasRequiredGraphQLTag=1;var r=requireRelayConcreteNode(),n=requireBrowser();requireWarning();function a(g){n(!1)}function i(g){var _=g;return typeof _=="function"?_=_():_.default&&(_=_.default),_}function o(g){var _=i(g);return typeof _=="object"&&_!==null&&_.kind===r.FRAGMENT}function s(g){var _=i(g);return typeof _=="object"&&_!==null&&_.kind===r.REQUEST}function l(g){var _=i(g);return typeof _=="object"&&_!==null&&_.kind===r.UPDATABLE_QUERY}function f(g){var _=i(g);return typeof _=="object"&&_!==null&&_.kind===r.INLINE_DATA_FRAGMENT}function d(g){var _=i(g);return o(_)||n(!1),_}function u(g){var _,S=d(g),N=(_=S.metadata)===null||_===void 0?void 0:_.refetch,O=N?.connection;return N===null||typeof N!="object"||O===null||typeof O!="object"?null:S}function c(g){var _,S=d(g),N=(_=S.metadata)===null||_===void 0?void 0:_.refetch;return N===null||typeof N!="object"?null:S}function v(g){var _=i(g);return s(_)||n(!1),_}function h(g){var _=i(g);return l(_)||n(!1),_}function m(g){var _=i(g);return f(_)||n(!1),_}return GraphQLTag={getFragment:d,getInlineDataFragment:m,getNode:i,getPaginationFragment:u,getRefetchableFragment:c,getRequest:v,getUpdatableQuery:h,graphql:a,isFragment:o,isInlineDataFragment:f,isRequest:s,isUpdatableQuery:l},GraphQLTag}var interopRequireDefault={exports:{}},hasRequiredInteropRequireDefault;function requireInteropRequireDefault(){return hasRequiredInteropRequireDefault||(hasRequiredInteropRequireDefault=1,function(r){function n(a){return a&&a.__esModule?a:{default:a}}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(interopRequireDefault)),interopRequireDefault.exports}var objectSpread2={exports:{}},defineProperty={exports:{}},toPropertyKey={exports:{}},_typeof={exports:{}},hasRequired_typeof;function require_typeof(){return hasRequired_typeof||(hasRequired_typeof=1,function(r){function n(a){"@babel/helpers - typeof";return r.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r.exports.__esModule=!0,r.exports.default=r.exports,n(a)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(_typeof)),_typeof.exports}var toPrimitive={exports:{}},hasRequiredToPrimitive;function requireToPrimitive(){return hasRequiredToPrimitive||(hasRequiredToPrimitive=1,function(r){var n=require_typeof().default;function a(i,o){if(n(i)!="object"||!i)return i;var s=i[Symbol.toPrimitive];if(s!==void 0){var l=s.call(i,o||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(i)}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(toPrimitive)),toPrimitive.exports}var hasRequiredToPropertyKey;function requireToPropertyKey(){return hasRequiredToPropertyKey||(hasRequiredToPropertyKey=1,function(r){var n=require_typeof().default,a=requireToPrimitive();function i(o){var s=a(o,"string");return n(s)=="symbol"?s:s+""}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(toPropertyKey)),toPropertyKey.exports}var hasRequiredDefineProperty;function requireDefineProperty(){return hasRequiredDefineProperty||(hasRequiredDefineProperty=1,function(r){var n=requireToPropertyKey();function a(i,o,s){return(o=n(o))in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,i}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(defineProperty)),defineProperty.exports}var hasRequiredObjectSpread2;function requireObjectSpread2(){return hasRequiredObjectSpread2||(hasRequiredObjectSpread2=1,function(r){var n=requireDefineProperty();function a(o,s){var l=Object.keys(o);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(o);s&&(f=f.filter(function(d){return Object.getOwnPropertyDescriptor(o,d).enumerable})),l.push.apply(l,f)}return l}function i(o){for(var s=1;s<arguments.length;s++){var l=arguments[s]!=null?arguments[s]:{};s%2?a(Object(l),!0).forEach(function(f){n(o,f,l[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(l)):a(Object(l)).forEach(function(f){Object.defineProperty(o,f,Object.getOwnPropertyDescriptor(l,f))})}return o}r.exports=i,r.exports.__esModule=!0,r.exports.default=r.exports}(objectSpread2)),objectSpread2.exports}var createForOfIteratorHelper={exports:{}},unsupportedIterableToArray={exports:{}},arrayLikeToArray={exports:{}},hasRequiredArrayLikeToArray;function requireArrayLikeToArray(){return hasRequiredArrayLikeToArray||(hasRequiredArrayLikeToArray=1,function(r){function n(a,i){(i==null||i>a.length)&&(i=a.length);for(var o=0,s=Array(i);o<i;o++)s[o]=a[o];return s}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayLikeToArray)),arrayLikeToArray.exports}var hasRequiredUnsupportedIterableToArray;function requireUnsupportedIterableToArray(){return hasRequiredUnsupportedIterableToArray||(hasRequiredUnsupportedIterableToArray=1,function(r){var n=requireArrayLikeToArray();function a(i,o){if(i){if(typeof i=="string")return n(i,o);var s={}.toString.call(i).slice(8,-1);return s==="Object"&&i.constructor&&(s=i.constructor.name),s==="Map"||s==="Set"?Array.from(i):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?n(i,o):void 0}}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(unsupportedIterableToArray)),unsupportedIterableToArray.exports}var hasRequiredCreateForOfIteratorHelper;function requireCreateForOfIteratorHelper(){return hasRequiredCreateForOfIteratorHelper||(hasRequiredCreateForOfIteratorHelper=1,function(r){var n=requireUnsupportedIterableToArray();function a(i,o){var s=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!s){if(Array.isArray(i)||(s=n(i))||o&&i&&typeof i.length=="number"){s&&(i=s);var l=0,f=function(){};return{s:f,n:function(){return l>=i.length?{done:!0}:{done:!1,value:i[l++]}},e:function(h){throw h},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
56
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var d,u=!0,c=!1;return{s:function(){s=s.call(i)},n:function(){var h=s.next();return u=h.done,h},e:function(h){c=!0,d=h},f:function(){try{u||s.return==null||s.return()}finally{if(c)throw d}}}}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(createForOfIteratorHelper)),createForOfIteratorHelper.exports}var handlePotentialSnapshotErrors_1,hasRequiredHandlePotentialSnapshotErrors;function requireHandlePotentialSnapshotErrors(){if(hasRequiredHandlePotentialSnapshotErrors)return handlePotentialSnapshotErrors_1;hasRequiredHandlePotentialSnapshotErrors=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireCreateForOfIteratorHelper()),i=requireBrowser();function o(f,d,u){var c=(0,a.default)(d),v;try{for(c.s();!(v=c.n()).done;){var h=v.value;f.relayFieldLogger((0,n.default)((0,n.default)({},h),{},{uiContext:u}))}}catch(S){c.e(S)}finally{c.f()}var m=(0,a.default)(d),g;try{for(m.s();!(g=m.n()).done;){var _=g.value;if(s(_))switch(_.kind){case"relay_resolver.error":throw new Error("Relay: Resolver error at path '".concat(_.fieldPath,"' in '").concat(_.owner,"'. Message: ").concat(_.error.message));case"relay_field_payload.error":throw new Error("Relay: Unexpected response payload - check server logs for details.");case"missing_expected_data.throw":throw new Error("Relay: Missing expected data at path '".concat(_.fieldPath,"' in '").concat(_.owner,"'."));case"missing_required_field.throw":throw new Error("Relay: Missing @required value at path '".concat(_.fieldPath,"' in '").concat(_.owner,"'."));case"missing_required_field.log":case"missing_expected_data.log":break;default:_.kind,i(!1)}}}catch(S){m.e(S)}finally{m.f()}}function s(f){switch(f.kind){case"relay_resolver.error":case"relay_field_payload.error":return f.shouldThrow&&!f.handled;case"missing_expected_data.throw":case"missing_required_field.throw":return!f.handled;case"missing_required_field.log":case"missing_expected_data.log":return!1;default:throw f.kind,new Error("Relay: Unexpected event kind")}}function l(f,d,u){d!=null&&o(f,d,u)}return handlePotentialSnapshotErrors_1={eventShouldThrow:s,handlePotentialSnapshotErrors:l},handlePotentialSnapshotErrors_1}var toConsumableArray={exports:{}},arrayWithoutHoles={exports:{}},hasRequiredArrayWithoutHoles;function requireArrayWithoutHoles(){return hasRequiredArrayWithoutHoles||(hasRequiredArrayWithoutHoles=1,function(r){var n=requireArrayLikeToArray();function a(i){if(Array.isArray(i))return n(i)}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(arrayWithoutHoles)),arrayWithoutHoles.exports}var iterableToArray={exports:{}},hasRequiredIterableToArray;function requireIterableToArray(){return hasRequiredIterableToArray||(hasRequiredIterableToArray=1,function(r){function n(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(iterableToArray)),iterableToArray.exports}var nonIterableSpread={exports:{}},hasRequiredNonIterableSpread;function requireNonIterableSpread(){return hasRequiredNonIterableSpread||(hasRequiredNonIterableSpread=1,function(r){function n(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(nonIterableSpread)),nonIterableSpread.exports}var hasRequiredToConsumableArray;function requireToConsumableArray(){return hasRequiredToConsumableArray||(hasRequiredToConsumableArray=1,function(r){var n=requireArrayWithoutHoles(),a=requireIterableToArray(),i=requireUnsupportedIterableToArray(),o=requireNonIterableSpread();function s(l){return n(l)||a(l)||i(l)||o()}r.exports=s,r.exports.__esModule=!0,r.exports.default=r.exports}(toConsumableArray)),toConsumableArray.exports}var RelayDefaultHandleKey,hasRequiredRelayDefaultHandleKey;function requireRelayDefaultHandleKey(){return hasRequiredRelayDefaultHandleKey||(hasRequiredRelayDefaultHandleKey=1,RelayDefaultHandleKey={DEFAULT_HANDLE_KEY:""}),RelayDefaultHandleKey}var getRelayHandleKey_1,hasRequiredGetRelayHandleKey;function requireGetRelayHandleKey(){if(hasRequiredGetRelayHandleKey)return getRelayHandleKey_1;hasRequiredGetRelayHandleKey=1;var r=requireRelayDefaultHandleKey(),n=r.DEFAULT_HANDLE_KEY,a=requireBrowser();function i(o,s,l){return s&&s!==n?"__".concat(s,"_").concat(o):(l==null&&a(!1),"__".concat(l,"_").concat(o))}return getRelayHandleKey_1=i,getRelayHandleKey_1}var RelayFeatureFlags_1,hasRequiredRelayFeatureFlags;function requireRelayFeatureFlags(){if(hasRequiredRelayFeatureFlags)return RelayFeatureFlags_1;hasRequiredRelayFeatureFlags=1;var r={ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_STORE_ID_COLLISION_LOGGING:!1,ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION:!1,MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD:!1,ENABLE_CYLE_DETECTION_IN_VARIABLES:!1,ENABLE_ACTIVITY_COMPATIBILITY:!0,ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX:!0,ENABLE_USE_PAGINATION_IS_LOADING_FIX:!1,DISALLOW_NESTED_UPDATES:!1,ENABLE_TYPENAME_PREFIXED_DATA_ID:!1,ENABLE_UI_CONTEXT_ON_RELAY_LOGGER:!1,CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES:!1,FILTER_OUT_RELAY_RESOLVER_RECORDS:!1,OPTIMIZE_NOTIFY:!1,ENABLE_FIELD_GRANULAR_NOTIFICATIONS:!1,ENABLE_READER_FRAGMENTS_LOGGING:!1};return RelayFeatureFlags_1=r,RelayFeatureFlags_1}var stableCopy_1,hasRequiredStableCopy;function requireStableCopy(){if(hasRequiredStableCopy)return stableCopy_1;hasRequiredStableCopy=1;function r(a){if(!a||typeof a!="object")return a;if(Array.isArray(a))return a.map(r);for(var i=Object.keys(a).sort(),o={},s=0;s<i.length;s++)o[i[s]]=r(a[i[s]]);return o}function n(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(!a||typeof a!="object")return!1;if(i.has(a))return!0;var o=new Set(i);o.add(a);var s=Array.isArray(a)?a:Object.values(a);return s.some(function(l){return n(l,o)})}return stableCopy_1={hasCycle:n,stableCopy:r},stableCopy_1}var RelayStoreUtils_1,hasRequiredRelayStoreUtils;function requireRelayStoreUtils(){if(hasRequiredRelayStoreUtils)return RelayStoreUtils_1;hasRequiredRelayStoreUtils=1;var r=requireInteropRequireDefault().default,n=r(requireToConsumableArray()),a=requireGetRelayHandleKey(),i=requireRelayConcreteNode(),o=requireRelayFeatureFlags(),s=requireStableCopy(),l=s.stableCopy,f=requireBrowser(),d=i.VARIABLE,u=i.LITERAL,c=i.OBJECT_VALUE,v=i.LIST_VALUE,h="__errors",m="__fieldGranularNotifications",g="__module_component_",_="__module_operation_",S="$r:";function N(y,b){if(y.kind===d)return B(y.variableName,b);if(y.kind===u)return y.value;if(y.kind===c){var D={};return y.fields.forEach(function(T){D[T.name]=N(T,b)}),D}else if(y.kind===v){var I=[];return y.items.forEach(function(T){T!=null&&I.push(N(T,b))}),I}}function O(y,b,D){var I={};return D&&(I[R.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),y&&y.forEach(function(T){I[T.name]=N(T,b)}),I}function M(y,b){var D=y.dynamicKey,I=y.handle,T=y.key,C=y.name,x=y.args,w=y.filters,E=a(I,T,C),q=null;return x&&w&&x.length!==0&&w.length!==0&&(q=x.filter(function(G){return w.indexOf(G.name)>-1})),D&&(q=q!=null?[D].concat((0,n.default)(q)):[D]),q===null?E:U(E,O(q,b))}function F(y,b){if(y.storageKey)return y.storageKey;var D=k(y),I=y.name;return D&&D.length!==0?U(I,O(D,b)):I}function L(y,b){var D=F(y,b);return o.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+D:D}function k(y){if(y.kind==="RelayResolver"||y.kind==="RelayLiveResolver"){var b;if(y.args==null){var D;return(D=y.fragment)===null||D===void 0?void 0:D.args}return((b=y.fragment)===null||b===void 0?void 0:b.args)==null?y.args:y.args.concat(y.fragment.args)}var I=typeof y.args>"u"?void 0:y.args;return I}function P(y,b){return U(y,l(b))}function U(y,b){if(!b)return y;var D=[];for(var I in b)if(b.hasOwnProperty(I)){var T=b[I];if(T!=null){var C;D.push(I+":"+((C=JSON.stringify(T))!==null&&C!==void 0?C:"undefined"))}}return D.length===0?y:y+"(".concat(D.join(","),")")}function B(y,b){return b.hasOwnProperty(y)||f(!1),l(b[y])}function j(y){return"".concat(g).concat(y)}function $(y){return"".concat(_).concat(y)}function A(y,b){return"__fn:".concat(y,":").concat(b)}var R={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:h,FIELD_GRANULAR_NOTIFICATIONS_KEY:m,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",RELAY_RESOLVER_RECORD_TYPENAME:"__RELAY_RESOLVER__",RELAY_READ_TIME_RESOLVER_KEY_PREFIX:S,formatStorageKey:U,getArgumentValue:N,getArgumentValues:O,getHandleStorageKey:M,getStorageKey:F,getReadTimeResolverStorageKey:L,getStableStorageKey:P,getModuleComponentKey:j,getModuleOperationKey:$,getFieldNotificationKey:A};return RelayStoreUtils_1=R,RelayStoreUtils_1}var RelayConcreteVariables,hasRequiredRelayConcreteVariables;function requireRelayConcreteVariables(){if(hasRequiredRelayConcreteVariables)return RelayConcreteVariables;hasRequiredRelayConcreteVariables=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireRelayStoreUtils(),i=a.getArgumentValues,o=requireBrowser();function s(d,u,c){if(d.argumentDefinitions==null)return c;var v;return d.argumentDefinitions.forEach(function(h){if(!c.hasOwnProperty(h.name))switch(v=v||(0,n.default)({},c),h.kind){case"LocalArgument":v[h.name]=h.defaultValue;break;case"RootArgument":if(!u.hasOwnProperty(h.name)){v[h.name]=void 0;break}v[h.name]=u[h.name];break;default:o(!1)}}),v||c}function l(d,u,c){var v={};return d.argumentDefinitions.forEach(function(h){var m=h.defaultValue;c[h.name]!=null&&(m=c[h.name]),v[h.name]=m}),u!=null&&Object.keys(u).forEach(function(h){v[h]=u[h].get()}),v}function f(d,u,c){if(u==null)return d;var v=(0,n.default)({},d),h=c?i(c,d):{};return u.forEach(function(m){var g,_=(g=h[m.name])!==null&&g!==void 0?g:m.defaultValue;v[m.name]=_}),v}return RelayConcreteVariables={getFragmentVariables:s,getLocalVariables:f,getOperationVariables:l},RelayConcreteVariables}var areEqual_1,hasRequiredAreEqual;function requireAreEqual(){if(hasRequiredAreEqual)return areEqual_1;hasRequiredAreEqual=1;var r=[],n=[];/**
58
+ * Checks if two values are equal. Values may be primitives, arrays, or objects.
59
+ * Returns true if both arguments have the same keys and values.
60
+ *
61
+ * @see http://underscorejs.org
62
+ * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
63
+ * @license MIT
64
+ */function a(o,s){var l=r.length?r.pop():[],f=n.length?n.pop():[],d=i(o,s,l,f);return l.length=0,f.length=0,r.push(l),n.push(f),d}function i(o,s,l,f){if(o===s)return o!==0||1/o==1/s;if(o==null||s==null||typeof o!="object"||typeof s!="object")return!1;var d=Object.prototype.toString,u=d.call(o);if(u!=d.call(s))return!1;switch(u){case"[object String]":return o==String(s);case"[object Number]":return isNaN(o)||isNaN(s)?!1:o==Number(s);case"[object Date]":case"[object Boolean]":return+o==+s;case"[object RegExp]":return o.source==s.source&&o.global==s.global&&o.multiline==s.multiline&&o.ignoreCase==s.ignoreCase}for(var c=l.length;c--;)if(l[c]==o)return f[c]==s;l.push(o),f.push(s);var v=0;if(u==="[object Array]"){if(v=o.length,v!==s.length)return!1;for(;v--;)if(!i(o[v],s[v],l,f))return!1}else{if(o.constructor!==s.constructor)return!1;if(o.hasOwnProperty("valueOf")&&s.hasOwnProperty("valueOf"))return o.valueOf()==s.valueOf();var h=Object.keys(o);if(h.length!=Object.keys(s).length)return!1;for(var m=0;m<h.length;m++)if(!i(o[h[m]],s[h[m]],l,f))return!1}return l.pop(),f.pop(),!0}return areEqual_1=a,areEqual_1}var RelayModernSelector,hasRequiredRelayModernSelector;function requireRelayModernSelector(){if(hasRequiredRelayModernSelector)return RelayModernSelector;hasRequiredRelayModernSelector=1;var r=requireRelayConcreteVariables(),n=r.getFragmentVariables,a=requireRelayStoreUtils(),i=a.CLIENT_EDGE_TRAVERSAL_PATH,o=a.FRAGMENT_OWNER_KEY,s=a.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,l=a.FRAGMENTS_KEY,f=a.ID_KEY,d=requireAreEqual(),u=requireBrowser();requireWarning();function c(A,R){typeof R=="object"&&R!==null&&!Array.isArray(R)||u(!1);var y=R[f],b=R[l],D=R[o],I=R[i];if(typeof y=="string"&&typeof b=="object"&&b!==null&&typeof b[A.name]=="object"&&b[A.name]!==null&&typeof D=="object"&&D!==null&&(I==null||Array.isArray(I))){var T=D,C=I,x=b[A.name],w=n(A,T.variables,x),E=x[s]===!0;return j(A,y,w,T,E,C)}return null}function v(A,R){var y=null;return R.forEach(function(b,D){var I=b!=null?c(A,b):null;I!=null&&(y=y||[],y.push(I))}),y==null?null:{kind:"PluralReaderSelector",selectors:y}}function h(A,R){return R==null?R:A.metadata&&A.metadata.plural===!0?(Array.isArray(R)||u(!1),v(A,R)):(Array.isArray(R)&&u(!1),c(A,R))}function m(A,R){var y={};for(var b in A)if(A.hasOwnProperty(b)){var D=A[b],I=R[b];y[b]=h(D,I)}return y}function g(A,R){var y={};for(var b in A)if(A.hasOwnProperty(b)){var D=A[b],I=R[b];y[b]=_(D,I)}return y}function _(A,R){return R==null?R:A.metadata&&A.metadata.plural===!0?(Array.isArray(R)||u(!1),S(A,R)):(Array.isArray(R)&&u(!1),N(A,R))}function S(A,R){var y=null;return R.forEach(function(b){var D=b!=null?N(A,b):null;D!=null&&(y=y||[],y.push(D))}),y}function N(A,R){typeof R=="object"&&R!==null&&!Array.isArray(R)||u(!1);var y=R[f];return typeof y=="string"?y:null}function O(A,R){var y={};for(var b in A)if(A.hasOwnProperty(b)){var D=A[b],I=R[b],T=M(D,I);Object.assign(y,T)}return y}function M(A,R){var y;return R==null?{}:((y=A.metadata)===null||y===void 0?void 0:y.plural)===!0?(Array.isArray(R)||u(!1),L(A,R)):(Array.isArray(R)&&u(!1),F(A,R)||{})}function F(A,R){var y=c(A,R);return y?y.variables:null}function L(A,R){var y={};return R.forEach(function(b,D){if(b!=null){var I=F(A,b);I!=null&&Object.assign(y,I)}}),y}function k(A,R){return A.dataID===R.dataID&&A.node===R.node&&d(A.variables,R.variables)&&P(A.owner,R.owner)&&A.isWithinUnmatchedTypeRefinement===R.isWithinUnmatchedTypeRefinement&&U(A.clientEdgeTraversalPath,R.clientEdgeTraversalPath)}function P(A,R){return A===R?!0:A.identifier===R.identifier&&d(A.cacheConfig,R.cacheConfig)}function U(A,R){if(A===R)return!0;if(A==null||R==null||A.length!==R.length)return!1;for(var y=A.length;y--;){var b=A[y],D=R[y];if(b!==D&&(b==null||D==null||b.clientEdgeDestinationID!==D.clientEdgeDestinationID||b.readerClientEdge!==D.readerClientEdge))return!1}return!0}function B(A,R){return A===R?!0:A==null?R==null:R==null?A==null:A.kind==="SingularReaderSelector"&&R.kind==="SingularReaderSelector"?k(A,R):A.kind==="PluralReaderSelector"&&R.kind==="PluralReaderSelector"?A.selectors.length===R.selectors.length&&A.selectors.every(function(y,b){return k(y,R.selectors[b])}):!1}function j(A,R,y,b){var D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,I=arguments.length>5?arguments[5]:void 0;return{clientEdgeTraversalPath:I??null,dataID:R,isWithinUnmatchedTypeRefinement:D,kind:"SingularReaderSelector",node:A,owner:b,variables:y}}function $(A,R,y){return{dataID:R,node:A,variables:y}}return RelayModernSelector={areEqualSelectors:B,createNormalizationSelector:$,createReaderSelector:j,getDataIDsFromFragment:_,getDataIDsFromObject:g,getPluralSelector:v,getSelector:h,getSelectorsFromObject:m,getSingularSelector:c,getVariablesFromFragment:M,getVariablesFromObject:O,getVariablesFromPluralFragment:L,getVariablesFromSingularFragment:F},RelayModernSelector}var ResolverFragments,hasRequiredResolverFragments;function requireResolverFragments(){if(hasRequiredResolverFragments)return ResolverFragments;hasRequiredResolverFragments=1;var r=requireGraphQLTag(),n=r.getFragment,a=requireHandlePotentialSnapshotErrors(),i=a.eventShouldThrow,o=requireRelayModernSelector(),s=o.getSelector,l=requireBrowser(),f=[];function d(v,h){f.push(v);try{return h()}finally{f.pop()}}function u(v,h){if(!f.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var m=f[f.length-1],g=n(v),_=s(g,h);_==null&&l(!1),_.kind!=="SingularReaderSelector"&&l(!1);var S=m.getDataForResolverFragment(_,h),N=S.data,O=S.isMissingData,M=S.fieldErrors;if(O||M!=null&&M.some(i))throw c;return N}var c={};return ResolverFragments={RESOLVER_FRAGMENT_ERRORED_SENTINEL:c,readFragment:u,withResolverContext:d},ResolverFragments}var resolverDataInjector_1,hasRequiredResolverDataInjector;function requireResolverDataInjector(){if(hasRequiredResolverDataInjector)return resolverDataInjector_1;hasRequiredResolverDataInjector=1;var r=requireResolverFragments(),n=r.readFragment,a=requireBrowser();function i(o,s,l,f){var d=s;return function(u,c,v){var h=n(o,u);if(l!=null){if(h==null)if(f===!0)a(!1);else return d(null,c,v);if(l in h)return f===!0&&h[l]==null&&a(!1),d(h[l],c,v);a(!1)}else return d(null,c,v)}}return resolverDataInjector_1=i,resolverDataInjector_1}var asyncToGenerator={exports:{}},hasRequiredAsyncToGenerator;function requireAsyncToGenerator(){return hasRequiredAsyncToGenerator||(hasRequiredAsyncToGenerator=1,function(r){function n(i,o,s,l,f,d,u){try{var c=i[d](u),v=c.value}catch(h){return void s(h)}c.done?o(v):Promise.resolve(v).then(l,f)}function a(i){return function(){var o=this,s=arguments;return new Promise(function(l,f){var d=i.apply(o,s);function u(v){n(d,l,f,u,c,"next",v)}function c(v){n(d,l,f,u,c,"throw",v)}u(void 0)})}}r.exports=a,r.exports.__esModule=!0,r.exports.default=r.exports}(asyncToGenerator)),asyncToGenerator.exports}var isPromise_1,hasRequiredIsPromise;function requireIsPromise(){if(hasRequiredIsPromise)return isPromise_1;hasRequiredIsPromise=1;function r(n){return n!=null&&typeof n=="object"&&typeof n.then=="function"}return isPromise_1=r,isPromise_1}var RelayObservable_1,hasRequiredRelayObservable;function requireRelayObservable(){if(hasRequiredRelayObservable)return RelayObservable_1;hasRequiredRelayObservable=1;var r=requireIsPromise(),n=d,a=function(){u.create=function(h){return new u(h)};function u(v){this._source=v}u.onUnhandledError=function(h){n=h},u.from=function(h){return i(h)?o(h):r(h)?s(h):l(h)};var c=u.prototype;return c.catch=function(h){var m=this;return u.create(function(g){var _;return m.subscribe({start:function(N){_=N},next:g.next,complete:g.complete,error:function(N){try{h(N).subscribe({start:function(M){_=M},next:g.next,complete:g.complete,error:g.error})}catch(O){g.error(O,!0)}}}),function(){return _.unsubscribe()}})},c.concat=function(h){var m=this;return u.create(function(g){var _;return m.subscribe({start:function(N){_=N},next:g.next,error:g.error,complete:function(){_=h.subscribe(g)}}),function(){_&&_.unsubscribe()}})},c.do=function(h){var m=this;return u.create(function(g){var _=function(N){return function(){try{h[N]&&h[N].apply(h,arguments)}catch(O){n(O,!0)}g[N]&&g[N].apply(g,arguments)}};return m.subscribe({start:_("start"),next:_("next"),error:_("error"),complete:_("complete"),unsubscribe:_("unsubscribe")})})},c.finally=function(h){var m=this;return u.create(function(g){var _=m.subscribe(g);return function(){_.unsubscribe(),h()}})},c.ifEmpty=function(h){var m=this;return u.create(function(g){var _=!1,S;return S=m.subscribe({next:function(O){_=!0,g.next(O)},error:g.error,complete:function(){_?g.complete():S=h.subscribe(g)}}),function(){S&&S.unsubscribe()}})},c.subscribe=function(h){return f(this._source,h)},c.map=function(h){var m=this;return u.create(function(g){var _=m.subscribe({complete:g.complete,error:g.error,next:function(N){try{var O=h(N);g.next(O)}catch(M){g.error(M,!0)}}});return function(){_.unsubscribe()}})},c.mergeMap=function(h){var m=this;return u.create(function(g){var _=[];function S(O){this._sub=O,_.push(O)}function N(){_.splice(_.indexOf(this._sub),1),_.length===0&&g.complete()}return m.subscribe({start:S,next:function(M){try{g.closed||u.from(h(M)).subscribe({start:S,next:g.next,error:g.error,complete:N})}catch(F){g.error(F,!0)}},error:g.error,complete:N}),function(){_.forEach(function(O){return O.unsubscribe()}),_.length=0}})},c.poll=function(h){var m=this;return u.create(function(g){var _,S,N=function O(){_=m.subscribe({next:g.next,error:g.error,complete:function(){S=setTimeout(O,h)}})};return N(),function(){clearTimeout(S),_.unsubscribe()}})},c.toPromise=function(){var h=this;return new Promise(function(m,g){var _=!1;h.subscribe({next:function(N){_||(_=!0,m(N))},error:g,complete:m})})},u}();function i(u){return typeof u=="object"&&u!==null&&typeof u.subscribe=="function"}function o(u){return u instanceof a?u:a.create(function(c){return u.subscribe(c)})}function s(u){return a.create(function(c){u.then(function(v){c.next(v),c.complete()},c.error)})}function l(u){return a.create(function(c){c.next(u),c.complete()})}function f(u,c){var v=!1,h,m=function(O){return Object.defineProperty(O,"closed",{get:function(){return v}})};function g(){if(h){if(h.unsubscribe)h.unsubscribe();else try{h()}catch(N){n(N,!0)}h=void 0}}var _=m({unsubscribe:function(){if(!v){v=!0;try{c.unsubscribe&&c.unsubscribe(_)}catch(O){n(O,!0)}finally{g()}}}});try{c.start&&c.start(_)}catch(N){n(N,!0)}if(v)return _;var S=m({next:function(O){if(!v&&c.next)try{c.next(O)}catch(M){n(M,!0)}},error:function(O,M){if(v||!c.error)v=!0,n(O,M||!1),g();else{v=!0;try{c.error(O)}catch(F){n(F,!0)}finally{g()}}},complete:function(){if(!v){v=!0;try{c.complete&&c.complete()}catch(O){n(O,!0)}finally{g()}}}});try{h=u(S)}catch(N){S.error(N,!0)}return v&&g(),_}function d(u,c){}return RelayObservable_1=a,RelayObservable_1}var RelayReplaySubject_1,hasRequiredRelayReplaySubject;function requireRelayReplaySubject(){if(hasRequiredRelayReplaySubject)return RelayReplaySubject_1;hasRequiredRelayReplaySubject=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=r(requireDefineProperty()),i=requireRelayObservable(),o=requireBrowser(),s=function(){function l(){var d=this;(0,a.default)(this,"_complete",!1),(0,a.default)(this,"_events",[]),(0,a.default)(this,"_sinks",new Set),(0,a.default)(this,"_subscription",[]),this._observable=i.create(function(u){d._sinks.add(u);for(var c=d._events,v=0;v<c.length&&!u.closed;v++){var h=c[v];switch(h.kind){case"complete":u.complete();break;case"error":u.error(h.error);break;case"next":u.next(h.data);break;default:h.kind,o(!1)}}return function(){d._sinks.delete(u)}})}var f=l.prototype;return f.complete=function(){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"complete"}),this._sinks.forEach(function(u){return u.complete()}))},f.error=function(u){this._complete!==!0&&(this._complete=!0,this._events.push({error:u,kind:"error"}),this._sinks.forEach(function(c){return c.error(u)}))},f.next=function(u){this._complete!==!0&&(this._events.push({data:u,kind:"next"}),this._sinks.forEach(function(c){return c.next(u)}))},f.subscribe=function(u){var c=this._observable.subscribe(u);return this._subscription.push(c),c},f.unsubscribe=function(){var u=(0,n.default)(this._subscription),c;try{for(u.s();!(c=u.n()).done;){var v=c.value;v.unsubscribe()}}catch(h){u.e(h)}finally{u.f()}this._subscription=[]},f.getObserverCount=function(){return this._sinks.size},l}();return RelayReplaySubject_1=s,RelayReplaySubject_1}var fetchQueryInternal,hasRequiredFetchQueryInternal;function requireFetchQueryInternal(){if(hasRequiredFetchQueryInternal)return fetchQueryInternal;hasRequiredFetchQueryInternal=1;var r=requireRelayObservable(),n=requireRelayReplaySubject(),a=requireBrowser(),i=typeof WeakMap=="function",o=i?new WeakMap:new Map;function s(m,g){return l(m,g.request.identifier,function(){return m.execute({operation:g})})}function l(m,g,_){return r.create(function(S){var N=v(m),O=N.get(g);return O||_().finally(function(){return N.delete(g)}).subscribe({start:function(F){O={identifier:g,subject:new n,subjectForInFlightStatus:new n,subscription:F,promise:null},N.set(g,O)},next:function(F){var L=h(N,g);L.subject.next(F),L.subjectForInFlightStatus.next(F)},error:function(F){var L=h(N,g);L.subject.error(F),L.subjectForInFlightStatus.error(F)},complete:function(){var F=h(N,g);F.subject.complete(),F.subjectForInFlightStatus.complete()},unsubscribe:function(F){var L=h(N,g);L.subject.unsubscribe(),L.subjectForInFlightStatus.unsubscribe()}}),O==null&&a(!1),f(N,O).subscribe(S)})}function f(m,g){return r.create(function(_){var S=g.subject.subscribe(_);return function(){S.unsubscribe();var N=m.get(g.identifier);if(N){var O=N.subscription;O!=null&&N.subject.getObserverCount()===0&&(O.unsubscribe(),m.delete(g.identifier))}}})}function d(m,g,_){return r.create(function(S){var N=_.subjectForInFlightStatus.subscribe({error:S.error,next:function(M){if(!m.isRequestActive(_.identifier)){S.complete();return}S.next()},complete:S.complete,unsubscribe:S.complete});return function(){N.unsubscribe()}})}function u(m,g){var _=v(m),S=_.get(g.identifier);if(!S||!m.isRequestActive(S.identifier))return null;var N=new Promise(function(O,M){var F=!1;d(m,_,S).subscribe({complete:O,error:M,next:function(k){F&&O(k)}}),F=!0});return N}function c(m,g){var _=v(m),S=_.get(g.identifier);return!S||!m.isRequestActive(S.identifier)?null:d(m,_,S)}function v(m){var g=o.get(m);if(g!=null)return g;var _=new Map;return o.set(m,_),_}function h(m,g){var _=m.get(g);return _==null&&a(!1),_}return fetchQueryInternal={fetchQuery:s,fetchQueryDeduped:l,getPromiseForActiveRequest:u,getObservableForActiveRequest:c},fetchQueryInternal}var observeFragmentExperimental,hasRequiredObserveFragmentExperimental;function requireObserveFragmentExperimental(){if(hasRequiredObserveFragmentExperimental)return observeFragmentExperimental;hasRequiredObserveFragmentExperimental=1;var r=requireInteropRequireDefault().default,n=requireAsyncToGenerator().default,a=r(requireCreateForOfIteratorHelper()),i=requireRelayObservable(),o=requireFetchQueryInternal(),s=o.getObservableForActiveRequest,l=requireGraphQLTag(),f=l.getFragment,d=requireHandlePotentialSnapshotErrors(),u=d.handlePotentialSnapshotErrors,c=requireRelayModernSelector(),v=c.getSelector,h=requireBrowser();function m(L,k,P){return g.apply(this,arguments)}function g(){return g=n(function*(L,k,P){var U;try{var B,j=yield new Promise(function(A,R){U=_(L,k,P).subscribe({next:function(b){b.state==="ok"?A(b.value):b.state==="error"&&R(b.error)}})});return(B=U)===null||B===void 0||B.unsubscribe(),j}catch(A){var $;throw($=U)===null||$===void 0||$.unsubscribe(),A}}),g.apply(this,arguments)}function _(L,k,P){var U,B=f(k),j=v(B,P);switch(j==null&&h(!1),((U=B.metadata)===null||U===void 0?void 0:U.hasClientEdges)==null||S(j)||h(!1),j.kind){case"SingularReaderSelector":return N(L,k,j);case"PluralReaderSelector":return O(L,k,j)}h(!1)}function S(L){var k,P,U,B;switch(L?.kind){case"SingularReaderSelector":return((k=(P=L.owner.node.operation)===null||P===void 0?void 0:P.use_exec_time_resolvers)!==null&&k!==void 0?k:(U=L.owner.node.operation)===null||U===void 0||(B=U.exec_time_resolvers_enabled_provider)===null||B===void 0?void 0:B.get())===!0;case"PluralReaderSelector":{var j;return(j=L.selectors)===null||j===void 0?void 0:j.every(function($){var A,R,y;return((A=$.owner.node.operation.use_exec_time_resolvers)!==null&&A!==void 0?A:(R=$.owner.node.operation)===null||R===void 0||(y=R.exec_time_resolvers_enabled_provider)===null||y===void 0?void 0:y.get())===!0})}}return!1}function N(L,k,P){var U=L.lookup(P);return i.create(function(B){B.next(M(L,k,P.owner,U));var j=L.subscribe(U,function($){B.next(M(L,k,P.owner,$))});return function(){return j.dispose()}})}function O(L,k,P){var U=P.selectors.map(function(B){return L.lookup(B)});return i.create(function(B){var j=U.map(function(A,R){return M(L,k,P.selectors[R].owner,A)});B.next(F(j));var $=U.map(function(A,R){return L.subscribe(A,function(y){j[R]=M(L,k,P.selectors[R].owner,y),B.next(F(j))})});return function(){return $.forEach(function(A){return A.dispose()})}})}function M(L,k,P,U){var B=U.missingLiveResolverFields!=null&&U.missingLiveResolverFields.length>0,j=U.missingClientEdges!=null&&U.missingClientEdges.length>0;if(B||j)return{state:"loading"};if(U.isMissingData&&(s(L,P)!=null||L.getOperationTracker().getPendingOperationsAffectingOwner(P)!=null))return{state:"loading"};try{u(L,U.fieldErrors)}catch($){return{error:$,state:"error"}}return U.data==null&&h(!1),{state:"ok",value:U.data}}function F(L){var k=[],P=(0,a.default)(L),U;try{for(P.s();!(U=P.n()).done;){var B=U.value;if(B.state==="ok")k.push(B.value);else return B}}catch(j){P.e(j)}finally{P.f()}return{state:"ok",value:k}}return observeFragmentExperimental={observeFragment:_,waitForFragmentData:m},observeFragmentExperimental}var deepFreeze_1,hasRequiredDeepFreeze;function requireDeepFreeze(){if(hasRequiredDeepFreeze)return deepFreeze_1;hasRequiredDeepFreeze=1;function r(a){return n(a)&&(Object.freeze(a),Object.getOwnPropertyNames(a).forEach(function(i){var o=a[i];o&&typeof o=="object"&&!Object.isFrozen(o)&&r(o)})),a}function n(a){return a!=null&&(Array.isArray(a)||typeof a=="object"&&a.constructor===Object)}return deepFreeze_1=r,deepFreeze_1}var getRequestIdentifier_1,hasRequiredGetRequestIdentifier;function requireGetRequestIdentifier(){if(hasRequiredGetRequestIdentifier)return getRequestIdentifier_1;hasRequiredGetRequestIdentifier=1;var r=requireStableCopy(),n=r.stableCopy,a=requireBrowser();function i(o,s){var l=o.cacheID!=null?o.cacheID:o.id;return l==null&&a(!1),l+JSON.stringify(n(s))}return getRequestIdentifier_1=i,getRequestIdentifier_1}var RelayModernOperationDescriptor,hasRequiredRelayModernOperationDescriptor;function requireRelayModernOperationDescriptor(){if(hasRequiredRelayModernOperationDescriptor)return RelayModernOperationDescriptor;hasRequiredRelayModernOperationDescriptor=1,requireDeepFreeze();var r=requireGetRequestIdentifier(),n=requireRelayFeatureFlags(),a=requireStableCopy(),i=a.hasCycle,o=requireRelayConcreteVariables(),s=o.getOperationVariables,l=requireRelayModernSelector(),f=l.createNormalizationSelector,d=l.createReaderSelector,u=requireRelayStoreUtils(),c=u.ROOT_ID,v=requireBrowser();function h(g,_,S){var N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:c,O=g.operation,M=s(O,g.params.providedVariables,_);n.ENABLE_CYLE_DETECTION_IN_VARIABLES&&i(M)&&v(!1);var F=m(g,M,S),L={fragment:d(g.fragment,N,M,F),request:F,root:f(O,N,M)};return L}function m(g,_,S){var N={identifier:r(g.params,_),node:g,variables:_,cacheConfig:S};return N}return RelayModernOperationDescriptor={createOperationDescriptor:h,createRequestDescriptor:m},RelayModernOperationDescriptor}var observeQueryExperimental,hasRequiredObserveQueryExperimental;function requireObserveQueryExperimental(){if(hasRequiredObserveQueryExperimental)return observeQueryExperimental;hasRequiredObserveQueryExperimental=1;var r=requireInteropRequireDefault().default,n=r(requireDefineProperty()),a=requireObserveFragmentExperimental(),i=a.observeFragment,o=requireRelayModernOperationDescriptor(),s=o.createOperationDescriptor;function l(f,d,u){var c=s(d,u),v={__fragmentOwner:c.request,__fragments:(0,n.default)({},c.fragment.node.name,c.request.variables),__id:c.fragment.dataID},h=c.request.node.fragment;return i(f,h,v)}return observeQueryExperimental={observeQuery:l},observeQueryExperimental}var waitForFragmentExperimental,hasRequiredWaitForFragmentExperimental;function requireWaitForFragmentExperimental(){if(hasRequiredWaitForFragmentExperimental)return waitForFragmentExperimental;hasRequiredWaitForFragmentExperimental=1;var r=requireAsyncToGenerator().default,n=requireObserveFragmentExperimental(),a=n.observeFragment;function i(s,l,f){return o.apply(this,arguments)}function o(){return o=r(function*(s,l,f){var d;try{var u,c=yield new Promise(function(h,m){d=a(s,l,f).subscribe({next:function(_){_.state==="ok"?h(_.value):_.state==="error"&&m(_.error)}})});return(u=d)===null||u===void 0||u.unsubscribe(),c}catch(h){var v;throw(v=d)===null||v===void 0||v.unsubscribe(),h}}),o.apply(this,arguments)}return waitForFragmentExperimental={waitForFragmentData:i},waitForFragmentExperimental}var experimental,hasRequiredExperimental;function requireExperimental(){if(hasRequiredExperimental)return experimental;hasRequiredExperimental=1;var r=requireResolverDataInjector(),n=requireObserveFragmentExperimental(),a=n.observeFragment,i=requireObserveQueryExperimental(),o=i.observeQuery,s=requireWaitForFragmentExperimental(),l=s.waitForFragmentData;function f(u){return u.ok===!0}function d(u){return u.ok===!1}return experimental={isErrorResult:d,isValueResult:f,observeFragment:a,observeQuery:o,resolverDataInjector:r,waitForFragmentData:l},experimental}var StringInterner,hasRequiredStringInterner;function requireStringInterner(){if(hasRequiredStringInterner)return StringInterner;hasRequiredStringInterner=1;var r=new Map,n=1,a=s(),i=" ",o="\v";function s(){for(var d=new Set,u=0;u<10;++u)d.add(u.toString());return d}function l(d){return d[0]===i&&a.has(d[1])||d[0]===o?o+d:d}function f(d,u){if(u==null||d.length<u)return l(d);var c=r.get(d);return c!=null||(c=i+n++,r.set(d,c)),c}return StringInterner={intern:f},StringInterner}var ClientID,hasRequiredClientID;function requireClientID(){if(hasRequiredClientID)return ClientID;hasRequiredClientID=1;var r=requireRelayFeatureFlags(),n=requireStringInterner(),a=n.intern,i="client:";function o(u,c,v){var h=r.STRING_INTERN_LEVEL<=0?u:a(u,r.MAX_DATA_ID_LENGTH),m=h+":"+c;return v!=null&&(m+=":"+v),m.indexOf(i)!==0&&(m=i+m),m}function s(u){return u.indexOf(i)===0}var l=0;function f(){return"".concat(i,"local:").concat(l++)}function d(u,c,v){var h="".concat(i).concat(u,":").concat(c);return v!=null&&(h+=":"+v),h}return ClientID={generateClientID:o,generateClientObjectClientID:d,generateUniqueClientID:f,isClientID:s},ClientID}var ConnectionInterface_1,hasRequiredConnectionInterface;function requireConnectionInterface(){if(hasRequiredConnectionInterface)return ConnectionInterface_1;hasRequiredConnectionInterface=1;var r={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},n={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},a={inject:function(o){n=o},get:function(){return n},isConnectionCall:function(o){return r.hasOwnProperty(o.name)}};return ConnectionInterface_1=a,ConnectionInterface_1}var ConnectionHandler,hasRequiredConnectionHandler;function requireConnectionHandler(){if(hasRequiredConnectionHandler)return ConnectionHandler;hasRequiredConnectionHandler=1;var r=requireClientID(),n=r.generateClientID,a=requireRelayStoreUtils(),i=a.getStableStorageKey,o=requireGetRelayHandleKey(),s=requireConnectionInterface(),l=requireBrowser();requireWarning();var f="connection",d="__connection_next_edge_index";function u(O,M){var F=O.get(M.dataID);if(F){var L=s.get(),k=L.EDGES,P=L.END_CURSOR,U=L.HAS_NEXT_PAGE,B=L.HAS_PREV_PAGE,j=L.PAGE_INFO,$=L.PAGE_INFO_TYPE,A=L.START_CURSOR,R=F.getLinkedRecord(M.fieldKey),y=R&&R.getLinkedRecord(j);if(!R){F.setValue(null,M.handleKey,void 0,F.getErrors(M.fieldKey));return}var b=n(F.getDataID(),M.handleKey),D=F.getLinkedRecord(M.handleKey),I=D??O.get(b),T=I&&I.getLinkedRecord(j);if(I){D==null&&F.setLinkedRecord(I,M.handleKey);var w=I,E=R.getLinkedRecords(k);E&&(E=E.map(function(ae){return S(O,w,ae)}));var q=w.getLinkedRecords(k),G=w.getLinkedRecord(j);w.copyFieldsFrom(R),q&&w.setLinkedRecords(q,k),G&&w.setLinkedRecord(G,j);var z=[],H=M.args;if(q&&E)if(H.after!=null){var V,K=(V=T)===null||V===void 0?void 0:V.getValue(P),Z=y?.getValue(P),re=T&&H.after===K,W=T&&K===Z;if(re||W){var X=new Set;N(q,z,X),N(E,z,X)}else return}else if(H.before!=null)if(T&&H.before===T.getValue(A)){var J=new Set;N(E,z,J),N(q,z,J)}else return;else z=E;else E?z=E:z=q;if(z!=null&&z!==q&&w.setLinkedRecords(z,k),T&&y){if(H.after==null&&H.before==null)T.copyFieldsFrom(y);else if(H.before!=null||H.after==null&&H.last){T.setValue(!!y.getValue(B),B);var ie=y.getValue(A);typeof ie=="string"&&T.setValue(ie,A)}else if(H.after!=null||H.before==null&&H.first){T.setValue(!!y.getValue(U),U);var ne=y.getValue(P);typeof ne=="string"&&T.setValue(ne,P)}}}else{var C=O.create(b,R.getType());C.setValue(0,d),C.copyFieldsFrom(R);var x=R.getLinkedRecords(k);x&&(x=x.map(function(ae){return S(O,C,ae)}),C.setLinkedRecords(x,k)),F.setLinkedRecord(C,M.handleKey),T=O.create(n(C.getDataID(),j),$),T.setValue(!1,U),T.setValue(!1,B),T.setValue(null,P),T.setValue(null,A),y&&T.copyFieldsFrom(y),C.setLinkedRecord(T,j)}}}function c(O,M,F){var L=o(f,M,null);return O.getLinkedRecord(L,F)}function v(O,M,F){var L=o(f,M,null),k=i(L,F);return n(O,k)}function h(O,M,F){var L=s.get(),k=L.CURSOR,P=L.EDGES,U=O.getLinkedRecords(P);if(!U){O.setLinkedRecords([M],P);return}var B;if(F==null)B=U.concat(M);else{B=[];for(var j=!1,$=0;$<U.length;$++){var A=U[$];if(B.push(A),A!=null){var R=A.getValue(k);F===R&&(B.push(M),j=!0)}}j||B.push(M)}O.setLinkedRecords(B,P)}function m(O,M,F,L){var k=s.get(),P=k.NODE,U=n(M.getDataID(),F.getDataID()),B=O.get(U);return B||(B=O.create(U,L)),B.setLinkedRecord(F,P),B.getValue("cursor")==null&&B.setValue(null,"cursor"),B}function g(O,M,F){var L=s.get(),k=L.CURSOR,P=L.EDGES,U=O.getLinkedRecords(P);if(!U){O.setLinkedRecords([M],P);return}var B;if(F==null)B=[M].concat(U);else{B=[];for(var j=!1,$=0;$<U.length;$++){var A=U[$];if(A!=null){var R=A.getValue(k);F===R&&(B.push(M),j=!0)}B.push(A)}j||B.unshift(M)}O.setLinkedRecords(B,P)}function _(O,M){var F=s.get(),L=F.EDGES,k=F.NODE,P=O.getLinkedRecords(L);if(P){for(var U,B=0;B<P.length;B++){var j=P[B],$=j&&j.getLinkedRecord(k);$!=null&&$.getDataID()===M?U===void 0&&(U=P.slice(0,B)):U!==void 0&&U.push(j)}U!==void 0&&O.setLinkedRecords(U,L)}}function S(O,M,F){if(F==null)return F;var L=s.get(),k=L.EDGES,P=M.getValue(d);typeof P!="number"&&l(!1);var U=n(M.getDataID(),k,P),B=O.create(U,F.getType());return B.copyFieldsFrom(F),B.getValue("cursor")==null&&B.setValue(null,"cursor"),M.setValue(P+1,d),B}function N(O,M,F){for(var L=s.get(),k=L.NODE,P=0;P<O.length;P++){var U=O[P];if(U){var B=U.getLinkedRecord(k),j=B&&B.getDataID();if(j){if(F.has(j))continue;F.add(j)}M.push(U)}}}return ConnectionHandler={buildConnectionEdge:S,createEdge:m,deleteNode:_,getConnection:c,getConnectionID:v,insertEdgeAfter:h,insertEdgeBefore:g,update:u},ConnectionHandler}var MutationHandlers,hasRequiredMutationHandlers;function requireMutationHandlers(){if(hasRequiredMutationHandlers)return MutationHandlers;hasRequiredMutationHandlers=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireConnectionHandler(),i=requireConnectionInterface(),o=requireBrowser(),s=requireWarning(),l={update:function(_,S){var N=_.get(S.dataID);if(N!=null){var O=N.getValue(S.fieldKey);typeof O=="string"?_.delete(O):Array.isArray(O)&&O.forEach(function(M){typeof M=="string"&&_.delete(M)})}}},f={update:function(_,S){var N=_.get(S.dataID);if(N!=null){var O=S.handleArgs.connections;O==null&&o(!1);var M=N.getValue(S.fieldKey),F=Array.isArray(M)?M:[M];F.forEach(function(L){if(typeof L=="string"){var k=(0,n.default)(O),P;try{for(k.s();!(P=k.n()).done;){var U=P.value,B=_.get(U);B!=null&&a.deleteNode(B,L)}}catch(j){k.e(j)}finally{k.f()}}})}}},d={update:h(a.insertEdgeAfter)},u={update:h(a.insertEdgeBefore)},c={update:m(a.insertEdgeAfter)},v={update:m(a.insertEdgeBefore)};function h(g){return function(_,S){var N,O=_.get(S.dataID);if(O!=null){var M=S.handleArgs.connections;M==null&&o(!1);var F,L;try{F=O.getLinkedRecord(S.fieldKey)}catch{}if(!F)try{L=O.getLinkedRecords(S.fieldKey)}catch{}if(!(F==null&&L==null)){var k=i.get(),P=k.NODE,U=k.EDGES,B=(N=L)!==null&&N!==void 0?N:[F],j=(0,n.default)(B),$;try{var A=function(){var D=$.value;if(D==null)return"continue";var I=D.getLinkedRecord("node");if(!I)return"continue";var T=I.getDataID(),C=(0,n.default)(M),x;try{for(C.s();!(x=C.n()).done;){var w=x.value,E=_.get(w);if(E!=null){var q=(R=E.getLinkedRecords(U))===null||R===void 0?void 0:R.some(function(z){var H;return(z==null||(H=z.getLinkedRecord(P))===null||H===void 0?void 0:H.getDataID())===T});if(!q){var G=a.buildConnectionEdge(_,E,D);G==null&&o(!1),g(E,G)}}}}catch(z){C.e(z)}finally{C.f()}};for(j.s();!($=j.n()).done;)var R,y=A()}catch(b){j.e(b)}finally{j.f()}}}}}function m(g){return function(_,S){var N,O=_.get(S.dataID);if(O!=null){var M=S.handleArgs,F=M.connections,L=M.edgeTypeName;F==null&&o(!1),L==null&&o(!1);var k,P;try{k=O.getLinkedRecord(S.fieldKey)}catch{}if(!k)try{P=O.getLinkedRecords(S.fieldKey)}catch{}if(!(k==null&&P==null)){var U=i.get(),B=U.NODE,j=U.EDGES,$=(N=P)!==null&&N!==void 0?N:[k],A=(0,n.default)($),R;try{var y=function(){var T=R.value;if(T==null)return"continue";var C=T.getDataID(),x=(0,n.default)(F),w;try{for(x.s();!(w=x.n()).done;){var E=w.value,q=_.get(E);if(q!=null){var G=(b=q.getLinkedRecords(j))===null||b===void 0?void 0:b.some(function(H){var V;return(H==null||(V=H.getLinkedRecord(B))===null||V===void 0?void 0:V.getDataID())===C});if(!G){var z=a.createEdge(_,q,T,L);z==null&&o(!1),g(q,z)}}}}catch(H){x.e(H)}finally{x.f()}};for(A.s();!(R=A.n()).done;)var b,D=y()}catch(I){A.e(I)}finally{A.f()}}}}}return MutationHandlers={AppendEdgeHandler:d,DeleteRecordHandler:l,PrependEdgeHandler:u,AppendNodeHandler:c,PrependNodeHandler:v,DeleteEdgeHandler:f},MutationHandlers}var RelayDefaultHandlerProvider_1,hasRequiredRelayDefaultHandlerProvider;function requireRelayDefaultHandlerProvider(){if(hasRequiredRelayDefaultHandlerProvider)return RelayDefaultHandlerProvider_1;hasRequiredRelayDefaultHandlerProvider=1;var r=requireConnectionHandler(),n=requireMutationHandlers(),a=requireBrowser();function i(o){switch(o){case"connection":return r;case"deleteRecord":return n.DeleteRecordHandler;case"deleteEdge":return n.DeleteEdgeHandler;case"appendEdge":return n.AppendEdgeHandler;case"prependEdge":return n.PrependEdgeHandler;case"appendNode":return n.AppendNodeHandler;case"prependNode":return n.PrependNodeHandler}a(!1)}return RelayDefaultHandlerProvider_1=i,RelayDefaultHandlerProvider_1}var isRelayModernEnvironment_1,hasRequiredIsRelayModernEnvironment;function requireIsRelayModernEnvironment(){if(hasRequiredIsRelayModernEnvironment)return isRelayModernEnvironment_1;hasRequiredIsRelayModernEnvironment=1;function r(n){return!!(n&&n["@@RelayModernEnvironment"])}return isRelayModernEnvironment_1=r,isRelayModernEnvironment_1}var RelayDeclarativeMutationConfig,hasRequiredRelayDeclarativeMutationConfig;function requireRelayDeclarativeMutationConfig(){if(hasRequiredRelayDeclarativeMutationConfig)return RelayDeclarativeMutationConfig;hasRequiredRelayDeclarativeMutationConfig=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireConnectionHandler(),i=requireWarning(),o=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),s=Object.freeze({APPEND:"append",PREPEND:"prepend"});function l(h,m,g,_){var S=g?[g]:[],N=_?[_]:[];return h.forEach(function(O){switch(O.type){case"NODE_DELETE":var M=f(O,m);M&&(S.push(M),N.push(M));break;case"RANGE_ADD":var F=d(O,m);F&&(S.push(F),N.push(F));break;case"RANGE_DELETE":var L=u(O,m);L&&(S.push(L),N.push(L));break}}),{optimisticUpdater:function(M,F){S.forEach(function(L){L(M,F)})},updater:function(M,F){N.forEach(function(L){L(M,F)})}}}function f(h,m){var g=h.deletedIDFieldName,_=v(m);return _?function(S,N){var O=S.getRootField(_);if(O){var M=O.getValue(g),F=Array.isArray(M)?M:[M];F.forEach(function(L){L&&typeof L=="string"&&S.delete(L)})}}:null}function d(h,m){var g=h.parentID,_=h.connectionInfo,S=h.edgeName;if(!g)return null;var N=v(m);return!_||!N?null:function(O,M){var F=O.get(g);if(F){var L=O.getRootField(N);if(L){var k=L.getLinkedRecord(S),P=(0,n.default)(_),U;try{for(P.s();!(U=P.n()).done;){var B=U.value;if(k){var j=a.getConnection(F,B.key,B.filters);if(j){var $=a.buildConnectionEdge(O,j,k);if($)switch(B.rangeBehavior){case"append":a.insertEdgeAfter(j,$);break;case"prepend":a.insertEdgeBefore(j,$);break;default:break}}}}}catch(A){P.e(A)}finally{P.f()}}}}}function u(h,m){var g=h.parentID,_=h.connectionKeys,S=h.pathToConnection,N=h.deletedIDFieldName;if(!g)return null;var O=v(m);return O?function(M,F){if(F){var L=[],k=F[O];if(k&&Array.isArray(N)){var P=(0,n.default)(N),U;try{for(P.s();!(U=P.n()).done;){var B=U.value;k&&typeof k=="object"&&(k=k[B])}}catch(j){P.e(j)}finally{P.f()}Array.isArray(k)?k.forEach(function(j){j&&j.id&&typeof j=="object"&&typeof j.id=="string"&&L.push(j.id)}):k&&k.id&&typeof k.id=="string"&&L.push(k.id)}else k&&typeof N=="string"&&typeof k=="object"&&(k=k[N],typeof k=="string"?L.push(k):Array.isArray(k)&&k.forEach(function(j){typeof j=="string"&&L.push(j)}));c(g,_,S,M,L)}}:null}function c(h,m,g,_,S){var N=_.get(h);if(N&&!(g.length<2)){for(var O=N,M=1;M<g.length-1;M++)O&&(O=O.getLinkedRecord(g[M]));if(!(!m||!O)){var F=(0,n.default)(m),L;try{var k=function(){var U=L.value,B=a.getConnection(O,U.key,U.filters);B&&S.forEach(function(j){a.deleteNode(B,j)})};for(F.s();!(L=F.n()).done;)k()}catch(P){F.e(P)}finally{F.f()}}}}function v(h){return h.fragment.selections&&h.fragment.selections.length>0&&h.fragment.selections[0].kind==="LinkedField"?h.fragment.selections[0].name:null}return RelayDeclarativeMutationConfig={MutationTypes:o,RangeOperations:s,convert:l},RelayDeclarativeMutationConfig}var applyOptimisticMutation_1,hasRequiredApplyOptimisticMutation;function requireApplyOptimisticMutation(){if(hasRequiredApplyOptimisticMutation)return applyOptimisticMutation_1;hasRequiredApplyOptimisticMutation=1;var r=requireGraphQLTag(),n=r.getRequest,a=requireIsRelayModernEnvironment(),i=requireRelayModernOperationDescriptor(),o=i.createOperationDescriptor,s=requireRelayDeclarativeMutationConfig(),l=requireBrowser();function f(d,u){a(d)||l(!1);var c=n(u.mutation);if(c.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var v=u.optimisticUpdater,h=u.configs,m=u.optimisticResponse,g=u.variables,_=o(c,g);if(h){var S=s.convert(h,c,v);v=S.optimisticUpdater}return d.applyMutation({operation:_,response:m,updater:v})}return applyOptimisticMutation_1=f,applyOptimisticMutation_1}var commitLocalUpdate_1,hasRequiredCommitLocalUpdate;function requireCommitLocalUpdate(){if(hasRequiredCommitLocalUpdate)return commitLocalUpdate_1;hasRequiredCommitLocalUpdate=1;function r(n,a){n.commitUpdate(a)}return commitLocalUpdate_1=r,commitLocalUpdate_1}var validateMutation_1,hasRequiredValidateMutation;function requireValidateMutation(){if(hasRequiredValidateMutation)return validateMutation_1;hasRequiredValidateMutation=1;var r=requireInteropRequireDefault().default;r(requireObjectSpread2()),requireWarning();var n=function(){};return validateMutation_1=n,validateMutation_1}var commitMutation_1,hasRequiredCommitMutation;function requireCommitMutation(){if(hasRequiredCommitMutation)return commitMutation_1;hasRequiredCommitMutation=1;var r=requireInteropRequireDefault().default,n=r(requireToConsumableArray()),a=requireGraphQLTag(),i=a.getRequest,o=requireClientID(),s=o.generateUniqueClientID,l=requireIsRelayModernEnvironment(),f=requireRelayModernOperationDescriptor(),d=f.createOperationDescriptor,u=requireRelayDeclarativeMutationConfig();requireValidateMutation();var c=requireBrowser();requireWarning();function v(h,m){l(h)||c(!1);var g=i(m.mutation);if(g.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(g.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var _=m.optimisticResponse,S=m.optimisticUpdater,N=m.updater,O=m.configs,M=m.cacheConfig,F=m.onError,L=m.onUnsubscribe,k=m.variables,P=m.uploadables,U=d(g,k,M,s());if(typeof _=="function"&&(_=_()),O){var B=u.convert(O,g,S,N);S=B.optimisticUpdater,N=B.updater}var j=[],$=h.executeMutation({operation:U,optimisticResponse:_,optimisticUpdater:S,updater:N,uploadables:P}).subscribe({complete:function(){var R=m.onCompleted;if(R){var y=h.lookup(U.fragment);R(y.data,j.length!==0?j:null)}},error:F,next:function(R){var y;Array.isArray(R)?R.forEach(function(b){b.errors&&j.push.apply(j,(0,n.default)(b.errors))}):R.errors&&j.push.apply(j,(0,n.default)(R.errors)),(y=m.onNext)===null||y===void 0||y.call(m)},unsubscribe:L});return{dispose:$.unsubscribe}}return commitMutation_1=v,commitMutation_1}var withProvidedVariables_1,hasRequiredWithProvidedVariables;function requireWithProvidedVariables(){if(hasRequiredWithProvidedVariables)return withProvidedVariables_1;hasRequiredWithProvidedVariables=1,requireAreEqual(),requireWarning();var r=typeof WeakMap=="function",n=r?new WeakMap:new Map;function a(i,o){if(o!=null){var s={};return Object.assign(s,i),Object.keys(o).forEach(function(l){var f=o[l].get,d=f();if(!n.has(f))n.set(f,d),s[l]=d;else{var u=n.get(f);s[l]=u}}),s}else return i}return a.tests_only_resetDebugCache=void 0,withProvidedVariables_1=a,withProvidedVariables_1}var ConvertToExecuteFunction,hasRequiredConvertToExecuteFunction;function requireConvertToExecuteFunction(){if(hasRequiredConvertToExecuteFunction)return ConvertToExecuteFunction;hasRequiredConvertToExecuteFunction=1;var r=requireRelayObservable();function n(a){return function(o,s,l,f,d){var u=a(o,s,l,f,d);return u instanceof Error?r.create(function(c){return c.error(u)}):r.from(u)}}return ConvertToExecuteFunction={convertFetch:n},ConvertToExecuteFunction}var RelayNetwork,hasRequiredRelayNetwork;function requireRelayNetwork(){if(hasRequiredRelayNetwork)return RelayNetwork;hasRequiredRelayNetwork=1;var r=requireWithProvidedVariables(),n=requireConvertToExecuteFunction(),a=n.convertFetch,i=requireBrowser();function o(s,l){var f=a(s);function d(u,c,v,h,m){var g=r(c,u.providedVariables);if(u.operationKind==="subscription")return l||i(!1),h&&i(!1),l(u,g,v);var _=v.poll;return _!=null?(h&&i(!1),f(u,g,{force:!0}).poll(_)):f(u,g,v,h,m)}return{execute:d}}return RelayNetwork={create:o},RelayNetwork}var RelayQueryResponseCache_1,hasRequiredRelayQueryResponseCache;function requireRelayQueryResponseCache(){if(hasRequiredRelayQueryResponseCache)return RelayQueryResponseCache_1;hasRequiredRelayQueryResponseCache=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireStableCopy(),i=a.stableCopy,o=requireBrowser(),s=function(){function d(c){var v=c.size,h=c.ttl;v>0||o(!1),h>0||o(!1),this._responses=new Map,this._size=v,this._ttl=h}var u=d.prototype;return u.clear=function(){this._responses.clear()},u.get=function(v,h){var m=this,g=l(v,h);this._responses.forEach(function(S,N){f(S.fetchTime,m._ttl)||m._responses.delete(N)});var _=this._responses.get(g);return _==null?null:Array.isArray(_.payload)?_.payload.map(function(S){return(0,n.default)((0,n.default)({},S),{},{extensions:(0,n.default)((0,n.default)({},S.extensions),{},{cacheTimestamp:_.fetchTime})})}):(0,n.default)((0,n.default)({},_.payload),{},{extensions:(0,n.default)((0,n.default)({},_.payload.extensions),{},{cacheTimestamp:_.fetchTime})})},u.set=function(v,h,m){var g=Date.now(),_=l(v,h);if(this._responses.delete(_),this._responses.set(_,{fetchTime:g,payload:m}),this._responses.size>this._size){var S=this._responses.keys().next();S.done||this._responses.delete(S.value)}},d}();function l(d,u){return JSON.stringify(i({queryID:d,variables:u}))}function f(d,u){return d+u>=Date.now()}return RelayQueryResponseCache_1=s,RelayQueryResponseCache_1}var fetchQuery_1,hasRequiredFetchQuery;function requireFetchQuery(){if(hasRequiredFetchQuery)return fetchQuery_1;hasRequiredFetchQuery=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireRelayObservable(),i=requireRelayModernOperationDescriptor(),o=i.createOperationDescriptor,s=requireHandlePotentialSnapshotErrors(),l=s.handlePotentialSnapshotErrors,f=requireFetchQueryInternal(),d=requireGraphQLTag(),u=d.getRequest,c=requireBrowser();function v(m,g,_,S){var N,O=u(g);O.params.operationKind!=="query"&&c(!1);var M=(0,n.default)({force:!0},S?.networkCacheConfig),F=o(O,_,M),L=(N=S?.fetchPolicy)!==null&&N!==void 0?N:"network-only";function k(j){return l(m,j.fieldErrors),j.data}switch(L){case"network-only":return h(m,F).map(k);case"store-or-network":{var P=m.check(F),U=P.status!=="available",B;return U?B=h(m,F).map(k):B=a.from(m.lookup(F.fragment)).map(k),m.__log({name:"fetchquery.fetch",operation:F,fetchPolicy:L,queryAvailability:P,shouldFetch:U}),B}default:throw new Error("fetchQuery: Invalid fetchPolicy "+L)}}function h(m,g){return f.fetchQuery(m,g).map(function(){return m.lookup(g.fragment)})}return fetchQuery_1=v,fetchQuery_1}var fetchQuery_DEPRECATED_1,hasRequiredFetchQuery_DEPRECATED;function requireFetchQuery_DEPRECATED(){if(hasRequiredFetchQuery_DEPRECATED)return fetchQuery_DEPRECATED_1;hasRequiredFetchQuery_DEPRECATED=1;var r=requireRelayModernOperationDescriptor(),n=r.createOperationDescriptor,a=requireGraphQLTag(),i=a.getRequest;function o(s,l,f,d){var u=i(l);if(u.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var c=n(u,f,d);return s.execute({operation:c}).map(function(){return s.lookup(c.fragment).data}).toPromise()}return fetchQuery_DEPRECATED_1=o,fetchQuery_DEPRECATED_1}var PreloadableQueryRegistry_1,hasRequiredPreloadableQueryRegistry;function requirePreloadableQueryRegistry(){if(hasRequiredPreloadableQueryRegistry)return PreloadableQueryRegistry_1;hasRequiredPreloadableQueryRegistry=1;var r=function(){function a(){this._preloadableQueries=new Map,this._callbacks=new Map}var i=a.prototype;return i.set=function(s,l){this._preloadableQueries.set(s,l);var f=this._callbacks.get(s);f?.forEach(function(d){try{d(l)}catch(u){setTimeout(function(){throw u},0)}})},i.get=function(s){return this._preloadableQueries.get(s)},i.onLoad=function(s,l){var f,d=(f=this._callbacks.get(s))!==null&&f!==void 0?f:new Set;d.add(l);var u=function(){d.delete(l)};return this._callbacks.set(s,d),{dispose:u}},i.clear=function(){this._preloadableQueries.clear()},a}(),n=new r;return PreloadableQueryRegistry_1=n,PreloadableQueryRegistry_1}var getPendingOperationsForFragment_1,hasRequiredGetPendingOperationsForFragment;function requireGetPendingOperationsForFragment(){if(hasRequiredGetPendingOperationsForFragment)return getPendingOperationsForFragment_1;hasRequiredGetPendingOperationsForFragment=1;var r=requireFetchQueryInternal(),n=r.getPromiseForActiveRequest;function a(i,o,s){var l,f,d=[],u=n(i,s);if(u!=null)d=[s];else{var c,v,h=i.getOperationTracker(),m=h.getPendingOperationsAffectingOwner(s);d=(c=m?.pendingOperations)!==null&&c!==void 0?c:[],u=(v=m?.promise)!==null&&v!==void 0?v:null}if(!u)return null;var g=(l=(f=d)===null||f===void 0?void 0:f.map(function(N){return N.node.params.name}).join(","))!==null&&l!==void 0?l:null;(g==null||g.length===0)&&(g="Unknown pending operation");var _=o.name,S=g===_?"Relay(".concat(g,")"):"Relay(".concat(g,":").concat(_,")");return u.displayName=S,i.__log({name:"pendingoperation.found",fragment:o,fragmentOwner:s,pendingOperations:d}),{promise:u,pendingOperations:d}}return getPendingOperationsForFragment_1=a,getPendingOperationsForFragment_1}var isScalarAndEqual_1,hasRequiredIsScalarAndEqual;function requireIsScalarAndEqual(){if(hasRequiredIsScalarAndEqual)return isScalarAndEqual_1;hasRequiredIsScalarAndEqual=1;function r(n,a){return n===a&&(n===null||typeof n!="object")}return isScalarAndEqual_1=r,isScalarAndEqual_1}var recycleNodesInto_1,hasRequiredRecycleNodesInto;function requireRecycleNodesInto(){if(hasRequiredRecycleNodesInto)return recycleNodesInto_1;hasRequiredRecycleNodesInto=1;function r(a,i){return n(a,i,!0)}function n(a,i,o){if(a===i||typeof a!="object"||!a||a.constructor!==Object&&!Array.isArray(a)||typeof i!="object"||!i||i.constructor!==Object&&!Array.isArray(i))return i;var s=!1,l=Array.isArray(a)?a:null,f=Array.isArray(i)?i:null;if(l&&f){var d=o&&!Object.isFrozen(f);s=f.reduce(function(g,_,S){var N=l[S],O=n(N,_,d);return O!==f[S]&&d&&(f[S]=O),g&&O===l[S]},!0)&&l.length===f.length}else if(!l&&!f){var u=a,c=i,v=Object.keys(u),h=Object.keys(c),m=o&&!Object.isFrozen(c);s=h.reduce(function(g,_){var S=u[_],N=n(S,c[_],m);return N!==c[_]&&m&&(c[_]=N),g&&N===u[_]},!0)&&v.length===h.length}return s?a:i}return recycleNodesInto_1=r,recycleNodesInto_1}var RelayModernFragmentSpecResolver_1,hasRequiredRelayModernFragmentSpecResolver;function requireRelayModernFragmentSpecResolver(){if(hasRequiredRelayModernFragmentSpecResolver)return RelayModernFragmentSpecResolver_1;hasRequiredRelayModernFragmentSpecResolver=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireDefineProperty()),i=requireGetPendingOperationsForFragment(),o=requireHandlePotentialSnapshotErrors(),s=o.handlePotentialSnapshotErrors,l=requireIsScalarAndEqual(),f=requireRecycleNodesInto(),d=requireRelayFeatureFlags(),u=requireRelayModernOperationDescriptor(),c=u.createRequestDescriptor,v=requireRelayModernSelector(),h=v.areEqualSelectors,m=v.createReaderSelector,g=v.getSelectorsFromObject,_=requireAreEqual(),S=requireBrowser();requireWarning();var N=function(){function L(P,U,B,j,$){var A=this;(0,a.default)(this,"_onChange",function(){A._stale=!0,typeof A._callback=="function"&&A._callback()}),this._callback=j,this._context=P,this._data={},this._fragments=U,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=$,this.setProps(B)}var k=L.prototype;return k.dispose=function(){for(var U in this._resolvers)this._resolvers.hasOwnProperty(U)&&F(this._resolvers[U])},k.resolve=function(){if(this._stale){var U=this._data,B;for(var j in this._resolvers)if(this._resolvers.hasOwnProperty(j)){var $=this._resolvers[j],A=U[j];if($){var R=$.resolve();(B||R!==A)&&(B=B||(0,n.default)({},U),B[j]=R)}else{var y=this._props[j],b=y!==void 0?y:null;(B||!l(b,A))&&(B=B||(0,n.default)({},U),B[j]=b)}}this._data=B||U,this._stale=!1}return this._data},k.setCallback=function(U,B){this._callback=B,d.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(U)},k.setProps=function(U){this._props={};var B=g(this._fragments,U);for(var j in B)if(B.hasOwnProperty(j)){var $=B[j],A=this._resolvers[j];$==null?(A?.dispose(),A=null):$.kind==="PluralReaderSelector"?A==null?A=new M(this._context.environment,this._rootIsQueryRenderer,$,this._callback!=null,this._onChange):(A instanceof M||S(!1),A.setSelector($)):A==null?A=new O(this._context.environment,this._rootIsQueryRenderer,$,this._callback!=null,this._onChange):(A instanceof O||S(!1),A.setSelector($)),this._props[j]=U[j],this._resolvers[j]=A}this._stale=!0},k.setVariables=function(U,B){for(var j in this._resolvers)if(this._resolvers.hasOwnProperty(j)){var $=this._resolvers[j];$&&$.setVariables(U,B)}this._stale=!0},L}(),O=function(){function L(P,U,B,j,$){var A=this;(0,a.default)(this,"_onChange",function(y){A._data=y.data,A._isMissingData=y.isMissingData,A._fieldErrors=y.fieldErrors,A._callback()});var R=P.lookup(B);this._callback=$,this._data=R.data,this._isMissingData=R.isMissingData,this._fieldErrors=R.fieldErrors,this._environment=P,this._rootIsQueryRenderer=U,this._selector=B,d.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?j&&(this._subscription=P.subscribe(R,this._onChange)):this._subscription=P.subscribe(R,this._onChange)}var k=L.prototype;return k.dispose=function(){this._subscription&&(this._subscription.dispose(),this._subscription=null)},k.resolve=function(){if(this._isMissingData===!0){var U=i(this._environment,this._selector.node,this._selector.owner),B=U?.promise;if(B!=null&&!this._rootIsQueryRenderer){var j,$=(j=U?.pendingOperations)!==null&&j!==void 0?j:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:$}),B}}return s(this._environment,this._fieldErrors),this._data},k.setSelector=function(U){if(!(this._subscription!=null&&h(U,this._selector))){this.dispose();var B=this._environment.lookup(U);this._data=f(this._data,B.data),this._isMissingData=B.isMissingData,this._fieldErrors=B.fieldErrors,this._selector=U,this._subscription=this._environment.subscribe(B,this._onChange)}},k.setVariables=function(U,B){if(!_(U,this._selector.variables)){var j=c(B,U),$=m(this._selector.node,this._selector.dataID,U,j);this.setSelector($)}},L}(),M=function(){function L(P,U,B,j,$){var A=this;(0,a.default)(this,"_onChange",function(R){A._stale=!0,A._callback()}),this._callback=$,this._data=[],this._environment=P,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=U,this._subscribeOnConstruction=j,this.setSelector(B)}var k=L.prototype;return k.dispose=function(){this._resolvers.forEach(F)},k.resolve=function(){if(this._stale){for(var U=this._data,B,j=0;j<this._resolvers.length;j++){var $=U[j],A=this._resolvers[j].resolve();(B||A!==$)&&(B=B||U.slice(0,j),B.push(A))}!B&&this._resolvers.length!==U.length&&(B=U.slice(0,this._resolvers.length)),this._data=B||U,this._stale=!1}return this._data},k.setSelector=function(U){for(var B=U.selectors;this._resolvers.length>B.length;){var j=this._resolvers.pop();j.dispose()}for(var $=0;$<B.length;$++)$<this._resolvers.length?this._resolvers[$].setSelector(B[$]):this._resolvers[$]=new O(this._environment,this._rootIsQueryRenderer,B[$],this._subscribeOnConstruction,this._onChange);this._stale=!0},k.setVariables=function(U,B){this._resolvers.forEach(function(j){return j.setVariables(U,B)}),this._stale=!0},L}();function F(L){L&&L.dispose()}return RelayModernFragmentSpecResolver_1=N,RelayModernFragmentSpecResolver_1}var createFragmentSpecResolver_1,hasRequiredCreateFragmentSpecResolver;function requireCreateFragmentSpecResolver(){if(hasRequiredCreateFragmentSpecResolver)return createFragmentSpecResolver_1;hasRequiredCreateFragmentSpecResolver=1;var r=requireRelayModernFragmentSpecResolver();requireWarning();function n(a,i,o,s,l,f){return new r(a,o,s,f,l)}return createFragmentSpecResolver_1=n,createFragmentSpecResolver_1}var createRelayContext_1,hasRequiredCreateRelayContext;function requireCreateRelayContext(){if(hasRequiredCreateRelayContext)return createRelayContext_1;hasRequiredCreateRelayContext=1;var r=requireBrowser(),n,a;function i(o){return n||(n=o.createContext(null),a=o),o!==a&&r(!1),n}return createRelayContext_1=i,createRelayContext_1}var createRelayLoggingContext_1,hasRequiredCreateRelayLoggingContext;function requireCreateRelayLoggingContext(){if(hasRequiredCreateRelayLoggingContext)return createRelayLoggingContext_1;hasRequiredCreateRelayLoggingContext=1;var r=requireBrowser(),n,a;function i(o){return n||(n=o.createContext(null),a=o),o!==a&&r(!1),n}return createRelayLoggingContext_1=i,createRelayLoggingContext_1}var ViewerPattern,hasRequiredViewerPattern;function requireViewerPattern(){if(hasRequiredViewerPattern)return ViewerPattern;hasRequiredViewerPattern=1;var r=requireClientID(),n=r.generateClientID,a=requireRelayStoreUtils(),i=a.ROOT_ID,o=n(i,"viewer"),s="Viewer";return ViewerPattern={VIEWER_ID:o,VIEWER_TYPE:s},ViewerPattern}var defaultGetDataID_1,hasRequiredDefaultGetDataID;function requireDefaultGetDataID(){if(hasRequiredDefaultGetDataID)return defaultGetDataID_1;hasRequiredDefaultGetDataID=1;var r=requireViewerPattern(),n=r.VIEWER_ID,a=r.VIEWER_TYPE;function i(o,s){return s===a&&o.id==null?n:o.id}return defaultGetDataID_1=i,defaultGetDataID_1}var LiveResolverSuspenseSentinel,hasRequiredLiveResolverSuspenseSentinel;function requireLiveResolverSuspenseSentinel(){if(hasRequiredLiveResolverSuspenseSentinel)return LiveResolverSuspenseSentinel;hasRequiredLiveResolverSuspenseSentinel=1;var r=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function n(){return r}function a(i){return i===r}return LiveResolverSuspenseSentinel={isSuspenseSentinel:a,suspenseSentinel:n},LiveResolverSuspenseSentinel}var objectWithoutPropertiesLoose={exports:{}},hasRequiredObjectWithoutPropertiesLoose;function requireObjectWithoutPropertiesLoose(){return hasRequiredObjectWithoutPropertiesLoose||(hasRequiredObjectWithoutPropertiesLoose=1,function(r){function n(a,i){if(a==null)return{};var o={};for(var s in a)if({}.hasOwnProperty.call(a,s)){if(i.indexOf(s)!==-1)continue;o[s]=a[s]}return o}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}(objectWithoutPropertiesLoose)),objectWithoutPropertiesLoose.exports}var RelayModernRecord,hasRequiredRelayModernRecord;function requireRelayModernRecord(){if(hasRequiredRelayModernRecord)return RelayModernRecord;hasRequiredRelayModernRecord=1;var r=requireInteropRequireDefault().default,n=r(requireDefineProperty()),a=r(requireObjectWithoutPropertiesLoose()),i=r(requireToPropertyKey()),o=r(requireObjectSpread2()),s=requireDeepFreeze(),l=requireClientID(),f=l.generateClientObjectClientID;l.isClientID;var d=requireLiveResolverSuspenseSentinel(),u=d.isSuspenseSentinel,c=requireRelayStoreUtils(),v=c.ACTOR_IDENTIFIER_KEY,h=c.ERRORS_KEY,m=c.ID_KEY,g=c.INVALIDATED_AT_KEY,_=c.REF_KEY,S=c.REFS_KEY,N=c.RELAY_RESOLVER_VALUE_KEY;c.ROOT_ID;var O=c.TYPENAME_KEY,M=requireAreEqual(),F=requireBrowser();requireWarning();function L(J){return(0,o.default)({},J)}function k(J,ie){for(var ne in J)J.hasOwnProperty(ne)&&ne!==m&&ne!==O&&(ie[ne]=J[ne])}function P(J,ie){var ne={};return ne[m]=J,ne[O]=ie,ne}function U(J){return J}function B(J){return J[m]}function j(J){return h in J?Object.keys(J).filter(function(ie){return ie!==h}):Object.keys(J)}function $(J){return J[O]}function A(J,ie){var ne;return(ne=J[h])===null||ne===void 0?void 0:ne[ie]}function R(J,ie){var ne=J[ie];return ne&&typeof ne=="object"&&(!ne.hasOwnProperty(_)&&!ne.hasOwnProperty(S)||F(!1)),ne}function y(J,ie){return ie in J}function b(J,ie){var ne=J[ie];if(ne==null)return ne;var ae=ne;return typeof ae=="object"&&ae&&typeof ae[_]=="string"||F(!1),ae[_]}function D(J,ie){var ne=J[ie];if(ne==null)return!1;var ae=ne;return typeof ae=="object"&&ae&&typeof ae[_]=="string"}function I(J,ie){var ne=J[ie];return ne==null?ne:(typeof ne=="object"&&Array.isArray(ne[S])||F(!1),ne[S])}function T(J,ie){var ne=J[ie];return ne==null?!1:typeof ne=="object"&&Array.isArray(ne[S])&&ne[S].every(function(ae){return typeof ae=="string"})}function C(J){if(J==null)return null;var ie=J[g];return typeof ie!="number"?null:ie}function x(J,ie){var ne,ae=J[h],ue=ie[h],fe=null;if(ae==null&&ue==null){var se;for(var pe in ie)(fe||!M(J[pe],ie[pe]))&&(fe=fe!==null?fe:(0,o.default)({},J),fe[pe]=ie[pe]);return(se=fe)!==null&&se!==void 0?se:J}for(var ce in ie)if(ce!==h){var he=ie[ce],ve=ue?.[ce];if(fe==null){var ye=J[ce],be=ae?.[ce];if(M(ye,he)&&M(be,ve))continue;fe=(0,o.default)({},J),ae!=null&&(fe[h]=(0,o.default)({},ae))}G(fe,ce,he),q(fe,ce,ve)}return(ne=fe)!==null&&ne!==void 0?ne:J}function w(J,ie){if(h in J||h in ie){var ne=J[h],ae=(0,a.default)(J,[h].map(i.default)),ue=ie[h],fe=(0,a.default)(ie,[h].map(i.default)),se=(0,o.default)((0,o.default)({},ae),fe);if(ne==null&&ue==null)return se;var pe={};for(var ce in ne)fe.hasOwnProperty(ce)||(pe[ce]=ne[ce]);for(var he in ue)pe[he]=ue[he];for(var ve in pe){se[h]=pe;break}return se}else return(0,o.default)((0,o.default)({},J),ie)}function E(J){s(J)}function q(J,ie,ne){var ae=J[h];if(ne!=null&&ne.length>0)ae==null?J[h]=(0,n.default)({},ie,ne):ae[ie]=ne;else if(ae!=null&&delete ae[ie]){for(var ue in ae)if(ae.hasOwnProperty(ue))return;delete J[h]}}function G(J,ie,ne){J[ie]=ne}function z(J,ie,ne){var ae={};ae[_]=ne,J[ie]=ae}function H(J,ie,ne){var ae={};ae[S]=ne,J[ie]=ae}function V(J,ie,ne,ae){var ue={};ue[_]=ae,ue[v]=ne,J[ie]=ue}function K(J,ie){var ne=J[ie];return ne==null?ne:(typeof ne=="object"&&typeof ne[_]=="string"&&ne[v]!=null||F(!1),[ne[v],ne[_]])}function Z(J,ie){var ne=R(J,N);return ne==null||u(ne)?null:(typeof ne=="object"&&(ne=ne.id),typeof ne!="string"&&F(!1),f(ie,ne))}function re(J,ie){var ne=R(J,N);return ne==null||u(ne)?null:(Array.isArray(ne)||F(!1),ne.map(function(ae){return ae==null?null:(typeof ae=="object"&&(ae=ae.id),typeof ae!="string"&&F(!1),f(ie,ae))}))}function W(J,ie,ne){var ae,ue;if(!M(J[ne],ie[ne]))return!0;var fe=(ae=J[h])===null||ae===void 0?void 0:ae[ne],se=(ue=ie[h])===null||ue===void 0?void 0:ue[ne];return!M(fe,se)}function X(J){return J}return RelayModernRecord={clone:L,copyFields:k,create:P,freeze:E,fromObject:U,getActorLinkedRecordID:K,getDataID:B,getErrors:A,getFields:j,getInvalidationEpoch:C,getLinkedRecordID:b,getLinkedRecordIDs:I,getResolverLinkedRecordID:Z,getResolverLinkedRecordIDs:re,getType:$,getValue:R,hasFieldChanged:W,hasLinkedRecordID:D,hasLinkedRecordIDs:T,hasValue:y,merge:w,setActorLinkedRecordID:V,setErrors:q,setLinkedRecordID:z,setLinkedRecordIDs:H,setValue:G,toJSON:X,update:x},RelayModernRecord}var NormalizationEngine_1,hasRequiredNormalizationEngine;function requireNormalizationEngine(){if(hasRequiredNormalizationEngine)return NormalizationEngine_1;hasRequiredNormalizationEngine=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireToConsumableArray()),i=requireStableCopy(),o=i.stableCopy,s=requireClientID(),l=s.generateClientID,f=requireDefaultGetDataID(),d=requireRelayModernRecord(),u=requireRelayModernSelector(),c=u.createNormalizationSelector,v=requireRelayStoreUtils(),h=v.ROOT_ID,m=v.ROOT_TYPE,g=v.getStorageKey;function _(M){var F=new Error(M);return F.stack,F}function S(M){var F;return(F=JSON.stringify(o(M)))!==null&&F!==void 0?F:""}var N=function(){function M(L){var k,P,U,B,j,$;this._normalizeResponse=L.normalizeResponse,this._operationLoader=(k=L.operationLoader)!==null&&k!==void 0?k:null,this._rootSelector={dataID:h,node:L.operation,variables:L.variables},this._options={deferDeduplicatedFields:!1,getDataID:(P=L.getDataID)!==null&&P!==void 0?P:f,log:null,path:[],treatMissingFieldsAsNull:(U=L.treatMissingFieldsAsNull)!==null&&U!==void 0?U:!1},this._useExecTimeResolvers=(B=(j=L.operation.use_exec_time_resolvers)!==null&&j!==void 0?j:(($=L.operation.exec_time_resolvers_enabled_provider)===null||$===void 0?void 0:$.get())===!0)!==null&&B!==void 0?B:!1,this._placeholders=new Map,this._bufferedResponses=new Map,this._parentRecords=new Map,this._serverComplete=!1}var F=M.prototype;return F.processResponse=function(k){var P=this._normalizeResponse(k,this._rootSelector,m,this._options,this._useExecTimeResolvers),U=[],B=[];P.incrementalPlaceholders!=null&&P.incrementalPlaceholders.length>0&&this._registerPlaceholders(P.incrementalPlaceholders,P.source,P.fieldPayloads,U,B),P.followupPayloads!=null&&P.followupPayloads.length>0&&this._processFollowups(P.followupPayloads,U,B);var j=(0,n.default)((0,n.default)({},P),{},{followupPayloads:null,incrementalPlaceholders:null,isFinal:this._computeIsFinal(P.isFinal),isPreNormalized:!0});return{payloads:[j].concat(U),pendingModules:B}},F.processIncrementalResponse=function(k){var P=k.label,U=k.path;if(P==null||U==null)throw _("NormalizationEngine: Expected incremental response to have `label` and `path` properties.");var B=P.indexOf("$defer$")!==-1,j=B?U.map(String).join("."):U.slice(0,-2).map(String).join("."),$=O(P,j),A=this._placeholders.get($);if(A==null){var R=this._bufferedResponses.get($);return R==null&&(R=[],this._bufferedResponses.set($,R)),R.push(k),null}return A.kind==="defer"?this._processDefer(k,U,A):this._processStream(k,U,A)},F.setServerComplete=function(){this._serverComplete=!0},F.isFinal=function(){return this._serverComplete&&this._bufferedResponses.size===0&&this._placeholders.size===0},F._processDefer=function(k,P,U){var B=this._normalizeResponse(k,U.selector,U.typeName,(0,n.default)((0,n.default)({},this._options),{},{deferDeduplicatedFields:!0,path:U.path}),this._useExecTimeResolvers),j=[],$=[];B.incrementalPlaceholders!=null&&B.incrementalPlaceholders.length>0&&this._registerPlaceholders(B.incrementalPlaceholders,B.source,B.fieldPayloads,j,$),B.followupPayloads!=null&&B.followupPayloads.length>0&&this._processFollowups(B.followupPayloads,j,$);var A=U.selector.dataID,R=this._parentRecords.get(A),y=B.fieldPayloads;if(R!=null&&R.fieldPayloads.length>0){var b;y=((b=y)!==null&&b!==void 0?b:[]).concat(R.fieldPayloads)}var D=(0,n.default)((0,n.default)({},B),{},{fieldPayloads:y,followupPayloads:null,incrementalPlaceholders:null,isFinal:this._computeIsFinal(B.isFinal),isPreNormalized:!0});return{payloads:[D].concat(j),pendingModules:$}},F._processStream=function(k,P,U){var B=U.node,j=U.parentID,$=U.variables,A=B.selections[0];if(A==null||A.kind!=="LinkedField"||A.plural!==!0)throw _("NormalizationEngine: Expected @stream to be used on a plural field.");var R=this._normalizeStreamItem(k,j,A,$,P,U.path),y=R.fieldPayloads,b=R.itemID,D=R.itemIndex,I=R.prevIDs,T=R.relayPayload,C=R.storageKey,x=function(G){var z=G.get(j);if(z!=null){var H=z.getLinkedRecords(C);if(H!=null&&!(H.length!==I.length||H.some(function(K,Z){return I[Z]!==(K&&K.getDataID())}))){var V=(0,a.default)(H);V[D]=G.get(b),z.setLinkedRecords(V,C)}}},w=T.fieldPayloads;if(y.length>0){var E;w=((E=w)!==null&&E!==void 0?E:[]).concat(y)}return{payloads:[(0,n.default)((0,n.default)({},T),{},{fieldPayloads:w,followupPayloads:null,incrementalPlaceholders:null,isFinal:this._computeIsFinal(T.isFinal),isPreNormalized:!0,storeUpdater:x})],pendingModules:[]}},F._normalizeStreamItem=function(k,P,U,B,j,$){var A,R,y,b,D=k.data;if(typeof D!="object")throw _("NormalizationEngine: Expected the GraphQL @stream payload `data` value to be an object.");var I=(A=U.alias)!==null&&A!==void 0?A:U.name,T=g(U,B),C=this._parentRecords.get(P);if(C==null)throw _("NormalizationEngine: Expected the parent record `"+P+"` for @stream data to exist.");var x=C.fieldPayloads,w=C.record,E=d.getLinkedRecordIDs(w,T);if(E==null)throw _("NormalizationEngine: Expected record `"+P+"` to have fetched field `"+U.name+"` with @stream.");var q=j[j.length-1],G=parseInt(q,10);if(G!==q||G<0)throw _("NormalizationEngine: Expected path for @stream to end in a positive integer index, got `"+String(q)+"`");var z=(R=U.concreteType)!==null&&R!==void 0?R:D.__typename;if(typeof z!="string")throw _("NormalizationEngine: Expected @stream field `"+U.name+"` to have a __typename.");var H=this._options.getDataID,V=(y=(b=typeof H=="function"?H(D,z):null)!==null&&b!==void 0?b:E?.[G])!==null&&y!==void 0?y:l(P,T,G);if(typeof V!="string")throw _("NormalizationEngine: Expected id of elements of field `"+T+"` to be strings.");var K=c(U,V,B),Z=d.clone(w),re=(0,a.default)(E);re[G]=V,d.setLinkedRecordIDs(Z,T,re),this._parentRecords.set(P,{fieldPayloads:x,record:Z});var W=this._normalizeResponse(k,K,z,(0,n.default)((0,n.default)({},this._options),{},{path:[].concat((0,a.default)($),[I,String(G)])}),this._useExecTimeResolvers);return{fieldPayloads:x,itemID:V,itemIndex:G,prevIDs:E,relayPayload:W,storageKey:T}},F._registerPlaceholders=function(k,P,U,B,j){for(var $=this,A=function(I){var T=k[I],C=T.label,x=T.path,w=x.map(String).join("."),E=O(C,w);$._placeholders.set(E,T);var q=void 0;T.kind==="stream"?q=T.parentID:q=T.selector.dataID;var G=P.get(q);if(G==null)throw _("NormalizationEngine: Expected record `"+q+"` to exist.");var z=(U??[]).filter(function(ue){var fe=l(ue.dataID,ue.fieldKey);return ue.dataID===q||fe===q}),H=$._parentRecords.get(q);if(H!=null){for(var V=d.update(H.record,G),K=new Map,Z=0;Z<H.fieldPayloads.length;Z++){var re=H.fieldPayloads[Z];K.set(S(re),re)}for(var W=0;W<z.length;W++){var X=z[W];K.set(S(X),X)}$._parentRecords.set(q,{fieldPayloads:Array.from(K.values()),record:V})}else $._parentRecords.set(q,{fieldPayloads:z,record:G});var J=$._bufferedResponses.get(E);if(J!=null){$._bufferedResponses.delete(E);for(var ie=0;ie<J.length;ie++){var ne=J[ie],ae=void 0;T.kind==="defer"?ae=$._processDefer(ne,(y=ne.path)!==null&&y!==void 0?y:[],T):ae=$._processStream(ne,(b=ne.path)!==null&&b!==void 0?b:[],T),ae!=null&&(B.push.apply(B,(0,a.default)(ae.payloads)),j.push.apply(j,(0,a.default)(ae.pendingModules)))}}},R=0;R<k.length;R++){var y,b;A(R)}},F._processFollowups=function(k,P,U){for(var B=0;B<k.length;B++){var j=k[B];j.kind==="ModuleImportPayload"&&this._processModuleImport(j,P,U)}},F._processModuleImport=function(k,P,U){var B=this,j=this._operationLoader;if(j!=null){var $=j.get(k.operationReference);if($!=null){var A=this._normalizeFollowup(k,$);P.push.apply(P,(0,a.default)(A.payloads)),U.push.apply(U,(0,a.default)(A.pendingModules));return}var R={payloads:[],pendingModules:[]};U.push(j.load(k.operationReference).then(function(y){return y!=null?B._normalizeFollowup(k,y):R}).catch(function(y){return R}))}},F._normalizeFollowup=function(k,P){var U=P.kind==="SplitOperation"?P:P.operation,B=c(U,k.dataID,k.variables),j=this._normalizeResponse({data:k.data},B,k.typeName,(0,n.default)((0,n.default)({},this._options),{},{path:k.path}),this._useExecTimeResolvers),$=[],A=[];j.incrementalPlaceholders!=null&&j.incrementalPlaceholders.length>0&&this._registerPlaceholders(j.incrementalPlaceholders,j.source,j.fieldPayloads,$,A),j.followupPayloads!=null&&j.followupPayloads.length>0&&this._processFollowups(j.followupPayloads,$,A);var R=(0,n.default)((0,n.default)({},j),{},{followupPayloads:null,incrementalPlaceholders:null,isFinal:this._computeIsFinal(j.isFinal),isPreNormalized:!0});return{payloads:[R].concat($),pendingModules:A}},F._computeIsFinal=function(k){return(k||this._serverComplete)&&this._bufferedResponses.size===0},M}();function O(M,F){return"".concat(M,"::").concat(F)}return NormalizationEngine_1=N,NormalizationEngine_1}var RelayRecordState_1,hasRequiredRelayRecordState;function requireRelayRecordState(){if(hasRequiredRelayRecordState)return RelayRecordState_1;hasRequiredRelayRecordState=1;var r={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"};return RelayRecordState_1=r,RelayRecordState_1}var RelayRecordSource_1,hasRequiredRelayRecordSource;function requireRelayRecordSource(){if(hasRequiredRelayRecordSource)return RelayRecordSource_1;hasRequiredRelayRecordSource=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireRelayFeatureFlags(),i=requireRelayModernRecord(),o=requireRelayRecordState(),s=requireRelayStoreUtils(),l=s.RELAY_RESOLVER_RECORD_TYPENAME,f=o.EXISTENT,d=o.NONEXISTENT,u=o.UNKNOWN,c=function(){function v(m){var g=this;this._records=new Map,m!=null&&Object.keys(m).forEach(function(_){var S=m[_],N=i.fromObject(S);g._records.set(_,N)})}v.create=function(g){return new v(g)};var h=v.prototype;return h.clear=function(){this._records=new Map},h.delete=function(g){this._records.set(g,null)},h.get=function(g){return this._records.get(g)},h.getRecordIDs=function(){return Array.from(this._records.keys())},h.getStatus=function(g){return this._records.has(g)?this._records.get(g)==null?d:f:u},h.has=function(g){return this._records.has(g)},h.remove=function(g){this._records.delete(g)},h.set=function(g,_){this._records.set(g,_)},h.size=function(){return this._records.size},h.toJSON=function(){var g={},_=(0,n.default)(this._records),S;try{for(_.s();!(S=_.n()).done;){var N=S.value,O=N[0],M=N[1];a.FILTER_OUT_RELAY_RESOLVER_RECORDS&&M!=null&&i.getType(M)===l||(g[O]=i.toJSON(M))}}catch(F){_.e(F)}finally{_.f()}return g},v}();return RelayRecordSource_1=c,RelayRecordSource_1}var ActorIdentifier,hasRequiredActorIdentifier;function requireActorIdentifier(){if(hasRequiredActorIdentifier)return ActorIdentifier;hasRequiredActorIdentifier=1;var r=requireBrowser(),n="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function a(i){i!==n&&r(!1)}return ActorIdentifier={INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:n,assertInternalActorIdentifier:a,getActorIdentifier:function(o){return o},getDefaultActorIdentifier:function(){throw new Error("Not Implemented")}},ActorIdentifier}var ActorUtils,hasRequiredActorUtils;function requireActorUtils(){if(hasRequiredActorUtils)return ActorUtils;hasRequiredActorUtils=1;var r="actor_key",n=requireActorIdentifier(),a=n.getActorIdentifier;function i(o){if(o!=null&&typeof o=="object"&&typeof o[r]=="string")return a(o[r])}return ActorUtils={ACTOR_IDENTIFIER_FIELD_NAME:r,getActorIdentifierFromPayload:i},ActorUtils}var RelayErrorTrie,hasRequiredRelayErrorTrie;function requireRelayErrorTrie(){if(hasRequiredRelayErrorTrie)return RelayErrorTrie;hasRequiredRelayErrorTrie=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireObjectWithoutPropertiesLoose()),i=r(requireCreateForOfIteratorHelper()),o=r(requireToConsumableArray()),s=["path","locations"],l=Symbol("$SELF");function f(v){if(v==null)return null;var h=new Map,m=(0,i.default)(v),g;try{for(m.s();!(g=m.n()).done;){var _=g.value,S=_.path,N=_.locations,O=(0,a.default)(_,s);if(S!=null){var M=S.length;if(M!==0){for(var F=M-1,L=h,k=0;k<F;k++){var P=S[k],U=L.get(P);if(U instanceof Map){L=U;continue}var B=new Map;Array.isArray(U)&&B.set(l,U),L.set(P,B),L=B}var j=S[F],$=L.get(j);$ instanceof Map&&(L=$,$=L.get(j),j=l),Array.isArray($)?$.push(O):L.set(j,[O])}}}}catch(A){m.e(A)}finally{m.f()}return h}function d(v,h){var m=v.get(h);if(m==null)return null;if(Array.isArray(m))return m;var g=[];return u(m,g),g}function u(v,h){var m=(0,i.default)(v),g;try{for(m.s();!(g=m.n()).done;){var _=g.value,S=_[0],N=_[1],O=h.length;if(Array.isArray(N)?h.push.apply(h,(0,o.default)(N)):u(N,h),S!==l)for(var M=h.length,F=O;F<M;F++){var L=h[F];L.path==null?h[F]=(0,n.default)((0,n.default)({},L),{},{path:[S]}):L.path.unshift(S)}}}catch(k){m.e(k)}finally{m.f()}}function c(v,h){var m=v.get(h);return m instanceof Map?m:null}return RelayErrorTrie={SELF:l,buildErrorTrie:f,getErrorsByKey:d,getNestedErrorTrieByKey:c},RelayErrorTrie}var TypeID,hasRequiredTypeID;function requireTypeID(){if(hasRequiredTypeID)return TypeID;hasRequiredTypeID=1;var r="client:__type:",n="__TypeSchema";function a(o){return r+o}function i(o){return o.indexOf(r)===0}return TypeID={generateTypeID:a,isTypeID:i,TYPE_SCHEMA_TYPE:n},TypeID}var RelayResponseNormalizer_1,hasRequiredRelayResponseNormalizer;function requireRelayResponseNormalizer(){if(hasRequiredRelayResponseNormalizer)return RelayResponseNormalizer_1;hasRequiredRelayResponseNormalizer=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=r(requireToConsumableArray()),i=requireActorUtils();i.ACTOR_IDENTIFIER_FIELD_NAME;var o=i.getActorIdentifierFromPayload,s=requireRelayFeatureFlags(),l=requireClientID(),f=l.generateClientID,d=l.isClientID,u=requireRelayConcreteVariables(),c=u.getLocalVariables,v=requireRelayErrorTrie(),h=v.buildErrorTrie,m=v.getErrorsByKey,g=v.getNestedErrorTrieByKey,_=requireRelayModernRecord(),S=requireRelayModernSelector(),N=S.createNormalizationSelector,O=requireRelayStoreUtils(),M=O.ROOT_ID,F=O.ROOT_TYPE,L=O.TYPENAME_KEY,k=O.getArgumentValues,P=O.getHandleStorageKey,U=O.getModuleComponentKey,B=O.getModuleOperationKey,j=O.getStorageKey,$=requireTypeID(),A=$.TYPE_SCHEMA_TYPE,R=$.generateTypeID;requireAreEqual();var y=requireBrowser();requireWarning();function b(I,T,C,x,w,E){var q=T.dataID,G=T.node,z=T.variables,H=new D(I,z,x,E??!1);return H.normalizeResponse(G,q,C,w)}var D=function(){function I(C,x,w,E){this._actorIdentifier=w.actorIdentifier,this._getDataId=w.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=w.treatMissingFieldsAsNull,this._deferDeduplicatedFields=w.deferDeduplicatedFields,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=E,this._followupPayloads=[],this._path=w.path?(0,a.default)(w.path):[],this._recordSource=C,this._variables=x,this._shouldProcessClientComponents=w.shouldProcessClientComponents,this._log=w.log,this._s2cExecutions=new Map}var T=I.prototype;return T.normalizeResponse=function(x,w,E,q){var G=this._recordSource.get(w);return G||y(!1),this._assignClientAbstractTypes(x),this._errorTrie=h(q),this._traverseSelections(x,G,E),{errors:q,fieldPayloads:this._handleFieldPayloads,followupPayloads:this._followupPayloads,incrementalPlaceholders:this._incrementalPlaceholders,isFinal:!1,s2cExecutions:this._s2cExecutions.size>0?Array.from(this._s2cExecutions.entries()).map(function(z){var H=z[0],V=z[1];return{recordID:H,selections:V.selections,typeName:V.typeName}}):void 0,source:this._recordSource}},T._assignClientAbstractTypes=function(x){var w=x.clientAbstractTypes;if(w!=null)for(var E=0,q=Object.keys(w);E<q.length;E++){var G=q[E],z=(0,n.default)(w[G]),H;try{for(z.s();!(H=z.n()).done;){var V=H.value,K=R(V),Z=this._recordSource.get(K);Z==null&&(Z=_.create(K,A),this._recordSource.set(K,Z)),_.setValue(Z,G,!0)}}catch(re){z.e(re)}finally{z.f()}}},T._getVariableValue=function(x){return this._variables.hasOwnProperty(x)||y(!1),this._variables[x]},T._getRecordType=function(x){var w=x[L];return w==null&&y(!1),w},T._traverseSelections=function(x,w,E){for(var q,G,z=0;z<x.selections.length;z++){var H=x.selections[z];switch(H.kind){case"ScalarField":case"LinkedField":this._normalizeField(H,w,E);break;case"Condition":var V=!!this._getVariableValue(H.condition);V===H.passingValue&&this._traverseSelections(H,w,E);break;case"FragmentSpread":{var K=this._variables;this._variables=c(this._variables,H.fragment.argumentDefinitions,H.args),this._traverseSelections(H.fragment,w,E),this._variables=K;break}case"InlineFragment":{this._normalizeInlineFragment(H,w,E);break}case"TypeDiscriminator":{var Z=H.abstractKey,re=Object.prototype.hasOwnProperty.call(E,Z),W=_.getType(w),X=R(W),J=this._recordSource.get(X);J==null&&(J=_.create(X,A),this._recordSource.set(X,J)),_.setValue(J,Z,re);break}case"LinkedHandle":case"ScalarHandle":var ie=H.args?k(H.args,this._variables):{},ne=j(H,this._variables),ae=P(H,this._variables);this._handleFieldPayloads.push({args:ie,dataID:_.getDataID(w),fieldKey:ne,handle:H.handle,handleArgs:H.handleArgs?k(H.handleArgs,this._variables):{},handleKey:ae});break;case"ModuleImport":this._normalizeModuleImport(H,w,E);break;case"Defer":this._normalizeDefer(H,w,E);break;case"Stream":this._normalizeStream(H,w,E);break;case"ClientExtension":var ue=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(H,w,E),this._isClientExtension=ue;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(H.fragment,w,E);break;case"ActorChange":this._normalizeActorChange(H,w,E);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers?((q=H.resolverInfo)===null||q===void 0?void 0:q.rootFragment)!=null&&this._collectS2CExecution(H,w):this._normalizeResolver(H,w,E);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers?((G=H.backingField.resolverInfo)===null||G===void 0?void 0:G.rootFragment)!=null&&this._collectS2CExecution(H,w):this._normalizeResolver(H.backingField,w,E);break;default:y(!1)}}},T._normalizeInlineFragment=function(x,w,E){var q=x.abstractKey;if(q==null){var G=_.getType(w);(G===x.type||G===F)&&this._traverseSelections(x,w,E)}else{var z=Object.prototype.hasOwnProperty.call(E,q),H=_.getType(w),V=R(H),K=this._recordSource.get(V);K==null&&(K=_.create(V,A),this._recordSource.set(V,K)),_.setValue(K,q,z),z&&this._traverseSelections(x,w,E)}},T._normalizeResolver=function(x,w,E){x.fragment!=null&&this._normalizeInlineFragment(x.fragment,w,E)},T._collectS2CExecution=function(x,w){var E=_.getDataID(w),q=_.getType(w),G=this._s2cExecutions.get(E);G==null&&(G={selections:[],typeName:q},this._s2cExecutions.set(E,G)),G.selections.push(x)},T._normalizeDefer=function(x,w,E){var q=x.if===null||this._getVariableValue(x.if);q===!1?this._traverseSelections(x,w,E):this._incrementalPlaceholders.push({actorIdentifier:this._actorIdentifier,data:E,kind:"defer",label:x.label,path:(0,a.default)(this._path),selector:N(x,_.getDataID(w),this._variables),typeName:_.getType(w)})},T._normalizeStream=function(x,w,E){this._traverseSelections(x,w,E);var q=x.if===null||this._getVariableValue(x.if);q===!0&&this._incrementalPlaceholders.push({actorIdentifier:this._actorIdentifier,kind:"stream",label:x.label,node:x,parentID:_.getDataID(w),path:(0,a.default)(this._path),variables:this._variables})},T._normalizeModuleImport=function(x,w,E){typeof E=="object"&&E||y(!1);var q=_.getType(w),G=U(x.documentName),z=x.componentModuleProvider||E[G];_.setValue(w,G,z??null);var H=B(x.documentName),V=x.operationModuleProvider||E[H];_.setValue(w,H,V??null),V!=null&&this._followupPayloads.push({actorIdentifier:this._actorIdentifier,args:x.args,data:E,dataID:_.getDataID(w),kind:"ModuleImportPayload",operationReference:V,path:(0,a.default)(this._path),typeName:q,variables:this._variables})},T._normalizeField=function(x,w,E){typeof E=="object"&&E||y(!1);var q=x.alias||x.name,G=j(x,this._variables),z=E[q],H=s.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(z)&&z.length===0;if(z==null||H){if(z===void 0){var V=this._isClientExtension||this._isUnmatchedAbstractType||this._deferDeduplicatedFields;if(V)return;if(!this._treatMissingFieldsAsNull)return}x.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(w,G,null),H?x.kind==="LinkedField"?_.setLinkedRecordIDs(w,G,[]):_.setValue(w,G,[]):_.setValue(w,G,null);var K=this._errorTrie;if(K!=null){var Z=m(K,q);Z!=null&&_.setErrors(w,G,Z)}return}if(x.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(w,G,z),_.setValue(w,G,z);else if(x.kind==="LinkedField"){this._path.push(q);var re=this._errorTrie;this._errorTrie=re==null?null:g(re,q),x.plural?this._normalizePluralLink(x,w,G,z):this._normalizeLink(x,w,G,z),this._errorTrie=re,this._path.pop()}else y(!1)},T._normalizeActorChange=function(x,w,E){var q,G=x.linkedField;typeof E=="object"&&E||y(!1);var z=G.alias||G.name,H=j(G,this._variables),V=E[z];if(V==null){if(V===void 0){var K=this._isClientExtension||this._isUnmatchedAbstractType;if(K)return;if(!this._treatMissingFieldsAsNull)return}_.setValue(w,H,null);return}var Z=o(V);if(Z==null){_.setValue(w,H,null);return}var re=(q=G.concreteType)!==null&&q!==void 0?q:this._getRecordType(V),W=this._getDataId(V,re)||_.getLinkedRecordID(w,H)||f(_.getDataID(w),H);typeof W!="string"&&y(!1),_.setActorLinkedRecordID(w,H,Z,W),this._followupPayloads.push({actorIdentifier:Z,data:V,dataID:W,kind:"ActorPayload",node:G,path:[].concat((0,a.default)(this._path),[z]),typeName:re,variables:this._variables})},T._normalizeLink=function(x,w,E,q){var G;typeof q=="object"&&q||y(!1);var z=this._getDataId(q,(G=x.concreteType)!==null&&G!==void 0?G:this._getRecordType(q))||_.getLinkedRecordID(w,E)||f(_.getDataID(w),E);typeof z!="string"&&y(!1),this._validateConflictingLinkedFieldsWithIdenticalId(_.getLinkedRecordID(w,E),z,E),_.setLinkedRecordID(w,E,z);var H=this._recordSource.get(z);if(H)this._validateRecordType(H,x,q);else{var V=x.concreteType||this._getRecordType(q);H=_.create(z,V),this._recordSource.set(z,H)}this._traverseSelections(x,H,q)},T._normalizePluralLink=function(x,w,E,q){var G=this;Array.isArray(q)||y(!1);var z=_.getLinkedRecordIDs(w,E),H=[];q.forEach(function(V,K){var Z;if(V==null){H.push(V);return}G._path.push(String(K));var re=G._errorTrie;G._errorTrie=re==null?null:g(re,K),typeof V!="object"&&y(!1);var W=G._getDataId(V,(Z=x.concreteType)!==null&&Z!==void 0?Z:G._getRecordType(V))||z&&z[K]||f(_.getDataID(w),E,K);typeof W!="string"&&y(!1),H.push(W);var X=G._recordSource.get(W);if(X)G._validateRecordType(X,x,V);else{var J=x.concreteType||G._getRecordType(V);X=_.create(W,J),G._recordSource.set(W,X)}z&&G._validateConflictingLinkedFieldsWithIdenticalId(z[K],W,E),G._traverseSelections(x,X,V),G._errorTrie=re,G._path.pop()}),_.setLinkedRecordIDs(w,E,H)},T._validateRecordType=function(x,w,E){if(s.ENABLE_STORE_ID_COLLISION_LOGGING){var q,G=(q=w.concreteType)!==null&&q!==void 0?q:this._getRecordType(E),z=_.getDataID(x),H=d(z)&&z!==M||_.getType(x)===G;if(!H){var V={name:"idCollision.typename",new_typename:G,previous_typename:_.getType(x)};this._log!=null&&this._log(V)}}},T._validateConflictingFieldsWithIdenticalId=function(x,w,E){},T._validateConflictingLinkedFieldsWithIdenticalId=function(x,w,E){},I}();return RelayResponseNormalizer_1={normalize:b},RelayResponseNormalizer_1}var normalizeResponse_1,hasRequiredNormalizeResponse;function requireNormalizeResponse(){if(hasRequiredNormalizeResponse)return normalizeResponse_1;hasRequiredNormalizeResponse=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireRelayModernRecord()),i=r(requireRelayRecordSource()),o=r(requireRelayResponseNormalizer());function s(l,f,d,u,c){var v,h=l.data,m=l.errors,g=i.default.create(),_=a.default.create(f.dataID,d);g.set(f.dataID,_);var S=o.default.normalize(g,f,h,u,m,c);return(0,n.default)((0,n.default)({},S),{},{isFinal:((v=l.extensions)===null||v===void 0?void 0:v.is_final)===!0})}return normalizeResponse_1=s,normalizeResponse_1}var readInlineData_1,hasRequiredReadInlineData;function requireReadInlineData(){if(hasRequiredReadInlineData)return readInlineData_1;hasRequiredReadInlineData=1;var r=requireGraphQLTag(),n=r.getInlineDataFragment,a=requireRelayStoreUtils(),i=a.FRAGMENTS_KEY,o=requireBrowser();function s(l,f){var d,u=n(l);if(f==null)return f;typeof f!="object"&&o(!1);var c=(d=f[i])===null||d===void 0?void 0:d[u.name];return c==null&&o(!1),c}return readInlineData_1=s,readInlineData_1}var generateID_1,hasRequiredGenerateID;function requireGenerateID(){if(hasRequiredGenerateID)return generateID_1;hasRequiredGenerateID=1;var r=1e5;function n(){return r++}return generateID_1=n,generateID_1}var wrapNetworkWithLogObserver_1,hasRequiredWrapNetworkWithLogObserver;function requireWrapNetworkWithLogObserver(){if(hasRequiredWrapNetworkWithLogObserver)return wrapNetworkWithLogObserver_1;hasRequiredWrapNetworkWithLogObserver=1;var r=requireGenerateID();function n(a,i){return{execute:function(s,l,f,d,u,c,v,h){var m=r(),g={start:function(N){a.__log({name:"network.start",networkRequestId:m,params:s,variables:l,cacheConfig:f})},next:function(N){a.__log({name:"network.next",networkRequestId:m,response:N})},error:function(N){a.__log({name:"network.error",networkRequestId:m,error:N})},complete:function(){a.__log({name:"network.complete",networkRequestId:m})},unsubscribe:function(){a.__log({name:"network.unsubscribe",networkRequestId:m})}},_=function(N){a.__log({name:"network.info",networkRequestId:m,info:N})};return i.execute(s,l,f,d,_,c,v,h).do(g)}}}return wrapNetworkWithLogObserver_1=n,wrapNetworkWithLogObserver_1}var RelayOperationTracker_1,hasRequiredRelayOperationTracker;function requireRelayOperationTracker(){if(hasRequiredRelayOperationTracker)return RelayOperationTracker_1;hasRequiredRelayOperationTracker=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireBrowser(),i=function(){function o(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var s=o.prototype;return s.update=function(f,d){if(d.size!==0){var u=f.identifier,c=new Set,v=(0,n.default)(d),h;try{for(v.s();!(h=v.n()).done;){var m=h.value,g=m.identifier,_=this._ownersToPendingOperations.get(g);_!=null?_.has(u)||(_.set(u,f),c.add(g)):(this._ownersToPendingOperations.set(g,new Map([[u,f]])),c.add(g))}}catch(F){v.e(F)}finally{v.f()}if(c.size!==0){var S=this._pendingOperationsToOwners.get(u)||new Set,N=(0,n.default)(c),O;try{for(N.s();!(O=N.n()).done;){var M=O.value;this._resolveOwnerResolvers(M),S.add(M)}}catch(F){N.e(F)}finally{N.f()}this._pendingOperationsToOwners.set(u,S)}}},s.complete=function(f){var d=f.identifier,u=this._pendingOperationsToOwners.get(d);if(u!=null){var c=new Set,v=new Set,h=(0,n.default)(u),m;try{for(h.s();!(m=h.n()).done;){var g=m.value,_=this._ownersToPendingOperations.get(g);_&&(_.delete(d),_.size>0?v.add(g):c.add(g))}}catch(k){h.e(k)}finally{h.f()}var S=(0,n.default)(c),N;try{for(S.s();!(N=S.n()).done;){var O=N.value;this._resolveOwnerResolvers(O),this._ownersToPendingOperations.delete(O)}}catch(k){S.e(k)}finally{S.f()}var M=(0,n.default)(v),F;try{for(M.s();!(F=M.n()).done;){var L=F.value;this._resolveOwnerResolvers(L)}}catch(k){M.e(k)}finally{M.f()}this._pendingOperationsToOwners.delete(d)}},s._resolveOwnerResolvers=function(f){var d=this._ownersToPendingPromise.get(f);d?.resolve(),this._ownersToPendingPromise.delete(f)},s.getPendingOperationsAffectingOwner=function(f){var d=f.identifier,u=this._ownersToPendingOperations.get(d);if(u==null||u.size===0)return null;var c=this._ownersToPendingPromise.get(d);if(c!=null)return{promise:c.promise,pendingOperations:c.pendingOperations};var v,h=new Promise(function(g){v=g});v==null&&a(!1);var m=Array.from(u.values());return this._ownersToPendingPromise.set(d,{promise:h,resolve:v,pendingOperations:m}),{promise:h,pendingOperations:m}},o}();return RelayOperationTracker_1=i,RelayOperationTracker_1}var registerEnvironmentWithDevTools_1,hasRequiredRegisterEnvironmentWithDevTools;function requireRegisterEnvironmentWithDevTools(){if(hasRequiredRegisterEnvironmentWithDevTools)return registerEnvironmentWithDevTools_1;hasRequiredRegisterEnvironmentWithDevTools=1;function r(n){var a=typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:void 0,i=a&&a.__RELAY_DEVTOOLS_HOOK__;i&&i.registerEnvironment(n)}return registerEnvironmentWithDevTools_1=r,registerEnvironmentWithDevTools_1}var defaultRelayFieldLogger_1,hasRequiredDefaultRelayFieldLogger;function requireDefaultRelayFieldLogger(){if(hasRequiredDefaultRelayFieldLogger)return defaultRelayFieldLogger_1;hasRequiredDefaultRelayFieldLogger=1;var r=function(a){};return defaultRelayFieldLogger_1=r,defaultRelayFieldLogger_1}var getOperation_1,hasRequiredGetOperation;function requireGetOperation(){if(hasRequiredGetOperation)return getOperation_1;hasRequiredGetOperation=1;var r=requireRelayConcreteNode(),n=r.REQUEST,a=r.SPLIT_OPERATION;function i(o){switch(o.kind){case n:return o.operation;case a:default:return o}}return getOperation_1=i,getOperation_1}var RelayError,hasRequiredRelayError;function requireRelayError(){if(hasRequiredRelayError)return RelayError;hasRequiredRelayError=1;function r(n,a,i){for(var o,s=arguments.length,l=new Array(s>3?s-3:0),f=3;f<s;f++)l[f-3]=arguments[f];var d=0,u=i.replace(/%s/g,function(){return String(l[d++])}),c=new Error(u),v=(o=l[2])!==null&&o!==void 0?o:null,h=Object.assign(c,{name:a,messageFormat:i,messageParams:l,type:n,operation:v,taalOpcodes:[2,2]});if(h.stack===void 0)try{throw h}catch{}return h}return RelayError={create:function(a,i){for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return r.apply(void 0,["error",a,i].concat(s))},createWarning:function(a,i){for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return r.apply(void 0,["warn",a,i].concat(s))}},RelayError}var withStartAndDuration_1,hasRequiredWithStartAndDuration;function requireWithStartAndDuration(){if(hasRequiredWithStartAndDuration)return withStartAndDuration_1;hasRequiredWithStartAndDuration=1;var r,n,a=typeof window<"u"&&typeof((r=window)===null||r===void 0||(n=r.performance)===null||n===void 0?void 0:n.now)=="function";function i(){return a?window.performance.now():Date.now()}function o(s){var l=i(),f=s();return[l,i()-l,f]}return withStartAndDuration_1=o,withStartAndDuration_1}var OperationExecutor,hasRequiredOperationExecutor;function requireOperationExecutor(){if(hasRequiredOperationExecutor)return OperationExecutor;hasRequiredOperationExecutor=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=r(requireToConsumableArray()),i=requireRelayObservable(),o=requireGenerateID(),s=requireGetOperation(),l=requireRelayError(),f=requireRelayFeatureFlags(),d=requireStableCopy(),u=d.stableCopy,c=requireWithStartAndDuration(),v=requireClientID(),h=v.generateClientID,m=v.generateUniqueClientID,g=requireRelayConcreteVariables(),_=g.getLocalVariables,S=requireRelayModernRecord(),N=requireRelayModernSelector(),O=N.createNormalizationSelector,M=N.createReaderSelector,F=requireRelayRecordSource(),L=requireRelayStoreUtils(),k=L.ROOT_TYPE,P=L.TYPENAME_KEY,U=L.getStorageKey,B=requireBrowser(),j=requireWarning();function $(D){return new A(D)}var A=function(){function D(T){var C=this,x,w,E,q=T.actorIdentifier,G=T.getDataID,z=T.getPublishQueue,H=T.getStore,V=T.isClientPayload,K=T.operation,Z=T.operationExecutions,re=T.operationLoader,W=T.operationTracker,X=T.optimisticConfig,J=T.scheduler,ie=T.shouldProcessClientComponents,ne=T.sink,ae=T.source,ue=T.treatMissingFieldsAsNull,fe=T.deferDeduplicatedFields,se=T.updater,pe=T.log,ce=T.normalizeResponse;this._actorIdentifier=q,this._getDataID=G,this._treatMissingFieldsAsNull=ue,this._deferDeduplicatedFields=fe,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=pe,this._executeId=o(),this._nextSubscriptionId=0,this._operation=K,this._operationExecutions=Z,this._operationLoader=re,this._operationTracker=W,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(x=(w=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&w!==void 0?w:((E=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||E===void 0?void 0:E.get())===!0)!==null&&x!==void 0?x:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=z,this._scheduler=J,this._sink=ne,this._source=new Map,this._state="started",this._getStore=H,this._subscriptions=new Map,this._updater=se,this._isClientPayload=V===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=ie,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=ce,this._isClientQuery=this._operation.request.node.params.id==null&&this._operation.request.node.params.text==null;var he=this._nextSubscriptionId++;f.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&X!=null&&this._processOptimisticResponse(X.response!=null?{data:X.response}:null,X.updater,!1),ae.subscribe({complete:function(){return C._complete(he)},error:function(ye){return C._error(ye)},next:function(ye){try{C._next(he,ye)}catch(be){ne.error(be)}},start:function(ye){var be;C._start(he,ye),C._log({cacheConfig:(be=C._operation.request.cacheConfig)!==null&&be!==void 0?be:{},executeId:C._executeId,name:"execute.start",params:C._operation.request.node.params,variables:C._operation.request.variables})},unsubscribe:function(){C._log({executeId:C._executeId,name:"execute.unsubscribe"})}}),!f.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&X!=null&&this._processOptimisticResponse(X.response!=null?{data:X.response}:null,X.updater,!1)}var I=D.prototype;return I.cancel=function(){var C=this;if(this._state!=="completed"){this._state="completed",this._operationExecutions.delete(this._operation.request.identifier),this._subscriptions.size!==0&&(this._subscriptions.forEach(function(w){return w.unsubscribe()}),this._subscriptions.clear());var x=this._optimisticUpdates;x!==null&&(this._optimisticUpdates=null,x.forEach(function(w){return C._getPublishQueueAndSaveActor().revertUpdate(w)}),this._runPublishQueue()),this._incrementalResults.clear(),this._asyncStoreUpdateDisposable!=null&&(this._asyncStoreUpdateDisposable.dispose(),this._asyncStoreUpdateDisposable=null),this._completeFns=[],this._completeOperationTracker(),this._disposeRetainedData()}},I._updateActiveState=function(){var C;switch(this._state){case"started":{C="active";break}case"loading_incremental":{C="active";break}case"completed":{C="inactive";break}case"loading_final":{C=this._pendingModulePayloadsCount>0||this._useExecTimeResolvers&&!this._execTimeResolverResponseComplete?"active":"inactive";break}default:this._state,B(!1)}this._operationExecutions.set(this._operation.request.identifier,C)},I._schedule=function(C,x){var w=this,E=this._scheduler;if(E!=null){var q=this._nextSubscriptionId++;i.create(function(G){var z=E.schedule(function(){try{C(),G.complete()}catch(H){G.error(H)}},x);return function(){return E.cancel(z)}}).subscribe({complete:function(){return w._complete(q)},error:function(z){return w._error(z)},start:function(z){return w._start(q,z)}})}else C()},I._complete=function(C){this._subscriptions.delete(C),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({executeId:this._executeId,name:"execute.complete"}))},I._error=function(C){this.cancel(),this._sink.error(C),this._log({error:C,executeId:this._executeId,name:"execute.error"})},I._start=function(C,x){this._subscriptions.set(C,x),this._updateActiveState()},I._next=function(C,x){var w=this,E=this._state==="loading_incremental"?"low":"default";this._schedule(function(){if(!Array.isArray(x)&&x.isPreNormalized===!0){w._handlePreNormalizedPayload(x);return}var q=x;w._log({executeId:w._executeId,name:"execute.next.start",operation:w._operation,response:q}),w._handleNext(q),w._maybeCompleteSubscriptionOperationTracking(),w._log({executeId:w._executeId,name:"execute.next.end",operation:w._operation,response:q})},E)},I._handleErrorResponse=function(C){var x=this,w=[];return C.forEach(function(E){if(!(E.data===null&&E.extensions!=null&&!E.hasOwnProperty("errors")))if(E.data==null){var q=E.hasOwnProperty("errors")&&E.errors!=null?E.errors:null,G=q?q.map(function(V){var K=V.message;return K}).join(`
65
+ `):"(No errors)",z=l.create("RelayNetwork","No data returned for operation `"+x._operation.request.node.params.name+"`, got error(s):\n"+G+"\n\nSee the error `source` property for more information.");throw z.source={errors:q,operation:x._operation.request.node,variables:x._operation.request.variables},z.stack,z}else{var H=E;w.push(H)}}),w},I._handleOptimisticResponses=function(C){var x;if(C.length>1)return C.some(function(q){var G;return((G=q.extensions)===null||G===void 0?void 0:G.isOptimistic)===!0})&&B(!1),!1;var w=C[0],E=((x=w.extensions)===null||x===void 0?void 0:x.isOptimistic)===!0;return E&&this._state!=="started"&&B(!1),E?(this._processOptimisticResponse(w,null,this._treatMissingFieldsAsNull),this._sink.next(w),!0):!1},I._handlePreNormalizedPayload=function(C){var x=this,w;if(this._state!=="completed"){this._seenActors.clear(),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(q){return x._getPublishQueueAndSaveActor().revertUpdate(q)}),this._optimisticUpdates=null),this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,(w=C.storeUpdater)!==null&&w!==void 0?w:this._updater),C.isFinal?this._state="loading_final":this._state==="started"&&(this._state="loading_incremental");var E=this._runPublishQueue(this._operation);this._updateActiveState(),this._updateOperationTracker(E)}},I._handleNext=function(C){if(this._state!=="completed"){this._seenActors.clear();var x=Array.isArray(C)?C:[C],w=this._handleErrorResponse(x);if(w.length===0){var E=x.some(function(ce){var he;return((he=ce.extensions)===null||he===void 0?void 0:he.is_final)===!0});E&&(this._useExecTimeResolvers&&this._state!=="loading_final"&&x.some(function(ce){var he;return((he=ce.extensions)===null||he===void 0?void 0:he.is_normalized)===!0})?(this._execTimeResolverResponseComplete=!0,!this._isClientQuery&&x.some(function(ce){var he;return((he=ce.extensions)===null||he===void 0?void 0:he.is_client_only)===!0})&&(this._isClientQuery=!0),this._isClientQuery&&(this._state="loading_final"),this._updateActiveState()):(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1)),this._sink.next(C);return}var q=this._handleOptimisticResponses(w);if(!q){var G=R(w),z=G[0],H=G[1],V=G[2],K=z.length>0,Z=V.length>0;if(K){if(this._isSubscriptionOperation){var re=m();this._operation={fragment:M(this._operation.fragment.node,re,this._operation.fragment.variables,this._operation.fragment.owner),request:this._operation.request,root:O(this._operation.root.node,re,this._operation.root.variables)}}var W=this._processResponses(z);this._processPayloadFollowups(W)}if(Z)for(var X=[],J=0;J<V.length;J++){var ie,ne,ae=V[J],ue=new F(ae.data),E=((ie=ae.extensions)===null||ie===void 0?void 0:ie.is_final)===!0;((ne=ae.extensions)===null||ne===void 0?void 0:ne.is_client_only)===!0&&(this._isClientQuery=!0);var fe={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:E,source:ue};this._getPublishQueueAndSaveActor().commitPayload(this._operation,fe,this._updater),X.push(fe),this._execTimeResolverResponseComplete=E,E&&(this._isClientQuery&&(this._state="loading_final"),this._updateActiveState())}if(H.length>0){var se=this._processIncrementalResponses(H);this._processPayloadFollowups(se)}this._isSubscriptionOperation&&(w[0].extensions==null?w[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:w[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var pe=this._runPublishQueue(K||Z?this._operation:void 0);K&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(pe),this._sink.next(C)}}},I._processOptimisticResponse=function(C,x,w){var E=this;if(this._optimisticUpdates!==null&&B(!1),!(C==null&&x==null)){var q=[];if(C){var G=this._normalizeResponse(C,this._operation.root,k,{actorIdentifier:this._actorIdentifier,deferDeduplicatedFields:!1,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:w},this._useExecTimeResolvers);b(G),q.push({operation:this._operation,payload:G,updater:x}),this._processOptimisticFollowups(G,q)}else x&&q.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,followupPayloads:null,incrementalPlaceholders:null,isFinal:!1,source:F.create()},updater:x});this._optimisticUpdates=q,q.forEach(function(H){return E._getPublishQueueAndSaveActor().applyUpdate(H)});var z=this._runPublishQueue();f.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(z)}},I._processOptimisticFollowups=function(C,x){if(C.followupPayloads&&C.followupPayloads.length){var w=C.followupPayloads,E=(0,n.default)(w),q;try{for(E.s();!(q=E.n()).done;){var G=q.value;switch(G.kind){case"ModuleImportPayload":var z=this._expectOperationLoader(),H=z.get(G.operationReference);if(H==null)this._processAsyncOptimisticModuleImport(G);else{var V=this._processOptimisticModuleImport(H,G);x.push.apply(x,(0,a.default)(V))}break;case"ActorPayload":break;default:B(!1)}}}catch(K){E.e(K)}finally{E.f()}}},I._normalizeFollowupPayload=function(C,x){var w;x.kind==="SplitOperation"&&C.kind==="ModuleImportPayload"?w=_(C.variables,x.argumentDefinitions,C.args):w=C.variables;var E=O(x,C.dataID,w),q={data:C.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(q,E,C.typeName,{actorIdentifier:this._actorIdentifier,deferDeduplicatedFields:!1,getDataID:this._getDataID,log:this._log,path:C.path,shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull},this._useExecTimeResolvers)},I._processOptimisticModuleImport=function(C,x){var w=s(C),E=[],q=this._normalizeFollowupPayload(x,w);return b(q),E.push({operation:this._operation,payload:q,updater:null}),this._processOptimisticFollowups(q,E),E},I._processAsyncOptimisticModuleImport=function(C){var x=this;this._expectOperationLoader().load(C.operationReference).then(function(w){if(!(w==null||x._state!=="started")){var E=x._processOptimisticModuleImport(w,C);if(E.forEach(function(G){return x._getPublishQueueAndSaveActor().applyUpdate(G)}),x._optimisticUpdates!=null){var q;(q=x._optimisticUpdates).push.apply(q,(0,a.default)(E)),x._runPublishQueue()}}})},I._processResponses=function(C){var x=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(w){x._getPublishQueueAndSaveActor().revertUpdate(w)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),C.map(function(w){var E=x._normalizeResponse(w,x._operation.root,k,{actorIdentifier:x._actorIdentifier,deferDeduplicatedFields:!1,getDataID:x._getDataID,log:x._log,path:[],shouldProcessClientComponents:x._shouldProcessClientComponents,treatMissingFieldsAsNull:x._treatMissingFieldsAsNull},x._useExecTimeResolvers);return x._getPublishQueueAndSaveActor().commitPayload(x._operation,E,x._updater),x._log({name:"execute.normalize.end",operation:x._operation}),E})},I._processPayloadFollowups=function(C){var x=this;this._state!=="completed"&&C.forEach(function(w){var E=w.incrementalPlaceholders,q=w.followupPayloads,G=w.isFinal;if(x._state=G?"loading_final":"loading_incremental",x._updateActiveState(),G&&(x._incrementalPayloadsPending=!1),q&&q.length!==0&&q.forEach(function(H){var V,K=x._actorIdentifier;x._actorIdentifier=(V=H.actorIdentifier)!==null&&V!==void 0?V:x._actorIdentifier,x._processFollowupPayload(H),x._actorIdentifier=K}),E&&E.length!==0&&(x._incrementalPayloadsPending=x._state!=="loading_final",E.forEach(function(H){var V,K=x._actorIdentifier;x._actorIdentifier=(V=H.actorIdentifier)!==null&&V!==void 0?V:x._actorIdentifier,x._processIncrementalPlaceholder(w,H),x._actorIdentifier=K}),x._isClientPayload||x._state==="loading_final")){var z=[];E.forEach(function(H){H.kind==="defer"&&z.push(x._processDeferResponse(H.label,H.path,H,{data:H.data,extensions:{is_final:!0}}))}),z.length>0&&x._processPayloadFollowups(z)}})},I._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},I._processFollowupPayload=function(C){var x=this;switch(C.kind){case"ModuleImportPayload":var w=this._expectOperationLoader(),E=w.get(C.operationReference);if(E!=null)this._processFollowupPayloadWithNormalizationNode(C,s(E));else{var q=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var G=function(){x._pendingModulePayloadsCount--,x._maybeCompleteSubscriptionOperationTracking()},z=i.from(new Promise(function(H,V){w.load(C.operationReference).then(H,V)}));i.create(function(H){var V,K=z.subscribe({error:H.error,next:function(re){if(re!=null){var W=function(){try{var ie=s(re),ne=f.BATCH_ASYNC_MODULE_UPDATES_FN,ae=ne!=null&&x._pendingModulePayloadsCount>1,ue=c(function(){if(x._handleFollowupPayload(C,ie),ae)x._scheduleAsyncStoreUpdate(ne,H.complete);else{var pe=x._runPublishQueue();x._updateOperationTracker(pe)}}),fe=ue[0],se=ue[1];x._log({duration:se,executeId:x._executeId,name:"execute.async.module",operationName:ie.name}),ae||H.complete()}catch(pe){H.error(pe)}},X=x._scheduler;X==null?W():V=X.schedule(W)}else H.complete()}});return function(){K.unsubscribe(),x._scheduler!=null&&V!=null&&x._scheduler.cancel(V)}}).subscribe({complete:function(){x._complete(q),G()},error:function(V){x._error(V),G()},start:function(V){return x._start(q,V)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(C,C.node);break;default:B(!1)}},I._processFollowupPayloadWithNormalizationNode=function(C,x){this._handleFollowupPayload(C,x),this._maybeCompleteSubscriptionOperationTracking()},I._handleFollowupPayload=function(C,x){var w=this._normalizeFollowupPayload(C,x);this._getPublishQueueAndSaveActor().commitPayload(this._operation,w),this._processPayloadFollowups([w])},I._processIncrementalPlaceholder=function(C,x){var w,E=x.label,q=x.path,G=q.map(String).join("."),z=this._incrementalResults.get(E);z==null&&(z=new Map,this._incrementalResults.set(E,z));var H=z.get(G),V=H!=null&&H.kind==="response"?H.responses:null;z.set(G,{kind:"placeholder",placeholder:x});var K;x.kind==="stream"?K=x.parentID:x.kind==="defer"?K=x.selector.dataID:B(!1);var Z=C.source.get(K),re=((w=C.fieldPayloads)!==null&&w!==void 0?w:[]).filter(function(ue){var fe=h(ue.dataID,ue.fieldKey);return ue.dataID===K||fe===K});Z==null&&B(!1);var W,X,J=this._source.get(K);if(J!=null){W=S.update(J.record,Z);var ie=new Map,ne=function(fe){var se=y(fe);ie.set(se,fe)};J.fieldPayloads.forEach(ne),re.forEach(ne),X=Array.from(ie.values())}else W=Z,X=re;if(this._source.set(K,{fieldPayloads:X,record:W}),V!=null){var ae=this._processIncrementalResponses(V);this._processPayloadFollowups(ae)}},I._processIncrementalResponses=function(C){var x=this,w=[];return C.forEach(function(E){var q=E.label,G=E.path,z=E.response,H=x._incrementalResults.get(q);if(H==null&&(H=new Map,x._incrementalResults.set(q,H)),q.indexOf("$defer$")!==-1){var V=G.map(String).join("."),K=H.get(V);if(K==null){K={kind:"response",responses:[E]},H.set(V,K);return}else if(K.kind==="response"){K.responses.push(E);return}var Z=K.placeholder;Z.kind!=="defer"&&B(!1),w.push(x._processDeferResponse(q,G,Z,z))}else{var re=G.slice(0,-2).map(String).join("."),W=H.get(re);if(W==null){W={kind:"response",responses:[E]},H.set(re,W);return}else if(W.kind==="response"){W.responses.push(E);return}var X=W.placeholder;X.kind!=="stream"&&B(!1),w.push(x._processStreamResponse(q,G,X,z))}}),w},I._processDeferResponse=function(C,x,w,E){var q,G=w.selector.dataID,z=this._actorIdentifier;this._actorIdentifier=(q=w.actorIdentifier)!==null&&q!==void 0?q:this._actorIdentifier;var H=this._normalizeResponse(E,w.selector,w.typeName,{actorIdentifier:this._actorIdentifier,deferDeduplicatedFields:this._deferDeduplicatedFields,getDataID:this._getDataID,log:this._log,path:w.path,shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,H);var V=this._source.get(G);V==null&&B(!1);var K=V.fieldPayloads;if(K.length!==0){var Z,re={errors:null,fieldPayloads:K,followupPayloads:null,incrementalPlaceholders:null,isFinal:((Z=E.extensions)===null||Z===void 0?void 0:Z.is_final)===!0,source:F.create()};this._getPublishQueueAndSaveActor().commitPayload(this._operation,re)}return this._actorIdentifier=z,H},I._processStreamResponse=function(C,x,w,E){var q=w.parentID,G=w.node,z=w.variables,H=w.actorIdentifier,V=this._actorIdentifier;this._actorIdentifier=H??this._actorIdentifier;var K=G.selections[0];K!=null&&K.kind==="LinkedField"&&K.plural===!0||B(!1);var Z=this._normalizeStreamItem(E,q,K,z,x,w.path),re=Z.fieldPayloads,W=Z.itemID,X=Z.itemIndex,J=Z.prevIDs,ie=Z.relayPayload,ne=Z.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,ie,function(ue){var fe=ue.get(q);if(fe!=null){var se=fe.getLinkedRecords(ne);if(se!=null&&!(se.length!==J.length||se.some(function(ce,he){return J[he]!==(ce&&ce.getDataID())}))){var pe=(0,a.default)(se);pe[X]=ue.get(W),fe.setLinkedRecords(pe,ne)}}}),re.length!==0){var ae={errors:null,fieldPayloads:re,followupPayloads:null,incrementalPlaceholders:null,isFinal:!1,source:F.create()};this._getPublishQueueAndSaveActor().commitPayload(this._operation,ae)}return this._actorIdentifier=V,ie},I._normalizeStreamItem=function(C,x,w,E,q,G){var z,H,V,K,Z=C.data;typeof Z!="object"&&B(!1);var re=(z=w.alias)!==null&&z!==void 0?z:w.name,W=U(w,E),X=this._source.get(x);X==null&&B(!1);var J=X.record,ie=X.fieldPayloads,ne=S.getLinkedRecordIDs(J,W);ne==null&&B(!1);var ae=q[q.length-1],ue=parseInt(ae,10);ue===ae&&ue>=0||B(!1);var fe=(H=w.concreteType)!==null&&H!==void 0?H:Z[P];typeof fe!="string"&&B(!1);var se=(V=(K=this._getDataID(Z,fe))!==null&&K!==void 0?K:ne?.[ue])!==null&&V!==void 0?V:h(x,W,ue);typeof se!="string"&&B(!1);var pe=O(w,se,E),ce=S.clone(J),he=(0,a.default)(ne);he[ue]=se,S.setLinkedRecordIDs(ce,W,he),this._source.set(x,{fieldPayloads:ie,record:ce});var ve=this._normalizeResponse(C,pe,fe,{actorIdentifier:this._actorIdentifier,deferDeduplicatedFields:!1,getDataID:this._getDataID,log:this._log,path:[].concat((0,a.default)(G),[re,String(ue)]),shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull},this._useExecTimeResolvers);return{fieldPayloads:ie,itemID:se,itemIndex:ue,prevIDs:ne,relayPayload:ve,storageKey:W}},I._scheduleAsyncStoreUpdate=function(C,x){var w=this;this._completeFns.push(x),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=C(function(){w._asyncStoreUpdateDisposable=null;var E=w._runPublishQueue();w._updateOperationTracker(E);var q=(0,n.default)(w._completeFns),G;try{for(q.s();!(G=q.n()).done;){var z=G.value;z()}}catch(H){q.e(H)}finally{q.f()}w._completeFns=[]}))},I._updateOperationTracker=function(C){C!=null&&C.length>0&&this._operationTracker.update(this._operation.request,new Set(C))},I._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},I._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},I._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},I._runPublishQueue=function(C){var x=new Set,w=(0,n.default)(this._getActorsToVisit()),E;try{for(w.s();!(E=w.n()).done;){var q=E.value,G=this._getPublishQueue(q).run(C);G.forEach(function(z){return x.add(z)})}}catch(z){w.e(z)}finally{w.f()}return Array.from(x)},I._retainData=function(){var C=(0,n.default)(this._getActorsToVisit()),x;try{for(C.s();!(x=C.n()).done;){var w=x.value;this._retainDisposables.has(w)||this._retainDisposables.set(w,this._getStore(w).retain(this._operation))}}catch(E){C.e(E)}finally{C.f()}},I._disposeRetainedData=function(){var C=(0,n.default)(this._retainDisposables.values()),x;try{for(C.s();!(x=C.n()).done;){var w=x.value;w.dispose()}}catch(E){C.e(E)}finally{C.f()}this._retainDisposables.clear()},I._expectOperationLoader=function(){var C=this._operationLoader;return C||B(!1),C},D}();function R(D){var I=[],T=[],C=[];return D.forEach(function(x){var w;if(x.path!=null||x.label!=null){var E=x.label,q=x.path;(E==null||q==null)&&B(!1),T.push({label:E,path:q,response:x})}else((w=x.extensions)===null||w===void 0?void 0:w.is_normalized)===!0?C.push(x):I.push(x)}),[I,T,C]}function y(D){var I;return(I=JSON.stringify(u(D)))!==null&&I!==void 0?I:""}function b(D){var I=D.incrementalPlaceholders;I!=null&&I.length!==0&&B(!1)}return OperationExecutor={execute:$},OperationExecutor}var resolveImmediate_1,hasRequiredResolveImmediate;function requireResolveImmediate(){if(hasRequiredResolveImmediate)return resolveImmediate_1;hasRequiredResolveImmediate=1;var r=Promise.resolve();function n(i){r.then(i).catch(a)}function a(i){setTimeout(function(){throw i},0)}return resolveImmediate_1=n,resolveImmediate_1}var RelayRecordSourceMutator_1,hasRequiredRelayRecordSourceMutator;function requireRelayRecordSourceMutator(){if(hasRequiredRelayRecordSourceMutator)return RelayRecordSourceMutator_1;hasRequiredRelayRecordSourceMutator=1;var r=requireRelayModernRecord(),n=requireRelayRecordState(),a=n.EXISTENT,i=requireBrowser(),o=function(){function s(f,d){this.__sources=[d,f],this._base=f,this._sink=d}var l=s.prototype;return l.unstable_getRawRecordWithChanges=function(d){var u=this._base.get(d),c=this._sink.get(d);if(c===void 0){if(u==null)return u;var v=r.clone(u);return v}else{if(c===null)return null;if(u!=null){var h=r.update(u,c);return h}else{var m=r.clone(c);return m}}},l._getSinkRecord=function(d){var u=this._sink.get(d);if(!u){var c=this._base.get(d);c||i(!1),u=r.create(d,r.getType(c)),this._sink.set(d,u)}return u},l.copyFields=function(d,u){var c=this._sink.get(d),v=this._base.get(d);c||v||i(!1);var h=this._getSinkRecord(u);v&&r.copyFields(v,h),c&&r.copyFields(c,h)},l.copyFieldsFromRecord=function(d,u){var c=this._getSinkRecord(u);r.copyFields(d,c)},l.create=function(d,u){this._base.getStatus(d)!==a&&this._sink.getStatus(d)!==a||i(!1);var c=r.create(d,u);this._sink.set(d,c)},l.delete=function(d){this._sink.delete(d)},l.getStatus=function(d){return this._sink.has(d)?this._sink.getStatus(d):this._base.getStatus(d)},l.getType=function(d){for(var u=0;u<this.__sources.length;u++){var c=this.__sources[u].get(d);if(c)return r.getType(c);if(c===null)return null}},l.getValue=function(d,u){for(var c=0;c<this.__sources.length;c++){var v=this.__sources[c].get(d);if(v){var h=r.getValue(v,u);if(h!==void 0)return h}else if(v===null)return null}},l.setValue=function(d,u,c){var v=this._getSinkRecord(d);r.setValue(v,u,c)},l.getErrors=function(d,u){for(var c=0;c<this.__sources.length;c++){var v=this.__sources[c].get(d);if(v){var h=r.getErrors(v,u);if(h!==void 0)return h}else if(v===null)return null}},l.setErrors=function(d,u,c){var v=this._getSinkRecord(d);r.setErrors(v,u,c)},l.getLinkedRecordID=function(d,u){for(var c=0;c<this.__sources.length;c++){var v=this.__sources[c].get(d);if(v){var h=r.getLinkedRecordID(v,u);if(h!==void 0)return h}else if(v===null)return null}},l.setLinkedRecordID=function(d,u,c){var v=this._getSinkRecord(d);r.setLinkedRecordID(v,u,c)},l.getLinkedRecordIDs=function(d,u){for(var c=0;c<this.__sources.length;c++){var v=this.__sources[c].get(d);if(v){var h=r.getLinkedRecordIDs(v,u);if(h!==void 0)return h}else if(v===null)return null}},l.setLinkedRecordIDs=function(d,u,c){var v=this._getSinkRecord(d);r.setLinkedRecordIDs(v,u,c)},s}();return RelayRecordSourceMutator_1=o,RelayRecordSourceMutator_1}var createUpdatableProxy_1,hasRequiredCreateUpdatableProxy;function requireCreateUpdatableProxy(){if(hasRequiredCreateUpdatableProxy)return createUpdatableProxy_1;hasRequiredCreateUpdatableProxy=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireRelayStoreUtils(),i=a.getArgumentValues,o=["id","__id","__typename","js"];function s(g,_,S,N,O){var M={};return l(M,g,_,S,N,O),M}function l(g,_,S,N,O,M){var F,L=(0,n.default)(N),k;try{var P=function(){var $=k.value;switch($.kind){case"LinkedField":$.plural?Object.defineProperty(g,(U=$.alias)!==null&&U!==void 0?U:$.name,{get:u($,S,_,O,M),set:f($,S,_,O)}):Object.defineProperty(g,(B=$.alias)!==null&&B!==void 0?B:$.name,{get:c($,S,_,O,M),set:d($,S,_,O)});break;case"ScalarField":var A=(F=$.alias)!==null&&F!==void 0?F:$.name;Object.defineProperty(g,A,{get:function(){var y,b=i((y=$.args)!==null&&y!==void 0?y:[],S),D=_.getValue($.name,b);return D==null&&(D=m($,b,_,O,M)),D},set:o.includes($.name)?void 0:function(R){var y,b=i((y=$.args)!==null&&y!==void 0?y:[],S);_.setValue__UNSAFE(R,$.name,b)}});break;case"InlineFragment":_.getType()===$.type&&l(g,_,S,$.selections,O,M);break;case"ClientExtension":l(g,_,S,$.selections,O,M);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw $.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(L.s();!(k=L.n()).done;){var U,B;P()}}catch(j){L.e(j)}finally{L.f()}}function f(g,_,S,N){return function(M){var F,L=i((F=g.args)!==null&&F!==void 0?F:[],_);if(M==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var k=M.map(function(P){if(P==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var U=P.__id;if(U==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var B=N.get(U);if(B==null)throw new Error("Did not find item with data id ".concat(U," in the store."));return B});S.setLinkedRecords(k,g.name,L)}}function d(g,_,S,N){return function(M){var F,L=i((F=g.args)!==null&&F!==void 0?F:[],_);if(M==null)S.setValue(M,g.name,L);else{var k=M.__id;if(k==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var P=N.get(k);if(P==null)throw new Error("Did not find item with data id ".concat(k," in the store."));S.setLinkedRecord(P,g.name,L)}}}function u(g,_,S,N,O){return function(){var M,F=i((M=g.args)!==null&&M!==void 0?M:[],_),L=S.getLinkedRecords(g.name,F);return L===void 0&&(L=h(g,F,S,N,O)),L!=null?L.map(function(k){if(k!=null){var P={};return l(P,k,_,g.selections,N,O),P}else return k}):L}}function c(g,_,S,N,O){return function(){var M,F=i((M=g.args)!==null&&M!==void 0?M:[],_),L=S.getLinkedRecord(g.name,F);if(L===void 0&&(L=v(g,F,S,N,O)),L!=null){var k={};return l(k,L,_,g.selections,N,O),k}else return L}}function v(g,_,S,N,O){var M=(0,n.default)(O),F;try{for(M.s();!(F=M.n()).done;){var L=F.value;if(L.kind==="linked"){var k=L.handle(g,S,_,N);if(k!=null)return N.get(k)}}}catch(P){M.e(P)}finally{M.f()}}function h(g,_,S,N,O){var M=(0,n.default)(O),F;try{for(M.s();!(F=M.n()).done;){var L=F.value;if(L.kind==="pluralLinked"){var k=L.handle(g,S,_,N);if(k!=null)return k.map(function(P){if(P!=null)return N.get(P)})}}}catch(P){M.e(P)}finally{M.f()}}function m(g,_,S,N,O){var M=(0,n.default)(O),F;try{for(M.s();!(F=M.n()).done;){var L=F.value;if(L.kind==="scalar"){var k=L.handle(g,S,_,N);if(k!==void 0)return k}}}catch(P){M.e(P)}finally{M.f()}}return createUpdatableProxy_1={createUpdatableProxy:s},createUpdatableProxy_1}var readUpdatableFragment_1,hasRequiredReadUpdatableFragment;function requireReadUpdatableFragment(){if(hasRequiredReadUpdatableFragment)return readUpdatableFragment_1;hasRequiredReadUpdatableFragment=1;var r=requireGraphQLTag(),n=r.getFragment,a=requireRelayModernSelector(),i=a.getVariablesFromFragment,o=requireRelayStoreUtils(),s=o.ID_KEY,l=requireCreateUpdatableProxy(),f=l.createUpdatableProxy,d=requireBrowser();function u(c,v,h,m){var g=n(c),_=i(g,v),S=v[s],N=h.get(S);return N==null&&d(!1),{updatableData:f(N,_,g.selections,h,m)}}return readUpdatableFragment_1={readUpdatableFragment:u},readUpdatableFragment_1}var readUpdatableQuery_1,hasRequiredReadUpdatableQuery;function requireReadUpdatableQuery(){if(hasRequiredReadUpdatableQuery)return readUpdatableQuery_1;hasRequiredReadUpdatableQuery=1;var r=requireGraphQLTag(),n=r.getUpdatableQuery,a=requireCreateUpdatableProxy(),i=a.createUpdatableProxy;function o(s,l,f,d){var u=n(s);return{updatableData:i(f.getRoot(),l,u.fragment.selections,f,d)}}return readUpdatableQuery_1={readUpdatableQuery:o},readUpdatableQuery_1}var RelayRecordProxy_1,hasRequiredRelayRecordProxy;function requireRelayRecordProxy(){if(hasRequiredRelayRecordProxy)return RelayRecordProxy_1;hasRequiredRelayRecordProxy=1;var r=requireClientID(),n=r.generateClientID,a=requireRelayStoreUtils(),i=a.getStableStorageKey,o=requireBrowser(),s=function(){function f(u,c,v){this._dataID=v,this._mutator=c,this._source=u}var d=f.prototype;return d.copyFieldsFrom=function(c){this._mutator.copyFields(c.getDataID(),this._dataID)},d.getDataID=function(){return this._dataID},d.getType=function(){var c=this._mutator.getType(this._dataID);return c==null&&o(!1),c},d.getValue=function(c,v){var h=i(c,v);return this._mutator.getValue(this._dataID,h)},d.setValue=function(c,v,h,m){return l(c)||o(!1),this.setValue__UNSAFE(c,v,h,m)},d.getErrors=function(c,v){var h=i(c,v);return this._mutator.getErrors(this._dataID,h)},d.setValue__UNSAFE=function(c,v,h,m){var g=i(v,h);return this._mutator.setValue(this._dataID,g,c),m!=null&&(m.length===0?this._mutator.setErrors(this._dataID,g):this._mutator.setErrors(this._dataID,g,m)),this},d.getLinkedRecord=function(c,v){var h=i(c,v),m=this._mutator.getLinkedRecordID(this._dataID,h);return m!=null?this._source.get(m):m},d.setLinkedRecord=function(c,v,h){c instanceof f||o(!1);var m=i(v,h),g=c.getDataID();return this._mutator.setLinkedRecordID(this._dataID,m,g),this},d.getOrCreateLinkedRecord=function(c,v,h){var m=this.getLinkedRecord(c,h);if(!m){var g,_=i(c,h),S=n(this.getDataID(),_);m=(g=this._source.get(S))!==null&&g!==void 0?g:this._source.create(S,v),this.setLinkedRecord(m,c,h)}return m},d.getLinkedRecords=function(c,v){var h=this,m=i(c,v),g=this._mutator.getLinkedRecordIDs(this._dataID,m);return g==null?g:g.map(function(_){return _!=null?h._source.get(_):_})},d.setLinkedRecords=function(c,v,h){Array.isArray(c)||o(!1);var m=i(v,h),g=c.map(function(_){return _&&_.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,m,g),this},d.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},f}();function l(f){return f==null||typeof f!="object"||Array.isArray(f)&&f.every(l)}return RelayRecordProxy_1=s,RelayRecordProxy_1}var RelayRecordSourceProxy_1,hasRequiredRelayRecordSourceProxy;function requireRelayRecordSourceProxy(){if(hasRequiredRelayRecordSourceProxy)return RelayRecordSourceProxy_1;hasRequiredRelayRecordSourceProxy=1;var r=requireRelayModernRecord(),n=requireRelayRecordState(),a=n.EXISTENT,i=n.NONEXISTENT,o=requireRelayStoreUtils(),s=o.ROOT_ID,l=o.ROOT_TYPE,f=requireReadUpdatableFragment(),d=f.readUpdatableFragment,u=requireReadUpdatableQuery(),c=u.readUpdatableQuery,v=requireRelayRecordProxy(),h=requireBrowser(),m=function(){function g(S,N,O,M,F){this.__mutator=S,this._handlerProvider=O||null,this._proxies={},this._getDataID=N,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=M,this._log=F??function(L){}}var _=g.prototype;return _.publishSource=function(N,O){var M=this,F=N.getRecordIDs();F.forEach(function(L){var k=N.getStatus(L);if(k===a){var P=N.get(L);P&&(M.__mutator.getStatus(L)!==a&&M.create(L,r.getType(P)),M.__mutator.copyFieldsFromRecord(P,L))}else k===i&&M.delete(L)}),O&&O.length&&O.forEach(function(L){var k=M._handlerProvider&&M._handlerProvider(L.handle);k||h(!1),k.update(M,L)})},_.create=function(N,O){this.__mutator.create(N,O),delete this._proxies[N];var M=this.get(N);return M||h(!1),M},_.delete=function(N){N===s&&h(!1),delete this._proxies[N],this.__mutator.delete(N)},_.get=function(N){if(!this._proxies.hasOwnProperty(N)){var O=this.__mutator.getStatus(N);O===a?this._proxies[N]=new v(this,this.__mutator,N):this._proxies[N]=O===i?null:void 0}return this._proxies[N]},_.getRoot=function(){var N=this.get(s);return N||(N=this.create(s,l)),N&&N.getType()===l||h(!1),N},_.invalidateStore=function(){this._invalidatedStore=!0},_.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},_.markIDForInvalidation=function(N){this._idsMarkedForInvalidation.add(N)},_.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},_.readUpdatableQuery=function(N,O){return c(N,O,this,this._missingFieldHandlers)},_.readUpdatableFragment=function(N,O){return d(N,O,this,this._missingFieldHandlers)},g}();return RelayRecordSourceProxy_1=m,RelayRecordSourceProxy_1}var cloneRelayHandleSourceField_1,hasRequiredCloneRelayHandleSourceField;function requireCloneRelayHandleSourceField(){if(hasRequiredCloneRelayHandleSourceField)return cloneRelayHandleSourceField_1;hasRequiredCloneRelayHandleSourceField=1;var r=requireRelayConcreteNode(),n=r.LINKED_FIELD,a=requireRelayStoreUtils(),i=a.getHandleStorageKey,o=requireAreEqual(),s=requireBrowser();function l(f,d,u){var c=d.find(function(h){return h.kind===n&&h.name===f.name&&h.alias===f.alias&&o(h.args,f.args)});c&&c.kind===n||s(!1);var v=i(f,u);return{kind:"LinkedField",alias:c.alias,name:v,storageKey:v,args:null,concreteType:c.concreteType,plural:c.plural,selections:c.selections}}return cloneRelayHandleSourceField_1=l,cloneRelayHandleSourceField_1}var cloneRelayScalarHandleSourceField_1,hasRequiredCloneRelayScalarHandleSourceField;function requireCloneRelayScalarHandleSourceField(){if(hasRequiredCloneRelayScalarHandleSourceField)return cloneRelayScalarHandleSourceField_1;hasRequiredCloneRelayScalarHandleSourceField=1;var r=requireRelayConcreteNode(),n=r.SCALAR_FIELD,a=requireRelayStoreUtils(),i=a.getHandleStorageKey,o=requireAreEqual(),s=requireBrowser();function l(f,d,u){var c=d.find(function(h){return h.kind===n&&h.name===f.name&&h.alias===f.alias&&o(h.args,f.args)});c&&c.kind===n||s(!1);var v=i(f,u);return{kind:"ScalarField",alias:c.alias,name:v,storageKey:v,args:null}}return cloneRelayScalarHandleSourceField_1=l,cloneRelayScalarHandleSourceField_1}var DataChecker_1,hasRequiredDataChecker;function requireDataChecker(){if(hasRequiredDataChecker)return DataChecker_1;hasRequiredDataChecker=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireRelayRecordSourceMutator(),i=requireRelayRecordSourceProxy(),o=requireGetOperation(),s=requireClientID(),l=s.isClientID,f=requireCloneRelayHandleSourceField(),d=requireCloneRelayScalarHandleSourceField(),u=requireRelayConcreteVariables(),c=u.getLocalVariables,v=requireRelayModernRecord(),h=requireRelayRecordState(),m=h.EXISTENT,g=h.UNKNOWN,_=requireRelayStoreUtils(),S=requireTypeID(),N=S.TYPE_SCHEMA_TYPE,O=S.generateTypeID,M=requireBrowser(),F=_.getModuleOperationKey,L=_.getStorageKey,k=_.getArgumentValues;function P(B,j,$,A,R,y,b,D,I,T){I?.({name:"store.datachecker.start",selector:A});var C=A.dataID,x=A.node,w=A.variables,E=new U(B,j,$,w,R,y,b,D,I,T),q=E.check(x,C);return I?.({name:"store.datachecker.end",selector:A}),q}var U=function(){function B($,A,R,y,b,D,I,T,C,x){this._getSourceForActor=$,this._getTargetForActor=A,this._getDataID=I,this._source=$(R),this._mutatorRecordSourceProxyCache=new Map;var w=this._getMutatorAndRecordProxyForActor(R),E=w[0],q=w[1];this._useExecTimeResolvers=x??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=b,this._mutator=E,this._operationLoader=D??null,this._recordSourceProxy=q,this._recordWasMissing=!1,this._variables=y,this._shouldProcessClientComponents=T,this._log=C}var j=B.prototype;return j._getMutatorAndRecordProxyForActor=function(A){var R=this._mutatorRecordSourceProxyCache.get(A);if(R==null){var y=this._getTargetForActor(A),b=new a(this._getSourceForActor(A),y),D=new i(b,this._getDataID,void 0,this._handlers,this._log);R=[b,D],this._mutatorRecordSourceProxyCache.set(A,R)}return R},j.check=function(A,R){return this._assignClientAbstractTypes(A),this._traverse(A,R),this._recordWasMissing===!0?{mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt,status:"missing"}:{mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt,status:"available"}},j._getVariableValue=function(A){return this._variables.hasOwnProperty(A)||M(!1),this._variables[A]},j._handleMissing=function(){this._recordWasMissing=!0},j._handleMissingScalarField=function(A,R){if(!(A.name==="id"&&A.alias==null&&l(R))){var y=A.args!=null?k(A.args,this._variables):{},b=(0,n.default)(this._handlers),D;try{for(b.s();!(D=b.n()).done;){var I=D.value;if(I.kind==="scalar"){var T=I.handle(A,this._recordSourceProxy.get(R),y,this._recordSourceProxy);if(T!==void 0)return T}}}catch(C){b.e(C)}finally{b.f()}this._log!=null&&this._log({name:"store.datachecker.missing",kind:"scalar",dataID:R,fieldName:A.name,storageKey:L(A,this._variables)}),this._handleMissing()}},j._handleMissingLinkField=function(A,R){var y=A.args!=null?k(A.args,this._variables):{},b=(0,n.default)(this._handlers),D;try{for(b.s();!(D=b.n()).done;){var I=D.value;if(I.kind==="linked"){var T=I.handle(A,this._recordSourceProxy.get(R),y,this._recordSourceProxy);if(T!==void 0&&(T===null||this._mutator.getStatus(T)===m))return T}}}catch(C){b.e(C)}finally{b.f()}this._log!=null&&this._log({name:"store.datachecker.missing",kind:"linked",dataID:R,fieldName:A.name,storageKey:L(A,this._variables)}),this._handleMissing()},j._handleMissingPluralLinkField=function(A,R){var y=this,b=A.args!=null?k(A.args,this._variables):{},D=(0,n.default)(this._handlers),I;try{for(D.s();!(I=D.n()).done;){var T=I.value;if(T.kind==="pluralLinked"){var C=T.handle(A,this._recordSourceProxy.get(R),b,this._recordSourceProxy);if(C!=null){var x=C.every(function(w){return w!=null&&y._mutator.getStatus(w)===m});if(x)return C}else if(C===null)return null}}}catch(w){D.e(w)}finally{D.f()}this._log!=null&&this._log({name:"store.datachecker.missing",kind:"pluralLinked",dataID:R,fieldName:A.name,storageKey:L(A,this._variables)}),this._handleMissing()},j._traverse=function(A,R){var y=this._mutator.getStatus(R);if(y===g&&(this._log!=null&&this._log({name:"store.datachecker.missing",kind:"unknown_record",dataID:R}),this._handleMissing()),y===m){var b=this._source.get(R),D=v.getInvalidationEpoch(b);D!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,D):D),this._traverseSelections(A.selections,R)}},j._traverseSelections=function(A,R){var y=this;A.forEach(function(b){switch(b.kind){case"ScalarField":y._checkScalar(b,R);break;case"LinkedField":b.plural?y._checkPluralLink(b,R):y._checkLink(b,R);break;case"ActorChange":y._checkActorChange(b.linkedField,R);break;case"Condition":var D=!!y._getVariableValue(b.condition);D===b.passingValue&&y._traverseSelections(b.selections,R);break;case"InlineFragment":{var I=b.abstractKey;if(I==null){var T=y._mutator.getType(R);T===b.type&&y._traverseSelections(b.selections,R)}else{var C=y._mutator.getType(R);C==null&&M(!1);var x=O(C),w=y._mutator.getValue(x,I);w===!0?y._traverseSelections(b.selections,R):w==null&&y._handleMissing()}break}case"LinkedHandle":{var E=f(b,A,y._variables);E.plural?y._checkPluralLink(E,R):y._checkLink(E,R);break}case"ScalarHandle":{var q=d(b,A,y._variables);y._checkScalar(q,R);break}case"ModuleImport":y._checkModuleImport(b,R);break;case"Defer":case"Stream":y._traverseSelections(b.selections,R);break;case"FragmentSpread":var G=y._variables;y._variables=c(y._variables,b.fragment.argumentDefinitions,b.args),y._traverseSelections(b.fragment.selections,R),y._variables=G;break;case"ClientExtension":var z=y._recordWasMissing;y._traverseSelections(b.selections,R),y._recordWasMissing=z;break;case"TypeDiscriminator":var H=b.abstractKey,V=y._mutator.getType(R);V==null&&M(!1);var K=O(V),Z=y._mutator.getValue(K,H);Z==null&&y._handleMissing();break;case"ClientComponent":if(y._shouldProcessClientComponents===!1)break;y._traverseSelections(b.fragment.selections,R);break;case"RelayResolver":case"RelayLiveResolver":y._useExecTimeResolvers||y._checkResolver(b,R);break;case"ClientEdgeToClientObject":y._useExecTimeResolvers||y._checkResolver(b.backingField,R);break;default:M(!1)}})},j._checkResolver=function(A,R){A.fragment&&this._traverseSelections([A.fragment],R)},j._checkModuleImport=function(A,R){var y=this._operationLoader;y===null&&M(!1);var b=F(A.documentName),D=this._mutator.getValue(R,b);if(D==null){D===void 0&&this._handleMissing();return}var I=y.get(D);if(I!=null){var T=o(I),C=this._variables;this._variables=c(this._variables,T.argumentDefinitions,A.args),this._traverse(T,R),this._variables=C}else this._handleMissing()},j._checkScalar=function(A,R){var y=L(A,this._variables),b=this._mutator.getValue(R,y);b===void 0&&(b=this._handleMissingScalarField(A,R),b!==void 0&&this._mutator.setValue(R,y,b))},j._checkLink=function(A,R){var y=L(A,this._variables),b=this._mutator.getLinkedRecordID(R,y);b===void 0&&(b=this._handleMissingLinkField(A,R),b!=null?this._mutator.setLinkedRecordID(R,y,b):b===null&&this._mutator.setValue(R,y,null)),b!=null&&this._traverse(A,b)},j._checkPluralLink=function(A,R){var y=this,b=L(A,this._variables),D=this._mutator.getLinkedRecordIDs(R,b);D===void 0&&(D=this._handleMissingPluralLinkField(A,R),D!=null?this._mutator.setLinkedRecordIDs(R,b,D):D===null&&this._mutator.setValue(R,b,null)),D&&D.forEach(function(I){I!=null&&y._traverse(A,I)})},j._checkActorChange=function(A,R){var y=L(A,this._variables),b=this._source.get(R),D=b!=null?v.getActorLinkedRecordID(b,y):b;if(D==null)D===void 0&&this._handleMissing();else{var I=D[0],T=D[1],C=this._source,x=this._mutator,w=this._recordSourceProxy,E=this._getMutatorAndRecordProxyForActor(I),q=E[0],G=E[1];this._source=this._getSourceForActor(I),this._mutator=q,this._recordSourceProxy=G,this._assignClientAbstractTypes(A),this._traverse(A,T),this._source=C,this._mutator=x,this._recordSourceProxy=w}},j._assignClientAbstractTypes=function(A){var R=A.clientAbstractTypes;if(R!=null)for(var y=0,b=Object.keys(R);y<b.length;y++){var D=b[y],I=(0,n.default)(R[D]),T;try{for(I.s();!(T=I.n()).done;){var C=T.value,x=O(C);this._source.get(x)==null&&this._mutator.create(x,N),this._mutator.getValue(x,D)==null&&this._mutator.setValue(x,D,!0)}}catch(w){I.e(w)}finally{I.f()}}},B}();return DataChecker_1={check:P},DataChecker_1}var shallowFreeze,hasRequiredShallowFreeze;function requireShallowFreeze(){return hasRequiredShallowFreeze||(hasRequiredShallowFreeze=1,shallowFreeze=function(n){typeof n=="object"&&n!=null&&(Array.isArray(n)||n.constructor===Object)&&Object.freeze(n)}),shallowFreeze}var getOutputTypeRecordIDs_1,hasRequiredGetOutputTypeRecordIDs;function requireGetOutputTypeRecordIDs(){if(hasRequiredGetOutputTypeRecordIDs)return getOutputTypeRecordIDs_1;hasRequiredGetOutputTypeRecordIDs=1;var r=requireRelayModernRecord(),n=requireRelayStoreUtils(),a=n.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,i=requireBrowser();function o(s){var l=r.getValue(s,a);return l==null?null:(l instanceof Set||i(!1),l)}return getOutputTypeRecordIDs_1=o,getOutputTypeRecordIDs_1}var isLiveStateValue_1,hasRequiredIsLiveStateValue;function requireIsLiveStateValue(){if(hasRequiredIsLiveStateValue)return isLiveStateValue_1;hasRequiredIsLiveStateValue=1;function r(n){return n!=null&&typeof n=="object"&&typeof n.read=="function"&&typeof n.subscribe=="function"}return isLiveStateValue_1=r,isLiveStateValue_1}var LiveResolverCache_1,hasRequiredLiveResolverCache;function requireLiveResolverCache(){if(hasRequiredLiveResolverCache)return LiveResolverCache_1;hasRequiredLiveResolverCache=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireRecycleNodesInto(),i=requireRelayConcreteNode(),o=i.RELAY_LIVE_RESOLVER,s=requireRelayFeatureFlags(),l=requireShallowFreeze(),f=requireClientID(),d=f.generateClientID,u=f.generateClientObjectClientID,c=requireRelayModernRecord(),v=requireRelayModernSelector(),h=v.createNormalizationSelector,m=requireRelayRecordSource(),g=requireRelayResponseNormalizer(),_=g.normalize,S=requireRelayStoreUtils(),N=S.RELAY_RESOLVER_ERROR_KEY,O=S.RELAY_RESOLVER_INVALIDATION_KEY,M=S.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,F=S.RELAY_RESOLVER_RECORD_TYPENAME,L=S.RELAY_RESOLVER_SNAPSHOT_KEY,k=S.RELAY_RESOLVER_VALUE_KEY,P=S.getReadTimeResolverStorageKey,U=S.getStorageKey,B=requireGetOutputTypeRecordIDs(),j=requireIsLiveStateValue(),$=requireLiveResolverSuspenseSentinel(),A=$.isSuspenseSentinel,R=requireBrowser();requireWarning();var y="__resolverLiveStateSubscription",b="__resolverLiveStateValue",D="__resolverLiveStateDirty",I="__relay_model_instance";function T(re,W,X){var J=re.get(W);J||(J=new Set,re.set(W,J)),J.add(X)}var C=function(){function re(X,J){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=X,this._store=J,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var W=re.prototype;return W.readFromCacheOrEvaluate=function(J,ie,ne,ae,ue){var fe=this._getRecordSource(),se=V(fe,J),pe=P(ie,ne),ce=c.getLinkedRecordID(se,pe),he=ce==null?null:fe.get(ce),ve;if(he==null||this._isInvalid(he,ue)){var ye;he!=null&&H(he),ce=(ye=ce)!==null&&ye!==void 0?ye:d(J,pe),he=c.create(ce,F);var be=ae();if(c.setValue(he,L,be.snapshot),c.setValue(he,N,be.error),ie.kind===o){if(be.resolverResult!=null){be.error!=null&&R(!1);var _e=be.resolverResult;ve=this._setLiveStateValue(he,ce,_e,ie,ne)}}else ve=this._setResolverValue(he,be.resolverResult,ie,ne);fe.set(ce,he);var me=V(fe,J),Pe=c.clone(me);if(c.setLinkedRecordID(Pe,pe,ce),fe.set(J,Pe),ie.fragment!=null){var Ne,Ee=U(ie.fragment,ne),Be=d(J,Ee);T(this._resolverIDToRecordIDs,Be,ce),T(this._recordIDToResolverIDs,J,Be);var Ce=(Ne=be.snapshot)===null||Ne===void 0?void 0:Ne.seenRecords;if(Ce!=null){var Re=(0,n.default)(Ce),Ge;try{for(Re.s();!(Ge=Re.n()).done;){var Me=Ge.value;T(this._recordIDToResolverIDs,Me,Be)}}catch(je){Re.e(je)}finally{Re.f()}}}}else if(ie.kind===o&&c.getValue(he,D)){var Te;ce=(Te=ce)!==null&&Te!==void 0?Te:d(J,pe),he=c.clone(he);var Ke=c.getValue(he,b);j(Ke)||R(!1),ve=this._setLiveResolverValue(he,Ke,ie,ne),c.setValue(he,D,!1),fe.set(ce,he)}var Fe=this._getResolverValue(he),Ie=c.getValue(he,L),Qe=c.getValue(he,N),qe=null;if(A(Fe)){var Se;qe=(Se=ce)!==null&&Se!==void 0?Se:d(J,pe)}return[Fe,ce,Qe,Ie,qe,ve]},W.getLiveResolverPromise=function(J){var ie=this._getRecordSource(),ne=ie.get(J);ne==null&&R(!1);var ae=c.getValue(ne,b);return new Promise(function(ue){var fe=ae.subscribe(function(){fe(),ue()})})},W._setLiveStateValue=function(J,ie,ne,ae,ue){var fe=this._makeLiveStateHandler(ie),se=ne.subscribe(fe);c.setValue(J,b,ne);var pe=this._setLiveResolverValue(J,ne,ae,ue);return c.setValue(J,D,!1),c.setValue(J,y,se),pe},W._makeLiveStateHandler=function(J){var ie=this;return function(){var ne=ie._getRecordSource(),ae=ne.get(J);if(ae&&c.hasValue(ae,b)){var ue=c.clone(ae);c.setValue(ue,D,!0),ie._setLiveResolverUpdate(J,ue)}}},W._setLiveResolverUpdate=function(J,ie){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=m.create()),this._liveResolverBatchRecordSource.set(J,ie);else{var ne=m.create();ne.set(J,ie),this._store.publish(ne),this._store.notify()}},W.batchLiveStateUpdates=function(J){this._handlingBatch&&R(!1),this._handlingBatch=!0;try{J()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},W.batchLiveStateUpdatesWithoutNotify=function(J){this._handlingBatch&&R(!1),this._handlingBatch=!0;try{J()}finally{var ie=this._liveResolverBatchRecordSource!=null;return ie&&this._store.publish(this._liveResolverBatchRecordSource),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1,ie}},W._setLiveResolverValue=function(J,ie,ne,ae){var ue=null,fe=null;try{ue=ie.read()}catch(se){fe=se}return c.setValue(J,N,fe),this._setResolverValue(J,ue,ne,ae)},W._setResolverValue=function(J,ie,ne,ae){var ue=ne.normalizationInfo,fe=null;if(ie!=null&&ue!=null&&!A(ie)){var se,pe=B(J),ce=new Set,he=this._getRecordSource();if(ue.plural){Array.isArray(ie)||R(!1),se=[];for(var ve=m.create(),ye=0;ye<ie.length;ye++){var be=ie[ye];if(be!=null){typeof be!="object"&&R(!1);var _e=Z(ue,be),me=u(_e,c.getDataID(J),ye),Pe=this._normalizeOutputTypeValue(me,be,ae,ue,[ne.path,String(ye)],_e),Ne=(0,n.default)(Pe.getRecordIDs()),Ee;try{for(Ne.s();!(Ee=Ne.n()).done;){var Be=Ee.value;ve.set(Be,V(Pe,Be)),ce.add(Be)}}catch(Fe){Ne.e(Fe)}finally{Ne.f()}se.push(me)}}fe=x(he,ve,pe)}else{typeof ie!="object"&&R(!1);var Ce=Z(ue,ie),Re=u(Ce,c.getDataID(J)),Ge=this._normalizeOutputTypeValue(Re,ie,ae,ue,[ne.path],Ce),Me=(0,n.default)(Ge.getRecordIDs()),Te;try{for(Me.s();!(Te=Me.n()).done;){var Ke=Te.value;ce.add(Ke)}}catch(Fe){Me.e(Fe)}finally{Me.f()}se=Re,fe=x(he,Ge,pe)}c.setValue(J,M,ce),l(se),c.setValue(J,k,se)}else l(ie),c.setValue(J,k,ie),c.setValue(J,M,new Set);return fe},W.notifyUpdatedSubscribers=function(J){this._store.__notifyUpdatedSubscribers(J)},W._getResolverValue=function(J){return c.getValue(J,k)},W.invalidateDataIDs=function(J){for(var ie=this._getRecordSource(),ne=new Set,ae=Array.from(J);ae.length;){var ue=ae.pop();ne.add(ue),J.add(ue);var fe=this._recordIDToResolverIDs.get(ue);if(fe!=null){var se=(0,n.default)(fe),pe;try{for(se.s();!(pe=se.n()).done;){var ce=pe.value;if(!ne.has(ce)){ne.add(ce);var he=this._resolverIDToRecordIDs.get(ce);if(he==null)continue;var ve=(0,n.default)(he),ye;try{for(ve.s();!(ye=ve.n()).done;){var be=ye.value;E(be,ie),ne.has(be)||(ne.add(be),ae.push(be))}}catch(_e){ve.e(_e)}finally{ve.f()}}}}catch(_e){se.e(_e)}finally{se.f()}}}},W._isInvalid=function(J,ie){if(!c.getValue(J,O))return!1;var ne=c.getValue(J,L),ae=ne?.data,ue=ne?.selector;if(ae==null||ue==null)return!0;var fe=ie(ue),se=fe.data,pe=a(ae,se);if(pe!==ae)return!0;if(s.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var ce=c.clone(J);c.setValue(ce,O,!1);var he=this._getRecordSource();he.set(c.getDataID(J),ce)}return!1},W._normalizeOutputTypeValue=function(J,ie,ne,ae,ue,fe){var se=m.create();switch(ae.kind){case"OutputType":{var pe=c.create(J,fe);se.set(J,pe);var ce=h(ae.normalizationNode,J,ne),he=!1,ve=this._store.__getNormalizationOptions(ue);return _(se,ce,ie,ve,void 0,he).source}case"WeakModel":{var ye=c.create(J,fe);return c.setValue(ye,I,ie),se.set(J,ye),se}default:ae.kind,R(!1)}},W.ensureClientRecord=function(J,ie){var ne=u(ie,J),ae=this._getRecordSource();if(!ae.has(ne)){var ue=c.create(ne,ie);c.setValue(ue,"id",J),ae.set(ne,ue)}return ne},W.unsubscribeFromLiveResolverRecords=function(J){return G(this._getRecordSource(),J)},W.invalidateResolverRecords=function(J){if(J.size!==0){var ie=(0,n.default)(J),ne;try{for(ie.s();!(ne=ie.n()).done;){var ae=ne.value,ue=this._getRecordSource().get(ae);ue!=null&&z(ue)&&this._getRecordSource().delete(ae)}}catch(fe){ie.e(fe)}finally{ie.f()}}},re}();function x(re,W,X){var J=new Set;if(X!=null){var ie=(0,n.default)(X),ne;try{for(ie.s();!(ne=ie.n()).done;){var ae=ne.value;W.has(ae)||(J.add(ae),re.remove(ae))}}catch(ve){ie.e(ve)}finally{ie.f()}}var ue=(0,n.default)(W.getRecordIDs()),fe;try{for(ue.s();!(fe=ue.n()).done;){var se=fe.value,pe=V(W,se);if(re.has(se)){var ce=V(re,se),he=c.update(ce,pe);he!==ce&&(J.add(se),re.set(se,he),q(ce,re))}else re.set(se,pe)}}catch(ve){ue.e(ve)}finally{ue.f()}return J}function w(re){var W=new Set;return c.getFields(re).forEach(function(X){if(c.hasLinkedRecordID(re,X)){var J=c.getLinkedRecordID(re,X);J!=null&&W.add(J)}else if(c.hasLinkedRecordIDs(re,X)){var ie;(ie=c.getLinkedRecordIDs(re,X))===null||ie===void 0||ie.forEach(function(ne){ne!=null&&W.add(ne)})}}),W}function E(re,W){var X=W.get(re);if(X){var J=c.clone(X);c.setValue(J,O,!0),W.set(re,J)}}function q(re,W){var X=w(re),J=(0,n.default)(X),ie;try{for(J.s();!(ie=J.n()).done;){var ne=ie.value,ae=W.get(ne);ae!=null&&z(ae)&&E(ne,W)}}catch(ue){J.e(ue)}finally{J.f()}}function G(re,W){if(W.size!==0){var X=(0,n.default)(W),J;try{for(X.s();!(J=X.n()).done;){var ie=J.value,ne=re.get(ie);ne!=null&&z(ne)&&H(ne)}}catch(ae){X.e(ae)}finally{X.f()}}}function z(re){return c.getType(re)===F}function H(re){var W=c.getValue(re,y);W?.()}function V(re,W){var X=re.get(W);return X==null&&R(!1),X}function K(re){return re}function Z(re,W){var X,J=(X=re.concreteType)!==null&&X!==void 0?X:W.__typename;return J==null&&R(!1),J}return LiveResolverCache_1={LiveResolverCache:C,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:y,getUpdatedDataIDs:K},LiveResolverCache_1}var RelayOptimisticRecordSource_1,hasRequiredRelayOptimisticRecordSource;function requireRelayOptimisticRecordSource(){if(hasRequiredRelayOptimisticRecordSource)return RelayOptimisticRecordSource_1;hasRequiredRelayOptimisticRecordSource=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireRelayModernRecord(),i=requireRelayRecordSource(),o=requireBrowser(),s=a.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),l=function(){function u(v){this._base=v,this._sink=i.create()}var c=u.prototype;return c.has=function(h){if(this._sink.has(h)){var m=this._sink.get(h);return m!==s}else return this._base.has(h)},c.get=function(h){if(this._sink.has(h)){var m=this._sink.get(h);return m===s?void 0:m}else return this._base.get(h)},c.getStatus=function(h){var m=this.get(h);return m===void 0?"UNKNOWN":m===null?"NONEXISTENT":"EXISTENT"},c.clear=function(){this._base=i.create(),this._sink.clear()},c.delete=function(h){this._sink.delete(h)},c.remove=function(h){this._sink.set(h,s)},c.set=function(h,m){this._sink.set(h,m)},c.getRecordIDs=function(){return Object.keys(this.toJSON())},c.size=function(){return Object.keys(this.toJSON()).length},c.toJSON=function(){var h=this,m=(0,n.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(g){var _=h.get(g);_===void 0?delete m[g]:m[g]=a.toJSON(_)}),m},c.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},u}();function f(u){return new l(u)}function d(u){return u instanceof l||o(!1),u.getOptimisticRecordIDs()}return RelayOptimisticRecordSource_1={create:f,getOptimisticRecordIDs:d},RelayOptimisticRecordSource_1}var ResolverCache,hasRequiredResolverCache;function requireResolverCache(){if(hasRequiredResolverCache)return ResolverCache;hasRequiredResolverCache=1;var r=requireRelayConcreteNode(),n=r.RELAY_LIVE_RESOLVER,a=requireBrowser(),i=function(){function o(){}var s=o.prototype;return s.readFromCacheOrEvaluate=function(f,d,u,c,v){d.kind===n&&a(!1);var h=c(),m=h.resolverResult,g=h.snapshot,_=h.error;return[m,void 0,_,g,void 0,void 0]},s.invalidateDataIDs=function(f){},s.ensureClientRecord=function(f,d){a(!1)},s.notifyUpdatedSubscribers=function(f){},o}();return ResolverCache={NoopResolverCache:i},ResolverCache}var RelayReader_1,hasRequiredRelayReader;function requireRelayReader(){if(hasRequiredRelayReader)return RelayReader_1;hasRequiredRelayReader=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=r(requireDefineProperty()),i=r(requireObjectWithoutPropertiesLoose()),o=r(requireToConsumableArray()),s=["message"],l=requireRelayFeatureFlags(),f=requireLiveResolverSuspenseSentinel(),d=f.isSuspenseSentinel,u=requireRelayConcreteVariables(),c=requireRelayModernRecord(),v=requireRelayStoreUtils(),h=v.CLIENT_EDGE_TRAVERSAL_PATH,m=v.FIELD_GRANULAR_NOTIFICATIONS_KEY,g=v.FRAGMENT_OWNER_KEY,_=v.FRAGMENT_PROP_NAME_KEY,S=v.FRAGMENTS_KEY,N=v.ID_KEY,O=v.MODULE_COMPONENT_KEY,M=v.ROOT_ID,F=v.getArgumentValues,L=v.getFieldNotificationKey,k=v.getModuleComponentKey,P=v.getStorageKey,U=requireResolverCache(),B=U.NoopResolverCache,j=requireResolverFragments(),$=j.RESOLVER_FRAGMENT_ERRORED_SENTINEL,A=j.withResolverContext,R=requireTypeID(),y=R.generateTypeID,b=requireBrowser();function D(w,E,q,G,z){var H=new I(w,E,q,G??new B,z);return H.read()}var I=function(){function w(q,G,z,H,V){var K,Z,re,W;this._clientEdgeTraversalPath=(K=G.clientEdgeTraversalPath)!==null&&K!==void 0&&K.length?(0,o.default)(G.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._fieldGranularNotificationDataID=null,this._owner=G.owner,this._useExecTimeResolvers=(Z=(re=this._owner.node.operation.use_exec_time_resolvers)!==null&&re!==void 0?re:((W=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||W===void 0?void 0:W.get())===!0)!==null&&Z!==void 0?Z:!1,this._recordSource=q,this._seenRecords=new Set,this._selector=G,this._variables=G.variables,this._resolverCache=H,this._fragmentName=G.node.name,this._updatedDataIDs=new Set,this._resolverContext=V,this._log=z}var E=w.prototype;return E.read=function(){var G,z=this._selector,H=z.node,V=z.dataID,K=z.isWithinUnmatchedTypeRefinement,Z=H.abstractKey,re=this._recordSource.get(V),W=!K;if(W&&Z==null&&re!=null&&(this._recordMatchesTypeCondition(re,H.type)||(W=!1)),W&&Z!=null&&re!=null){var X=this._implementsInterface(re,Z);X===!1&&(W=!1)}this._isWithinUnmatchedTypeRefinement=!W;var J=this._traverse(H,V,null),ie=(G=this._selector.node.metadata)===null||G===void 0?void 0:G.catchTo;if(ie!=null&&(J=this._catchErrors(J,ie,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),l.ENABLE_READER_FRAGMENTS_LOGGING){var ne;(ne=this._log)===null||ne===void 0||ne.call(this,{name:"reader.read",selector:this._selector})}return{data:J,fieldErrors:this._fieldErrors,isMissingData:this._isMissingData&&W,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector}},E._maybeAddFieldErrors=function(G,z){var H=c.getErrors(G,z);if(H!=null){var V=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var K=0;K<H.length;K++){var Z,re,W,X=H[K];this._fieldErrors.push({error:X,fieldPath:((Z=X.path)!==null&&Z!==void 0?Z:[]).join("."),handled:!1,kind:"relay_field_payload.error",owner:V,shouldThrow:(re=(W=this._selector.node.metadata)===null||W===void 0?void 0:W.throwOnFieldError)!==null&&re!==void 0?re:!1,uiContext:void 0})}}},E._markDataAsMissing=function(G){var z,H;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var V=this._fragmentName;if(this._fieldErrors.push((z=(H=this._selector.node.metadata)===null||H===void 0?void 0:H.throwOnFieldError)!==null&&z!==void 0&&z?{fieldPath:G,handled:!1,kind:"missing_expected_data.throw",owner:V,uiContext:void 0}:{fieldPath:G,kind:"missing_expected_data.log",owner:V,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var K=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];K!==null&&this._missingClientEdges.push({clientEdgeDestinationID:K.clientEdgeDestinationID,request:K.readerClientEdge.operation})}}},E._traverse=function(G,z,H){var V=this._recordSource.get(z),K=this._fieldGranularNotificationDataID;if(V!=null&&c.getValue(V,m)?this._fieldGranularNotificationDataID=z:(this._seenRecords.add(z),this._fieldGranularNotificationDataID=null),V==null)return V===void 0&&this._markDataAsMissing("<record>"),this._fieldGranularNotificationDataID=K,V;var Z=H||{},re=this._traverseSelections(G.selections,V,Z);return this._fieldGranularNotificationDataID=K,re?Z:null},E._getVariableValue=function(G){return this._variables.hasOwnProperty(G)||b(!1),this._variables[G]},E._maybeReportUnexpectedNull=function(G){if(G.action!=="NONE"){var z=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var H;if(G.field.linkedField!=null){var V;H=(V=G.field.linkedField.alias)!==null&&V!==void 0?V:G.field.linkedField.name}else{var K;H=(K=G.field.alias)!==null&&K!==void 0?K:G.field.name}switch(G.action){case"THROW":this._fieldErrors.push({fieldPath:H,handled:!1,kind:"missing_required_field.throw",owner:z,uiContext:void 0});return;case"LOG":this._fieldErrors.push({fieldPath:H,kind:"missing_required_field.log",owner:z,uiContext:void 0});return;default:G.action}}},E._handleRequiredFieldValue=function(G,z){return z==null?(this._maybeReportUnexpectedNull(G),!1):!0},E._catchErrors=function(G,z,H){var V=G;switch(z){case"RESULT":V=this._asResult(G);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(V=null);break}var K=this._fieldErrors;if(this._fieldErrors=H,K!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var Z=0;Z<K.length;Z++)this._fieldErrors.push(T(K[Z]))}return V},E._asResult=function(G){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:G};var z=this._fieldErrors.map(function(H){switch(H.kind){case"relay_field_payload.error":var V=H.error;V.message;var K=(0,i.default)(V,s);return K;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:H.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(H.fieldPath," in ").concat(H.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(H.fieldPath,"' in '").concat(H.owner,"'.")};case"missing_required_field.log":return null;default:H.kind,b(!1)}}).filter(Boolean);return{errors:z,ok:!1}},E._traverseSelections=function(G,z,H){for(var V=0;V<G.length;V++){var K=G[V];switch(K.kind){case"RequiredField":var Z=this._readClientSideDirectiveField(K,z,H);if(!this._handleRequiredFieldValue(K,Z))return!1;break;case"CatchField":{var re,W,X,J=this._fieldErrors;this._fieldErrors=null;var ie=this._readClientSideDirectiveField(K,z,H),ne=(re=(W=K.field)===null||W===void 0?void 0:W.backingField)!==null&&re!==void 0?re:K.field,ae=(X=ne?.alias)!==null&&X!==void 0?X:ne?.name;ae==null&&b(!1),H[ae]=this._catchErrors(ie,K.to,J);break}case"ScalarField":this._readScalar(K,z,H);break;case"LinkedField":K.plural?this._readPluralLink(K,z,H):this._readLink(K,z,H);break;case"Condition":var ue=!!this._getVariableValue(K.condition);if(ue===K.passingValue){var fe=this._traverseSelections(K.selections,z,H);if(!fe)return!1}break;case"InlineFragment":{var se=this._readInlineFragment(K,z,H,!1);if(se===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(K,z,H):this._readResolverField(K,z,H);break}case"FragmentSpread":this._createFragmentPointer(K,z,H);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(K,z,H);break}case"ModuleImport":this._readModuleImport(K,z,H);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(K,z,H);break;case"Defer":case"ClientExtension":{var pe=this._isMissingData,ce=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var he=this._traverseSelections(K.selections,z,H);if(this._isMissingData=pe||this._missingClientEdges.length>ce||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!he)return!1;break}case"Stream":{var ve=this._traverseSelections(K.selections,z,H);if(!ve)return!1;break}case"ActorChange":this._readActorChange(K,z,H);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(K.backingField.kind==="RelayResolver"||K.backingField.kind==="RelayLiveResolver")){var ye=K.linkedField;ye.plural?this._readPluralLink(ye,z,H):this._readLink(ye,z,H)}else this._readClientEdge(K,z,H);break;default:b(!1)}}return!0},E._readClientSideDirectiveField=function(G,z,H){switch(G.field.kind){case"ScalarField":return this._readScalar(G.field,z,H);case"LinkedField":return G.field.plural?this._readPluralLink(G.field,z,H):this._readLink(G.field,z,H);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(G.field,z,H):this._readResolverField(G.field,z,H);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(G.field.backingField.kind==="RelayResolver"||G.field.backingField.kind==="RelayLiveResolver")){var V=G.field;return V.linkedField.plural?this._readPluralLink(V.linkedField,z,H):this._readLink(V.linkedField,z,H)}else return this._readClientEdge(G.field,z,H);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(G.field,z,H);default:G.field.kind,b(!1)}},E._readResolverField=function(G,z,H){var V,K=c.getDataID(z),Z=this._fieldErrors;this._fieldErrors=null;var re=this._readResolverFieldImpl(G,K),W=(V=G.alias)!==null&&V!==void 0?V:G.name;return this._prependPreviousErrors(Z,W),H[W]=re,re},E._readResolverFieldImpl=function(G,z){var H=this,V=G.fragment,K,Z=function(se){return K!=null?{data:K.data,fieldErrors:K.fieldErrors,isMissingData:K.isMissingData}:(K=D(H._recordSource,se,null,H._resolverCache,void 0),{data:K.data,fieldErrors:K.fieldErrors,isMissingData:K.isMissingData})},re=function(){if(V!=null){var se={__fragmentOwner:H._owner,__fragments:(0,a.default)({},V.name,V.args?F(V.args,H._variables):{}),__id:z};H._clientEdgeTraversalPath.length>0&&H._clientEdgeTraversalPath[H._clientEdgeTraversalPath.length-1]!==null&&(se[h]=(0,o.default)(H._clientEdgeTraversalPath));var pe={getDataForResolverFragment:Z};return A(pe,function(){var ye=C(G,H._variables,se,H._resolverContext),be=ye[0],_e=ye[1];return{error:_e,resolverResult:be,snapshot:K}})}else{var ce=C(G,H._variables,null,H._resolverContext),he=ce[0],ve=ce[1];return{error:ve,resolverResult:he,snapshot:void 0}}},W=this._resolverCache.readFromCacheOrEvaluate(z,G,this._variables,re,Z),X=W[0],J=W[1],ie=W[2],ne=W[3],ae=W[4],ue=W[5];return this._propagateResolverMetadata(G.path,ne,ie,J,ae,ue),X},E._propagateResolverMetadata=function(G,z,H,V,K,Z){var re=this;if(z!=null){if(z.missingClientEdges!=null)for(var W=0;W<z.missingClientEdges.length;W++){var X=z.missingClientEdges[W];this._missingClientEdges.push(X)}if(z.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||z.missingLiveResolverFields.length>0;for(var J=0;J<z.missingLiveResolverFields.length;J++){var ie=z.missingLiveResolverFields[J];this._missingLiveResolverFields.push(ie)}}if(z.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var ne=0;ne<z.fieldErrors.length;ne++){var ae,ue=z.fieldErrors[ne];((ae=this._selector.node.metadata)===null||ae===void 0?void 0:ae.throwOnFieldError)===!0?this._fieldErrors.push(ue):this._fieldErrors.push(T(ue))}}this._isMissingData=this._isMissingData||z.isMissingData}if(H){var fe,se,pe={error:H,fieldPath:G,handled:!1,kind:"relay_resolver.error",owner:this._fragmentName,shouldThrow:(fe=(se=this._selector.node.metadata)===null||se===void 0?void 0:se.throwOnFieldError)!==null&&fe!==void 0?fe:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[pe]:this._fieldErrors.push(pe)}V!=null&&this._seenRecords.add(V),K!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(K)),Z?.forEach(function(ce){re._updatedDataIDs.add(ce)})},E._readClientEdge=function(G,z,H){var V=this,K,Z=G.backingField;Z.kind==="ClientExtension"&&b(!1);var re=(K=Z.alias)!==null&&K!==void 0?K:Z.name,W={};this._traverseSelections([Z],z,W);var X=W[re];if(X==null||d(X))return H[re]=X,X;if(G.linkedField.plural){Array.isArray(X)||b(!1);var J;G.kind!=="ClientEdgeToClientObject"&&b(!1),G.backingField.normalizationInfo==null?J=X.map(function(_e){var me,Pe=(me=G.concreteType)!==null&&me!==void 0?me:_e.__typename;typeof Pe!="string"&&b(!1);var Ne=x(_e,Z.path,V._owner.identifier),Ee=V._resolverCache.ensureClientRecord(Ne,Pe),Be=G.modelResolvers;if(Be!=null){var Ce=Be[Pe];Ce===void 0&&b(!1);var Re=V._readResolverFieldImpl(Ce,Ee);return Re!=null?Ee:null}return Ee}):J=X.map(function(_e){return x(_e,Z.path,V._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var ie=this._readLinkedIds(G.linkedField,J,z,H);return this._clientEdgeTraversalPath.pop(),H[re]=ie,ie}else{var ne,ae=x(X,Z.path,this._owner.identifier),ue,fe=(ne=G.concreteType)!==null&&ne!==void 0?ne:X.__typename,se;G.kind==="ClientEdgeToClientObject"?G.backingField.normalizationInfo==null?(typeof fe!="string"&&b(!1),ue=this._resolverCache.ensureClientRecord(ae,fe),se=null):(ue=ae,se=null):(ue=ae,se={clientEdgeDestinationID:ae,readerClientEdge:G});var pe=G.modelResolvers;if(pe!=null){typeof fe!="string"&&b(!1);var ce=pe[fe];ce===void 0&&b(!1);var he=this._readResolverFieldImpl(ce,ue);if(he==null)return H[re]=null,null}this._clientEdgeTraversalPath.push(se);var ve=H[re];ve==null||typeof ve=="object"||b(!1);var ye=this._fieldErrors;this._fieldErrors=null;var be=this._traverse(G.linkedField,ue,ve);return this._prependPreviousErrors(ye,re),this._clientEdgeTraversalPath.pop(),H[re]=be,be}},E._readScalar=function(G,z,H){var V,K=(V=G.alias)!==null&&V!==void 0?V:G.name,Z=P(G,this._variables);this._fieldGranularNotificationDataID!=null&&this._seenRecords.add(L(this._fieldGranularNotificationDataID,Z));var re=c.getValue(z,Z);return re===null||l.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(re)&&re.length===0?this._maybeAddFieldErrors(z,Z):re===void 0&&this._markDataAsMissing(K),H[K]=re,re},E._readLink=function(G,z,H){var V,K=(V=G.alias)!==null&&V!==void 0?V:G.name,Z=P(G,this._variables);this._fieldGranularNotificationDataID!=null&&this._seenRecords.add(L(this._fieldGranularNotificationDataID,Z));var re=c.getLinkedRecordID(z,Z);if(re==null)return H[K]=re,re===null?this._maybeAddFieldErrors(z,Z):re===void 0&&this._markDataAsMissing(K),re;var W=H[K];W==null||typeof W=="object"||b(!1);var X=this._fieldErrors;this._fieldErrors=null;var J=this._traverse(G,re,W);return this._prependPreviousErrors(X,K),H[K]=J,J},E._prependPreviousErrors=function(G,z){if(this._fieldErrors!=null){for(var H=0;H<this._fieldErrors.length;H++){var V=this._fieldErrors[H];V.owner===this._fragmentName&&(V.kind==="missing_expected_data.throw"||V.kind==="missing_expected_data.log"||V.kind==="missing_required_field.throw"||V.kind==="missing_required_field.log")&&(V.fieldPath="".concat(z,".").concat(V.fieldPath))}if(G!=null){for(var K=this._fieldErrors.length-1;K>=0;K--)G.push(this._fieldErrors[K]);this._fieldErrors=G}}else this._fieldErrors=G},E._readActorChange=function(G,z,H){var V,K=(V=G.alias)!==null&&V!==void 0?V:G.name,Z=P(G,this._variables),re=c.getActorLinkedRecordID(z,Z);if(re==null)return H[K]=re,re===void 0?this._markDataAsMissing(K):re===null&&this._maybeAddFieldErrors(z,Z),H[K];var W=re[0],X=re[1],J={};return this._createFragmentPointer(G.fragmentSpread,c.fromObject({__id:X}),J),H[K]={__fragmentRef:J,__viewer:W},H[K]},E._readPluralLink=function(G,z,H){var V=P(G,this._variables);this._fieldGranularNotificationDataID!=null&&this._seenRecords.add(L(this._fieldGranularNotificationDataID,V));var K=c.getLinkedRecordIDs(z,V);return(K===null||l.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(K)&&K.length===0)&&this._maybeAddFieldErrors(z,V),this._readLinkedIds(G,K,z,H)},E._readLinkedIds=function(G,z,H,V){var K=this,Z,re=(Z=G.alias)!==null&&Z!==void 0?Z:G.name;if(z==null)return V[re]=z,z===void 0&&this._markDataAsMissing(re),z;var W=V[re];W==null||Array.isArray(W)||b(!1);var X=this._fieldErrors;this._fieldErrors=null;var J=W||[];return z.forEach(function(ie,ne){if(ie==null){ie===void 0&&K._markDataAsMissing(String(ne)),J[ne]=ie;return}var ae=J[ne];ae==null||typeof ae=="object"||b(!1);var ue=K._fieldErrors;K._fieldErrors=null,J[ne]=K._traverse(G,ie,ae),K._prependPreviousErrors(ue,ne)}),this._prependPreviousErrors(X,re),V[re]=J,J},E._readModuleImport=function(G,z,H){var V=k(G.documentName),K=c.getValue(z,V),Z=K!==void 0?K:G.componentModuleProvider;if(Z==null){Z===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({args:G.args,kind:"FragmentSpread",name:G.fragmentName},z,H),H[_]=G.fragmentPropName,H[O]=Z},E._readAliasedInlineFragment=function(G,z,H){var V=this._fieldErrors;this._fieldErrors=null;var K=this._readInlineFragment(G.fragment,z,{},!0);return this._prependPreviousErrors(V,G.name),K===!1&&(K=null),H[G.name]=K,K},E._readInlineFragment=function(G,z,H,V){if(G.type==null){var K=this._traverseSelections(G.selections,z,H);return K===!1?!1:H}var Z=G.abstractKey;if(Z==null)if(this._recordMatchesTypeCondition(z,G.type)){var K=this._traverseSelections(G.selections,z,H);if(!K)return!1}else return null;else{var re=this._implementsInterface(z,Z);if(re===!1&&V)return null;var W=this._isMissingData,X=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=X||re===!1;var J=this._traverseSelections(G.selections,z,H);if(this._isWithinUnmatchedTypeRefinement=X,re===!1)return this._isMissingData=W,null;if(re==null)return;if(J===!1)return!1}return H},E._recordMatchesTypeCondition=function(G,z){var H=c.getType(G);return H!=null&&H===z||c.getDataID(G)===M},E._createFragmentPointer=function(G,z,H){var V=H[S];V==null&&(V=H[S]={}),typeof V=="object"&&V!=null||b(!1),H[N]==null&&(H[N]=c.getDataID(z));var K=F(G.args,this._variables,this._isWithinUnmatchedTypeRefinement);if(V[G.name]=K,H[g]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(H[h]=(0,o.default)(this._clientEdgeTraversalPath)),l.ENABLE_READER_FRAGMENTS_LOGGING){var Z;(Z=this._log)===null||Z===void 0||Z.call(this,{name:"reader.fragmentSpread",fragmentName:G.name,data:H})}},E._createInlineDataOrResolverFragmentPointer=function(G,z,H){var V=H[S];V==null&&(V=H[S]={}),typeof V=="object"&&V!=null||b(!1),H[N]==null&&(H[N]=c.getDataID(z));var K={},Z=this._fragmentName;this._fragmentName=G.name;var re=this._variables,W=G.args?F(G.args,this._variables):{};this._variables=u.getFragmentVariables(G,this._owner.variables,W),this._traverseSelections(G.selections,z,K),this._variables=re,this._fragmentName=Z,V[G.name]=K},E._implementsInterface=function(G,z){var H=c.getType(G),V=this._recordSource.get(y(H)),K=V!=null?c.getValue(V,z):null;return K==null&&this._markDataAsMissing("<abstract-type-hint>"),K},w}();function T(w){switch(w.kind){case"missing_expected_data.throw":case"missing_required_field.throw":case"relay_field_payload.error":case"relay_resolver.error":return(0,n.default)((0,n.default)({},w),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return w;default:w.kind,b(!1)}}function C(w,E,q,G){var z=typeof w.resolverModule=="function"?w.resolverModule:w.resolverModule.default,H=null,V=null;try{var K=[];w.fragment!=null&&K.push(q);var Z=w.args?F(w.args,E):void 0;K.push(Z),K.push(G),H=z.apply(null,K)}catch(re){H=null,re!==$&&(V=re)}return[H,V]}function x(w,E,q){if(typeof w=="string")return w;if(typeof w=="object"&&w!=null&&typeof w.id=="string")return w.id;b(!1)}return RelayReader_1={read:D},RelayReader_1}var RelayReferenceMarker_1,hasRequiredRelayReferenceMarker;function requireRelayReferenceMarker(){if(hasRequiredRelayReferenceMarker)return RelayReferenceMarker_1;hasRequiredRelayReferenceMarker=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireGetOperation(),i=requireCloneRelayHandleSourceField(),o=requireGetOutputTypeRecordIDs(),s=requireRelayConcreteVariables(),l=s.getLocalVariables,f=requireRelayModernRecord(),d=requireRelayStoreUtils(),u=requireTypeID(),c=u.generateTypeID,v=requireBrowser(),h=d.getReadTimeResolverStorageKey,m=d.getStorageKey,g=d.getModuleOperationKey;function _(N,O,M,F,L,k){var P=O.dataID,U=O.node,B=O.variables,j=new S(N,B,M,F,L,k);j.mark(U,P)}var S=function(){function N(M,F,L,k,P,U){this._operationLoader=k??null,this._operationName=null,this._useExecTimeResolvers=U??!1,this._recordSource=M,this._references=L,this._variables=F,this._shouldProcessClientComponents=P}var O=N.prototype;return O.mark=function(F,L){(F.kind==="Operation"||F.kind==="SplitOperation")&&(this._operationName=F.name),this._traverse(F,L)},O._traverse=function(F,L){this._references.add(L);var k=this._recordSource.get(L);k!=null&&this._traverseSelections(F.selections,k)},O._getVariableValue=function(F){return this._variables.hasOwnProperty(F)||v(!1),this._variables[F]},O._traverseSelections=function(F,L){var k=this;F.forEach(function(P){switch(P.kind){case"ActorChange":k._traverseLink(P.linkedField,L);break;case"LinkedField":P.plural?k._traversePluralLink(P,L):k._traverseLink(P,L);break;case"Condition":var U=!!k._getVariableValue(P.condition);U===P.passingValue&&k._traverseSelections(P.selections,L);break;case"InlineFragment":if(P.abstractKey==null){var B=f.getType(L);(B!=null&&B===P.type||B===d.ROOT_TYPE)&&k._traverseSelections(P.selections,L)}else{var j=f.getType(L),$=c(j);k._references.add($),k._traverseSelections(P.selections,L)}break;case"FragmentSpread":var A=k._variables;k._variables=l(k._variables,P.fragment.argumentDefinitions,P.args),k._traverseSelections(P.fragment.selections,L),k._variables=A;break;case"LinkedHandle":var R=i(P,F,k._variables);R.plural?k._traversePluralLink(R,L):k._traverseLink(R,L);break;case"Defer":case"Stream":k._traverseSelections(P.selections,L);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var y=f.getType(L),b=c(y);k._references.add(b);break}case"ModuleImport":k._traverseModuleImport(P,L);break;case"ClientExtension":k._traverseSelections(P.selections,L);break;case"ClientComponent":if(k._shouldProcessClientComponents===!1)break;k._traverseSelections(P.fragment.selections,L);break;case"RelayResolver":case"RelayLiveResolver":k._traverseResolverField(P,L);break;case"ClientEdgeToClientObject":k._traverseClientEdgeToClientObject(P,L);break;default:v(!1)}})},O._traverseClientEdgeToClientObject=function(F,L){if(this._useExecTimeResolvers){this._traverseLink(F.linkedField,L);return}var k=this._traverseResolverField(F.backingField,L);if(k!=null){var P=this._recordSource.get(k);if(P!=null){var U=F.linkedField;if(F.backingField.isOutputType){var B=o(P);if(B!=null){var j=(0,n.default)(B),$;try{for(j.s();!($=j.n()).done;){var A=$.value;this._references.add(A),this._traverse(U,A)}}catch(C){j.e(C)}finally{j.f()}}}else{var R=U.concreteType;if(R==null)return;if(U.plural){var y=f.getResolverLinkedRecordIDs(P,R);if(y!=null){var b=(0,n.default)(y),D;try{for(b.s();!(D=b.n()).done;){var I=D.value;I!=null&&this._traverse(U,I)}}catch(C){b.e(C)}finally{b.f()}}}else{var T=f.getResolverLinkedRecordID(P,R);T!=null&&this._traverse(U,T)}}}}},O._traverseResolverField=function(F,L){if(!this._useExecTimeResolvers){var k=h(F,this._variables),P=f.getLinkedRecordID(L,k);P!=null&&this._references.add(P);var U=F.fragment;return U!=null&&this._traverseSelections([U],L),P}},O._traverseModuleImport=function(F,L){var k=this._operationLoader;k===null&&v(!1);var P=g(F.documentName),U=f.getValue(L,P);if(U!=null){var B=k.get(U);if(B!=null){var j=a(B),$=this._variables;this._variables=l(this._variables,j.argumentDefinitions,F.args),this._traverseSelections(j.selections,L),this._variables=$}}},O._traverseLink=function(F,L){var k=m(F,this._variables),P=f.getLinkedRecordID(L,k);P!=null&&this._traverse(F,P)},O._traversePluralLink=function(F,L){var k=this,P=m(F,this._variables),U=f.getLinkedRecordIDs(L,P);U?.forEach(function(B){B!=null&&k._traverse(F,B)})},N}();return RelayReferenceMarker_1={mark:_},RelayReferenceMarker_1}var hasOverlappingIDs_1,hasRequiredHasOverlappingIDs;function requireHasOverlappingIDs(){if(hasRequiredHasOverlappingIDs)return hasOverlappingIDs_1;hasRequiredHasOverlappingIDs=1;var r=Symbol.iterator;function n(a,i){for(var o=a[r](),s=o.next();!s.done;){var l=s.value;if(i.has(l))return!0;s=o.next()}return!1}return hasOverlappingIDs_1=n,hasOverlappingIDs_1}var hasSignificantOverlappingIDs_1,hasRequiredHasSignificantOverlappingIDs;function requireHasSignificantOverlappingIDs(){if(hasRequiredHasSignificantOverlappingIDs)return hasSignificantOverlappingIDs_1;hasRequiredHasSignificantOverlappingIDs=1;var r=requireRelayStoreUtils(),n=r.ROOT_ID,a=requireViewerPattern(),i=a.VIEWER_ID,o=Symbol.iterator;function s(l,f){for(var d=l[o](),u=d.next();!u.done;){var c=u.value;if(f.has(c)&&c!==n&&c!==i)return!0;u=d.next()}return!1}return hasSignificantOverlappingIDs_1=s,hasSignificantOverlappingIDs_1}var RelayStoreSubscriptions_1,hasRequiredRelayStoreSubscriptions;function requireRelayStoreSubscriptions(){if(hasRequiredRelayStoreSubscriptions)return RelayStoreSubscriptions_1;hasRequiredRelayStoreSubscriptions=1,requireDeepFreeze();var r=requireRecycleNodesInto(),n=requireRelayFeatureFlags(),a=requireHasOverlappingIDs(),i=requireHasSignificantOverlappingIDs(),o=requireRelayReader(),s=function(){function l(d,u,c){this._subscriptions=new Set,this._staleSubscriptions=new Set,this.__log=d,this._resolverCache=u,this._resolverContext=c}var f=l.prototype;return f.subscribe=function(u,c){var v=this,h={backup:null,callback:c,snapshot:u,stale:!1},m=function(){v._subscriptions.delete(h),n.OPTIMIZE_NOTIFY&&h.stale&&v._staleSubscriptions.delete(h)};return this._subscriptions.add(h),{dispose:m}},f.snapshotSubscriptions=function(u){var c=this;this._subscriptions.forEach(function(v){if(!v.stale){v.backup=v.snapshot;return}var h=v.snapshot,m=o.read(u,h.selector,c.__log,c._resolverCache,c._resolverContext),g=r(h.data,m.data);m.data=g,v.backup=m})},f.restoreSubscriptions=function(){var u=this;this._subscriptions.forEach(function(c){var v=c.backup;c.backup=null,v?(v.data!==c.snapshot.data&&(c.stale=!0,n.OPTIMIZE_NOTIFY&&u._staleSubscriptions.add(c)),c.snapshot={data:c.snapshot.data,fieldErrors:v.fieldErrors,isMissingData:v.isMissingData,missingClientEdges:v.missingClientEdges,missingLiveResolverFields:v.missingLiveResolverFields,seenRecords:v.seenRecords,selector:v.selector}):(c.stale=!0,n.OPTIMIZE_NOTIFY&&u._staleSubscriptions.add(c))})},f.updateSubscriptions=function(u,c,v,h){var m=this,g=c.size!==0;this._subscriptions.forEach(function(_){var S=m._updateSubscription(u,_,c,g,h);S!=null&&v.push(S)})},f.updateStaleSubscriptions=function(u,c,v,h){var m=this,g=c.size!==0;this._staleSubscriptions.forEach(function(_){var S=m._updateSubscription(u,_,c,g,h);S!=null&&v.push(S)})},f._updateSubscription=function(u,c,v,h,m){var g=c.backup,_=c.callback,S=c.snapshot,N=c.stale,O=h&&a(S.seenRecords,v);if(!(!N&&!O)){var M=O||!g?o.read(u,S.selector,this.__log,this._resolverCache,this._resolverContext):g,F=r(S.data,M.data);if(M={data:F,fieldErrors:M.fieldErrors,isMissingData:M.isMissingData,missingClientEdges:M.missingClientEdges,missingLiveResolverFields:M.missingLiveResolverFields,seenRecords:M.seenRecords,selector:M.selector},c.snapshot=M,c.stale=!1,n.OPTIMIZE_NOTIFY&&N&&this._staleSubscriptions.delete(c),M.data!==S.data)return this.__log&&n.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",nextSnapshot:M,snapshot:S,sourceOperation:m}),_(M),S.selector.owner;if(n.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(N||i(S.seenRecords,v)))return S.selector.owner}},f.size=function(){return this._subscriptions.size},l}();return RelayStoreSubscriptions_1=s,RelayStoreSubscriptions_1}var RelayModernStore_1,hasRequiredRelayModernStore;function requireRelayModernStore(){if(hasRequiredRelayModernStore)return RelayModernStore_1;hasRequiredRelayModernStore=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=r(requireDefineProperty()),i=requireActorIdentifier(),o=i.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,s=i.assertInternalActorIdentifier;requireDeepFreeze();var l=requireRelayFeatureFlags(),f=requireResolveImmediate(),d=requireDataChecker(),u=requireDefaultGetDataID(),c=requireLiveResolverCache(),v=c.LiveResolverCache,h=c.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,m=c.getUpdatedDataIDs,g=requireRelayModernRecord(),_=requireRelayOptimisticRecordSource(),S=requireRelayReader(),N=requireRelayReferenceMarker(),O=requireRelayStoreSubscriptions(),M=requireRelayStoreUtils(),F=requireRelayStoreUtils(),L=F.FIELD_GRANULAR_NOTIFICATIONS_KEY,k=F.ROOT_ID,P=F.ROOT_TYPE,U=F.getFieldNotificationKey,B=requireBrowser(),j=10,$=function(){function b(I,T){var C=this,x,w,E,q,G,z,H,V,K;(0,a.default)(this,"_gcStep",function(){C._gcRun&&(C._gcRun.next().done?C._gcRun=null:C._gcScheduler(C._gcStep))}),this._currentWriteEpoch=0,this._gcHoldCounter=0,this._gcReleaseBufferSize=(x=T?.gcReleaseBufferSize)!==null&&x!==void 0?x:j,this._shouldRetainWithinTTL_EXPERIMENTAL=(w=T?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&w!==void 0?w:!1,this._gcRun=null,this._gcScheduler=(E=T?.gcScheduler)!==null&&E!==void 0?E:f,this._getDataID=(q=T?.getDataID)!==null&&q!==void 0?q:u,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(G=T?.log)!==null&&G!==void 0?G:null,this._queryCacheExpirationTime=T?.queryCacheExpirationTime,this._operationLoader=(z=T?.operationLoader)!==null&&z!==void 0?z:null,this._optimisticSource=null,this._recordSource=I,this._releaseBuffer=[],this._roots=new Map,this._shouldScheduleGC=!1,this._resolverCache=new v(function(){return C._getMutableRecordSource()},this),this._resolverContext=T?.resolverContext,this._storeSubscriptions=new O(T?.log,this._resolverCache,this._resolverContext),this._updatedRecordIDs=new Set,this._shouldProcessClientComponents=(H=T?.shouldProcessClientComponents)!==null&&H!==void 0?H:!1,this._treatMissingFieldsAsNull=(V=T?.treatMissingFieldsAsNull)!==null&&V!==void 0?V:!1,this._deferDeduplicatedFields=(K=T?.deferDeduplicatedFields)!==null&&K!==void 0?K:!1,this._actorIdentifier=T?.actorIdentifier,this._batch=null,A(this._recordSource)}var D=b.prototype;return D.getSource=function(){var T;return(T=this._optimisticSource)!==null&&T!==void 0?T:this._recordSource},D.getOperationLoader=function(){return this._operationLoader},D._getMutableRecordSource=function(){var T;return(T=this._optimisticSource)!==null&&T!==void 0?T:this._recordSource},D.getLiveResolverPromise=function(T){return this._resolverCache.getLiveResolverPromise(T)},D.batchLiveStateUpdates=function(T){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(T)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},D.experimental_batchUpdates=function(T){if(this._batch!=null)throw new Error("RelayModernStore: Cannot batch updates while already batching updates.");var C=this.__log;C?.({name:"store.batch.start"});var x={sourceOperations:[],invalidateStore:!1};this._batch=x;try{T()}finally{this._batch=null,this.notify(void 0,x.invalidateStore);var w=(0,n.default)(x.sourceOperations),E;try{for(w.s();!(E=w.n()).done;){var q=E.value;this._recordSourceOperation(q)}}catch(G){w.e(G)}finally{w.f()}C?.({name:"store.batch.complete",sourceOperations:x.sourceOperations,invalidateStore:x.invalidateStore})}},D.batchLiveStateUpdatesWithoutNotify=function(T){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});var C=!1;try{C=this._resolverCache.batchLiveStateUpdatesWithoutNotify(T)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}return C},D.check=function(T,C){var x,w,E,q,G,z,H,V=T.root,K=this._getMutableRecordSource(),Z=this._globalInvalidationEpoch,re=(x=(w=T.request.node.operation.use_exec_time_resolvers)!==null&&w!==void 0?w:((E=T.request.node.operation.exec_time_resolvers_enabled_provider)===null||E===void 0?void 0:E.get())===!0)!==null&&x!==void 0?x:!1,W=this._roots.get(T.request.identifier),X=W!=null?W.epoch:null;if(Z!=null&&(X==null||X<=Z))return{status:"stale"};var J=(q=C?.handlers)!==null&&q!==void 0?q:[],ie=(G=C?.getSourceForActor)!==null&&G!==void 0?G:function(ue){return s(ue),K},ne=(z=C?.getTargetForActor)!==null&&z!==void 0?z:function(ue){return s(ue),K},ae=d.check(ie,ne,(H=C?.defaultActorIdentifier)!==null&&H!==void 0?H:o,V,J,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,re);return y(ae,X,W?.fetchTime,this._queryCacheExpirationTime)},D.retain=function(T){var C=this,x=T.request.identifier,w=!1,E=function(){if(!w){w=!0;var z=C._roots.get(x);if(z!=null&&(z.refCount--,z.refCount===0)){var H=C._queryCacheExpirationTime,V=z.fetchTime!=null&&H!=null&&z.fetchTime<=Date.now()-H;if(V)C._shouldRetainWithinTTL_EXPERIMENTAL||C._roots.delete(x),C.scheduleGC();else if(C._releaseBuffer.push(x),C._releaseBuffer.length>C._gcReleaseBufferSize){var K=C._releaseBuffer.shift();C._shouldRetainWithinTTL_EXPERIMENTAL||C._roots.delete(K),C.scheduleGC()}}}},q=this._roots.get(x);return q!=null?(q.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(G){return G!==x})),q.refCount+=1):this._roots.set(x,{operation:T,refCount:1,epoch:null,fetchTime:null}),{dispose:E}},D.lookup=function(T){var C=this.__log;C?.({name:"store.lookup.start",selector:T});var x=this.getSource(),w=S.read(x,T,C,this._resolverCache,this._resolverContext);return C?.({name:"store.lookup.end",selector:T}),w},D.notify=function(T,C){var x=this,w=this._batch;if(w!=null)return T!=null&&w.sourceOperations.push(T),C===!0&&(w.invalidateStore=!0),[];var E=this.__log;E?.({name:"store.notify.start",sourceOperation:T}),l.OPTIMIZE_NOTIFY||(this._currentWriteEpoch++,C===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch)),(!l.OPTIMIZE_NOTIFY||this._updatedRecordIDs.size>0)&&this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var q=this.getSource(),G=[];return!l.OPTIMIZE_NOTIFY||this._updatedRecordIDs.size>0?this._storeSubscriptions.updateSubscriptions(q,this._updatedRecordIDs,G,T):this._storeSubscriptions.updateStaleSubscriptions(q,this._updatedRecordIDs,G,T),l.OPTIMIZE_NOTIFY&&(this._updatedRecordIDs.size>0||G.length>0||this._invalidatedRecordIDs.size>0||C===!0||this._globalInvalidationEpoch===this._currentWriteEpoch)&&(this._currentWriteEpoch++,C===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch)),(!l.OPTIMIZE_NOTIFY||this._invalidatedRecordIDs.size>0||C===!0)&&this._invalidationSubscriptions.forEach(function(z){x._updateInvalidationSubscription(z,C===!0)}),T!=null&&this._recordSourceOperation(T),E?.({name:"store.notify.complete",sourceOperation:T,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:G}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),G},D._recordSourceOperation=function(T){var C=T.request.identifier,x=this._roots.get(C);if(x!=null)x.epoch=this._currentWriteEpoch,x.fetchTime=Date.now();else if(T.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var w={operation:T,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(C),this._roots.set(C,w)}},D.publish=function(T,C){var x=this._getMutableRecordSource();R(x,T,this._currentWriteEpoch+1,C,this._updatedRecordIDs,this._invalidatedRecordIDs);var w=this.__log;w?.({name:"store.publish",source:T,optimistic:x===this._optimisticSource})},D.subscribe=function(T,C){return this._storeSubscriptions.subscribe(T,C)},D.holdGC=function(){var T=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var C=function(){T._gcHoldCounter>0&&(T._gcHoldCounter--,T._gcHoldCounter===0&&T._shouldScheduleGC&&(T.scheduleGC(),T._shouldScheduleGC=!1))};return{dispose:C}},D.toJSON=function(){return"RelayModernStore()"},D.getEpoch=function(){return this._currentWriteEpoch},D.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},D.lookupInvalidationState=function(T){var C=this,x=new Map;return T.forEach(function(w){var E,q=C.getSource().get(w);x.set(w,(E=g.getInvalidationEpoch(q))!==null&&E!==void 0?E:null)}),x.set("global",this._globalInvalidationEpoch),{dataIDs:T,invalidations:x}},D.checkInvalidationState=function(T){var C=this.lookupInvalidationState(T.dataIDs),x=C.invalidations,w=T.invalidations;if(x.get("global")!==w.get("global"))return!0;var E=(0,n.default)(T.dataIDs),q;try{for(E.s();!(q=E.n()).done;){var G=q.value;if(x.get(G)!==w.get(G))return!0}}catch(z){E.e(z)}finally{E.f()}return!1},D.subscribeToInvalidationState=function(T,C){var x=this,w={callback:C,invalidationState:T},E=function(){x._invalidationSubscriptions.delete(w)};return this._invalidationSubscriptions.add(w),{dispose:E}},D._updateInvalidationSubscription=function(T,C){var x=this,w=T.callback,E=T.invalidationState,q=E.dataIDs,G=C||q.some(function(z){return x._invalidatedRecordIDs.has(z)});G&&w()},D.snapshot=function(){this._optimisticSource!=null&&B(!1);var T=this.__log;T?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=_.create(this.getSource())},D.restore=function(){var T=this._optimisticSource;T||B(!1);var C=this.__log;C?.({name:"store.restore"});var x=_.getOptimisticRecordIDs(T);this._resolverCache.unsubscribeFromLiveResolverRecords(x),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(x)},D.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},D.__gc=function(){if(this._optimisticSource==null)for(var T=this._collect();!T.next().done;);},D._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var T=this.__log;e:for(;;){T?.({name:"store.gc.start"});var C=this._currentWriteEpoch,x=new Set,w=(0,n.default)(this._roots.entries()),E;try{for(w.s();!(E=w.n()).done;){var q,G,z,H=E.value,V=H[0],K=H[1],Z=K.operation,re=K.refCount,W=K.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var X=this._queryCacheExpirationTime;X==null&&B(!1);var J=W==null||W<=Date.now()-X,ie=J&&re===0&&!this._releaseBuffer.includes(V);if(ie)continue}var ne=Z.root,ae=(q=(G=Z.request.node.operation.use_exec_time_resolvers)!==null&&G!==void 0?G:((z=Z.request.node.operation.exec_time_resolvers_enabled_provider)===null||z===void 0?void 0:z.get())===!0)!==null&&q!==void 0?q:!1;if(N.mark(this._recordSource,ne,x,this._operationLoader,this._shouldProcessClientComponents,ae),yield,C!==this._currentWriteEpoch){T?.({name:"store.gc.interrupted"});continue e}}}catch(he){w.e(he)}finally{w.f()}for(var ue=this._recordSource.getRecordIDs(),fe=0;fe<ue.length;fe++){var se=ue[fe];if(!x.has(se)){var pe=this._recordSource.get(se);if(pe!=null){var ce=g.getValue(pe,h);ce?.()}this._recordSource.remove(se),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(se)}}T?.({name:"store.gc.end",references:x});return}}},D.__getNormalizationOptions=function(T){return{path:T,getDataID:this._getDataID,log:this.__log,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,deferDeduplicatedFields:this._deferDeduplicatedFields,shouldProcessClientComponents:this._shouldProcessClientComponents,actorIdentifier:this._actorIdentifier}},D.__notifyUpdatedSubscribers=function(T){var C=m(T),x=this._updatedRecordIDs;this._updatedRecordIDs=C,this.notify(),this._updatedRecordIDs=x},b}();function A(b){if(!b.has(k)){var D=g.create(k,P);l.ENABLE_FIELD_GRANULAR_NOTIFICATIONS&&g.setValue(D,L,!0),b.set(k,D)}}function R(b,D,I,T,C,x){T&&T.forEach(function(re){var W=b.get(re),X=D.get(re);if(X!==null){var J;W!=null?J=g.clone(W):J=X!=null?g.clone(X):null,J&&(g.setValue(J,M.INVALIDATED_AT_KEY,I),x.add(re),b.set(re,J))}});for(var w=D.getRecordIDs(),E=0;E<w.length;E++){var q=w[E],G=D.get(q),z=b.get(q);if(G&&z){var H=g.update(z,G);if(H!==z&&(C.add(q),b.set(q,H),g.getValue(H,L)))for(var V=g.getFields(H),K=0;K<V.length;K++){var Z=V[K];Z.startsWith("__")||g.hasFieldChanged(z,H,Z)&&C.add(U(q,Z))}}else G===null?(b.delete(q),z!==null&&C.add(q)):G&&(b.set(q,G),C.add(q))}}function y(b,D,I,T){var C=b.mostRecentlyInvalidatedAt,x=b.status;if(typeof C=="number"&&(D==null||C>D))return{status:"stale"};if(x==="missing")return{status:"missing"};if(I!=null&&T!=null){var w=I<=Date.now()-T;if(w)return{status:"stale"}}return{status:"available",fetchTime:I??null}}return RelayModernStore_1=$,RelayModernStore_1}var RelayRecordSourceSelectorProxy_1,hasRequiredRelayRecordSourceSelectorProxy;function requireRelayRecordSourceSelectorProxy(){if(hasRequiredRelayRecordSourceSelectorProxy)return RelayRecordSourceSelectorProxy_1;hasRequiredRelayRecordSourceSelectorProxy=1;var r=requireRelayStoreUtils(),n=r.ROOT_TYPE,a=r.getStorageKey,i=requireReadUpdatableFragment(),o=i.readUpdatableFragment,s=requireReadUpdatableQuery(),l=s.readUpdatableQuery,f=requireBrowser(),d=function(){function u(v,h,m,g){this.__mutator=v,this.__recordSource=h,this._readSelector=m,this._missingFieldHandlers=g}var c=u.prototype;return c.create=function(h,m){return this.__recordSource.create(h,m)},c.delete=function(h){this.__recordSource.delete(h)},c.get=function(h){return this.__recordSource.get(h)},c.getRoot=function(){return this.__recordSource.getRoot()},c.getOperationRoot=function(){var h=this.__recordSource.get(this._readSelector.dataID);return h||(h=this.__recordSource.create(this._readSelector.dataID,n)),h},c._getRootField=function(h,m,g){var _=h.node.selections.find(function(S){return S.kind==="LinkedField"&&S.name===m||S.kind==="RequiredField"&&S.field.name===m});return _&&_.kind==="RequiredField"&&(_=_.field),_&&_.kind==="LinkedField"||f(!1),_.plural!==g&&f(!1),_},c.getRootField=function(h){var m=this._getRootField(this._readSelector,h,!1),g=a(m,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(g)},c.getPluralRootField=function(h){var m=this._getRootField(this._readSelector,h,!0),g=a(m,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(g)},c.invalidateStore=function(){this.__recordSource.invalidateStore()},c.readUpdatableQuery=function(h,m){return l(h,m,this,this._missingFieldHandlers)},c.readUpdatableFragment=function(h,m){return o(h,m,this,this._missingFieldHandlers)},u}();return RelayRecordSourceSelectorProxy_1=d,RelayRecordSourceSelectorProxy_1}var RelayPublishQueue_1,hasRequiredRelayPublishQueue;function requireRelayPublishQueue(){if(hasRequiredRelayPublishQueue)return RelayPublishQueue_1;hasRequiredRelayPublishQueue=1;var r,n,a=requireRelayRecordSourceMutator(),i=requireRelayRecordSourceProxy(),o=requireRelayRecordSourceSelectorProxy(),s=requireRelayFeatureFlags(),l=requireRelayReader(),f=requireRelayRecordSource(),d=requireBrowser();requireWarning();var u=typeof commonjsGlobal<"u"?commonjsGlobal:typeof window<"u"?window:void 0,c=(r=u==null||(n=u.ErrorUtils)===null||n===void 0?void 0:n.applyWithGuard)!==null&&r!==void 0?r:function(m,g,_,S,N){return m.apply(g,_)},v=function(){function m(_,S,N,O,M){this._hasStoreSnapshot=!1,this._handlerProvider=S||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=_,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=N,this._missingFieldHandlers=O,this._log=M}var g=m.prototype;return g.applyUpdate=function(S){!this._appliedOptimisticUpdates.has(S)&&!this._pendingOptimisticUpdates.has(S)||d(!1),this._pendingOptimisticUpdates.add(S)},g.revertUpdate=function(S){this._pendingOptimisticUpdates.has(S)?this._pendingOptimisticUpdates.delete(S):this._appliedOptimisticUpdates.has(S)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(S))},g.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},g.commitPayload=function(S,N,O){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:S,payload:N,updater:O})},g.commitUpdate=function(S){this._pendingBackupRebase=!0,this._pendingData.add({kind:"updater",updater:S})},g.commitSource=function(S){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:S})},g.run=function(S){var N=this._appliedOptimisticUpdates===0&&!!this._gcHold,O=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!N;if(s.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&d(!1),this._isRunning=!0,O)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var M=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(S,M)},g._publishSourceFromPayload=function(S){var N=this,O=S.payload,M=S.operation,F=S.updater,L=O.source,k=O.fieldPayloads,P=new a(this._store.getSource(),L),U=new i(P,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(k&&k.length&&k.forEach(function(R){var y=N._handlerProvider&&N._handlerProvider(R.handle);y||d(!1),y.update(U,R)}),F){var B=M.fragment;B==null&&d(!1);var j=new o(P,U,B,this._missingFieldHandlers),$=h(L,B);F(j,$)}var A=U.getIDsMarkedForInvalidation();return this._store.publish(L,A),U.isStoreMarkedForInvalidation()},g._commitData=function(){var S=this;if(!this._pendingData.size)return!1;var N=!1;return this._pendingData.forEach(function(O){if(O.kind==="payload"){var M=S._publishSourceFromPayload(O);N=N||M}else if(O.kind==="source"){var F=O.source;S._store.publish(F)}else{var L=O.updater,k=f.create(),P=new a(S._store.getSource(),k),U=new i(P,S._getDataID,S._handlerProvider,S._missingFieldHandlers,S._log);c(L,null,[U],null,"RelayPublishQueue:commitData"),N=N||U.isStoreMarkedForInvalidation();var B=U.getIDsMarkedForInvalidation();S._store.publish(k,B)}}),this._pendingData.clear(),N},g._applyUpdates=function(){var S=this,N=f.create(),O=new a(this._store.getSource(),N),M=new i(O,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),F=function(k){if(k.storeUpdater){var P=k.storeUpdater;c(P,null,[M],null,"RelayPublishQueue:applyUpdates")}else{var U=k.operation,B=k.payload,j=k.updater,$=B.source,A=B.fieldPayloads;if($&&M.publishSource($,A),j){var R;$&&(R=h($,U.fragment));var y=new o(O,M,U.fragment,S._missingFieldHandlers);c(j,null,[y,R],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(F),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(L){F(L),S._appliedOptimisticUpdates.add(L)}),this._pendingOptimisticUpdates.clear()),this._store.publish(N)},m}();function h(m,g){var _=l.read(m,g,null,void 0,void 0).data;return _}return RelayPublishQueue_1=v,RelayPublishQueue_1}var RelayModernEnvironment_1,hasRequiredRelayModernEnvironment;function requireRelayModernEnvironment(){if(hasRequiredRelayModernEnvironment)return RelayModernEnvironment_1;hasRequiredRelayModernEnvironment=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireRelayDefaultHandlerProvider(),i=requireActorIdentifier(),o=i.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,s=i.assertInternalActorIdentifier,l=requireRelayObservable(),f=requireWrapNetworkWithLogObserver(),d=requireRelayOperationTracker(),u=requireRegisterEnvironmentWithDevTools(),c=requireDefaultGetDataID(),v=requireDefaultRelayFieldLogger(),h=requireNormalizeResponse(),m=requireOperationExecutor(),g=requireRelayModernStore(),_=requireRelayPublishQueue(),S=requireRelayRecordSource(),N=requireBrowser(),O=function(){function L(P){var U=this,B,j,$,A,R,y,b,D,I,T,C;this.configName=P.configName,this._treatMissingFieldsAsNull=P.treatMissingFieldsAsNull===!0,this._deferDeduplicatedFields=P.deferDeduplicatedFields===!0;var x=P.operationLoader,w=(B=P.store)!==null&&B!==void 0?B:new g(new S,{getDataID:P.getDataID,log:P.log,operationLoader:P.operationLoader,shouldProcessClientComponents:P.shouldProcessClientComponents});this.__log=(j=P.log)!==null&&j!==void 0?j:F,this.relayFieldLogger=($=P.relayFieldLogger)!==null&&$!==void 0?$:v,this._defaultRenderPolicy=(A=P.UNSTABLE_defaultRenderPolicy)!==null&&A!==void 0?A:"partial",this._operationLoader=x,this._operationExecutions=new Map,this._network=f(this,P.network),this._getDataID=(R=P.getDataID)!==null&&R!==void 0?R:c,this._missingFieldHandlers=(y=P.missingFieldHandlers)!==null&&y!==void 0?y:[],this._publishQueue=new _(w,(b=P.handlerProvider)!==null&&b!==void 0?b:a,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(D=P.scheduler)!==null&&D!==void 0?D:null,this._store=w,this.options=P.options,this._isServer=(I=P.isServer)!==null&&I!==void 0?I:!1,this._normalizeResponse=(T=P.normalizeResponse)!==null&&T!==void 0?T:h,this.__setNet=function(E){return U._network=f(U,E)},this._operationTracker=(C=P.operationTracker)!==null&&C!==void 0?C:new d,this._shouldProcessClientComponents=P.shouldProcessClientComponents,u(this)}var k=L.prototype;return k.getStore=function(){return this._store},k.getNetwork=function(){return this._network},k.getOperationTracker=function(){return this._operationTracker},k.getScheduler=function(){return this._scheduler},k.isRequestActive=function(U){var B=this._operationExecutions.get(U);return B==="active"},k.UNSTABLE_getDefaultRenderPolicy=function(){return this._defaultRenderPolicy},k.applyUpdate=function(U){var B=this,j=function(){B._scheduleUpdates(function(){B._publishQueue.revertUpdate(U),B._publishQueue.run()})};return this._scheduleUpdates(function(){B._publishQueue.applyUpdate(U),B._publishQueue.run()}),{dispose:j}},k.revertUpdate=function(U){var B=this;this._scheduleUpdates(function(){B._publishQueue.revertUpdate(U),B._publishQueue.run()})},k.replaceUpdate=function(U,B){var j=this;this._scheduleUpdates(function(){j._publishQueue.revertUpdate(U),j._publishQueue.applyUpdate(B),j._publishQueue.run()})},k.applyMutation=function(U){var B=this._execute({createSource:function(){return l.create(function($){})},isClientPayload:!1,operation:U.operation,optimisticConfig:U,updater:null}).subscribe({});return{dispose:function(){return B.unsubscribe()}}},k.check=function(U){return this._missingFieldHandlers.length===0&&!M(U)?this._store.check(U):this._checkSelectorAndHandleMissingFields(U,this._missingFieldHandlers)},k.commitPayload=function(U,B){this._execute({createSource:function(){return l.from({data:B})},isClientPayload:!0,operation:U,optimisticConfig:null,updater:null}).subscribe({})},k.commitUpdate=function(U){var B=this;this._scheduleUpdates(function(){B._publishQueue.commitUpdate(U),B._publishQueue.run()})},k.lookup=function(U){return this._store.lookup(U)},k.subscribe=function(U,B){return this._store.subscribe(U,B)},k.retain=function(U){return this._store.retain(U)},k.experimental_batchUpdates=function(U){var B=this._store.experimental_batchUpdates;typeof B!="function"&&N(!1),B.call(this._store,U)},k.isServer=function(){return this._isServer},k._checkSelectorAndHandleMissingFields=function(U,B){var j=this,$=S.create(),A=this._store.getSource(),R=this._store.check(U,{defaultActorIdentifier:o,getSourceForActor:function(b){return s(b),A},getTargetForActor:function(b){return s(b),$},handlers:B});return $.size()>0&&this._scheduleUpdates(function(){j._publishQueue.commitSource($),j._publishQueue.run()}),R},k._scheduleUpdates=function(U){var B=this._scheduler;B!=null?B.schedule(U):U()},k.execute=function(U){var B=this,j=U.operation;return this._execute({createSource:function(){return B.getNetwork().execute(j.request.node.params,j.request.variables,j.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return B.check(j)})},isClientPayload:!1,operation:j,optimisticConfig:null,updater:null})},k.executeSubscription=function(U){var B=this,j=U.operation,$=U.updater;return this._execute({createSource:function(){return B.getNetwork().execute(j.request.node.params,j.request.variables,j.request.cacheConfig||{},null)},isClientPayload:!1,operation:j,optimisticConfig:null,updater:$})},k.executeMutation=function(U){var B=this,j=U.operation,$=U.optimisticResponse,A=U.optimisticUpdater,R=U.updater,y=U.uploadables,b;return($||A)&&(b={operation:j,response:$,updater:A}),this._execute({createSource:function(){return B.getNetwork().execute(j.request.node.params,j.request.variables,(0,n.default)((0,n.default)({},j.request.cacheConfig),{},{force:!0}),y)},isClientPayload:!1,operation:j,optimisticConfig:b,updater:R})},k.executeWithSource=function(U){var B=U.operation,j=U.source;return this._execute({createSource:function(){return j},isClientPayload:!1,operation:B,optimisticConfig:null,updater:null})},k.toJSON=function(){var U;return"RelayModernEnvironment(".concat((U=this.configName)!==null&&U!==void 0?U:"",")")},k._execute=function(U){var B=this,j=U.createSource,$=U.isClientPayload,A=U.operation,R=U.optimisticConfig,y=U.updater,b=this._publishQueue,D=this._store;return l.create(function(I){var T=m.execute({actorIdentifier:o,getDataID:B._getDataID,getPublishQueue:function(x){return s(x),b},getStore:function(x){return s(x),D},isClientPayload:$,log:B.__log,normalizeResponse:B._normalizeResponse,operation:A,operationExecutions:B._operationExecutions,operationLoader:B._operationLoader,operationTracker:B._operationTracker,optimisticConfig:R,scheduler:B._scheduler,shouldProcessClientComponents:B._shouldProcessClientComponents,sink:I,source:j(),treatMissingFieldsAsNull:B._treatMissingFieldsAsNull,deferDeduplicatedFields:B._deferDeduplicatedFields,updater:y});return function(){return T.cancel()}})},L}();function M(L){return L.root.node.kind==="Operation"&&L.root.node.clientAbstractTypes!=null}O.prototype["@@RelayModernEnvironment"]=!0;function F(){}return RelayModernEnvironment_1=O,RelayModernEnvironment_1}var requestSubscription_1,hasRequiredRequestSubscription;function requireRequestSubscription(){if(hasRequiredRequestSubscription)return requestSubscription_1;hasRequiredRequestSubscription=1;var r=requireRelayDeclarativeMutationConfig(),n=requireGraphQLTag(),a=n.getRequest,i=requireRelayModernOperationDescriptor(),o=i.createOperationDescriptor,s=requireRelayModernSelector(),l=s.createReaderSelector;requireWarning();function f(d,u){var c=a(u.subscription);if(c.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var v=u.configs,h=u.onCompleted,m=u.onError,g=u.onNext,_=u.variables,S=u.cacheConfig,N=o(c,_,S),O=v?r.convert(v,c,null,u.updater):u,M=O.updater,F=d.executeSubscription({operation:N,updater:M}).subscribe({complete:h,error:m,next:function(k){if(g!=null){var P=N.fragment,U;if(Array.isArray(k)){var B,j;U=(B=k[0])===null||B===void 0||(j=B.extensions)===null||j===void 0?void 0:j.__relay_subscription_root_id}else{var $;U=($=k.extensions)===null||$===void 0?void 0:$.__relay_subscription_root_id}typeof U=="string"&&(P=l(P.node,U,P.variables,P.owner));var A=d.lookup(P).data;g(A)}}});return{dispose:F.unsubscribe}}return requestSubscription_1=f,requestSubscription_1}var createPayloadFor3DField_1,hasRequiredCreatePayloadFor3DField;function requireCreatePayloadFor3DField(){if(hasRequiredCreatePayloadFor3DField)return createPayloadFor3DField_1;hasRequiredCreatePayloadFor3DField=1;var r=requireInteropRequireDefault().default,n=r(requireObjectSpread2()),a=requireRelayStoreUtils(),i=a.getModuleComponentKey,o=a.getModuleOperationKey;function s(l,f,d,u){var c=(0,n.default)({},u);return c[i(l)]=d,c[o(l)]=f,c}return createPayloadFor3DField_1=s,createPayloadFor3DField_1}var isEmptyObject_1,hasRequiredIsEmptyObject;function requireIsEmptyObject(){if(hasRequiredIsEmptyObject)return isEmptyObject_1;hasRequiredIsEmptyObject=1;var r=Object.prototype.hasOwnProperty;function n(a){for(var i in a)if(r.call(a,i))return!1;return!0}return isEmptyObject_1=n,isEmptyObject_1}var getFragmentIdentifier_1,hasRequiredGetFragmentIdentifier;function requireGetFragmentIdentifier(){if(hasRequiredGetFragmentIdentifier)return getFragmentIdentifier_1;hasRequiredGetFragmentIdentifier=1;var r=requireRelayModernSelector(),n=r.getDataIDsFromFragment,a=r.getSelector,i=r.getVariablesFromFragment,o=requireIsEmptyObject(),s=requireRelayFeatureFlags(),l=requireStableCopy(),f=l.stableCopy,d=requireStringInterner(),u=d.intern;function c(v,h){var m=a(v,h),g=m==null?"null":m.kind==="SingularReaderSelector"?m.owner.identifier:"["+m.selectors.map(function(F){return F.owner.identifier}).join(",")+"]",_=i(v,h),S=n(v,h);if(s.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var N=typeof S>"u"?"missing":S==null?"null":Array.isArray(S)?"["+S.join(",")+"]":S;return N=s.STRING_INTERN_LEVEL<=1?N:u(N,s.MAX_DATA_ID_LENGTH),g+"/"+v.name+"/"+(_==null||o(_)?"{}":JSON.stringify(f(_)))+"/"+N}else{var O,M=(O=JSON.stringify(S))!==null&&O!==void 0?O:"missing";return M=s.STRING_INTERN_LEVEL<=1?M:u(M,s.MAX_DATA_ID_LENGTH),g+"/"+v.name+"/"+JSON.stringify(f(_))+"/"+M}}return getFragmentIdentifier_1=c,getFragmentIdentifier_1}var getRefetchMetadata_1,hasRequiredGetRefetchMetadata;function requireGetRefetchMetadata(){if(hasRequiredGetRefetchMetadata)return getRefetchMetadata_1;hasRequiredGetRefetchMetadata=1;var r=requireBrowser();function n(a,i){var o,s;((o=a.metadata)===null||o===void 0?void 0:o.plural)===!0&&r(!1);var l=(s=a.metadata)===null||s===void 0?void 0:s.refetch;l==null&&r(!1);var f=l.operation.default?l.operation.default:l.operation,d=l.fragmentPathInResult;typeof f=="string"&&r(!1);var u=l.identifierInfo;return u!=null&&(u.identifierField==null||typeof u.identifierField=="string"||r(!1),u.identifierQueryVariableName==null||typeof u.identifierQueryVariableName=="string"||r(!1)),{fragmentRefPathInResponse:d,identifierInfo:u,refetchableRequest:f,refetchMetadata:l}}return getRefetchMetadata_1=n,getRefetchMetadata_1}var getPaginationMetadata_1,hasRequiredGetPaginationMetadata;function requireGetPaginationMetadata(){if(hasRequiredGetPaginationMetadata)return getPaginationMetadata_1;hasRequiredGetPaginationMetadata=1;var r=requireGetRefetchMetadata(),n=requireBrowser();function a(i,o){var s,l,f=r(i,o),d=f.refetchableRequest,u=f.refetchMetadata,c=u.connection;c==null&&n(!1);var v=c.path,h=((s=(l=i.metadata)===null||l===void 0?void 0:l.connection)!==null&&s!==void 0?s:[])[0];h==null&&n(!1);var m=u.identifierInfo;return m?.identifierField==null||typeof m.identifierField=="string"||n(!1),{connectionPathInFragmentData:v,identifierField:m?.identifierField,paginationRequest:d,paginationMetadata:c,stream:h.stream===!0}}return getPaginationMetadata_1=a,getPaginationMetadata_1}var getPaginationVariables_1,hasRequiredGetPaginationVariables;function requireGetPaginationVariables(){if(hasRequiredGetPaginationVariables)return getPaginationVariables_1;hasRequiredGetPaginationVariables=1;var r=requireInteropRequireDefault().default,n=r(requireDefineProperty()),a=r(requireObjectSpread2()),i=requireBrowser();requireWarning();function o(s,l,f,d,u,c){var v,h=c.backward,m=c.forward;if(s==="backward"){var g;h!=null&&h.count!=null&&h.cursor!=null||i(!1);var _=(0,a.default)((0,a.default)((0,a.default)({},d),u),{},(g={},(0,n.default)(g,h.cursor,f),(0,n.default)(g,h.count,l),g));return m&&m.cursor&&(_[m.cursor]=null),m&&m.count&&(_[m.count]=null),_}m!=null&&m.count!=null&&m.cursor!=null||i(!1);var S=(0,a.default)((0,a.default)((0,a.default)({},d),u),{},(v={},(0,n.default)(v,m.cursor,f),(0,n.default)(v,m.count,l),v));return h&&h.cursor&&(S[h.cursor]=null),h&&h.count&&(S[h.count]=null),S}return getPaginationVariables_1=o,getPaginationVariables_1}var getValueAtPath_1,hasRequiredGetValueAtPath;function requireGetValueAtPath(){if(hasRequiredGetValueAtPath)return getValueAtPath_1;hasRequiredGetValueAtPath=1;var r=requireInteropRequireDefault().default,n=r(requireCreateForOfIteratorHelper()),a=requireBrowser();function i(o,s){var l=o,f=(0,n.default)(s),d;try{for(f.s();!(d=f.n()).done;){var u=d.value;if(l==null)return null;typeof u=="number"?(Array.isArray(l)||a(!1),l=l[u]):(typeof l=="object"&&!Array.isArray(l)||a(!1),l=l[u])}}catch(c){f.e(c)}finally{f.f()}return l}return getValueAtPath_1=i,getValueAtPath_1}var RelayProfiler_1,hasRequiredRelayProfiler;function requireRelayProfiler(){if(hasRequiredRelayProfiler)return RelayProfiler_1;hasRequiredRelayProfiler=1;var r={},n={stop:function(){}},a={profile:function(s,l){var f=r[s];if(f&&f.length>0){for(var d=[],u=f.length-1;u>=0;u--){var c=f[u](s,l);d.unshift(c)}return{stop:function(h){d.forEach(function(m){return m(h)})}}}return n},attachProfileHandler:function(s,l){r.hasOwnProperty(s)||(r[s]=[]),r[s].push(l)},detachProfileHandler:function(s,l){r.hasOwnProperty(s)&&i(r[s],l)}};function i(o,s){var l=o.indexOf(s);l!==-1&&o.splice(l,1)}return RelayProfiler_1=a,RelayProfiler_1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var r=requireExperimental(),n=r.isErrorResult,a=r.isValueResult,i=requireConnectionHandler(),o=requireConnectionInterface(),s=requireMutationHandlers(),l=requireRelayDefaultHandlerProvider(),f=requireApplyOptimisticMutation(),d=requireCommitLocalUpdate(),u=requireCommitMutation(),c=requireRelayDeclarativeMutationConfig(),v=requireRelayNetwork(),h=requireRelayObservable(),m=requireRelayQueryResponseCache(),g=requireFetchQuery(),_=requireFetchQuery_DEPRECATED(),S=requireFetchQueryInternal(),N=requireGraphQLTag(),O=requirePreloadableQueryRegistry(),M=requireClientID(),F=M.generateClientID,L=M.generateUniqueClientID,k=M.isClientID,P=requireCreateFragmentSpecResolver(),U=requireCreateRelayContext(),B=requireCreateRelayLoggingContext(),j=requireDefaultGetDataID(),$=requireIsRelayModernEnvironment(),A=requireLiveResolverSuspenseSentinel(),R=A.isSuspenseSentinel,y=A.suspenseSentinel,b=requireNormalizationEngine(),D=requireNormalizeResponse(),I=requireReadInlineData(),T=requireRelayConcreteVariables(),C=requireRelayModernEnvironment(),x=requireRelayModernOperationDescriptor(),w=requireRelayModernRecord(),E=requireRelayModernSelector(),q=requireRelayModernStore(),G=requireRelayOperationTracker(),z=requireRelayRecordSource(),H=requireRelayStoreUtils(),V=requireResolverFragments(),K=requireViewerPattern(),Z=requireRequestSubscription(),re=requireCreatePayloadFor3DField(),W=requireDeepFreeze(),X=requireGetFragmentIdentifier(),J=requireGetPaginationMetadata(),ie=requireGetPaginationVariables(),ne=requireGetPendingOperationsForFragment(),ae=requireGetRefetchMetadata(),ue=requireGetRelayHandleKey(),fe=requireGetRequestIdentifier(),se=requireGetValueAtPath(),pe=requireHandlePotentialSnapshotErrors(),ce=pe.handlePotentialSnapshotErrors,he=requireIsPromise(),ve=requireIsScalarAndEqual(),ye=requireRecycleNodesInto(),be=requireRelayConcreteNode(),_e=requireRelayDefaultHandleKey(),me=requireRelayError(),Pe=requireRelayFeatureFlags(),Ne=requireRelayProfiler(),Ee=requireRelayReplaySubject(),Be=requireStableCopy(),Ce=Be.hasCycle,Re=Be.stableCopy,Ge=requireWithProvidedVariables(),Me=E.areEqualSelectors,Te=E.createNormalizationSelector,Ke=E.createReaderSelector,Fe=E.getDataIDsFromFragment,Ie=E.getDataIDsFromObject,Qe=E.getPluralSelector,qe=E.getSelector,Se=E.getSelectorsFromObject,je=E.getSingularSelector,Le=E.getVariablesFromFragment,we=E.getVariablesFromObject,He=E.getVariablesFromPluralFragment,$e=E.getVariablesFromSingularFragment,ee=x.createOperationDescriptor,Q=x.createRequestDescriptor,Y=H.getArgumentValues,te=H.getModuleComponentKey,oe=H.getModuleOperationKey,le=H.getStorageKey,de=H.FRAGMENTS_KEY,De=H.FRAGMENT_OWNER_KEY,Ae=H.ID_KEY,ge=H.REF_KEY,ke=H.REFS_KEY,xe=H.ROOT_ID,Oe=H.ROOT_TYPE,ze=H.TYPENAME_KEY,Ue=N.getNode,Ve=N.getFragment,Ye=N.getInlineDataFragment,We=N.getPaginationFragment,Xe=N.getRefetchableFragment,Je=N.getRequest,Ze=N.graphql,er=N.isFragment,rr=N.isInlineDataFragment,tr=N.isRequest,nr=V.readFragment,ir=_e.DEFAULT_HANDLE_KEY,ar=c.MutationTypes,sr=c.RangeOperations,or=K.VIEWER_ID,ur=K.VIEWER_TYPE,lr={ResolverFragments:V,OperationTracker:G,createRelayContext:U,createRelayLoggingContext:B,defaultGetDataID:j,getOperationVariables:T.getOperationVariables,getLocalVariables:T.getLocalVariables,fetchQuery:S.fetchQuery,fetchQueryDeduped:S.fetchQueryDeduped,getPromiseForActiveRequest:S.getPromiseForActiveRequest,getObservableForActiveRequest:S.getObservableForActiveRequest,NormalizationEngine:b,normalizeResponse:D,withProvidedVariables:Ge};return lib={Environment:C,Network:v,Observable:h,QueryResponseCache:m,RecordSource:z,Record:w,ReplaySubject:Ee,Store:q,areEqualSelectors:Me,createFragmentSpecResolver:P,createNormalizationSelector:Te,createOperationDescriptor:ee,createReaderSelector:Ke,createRequestDescriptor:Q,getArgumentValues:Y,getDataIDsFromFragment:Fe,getDataIDsFromObject:Ie,getNode:Ue,getFragment:Ve,getInlineDataFragment:Ye,getModuleComponentKey:te,getModuleOperationKey:oe,getPaginationFragment:We,getPluralSelector:Qe,getRefetchableFragment:Xe,getRequest:Je,getRequestIdentifier:fe,getSelector:qe,getSelectorsFromObject:Se,getSingularSelector:je,getStorageKey:le,getVariablesFromFragment:Le,getVariablesFromObject:we,getVariablesFromPluralFragment:He,getVariablesFromSingularFragment:$e,handlePotentialSnapshotErrors:ce,graphql:Ze,isErrorResult:n,isValueResult:a,isFragment:er,isInlineDataFragment:rr,isSuspenseSentinel:R,suspenseSentinel:y,isRequest:tr,readInlineData:I,readFragment:nr,MutationTypes:ar,RangeOperations:sr,DefaultHandlerProvider:l,ConnectionHandler:i,MutationHandlers:s,VIEWER_ID:or,VIEWER_TYPE:ur,applyOptimisticMutation:f,commitLocalUpdate:d,commitMutation:u,fetchQuery:g,fetchQuery_DEPRECATED:_,isRelayModernEnvironment:$,requestSubscription:Z,ConnectionInterface:o,PreloadableQueryRegistry:O,RelayProfiler:Ne,createPayloadFor3DField:re,RelayConcreteNode:be,RelayError:me,RelayFeatureFlags:Pe,DEFAULT_HANDLE_KEY:ir,FRAGMENTS_KEY:de,FRAGMENT_OWNER_KEY:De,ID_KEY:Ae,REF_KEY:ge,REFS_KEY:ke,ROOT_ID:xe,ROOT_TYPE:Oe,TYPENAME_KEY:ze,deepFreeze:W,generateClientID:F,generateUniqueClientID:L,getRelayHandleKey:ue,isClientID:k,isPromise:he,isScalarAndEqual:ve,recycleNodesInto:ye,stableCopy:Re,hasCycle:Ce,getFragmentIdentifier:X,getRefetchMetadata:ae,getPaginationMetadata:J,getPaginationVariables:ie,getPendingOperationsForFragment:ne,getValueAtPath:se,__internal:lr},lib}var relayRuntime,hasRequiredRelayRuntime;function requireRelayRuntime(){return hasRequiredRelayRuntime||(hasRequiredRelayRuntime=1,relayRuntime=requireLib()),relayRuntime}var relayRuntimeExports=requireRelayRuntime();function fetchRelayQuery(r,n,a){return new Promise((i,o)=>{const{unsubscribe:s}=relayRuntimeExports.fetchQuery(relayEnvironment,r,n).subscribe({complete:()=>{i(null)},error:()=>{o(),s()},next:f=>{i(f),s()}});function l(){s(),o(),a?.removeEventListener("abort",l)}a?.addEventListener("abort",l)})}const TOKEN_HEADER_KEY="x-graphql-event-stream-token";function validateStreamEvent(r){if(r=r,r!=="next"&&r!=="complete")throw new Error(`Invalid stream event "${r}"`);return r}function parseStreamData(r,n){if(n)try{n=JSON.parse(n)}catch{throw new Error("Invalid stream data")}if(r==="next"&&!n)throw new Error('Stream data must be an object for "next" events');return n||null}const version="17.0.2",versionInfo=Object.freeze({major:17,minor:0,patch:2,preReleaseTag:null}),MAX_ARRAY_LENGTH=10,MAX_RECURSIVE_DEPTH=2;function inspect(r){return formatValue(r,[])}function formatValue(r,n){switch(typeof r){case"string":return JSON.stringify(r);case"function":return r.name?`[function ${r.name}]`:"[function]";case"object":return formatObjectValue(r,n);default:return String(r)}}function formatObjectValue(r,n){if(r===null)return"null";if(n.includes(r))return"[Circular]";const a=[...n,r];if(isJSONable(r)){const i=r.toJSON();if(i!==r)return typeof i=="string"?i:formatValue(i,a)}else if(Array.isArray(r))return formatArray(r,a);return formatObject(r,a)}function isJSONable(r){return typeof r.toJSON=="function"}function formatObject(r,n){const a=Object.entries(r);return a.length===0?"{}":n.length>MAX_RECURSIVE_DEPTH?"["+getObjectTag(r)+"]":"{ "+a.map(([o,s])=>o+": "+formatValue(s,n)).join(", ")+" }"}function formatArray(r,n){if(r.length===0)return"[]";if(n.length>MAX_RECURSIVE_DEPTH)return"[Array]";const a=Math.min(MAX_ARRAY_LENGTH,r.length),i=r.length-a,o=[];for(let s=0;s<a;++s)o.push(formatValue(r[s],n));return i===1?o.push("... 1 more item"):i>1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}function getObjectTag(r){const n=Object.prototype.toString.call(r).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof r.constructor=="function"){const a=r.constructor.name;if(typeof a=="string"&&a!=="")return a}return n}function devInstanceOf(r,n,a){if(r?.__kind===n)return!0;if(typeof r=="object"&&r!==null){const i=a.prototype[Symbol.toStringTag],o=Symbol.toStringTag in r?r[Symbol.toStringTag]:r.constructor?.name;if(i===o){const s=inspect(r);throw new Error(`Cannot use ${i} "${s}" from another module or realm.
66
+
67
+ Ensure that there is only one instance of "graphql" in the node_modules
68
+ directory. If different versions of "graphql" are the dependencies of other
69
+ relied on modules, use "resolutions" to ensure only one version is installed.
70
+
71
+ https://yarnpkg.com/en/docs/selective-version-resolutions
72
+
73
+ Duplicate "graphql" modules cannot be used at the same time since different
74
+ versions may have different capabilities and behavior. The data from one
75
+ version used in the function from another could produce confusing and
76
+ spurious results.`)}}return!1}function prodInstanceOf(r,n){return r?.__kind===n}let instanceOf=prodInstanceOf;function enableDevInstanceOf(){instanceOf=devInstanceOf}let devMode=!1;function enableDevMode(){devMode=!0,enableDevInstanceOf()}function isDevModeEnabled(){return devMode}function isPromise(r){return r instanceof Promise}function isPromiseLike(r){return typeof r?.then=="function"}function toError(r){return r instanceof Error?r:new NonErrorThrown(r)}class NonErrorThrown extends Error{constructor(n){super("Unexpected error value: "+inspect(n)),this.name="NonErrorThrown",this.thrownValue=n}}function isObjectLike(r){return typeof r=="object"&&r!==null}function invariant(r,n){throw new Error(n??"Unexpected invariant triggered.")}const LineRegExp=/\r\n|[\n\r]/g;function getLocation$1(r,n){let a=0,i=1;for(const o of r.body.matchAll(LineRegExp)){if(typeof o.index!="number"&&invariant(),o.index>=n)break;a=o.index+o[0].length,i+=1}return{line:i,column:n+1-a}}function printLocation(r){return printSourceLocation(r.source,getLocation$1(r.source,r.start))}function printSourceLocation(r,n){const a=r.locationOffset.column-1,i="".padStart(a)+r.body,o=n.line-1,s=r.locationOffset.line-1,l=n.line+s,f=n.line===1?a:0,d=n.column+f,u=`${r.name}:${l}:${d}
77
+ `,c=i.split(/\r\n|[\n\r]/g),v=c[o];if(v.length>120){const h=Math.floor(d/80),m=d%80,g=[];for(let _=0;_<v.length;_+=80)g.push(v.slice(_,_+80));return u+printPrefixedLines([[`${l} |`,g[0]],...g.slice(1,h+1).map(_=>["|",_]),["|","^".padStart(m)],["|",g[h+1]]])}return u+printPrefixedLines([[`${l-1} |`,c[o-1]],[`${l} |`,v],["|","^".padStart(d)],[`${l+1} |`,c[o+1]]])}function printPrefixedLines(r){const n=r.filter(([i,o])=>o!==void 0),a=Math.max(...n.map(([i])=>i.length));return n.map(([i,o])=>i.padStart(a)+(o?" "+o:"")).join(`
78
+ `)}class GraphQLError extends Error{constructor(n,a={}){const{nodes:i,source:o,positions:s,path:l,originalError:f,cause:d,extensions:u}=a,c="cause"in a,v=c?d:f,h=c||f!=null?{cause:v}:void 0;super(n,h),this.name="GraphQLError",this.path=l??void 0;const m=f??(d instanceof Error?d:void 0);this.originalError=m,this.nodes=undefinedIfEmpty(Array.isArray(i)?i:i?[i]:void 0);const g=undefinedIfEmpty(this.nodes?.map(S=>S.loc).filter(S=>S!=null));this.source=o??g?.[0]?.source,this.positions=s??g?.map(S=>S.start),this.locations=s&&o?s.map(S=>getLocation$1(o,S)):g?.map(S=>getLocation$1(S.source,S.start));const _=isObjectLike(m?.extensions)?m.extensions:void 0;this.extensions=u??_??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),f?.stack!=null?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let n=this.message;if(this.nodes)for(const a of this.nodes)a.loc&&(n+=`
79
+
80
+ `+printLocation(a.loc));else if(this.source&&this.locations)for(const a of this.locations)n+=`
81
+
82
+ `+printSourceLocation(this.source,a);return n}toJSON(){const n={message:this.message};return this.locations!=null&&(n.locations=this.locations),this.path!=null&&(n.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(n.extensions=this.extensions),n}}function undefinedIfEmpty(r){return r===void 0||r.length===0?void 0:r}function ensureGraphQLError(r){if(r instanceof GraphQLError)return r;const n=toError(r);return new GraphQLError(n.message,{originalError:n})}class AccumulatorMap extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(n,a){const i=this.get(n);i===void 0?this.set(n,[a]):i.push(a)}}function capitalize(r){return r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()}function orList(r){return formatList("or",r)}function andList(r){return formatList("and",r)}function formatList(r,n){switch(n.length===0&&invariant(),n.length){case 1:return n[0];case 2:return n[0]+" "+r+" "+n[1]}const a=n.slice(0,-1),i=n.at(-1);return a.join(", ")+", "+r+" "+i}function isIterableObject(r){return typeof r=="object"&&typeof r?.[Symbol.iterator]=="function"}function keyMap(r,n){const a=Object.create(null);for(const i of r)a[n(i)]=i;return a}function mapValue(r,n){const a=Object.create(null);for(const i of Object.keys(r))a[i]=n(r[i],i);return a}function printPathArray(r){return r.length===0?"":` at ${r.map(n=>typeof n=="number"?`[${n}]`:`.${n}`).join("")}`}let Location$1=class{constructor(n,a,i){this.start=n.start,this.end=a.end,this.startToken=n,this.endToken=a,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};class Token{constructor(n,a,i,o,s,l){this.kind=n,this.start=a,this.end=i,this.line=o,this.column=s,this.value=l,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentArgument:["name","value"],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},kindValues=new Set(Object.keys(QueryDocumentKeys));function isNode(r){const n=r?.kind;return typeof n=="string"&&kindValues.has(n)}const OperationTypeNode={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"},NAME="Name",DOCUMENT="Document",OPERATION_DEFINITION="OperationDefinition",VARIABLE_DEFINITION="VariableDefinition",SELECTION_SET="SelectionSet",FIELD="Field",ARGUMENT="Argument",FRAGMENT_ARGUMENT="FragmentArgument",FRAGMENT_SPREAD="FragmentSpread",INLINE_FRAGMENT="InlineFragment",FRAGMENT_DEFINITION="FragmentDefinition",VARIABLE="Variable",INT="IntValue",FLOAT="FloatValue",STRING="StringValue",BOOLEAN="BooleanValue",NULL="NullValue",ENUM="EnumValue",LIST="ListValue",OBJECT="ObjectValue",OBJECT_FIELD="ObjectField",DIRECTIVE="Directive",NAMED_TYPE="NamedType",LIST_TYPE="ListType",NON_NULL_TYPE="NonNullType",SCHEMA_DEFINITION="SchemaDefinition",OPERATION_TYPE_DEFINITION="OperationTypeDefinition",SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",FIELD_DEFINITION="FieldDefinition",INPUT_VALUE_DEFINITION="InputValueDefinition",INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",UNION_TYPE_DEFINITION="UnionTypeDefinition",ENUM_TYPE_DEFINITION="EnumTypeDefinition",ENUM_VALUE_DEFINITION="EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",DIRECTIVE_DEFINITION="DirectiveDefinition",SCHEMA_EXTENSION="SchemaExtension",DIRECTIVE_EXTENSION="DirectiveExtension",SCALAR_TYPE_EXTENSION="ScalarTypeExtension",OBJECT_TYPE_EXTENSION="ObjectTypeExtension",INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",UNION_TYPE_EXTENSION="UnionTypeExtension",ENUM_TYPE_EXTENSION="EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",TYPE_COORDINATE="TypeCoordinate",MEMBER_COORDINATE="MemberCoordinate",ARGUMENT_COORDINATE="ArgumentCoordinate",DIRECTIVE_COORDINATE="DirectiveCoordinate",DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate";var Kind=Object.freeze({__proto__:null,ARGUMENT,ARGUMENT_COORDINATE,BOOLEAN,DIRECTIVE,DIRECTIVE_ARGUMENT_COORDINATE,DIRECTIVE_COORDINATE,DIRECTIVE_DEFINITION,DIRECTIVE_EXTENSION,DOCUMENT,ENUM,ENUM_TYPE_DEFINITION,ENUM_TYPE_EXTENSION,ENUM_VALUE_DEFINITION,FIELD,FIELD_DEFINITION,FLOAT,FRAGMENT_ARGUMENT,FRAGMENT_DEFINITION,FRAGMENT_SPREAD,INLINE_FRAGMENT,INPUT_OBJECT_TYPE_DEFINITION,INPUT_OBJECT_TYPE_EXTENSION,INPUT_VALUE_DEFINITION,INT,INTERFACE_TYPE_DEFINITION,INTERFACE_TYPE_EXTENSION,LIST,LIST_TYPE,MEMBER_COORDINATE,NAME,NAMED_TYPE,NON_NULL_TYPE,NULL,OBJECT,OBJECT_FIELD,OBJECT_TYPE_DEFINITION,OBJECT_TYPE_EXTENSION,OPERATION_DEFINITION,OPERATION_TYPE_DEFINITION,SCALAR_TYPE_DEFINITION,SCALAR_TYPE_EXTENSION,SCHEMA_DEFINITION,SCHEMA_EXTENSION,SELECTION_SET,STRING,TYPE_COORDINATE,UNION_TYPE_DEFINITION,UNION_TYPE_EXTENSION,VARIABLE,VARIABLE_DEFINITION});function devAssert(r,n){throw new Error(n)}const MAX_SUGGESTIONS=5;function didYouMean(r,n){const[a,i]=n?[r,n]:[void 0,r];if(i.length===0)return"";let o=" Did you mean ";a!=null&&(o+=a+" ");const s=orList(i.slice(0,MAX_SUGGESTIONS).map(l=>`"${l}"`));return o+s+"?"}function identityFunc(r){return r}function keyValMap(r,n,a){const i=Object.create(null);for(const o of r)i[n(o)]=a(o);return i}function naturalCompare(r,n){let a=0,i=0;for(;a<r.length&&i<n.length;){let o=r.charCodeAt(a),s=n.charCodeAt(i);if(isDigit$1(o)&&isDigit$1(s)){let l=0;do++a,l=l*10+o-DIGIT_0,o=r.charCodeAt(a);while(isDigit$1(o)&&l>0);let f=0;do++i,f=f*10+s-DIGIT_0,s=n.charCodeAt(i);while(isDigit$1(s)&&f>0);if(l<f)return-1;if(l>f)return 1}else{if(o<s)return-1;if(o>s)return 1;++a,++i}}return r.length-n.length}const DIGIT_0=48,DIGIT_9=57;function isDigit$1(r){return!isNaN(r)&&DIGIT_0<=r&&r<=DIGIT_9}function suggestionList(r,n){const a=Object.create(null),i=new LexicalDistance(r),o=Math.floor(r.length*.4)+1;for(const s of n){const l=i.measure(s,o);l!==void 0&&(a[s]=l)}return Object.keys(a).sort((s,l)=>{const f=a[s]-a[l];return f!==0?f:naturalCompare(s,l)})}class LexicalDistance{constructor(n){this._input=n,this._inputLowerCase=n.toLowerCase(),this._inputArray=stringToArray(this._inputLowerCase),this._rows=[new Array(n.length+1).fill(0),new Array(n.length+1).fill(0),new Array(n.length+1).fill(0)]}measure(n,a){if(this._input===n)return 0;const i=n.toLowerCase();if(this._inputLowerCase===i)return 1;let o=stringToArray(i),s=this._inputArray;if(o.length<s.length){const c=o;o=s,s=c}const l=o.length,f=s.length;if(l-f>a)return;const d=this._rows;for(let c=0;c<=f;c++)d[0][c]=c;for(let c=1;c<=l;c++){const v=d[(c-1)%3],h=d[c%3];let m=h[0]=c;for(let g=1;g<=f;g++){const _=o[c-1]===s[g-1]?0:1;let S=Math.min(v[g]+1,h[g-1]+1,v[g-1]+_);if(c>1&&g>1&&o[c-1]===s[g-2]&&o[c-2]===s[g-1]){const N=d[(c-2)%3][g-2];S=Math.min(S,N+1)}S<m&&(m=S),h[g]=S}if(m>a)return}const u=d[l%3][f];return u<=a?u:void 0}}function stringToArray(r){const n=r.length,a=new Array(n);for(let i=0;i<n;++i)a[i]=r.charCodeAt(i);return a}function toObjMapWithSymbols(r){if(r==null)return Object.create(null);if(Object.getPrototypeOf(r)===null)return r;const n=Object.create(null);for(const[a,i]of Object.entries(r))n[a]=i;for(const a of Object.getOwnPropertySymbols(r))n[a]=r[a];return n}function isWhiteSpace(r){return r===9||r===32}function isDigit(r){return r>=48&&r<=57}function isLetter(r){return r>=97&&r<=122||r>=65&&r<=90}function isNameStart(r){return isLetter(r)||r===95}function isNameContinue(r){return isLetter(r)||isDigit(r)||r===95}function dedentBlockStringLines(r){let n=Number.MAX_SAFE_INTEGER,a=null,i=-1;for(let o=0;o<r.length;++o){const s=r[o],l=leadingWhitespace(s);l!==s.length&&(a??=o,i=o,o!==0&&l<n&&(n=l))}return r.map((o,s)=>s===0?o:o.slice(n)).slice(a??0,i+1)}function leadingWhitespace(r){let n=0;for(;n<r.length&&isWhiteSpace(r.charCodeAt(n));)++n;return n}function isPrintableAsBlockString(r){if(r==="")return!0;let n=!0,a=!1,i=!0,o=!1;for(let s=0;s<r.length;++s)switch(r.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(n&&!o)return!1;o=!0,n=!0,a=!1;break;case 9:case 32:a||=n;break;default:i&&=a,n=!1}return!(n||i&&o)}function printBlockString(r,n){const a=r.replaceAll('"""','\\"""'),i=a.split(/\r\n|[\n\r]/g),o=i.length===1,s=i.length>1&&i.slice(1).every(m=>m.length===0||isWhiteSpace(m.charCodeAt(0))),l=a.endsWith('\\"""'),f=r.endsWith('"')&&!l,d=r.endsWith("\\"),u=f||d,c=!n?.minimize&&(!o||r.length>70||u||s||l);let v="";const h=o&&isWhiteSpace(r.charCodeAt(0));return(c&&!h||s)&&(v+=`
83
+ `),v+=a,(c||u)&&(v+=`
84
+ `),'"""'+v+'"""'}function printString(r){return`"${r.replace(escapedRegExp,escapedReplacer)}"`}const escapedRegExp=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function escapedReplacer(r){return escapeSequences[r.charCodeAt(0)]}const escapeSequences=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],BREAK$1=Object.freeze({});function visit$1(r,n,a=QueryDocumentKeys){const i=new Map;for(const g of Object.values(Kind))i.set(g,getEnterLeaveForKind$1(n,g));let o,s=Array.isArray(r),l=[r],f=-1,d=[],u=r,c,v;const h=[],m=[];do{f++;const g=f===l.length,_=g&&d.length!==0;if(g){if(c=m.length===0?void 0:h[h.length-1],u=v,v=m.pop(),_)if(s){u=u.slice();let N=0;for(const[O,M]of d){const F=O-N;M===null?(u.splice(F,1),N++):u[F]=M}}else{u={...u};for(const[N,O]of d)u[N]=O}f=o.index,l=o.keys,d=o.edits,s=o.inArray,o=o.prev}else if(v!=null){if(c=s?f:l[f],u=v[c],u==null)continue;h.push(c)}let S;if(!Array.isArray(u)){if(isNode(u)||devAssert(!1,`Invalid AST Node: ${inspect(u)}.`),S=(g?i.get(u.kind)?.leave:i.get(u.kind)?.enter)?.call(n,u,c,v,h,m),S===BREAK$1)break;if(S===!1){if(!g){h.pop();continue}}else if(S!==void 0&&(d.push([c,S]),!g))if(isNode(S))u=S;else{h.pop();continue}}S===void 0&&_&&d.push([c,u]),g?h.pop():(o={inArray:s,index:f,keys:l,edits:d,prev:o},s=Array.isArray(u),l=s?u:a[u.kind]??[],f=-1,d=[],v!=null&&m.push(v),v=u)}while(o!==void 0);return d.length!==0?d.at(-1)[1]:r}function visitInParallel(r){const n=new Array(r.length).fill(null),a=Object.create(null);for(const i of Object.values(Kind)){let o=!1;const s=new Array(r.length).fill(void 0),l=new Array(r.length).fill(void 0);for(let d=0;d<r.length;++d){const{enter:u,leave:c}=getEnterLeaveForKind$1(r[d],i);o||=u!=null||c!=null,s[d]=u,l[d]=c}if(!o)continue;const f={enter(...d){const u=d[0];for(let c=0;c<r.length;c++)if(n[c]===null){const v=s[c]?.apply(r[c],d);if(v===!1)n[c]=u;else if(v===BREAK$1)n[c]=BREAK$1;else if(v!==void 0)return v}},leave(...d){const u=d[0];for(let c=0;c<r.length;c++)if(n[c]===null){const v=l[c]?.apply(r[c],d);if(v===BREAK$1)n[c]=BREAK$1;else if(v!==void 0&&v!==!1)return v}else n[c]===u&&(n[c]=null)}};a[i]=f}return a}function getEnterLeaveForKind$1(r,n){const a=r[n];return typeof a=="object"?a:typeof a=="function"?{enter:a,leave:void 0}:{enter:r.enter,leave:r.leave}}function print(r){return visit$1(r,printDocASTReducer)}const MAX_LINE_LENGTH=80,printDocASTReducer={Name:{leave:r=>r.value},Variable:{leave:r=>"$"+r.name},Document:{leave:r=>join(r.definitions,`
85
+
86
+ `)},OperationDefinition:{leave(r){const n=hasMultilineItems(r.variableDefinitions)?wrap(`(
87
+ `,join(r.variableDefinitions,`
88
+ `),`
89
+ )`):wrap("(",join(r.variableDefinitions,", "),")"),a=wrap("",r.description,`
90
+ `)+join([r.operation,join([r.name,n]),join(r.directives," ")]," ");return(a==="query"?"":a+" ")+r.selectionSet}},VariableDefinition:{leave:({variable:r,type:n,defaultValue:a,directives:i,description:o})=>wrap("",o,`
91
+ `)+r+": "+n+wrap(" = ",a)+wrap(" ",join(i," "))},SelectionSet:{leave:({selections:r})=>block(r)},Field:{leave({alias:r,name:n,arguments:a,directives:i,selectionSet:o}){const s=join([wrap("",r,": "),n],"");return join([wrappedLineAndArgs(s,a),wrap(" ",join(i," ")),wrap(" ",o)])}},Argument:{leave:({name:r,value:n})=>r+": "+n},FragmentArgument:{leave:({name:r,value:n})=>r+": "+n},FragmentSpread:{leave:({name:r,arguments:n,directives:a})=>{const i="..."+r;return wrappedLineAndArgs(i,n)+wrap(" ",join(a," "))}},InlineFragment:{leave:({typeCondition:r,directives:n,selectionSet:a})=>join(["...",wrap("on ",r),join(n," "),a]," ")},FragmentDefinition:{leave:({name:r,typeCondition:n,variableDefinitions:a,directives:i,selectionSet:o,description:s})=>wrap("",s,`
92
+ `)+`fragment ${r}${wrap("(",join(a,", "),")")} on ${n} ${wrap("",join(i," ")," ")}`+o},IntValue:{leave:({value:r})=>r},FloatValue:{leave:({value:r})=>r},StringValue:{leave:({value:r,block:n})=>n===!0?printBlockString(r):printString(r)},BooleanValue:{leave:({value:r})=>r?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:r})=>r},ListValue:{leave:({values:r})=>{const n="["+join(r,", ")+"]";return n.length>MAX_LINE_LENGTH?`[
93
+ `+indent(join(r,`
94
+ `))+`
95
+ ]`:n}},ObjectValue:{leave:({fields:r})=>{const n="{ "+join(r,", ")+" }";return n.length>MAX_LINE_LENGTH?block(r):n}},ObjectField:{leave:({name:r,value:n})=>r+": "+n},Directive:{leave:({name:r,arguments:n})=>"@"+r+wrap("(",join(n,", "),")")},NamedType:{leave:({name:r})=>r},ListType:{leave:({type:r})=>"["+r+"]"},NonNullType:{leave:({type:r})=>r+"!"},SchemaDefinition:{leave:({description:r,directives:n,operationTypes:a})=>wrap("",r,`
96
+ `)+join(["schema",join(n," "),block(a)]," ")},OperationTypeDefinition:{leave:({operation:r,type:n})=>r+": "+n},ScalarTypeDefinition:{leave:({description:r,name:n,directives:a})=>wrap("",r,`
97
+ `)+join(["scalar",n,join(a," ")]," ")},ObjectTypeDefinition:{leave:({description:r,name:n,interfaces:a,directives:i,fields:o})=>wrap("",r,`
98
+ `)+join(["type",n,wrap("implements ",join(a," & ")),join(i," "),block(o)]," ")},FieldDefinition:{leave:({description:r,name:n,arguments:a,type:i,directives:o})=>wrap("",r,`
99
+ `)+n+(hasMultilineItems(a)?wrap(`(
100
+ `,indent(join(a,`
101
+ `)),`
102
+ )`):wrap("(",join(a,", "),")"))+": "+i+wrap(" ",join(o," "))},InputValueDefinition:{leave:({description:r,name:n,type:a,defaultValue:i,directives:o})=>wrap("",r,`
103
+ `)+join([n+": "+a,wrap("= ",i),join(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:r,name:n,interfaces:a,directives:i,fields:o})=>wrap("",r,`
104
+ `)+join(["interface",n,wrap("implements ",join(a," & ")),join(i," "),block(o)]," ")},UnionTypeDefinition:{leave:({description:r,name:n,directives:a,types:i})=>wrap("",r,`
105
+ `)+join(["union",n,join(a," "),wrap("= ",join(i," | "))]," ")},EnumTypeDefinition:{leave:({description:r,name:n,directives:a,values:i})=>wrap("",r,`
106
+ `)+join(["enum",n,join(a," "),block(i)]," ")},EnumValueDefinition:{leave:({description:r,name:n,directives:a})=>wrap("",r,`
107
+ `)+join([n,join(a," ")]," ")},InputObjectTypeDefinition:{leave:({description:r,name:n,directives:a,fields:i})=>wrap("",r,`
108
+ `)+join(["input",n,join(a," "),block(i)]," ")},DirectiveDefinition:{leave:({description:r,name:n,arguments:a,directives:i,repeatable:o,locations:s})=>wrap("",r,`
109
+ `)+"directive @"+n+(hasMultilineItems(a)?wrap(`(
110
+ `,indent(join(a,`
111
+ `)),`
112
+ )`):wrap("(",join(a,", "),")"))+wrap(" ",join(i," "))+(o?" repeatable":"")+" on "+join(s," | ")},SchemaExtension:{leave:({directives:r,operationTypes:n})=>join(["extend schema",join(r," "),block(n)]," ")},ScalarTypeExtension:{leave:({name:r,directives:n})=>join(["extend scalar",r,join(n," ")]," ")},ObjectTypeExtension:{leave:({name:r,interfaces:n,directives:a,fields:i})=>join(["extend type",r,wrap("implements ",join(n," & ")),join(a," "),block(i)]," ")},InterfaceTypeExtension:{leave:({name:r,interfaces:n,directives:a,fields:i})=>join(["extend interface",r,wrap("implements ",join(n," & ")),join(a," "),block(i)]," ")},UnionTypeExtension:{leave:({name:r,directives:n,types:a})=>join(["extend union",r,join(n," "),wrap("= ",join(a," | "))]," ")},EnumTypeExtension:{leave:({name:r,directives:n,values:a})=>join(["extend enum",r,join(n," "),block(a)]," ")},InputObjectTypeExtension:{leave:({name:r,directives:n,fields:a})=>join(["extend input",r,join(n," "),block(a)]," ")},DirectiveExtension:{leave:({name:r,directives:n})=>join(["extend directive @"+r,join(n," ")]," ")},TypeCoordinate:{leave:({name:r})=>r},MemberCoordinate:{leave:({name:r,memberName:n})=>join([r,wrap(".",n)])},ArgumentCoordinate:{leave:({name:r,fieldName:n,argumentName:a})=>join([r,wrap(".",n),wrap("(",a,":)")])},DirectiveCoordinate:{leave:({name:r})=>join(["@",r])},DirectiveArgumentCoordinate:{leave:({name:r,argumentName:n})=>join(["@",r,wrap("(",n,":)")])}};function join(r,n=""){return r?.filter(a=>a!==void 0&&a!=="").join(n)??""}function block(r){return wrap(`{
113
+ `,indent(join(r,`
114
+ `)),`
115
+ }`)}function wrap(r,n,a=""){return n!=null&&n!==""?r+n+a:""}function indent(r){return wrap(" ",r.replaceAll(`
116
+ `,`
117
+ `))}function hasMultilineItems(r){return r?.some(n=>n.includes(`
118
+ `))??!1}function wrappedLineAndArgs(r,n){let a=r+wrap("(",join(n,", "),")");return a.length>MAX_LINE_LENGTH&&(a=r+wrap(`(
119
+ `,indent(join(n,`
120
+ `)),`
121
+ )`)),a}function valueFromASTUntyped(r,n){switch(r.kind){case NULL:return null;case INT:return parseInt(r.value,10);case FLOAT:return parseFloat(r.value);case STRING:case ENUM:case BOOLEAN:return r.value;case LIST:return r.values.map(a=>valueFromASTUntyped(a,n));case OBJECT:return keyValMap(r.fields,a=>a.name.value,a=>valueFromASTUntyped(a.value,n));case VARIABLE:return n?.[r.name.value]}}function assertName(r){if(r.length===0)throw new GraphQLError("Expected name to be a non-empty string.");for(let n=1;n<r.length;++n)if(!isNameContinue(r.charCodeAt(n)))throw new GraphQLError(`Names must only contain [_a-zA-Z0-9] but "${r}" does not.`);if(!isNameStart(r.charCodeAt(0)))throw new GraphQLError(`Names must start with [_a-zA-Z] but "${r}" does not.`);return r}function assertEnumValueName(r){if(r==="true"||r==="false"||r==="null")throw new GraphQLError(`Enum values cannot be named: ${r}`);return assertName(r)}function isType(r){return isScalarType(r)||isObjectType(r)||isInterfaceType(r)||isUnionType(r)||isEnumType(r)||isInputObjectType(r)||isListType(r)||isNonNullType(r)}function assertType(r){if(!isType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL type.`);return r}const scalarSymbol=Symbol("Scalar");function isScalarType(r){return instanceOf(r,scalarSymbol,GraphQLScalarType)}function assertScalarType(r){if(!isScalarType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Scalar type.`);return r}const objectSymbol=Symbol("Object");function isObjectType(r){return instanceOf(r,objectSymbol,GraphQLObjectType)}function assertObjectType(r){if(!isObjectType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Object type.`);return r}const fieldSymbol=Symbol("Field");function isField(r){return instanceOf(r,fieldSymbol,GraphQLField)}function assertField(r){if(!isField(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL field.`);return r}const argumentSymbol=Symbol("Argument");function isArgument(r){return instanceOf(r,argumentSymbol,GraphQLArgument)}function assertArgument(r){if(!isArgument(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL argument.`);return r}const interfaceSymbol=Symbol("Interface");function isInterfaceType(r){return instanceOf(r,interfaceSymbol,GraphQLInterfaceType)}function assertInterfaceType(r){if(!isInterfaceType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Interface type.`);return r}const unionSymbol=Symbol("Union");function isUnionType(r){return instanceOf(r,unionSymbol,GraphQLUnionType)}function assertUnionType(r){if(!isUnionType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Union type.`);return r}const enumSymbol=Symbol("Enum");function isEnumType(r){return instanceOf(r,enumSymbol,GraphQLEnumType)}function assertEnumType(r){if(!isEnumType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Enum type.`);return r}const enumValueSymbol=Symbol("EnumValue");function isEnumValue(r){return instanceOf(r,enumValueSymbol,GraphQLEnumValue)}function assertEnumValue(r){if(!isEnumValue(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Enum value.`);return r}const inputObjectSymbol=Symbol("InputObject");function isInputObjectType(r){return instanceOf(r,inputObjectSymbol,GraphQLInputObjectType)}function assertInputObjectType(r){if(!isInputObjectType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Input Object type.`);return r}const inputFieldSymbol=Symbol("InputField");function isInputField(r){return instanceOf(r,inputFieldSymbol,GraphQLInputField)}function assertInputField(r){if(!isInputField(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL input field.`);return r}const listSymbol=Symbol("List");function isListType(r){return instanceOf(r,listSymbol,GraphQLList)}function assertListType(r){if(!isListType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL List type.`);return r}const nonNullSymbol=Symbol("NonNull");function isNonNullType(r){return instanceOf(r,nonNullSymbol,GraphQLNonNull)}function assertNonNullType(r){if(!isNonNullType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL Non-Null type.`);return r}function isInputType(r){return isScalarType(r)||isEnumType(r)||isInputObjectType(r)||isWrappingType(r)&&isInputType(r.ofType)}function assertInputType(r){if(!isInputType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL input type.`);return r}function isOutputType(r){return isScalarType(r)||isObjectType(r)||isInterfaceType(r)||isUnionType(r)||isEnumType(r)||isWrappingType(r)&&isOutputType(r.ofType)}function assertOutputType(r){if(!isOutputType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL output type.`);return r}function isLeafType(r){return isScalarType(r)||isEnumType(r)}function assertLeafType(r){if(!isLeafType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL leaf type.`);return r}function isCompositeType(r){return isObjectType(r)||isInterfaceType(r)||isUnionType(r)}function assertCompositeType(r){if(!isCompositeType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL composite type.`);return r}function isAbstractType(r){return isInterfaceType(r)||isUnionType(r)}function assertAbstractType(r){if(!isAbstractType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL abstract type.`);return r}class GraphQLList{constructor(n){this.__kind=listSymbol,this.ofType=n}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class GraphQLNonNull{constructor(n){this.__kind=nonNullSymbol,this.ofType=n}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function isWrappingType(r){return isListType(r)||isNonNullType(r)}function assertWrappingType(r){if(!isWrappingType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL wrapping type.`);return r}function isNullableType(r){return isType(r)&&!isNonNullType(r)}function assertNullableType(r){if(!isNullableType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL nullable type.`);return r}function getNullableType(r){if(r)return isNonNullType(r)?r.ofType:r}function isNamedType(r){return isScalarType(r)||isObjectType(r)||isInterfaceType(r)||isUnionType(r)||isEnumType(r)||isInputObjectType(r)}function assertNamedType(r){if(!isNamedType(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL named type.`);return r}function getNamedType(r){if(r){let n=r;for(;isWrappingType(n);)n=n.ofType;return n}}function resolveReadonlyArrayThunk(r){return typeof r=="function"?r():r}function resolveObjMapThunk(r){return typeof r=="function"?r():r}class GraphQLScalarType{constructor(n){this.__kind=scalarSymbol,this.name=assertName(n.name),this.description=n.description,this.specifiedByURL=n.specifiedByURL,this.serialize=n.serialize??n.coerceOutputValue??identityFunc,this.parseValue=n.parseValue??n.coerceInputValue??identityFunc,this.parseLiteral=n.parseLiteral??((a,i)=>this.coerceInputValue(valueFromASTUntyped(a,i))),this.coerceOutputValue=n.coerceOutputValue??this.serialize,this.coerceInputValue=n.coerceInputValue??this.parseValue,this.coerceInputLiteral=n.coerceInputLiteral,this.valueToLiteral=n.valueToLiteral,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||devAssert(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`)),n.coerceInputLiteral&&(typeof n.coerceInputValue=="function"&&typeof n.coerceInputLiteral=="function"||devAssert(!1,`${this.name} must provide both "coerceInputValue" and "coerceInputLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,coerceOutputValue:this.coerceOutputValue,coerceInputValue:this.coerceInputValue,coerceInputLiteral:this.coerceInputLiteral,valueToLiteral:this.valueToLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class GraphQLObjectType{constructor(n){this.__kind=objectSymbol,this.__kind=objectSymbol,this.name=assertName(n.name),this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this._fields=defineFieldMap.bind(void 0,this,n.fields),this._interfaces=defineInterfaces.bind(void 0,n.interfaces)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:mapValue(this.getFields(),n=>n.toConfig()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function defineInterfaces(r){return resolveReadonlyArrayThunk(r??[])}function defineFieldMap(r,n){const a=resolveObjMapThunk(n);return mapValue(a,(i,o)=>new GraphQLField(r,o,i))}class GraphQLField{constructor(n,a,i){this.__kind=fieldSymbol,this.parentType=n,this.name=assertName(a),this.description=i.description,this.type=i.type;const o=i.args;this.args=o?Object.entries(o).map(([s,l])=>new GraphQLArgument(this,s,l)):[],this.resolve=i.resolve,this.subscribe=i.subscribe,this.deprecationReason=i.deprecationReason,this.extensions=toObjMapWithSymbols(i.extensions),this.astNode=i.astNode}get[Symbol.toStringTag](){return"GraphQLField"}toConfig(){return{description:this.description,type:this.type,args:keyValMap(this.args,n=>n.name,n=>n.toConfig()),resolve:this.resolve,subscribe:this.subscribe,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType??"<meta>"}.${this.name}`}toJSON(){return this.toString()}}class GraphQLArgument{constructor(n,a,i){this.__kind=argumentSymbol,this.parent=n,this.name=assertName(a),this.description=i.description,this.type=i.type,this.defaultValue=i.defaultValue,this.default=i.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=i.deprecationReason,this.extensions=toObjMapWithSymbols(i.extensions),this.astNode=i.astNode}get[Symbol.toStringTag](){return"GraphQLArgument"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parent}(${this.name}:)`}toJSON(){return this.toString()}}function isRequiredArgument(r){return isNonNullType(r.type)&&r.default===void 0&&r.defaultValue===void 0}class GraphQLInterfaceType{constructor(n){this.__kind=interfaceSymbol,this.name=assertName(n.name),this.description=n.description,this.resolveType=n.resolveType,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this._fields=defineFieldMap.bind(void 0,this,n.fields),this._interfaces=defineInterfaces.bind(void 0,n.interfaces)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:mapValue(this.getFields(),n=>n.toConfig()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class GraphQLUnionType{constructor(n){this.__kind=unionSymbol,this.name=assertName(n.name),this.description=n.description,this.resolveType=n.resolveType,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this._types=defineTypes.bind(void 0,n.types)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function defineTypes(r){return resolveReadonlyArrayThunk(r)}class GraphQLEnumType{constructor(n){this.__kind=enumSymbol,this.name=assertName(n.name),this.description=n.description,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this._values=defineEnumValues.bind(void 0,this,n.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=this._values()),this._values}getValue(n){return this._nameLookup??=keyMap(this.getValues(),a=>a.name),this._nameLookup[n]}serialize(n){return this.coerceOutputValue(n)}coerceOutputValue(n){this._valueLookup??=new Map(this.getValues().map(i=>[i.value,i]));const a=this._valueLookup.get(n);if(a===void 0)throw new GraphQLError(`Enum "${this.name}" cannot represent value: ${inspect(n)}`);return a.name}parseValue(n,a){return this.coerceInputValue(n,a)}coerceInputValue(n,a){if(typeof n!="string"){const o=inspect(n);throw new GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${o}.`+(a?"":didYouMeanEnumValue(this,o)))}const i=this.getValue(n);if(i==null)throw new GraphQLError(`Value "${n}" does not exist in "${this.name}" enum.`+(a?"":didYouMeanEnumValue(this,n)));return i.value}parseLiteral(n,a,i){return this.coerceInputLiteral(n,i)}coerceInputLiteral(n,a){if(n.kind!==ENUM){const o=print(n);throw new GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${o}.`+(a?"":didYouMeanEnumValue(this,o)),{nodes:n})}const i=this.getValue(n.value);if(i==null){const o=print(n);throw new GraphQLError(`Value "${o}" does not exist in "${this.name}" enum.`+(a?"":didYouMeanEnumValue(this,o)),{nodes:n})}return i.value}valueToLiteral(n){if(typeof n=="string"&&this.getValue(n))return{kind:ENUM,value:n}}toConfig(){return{name:this.name,description:this.description,values:keyValMap(this.getValues(),n=>n.name,n=>n.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function defineEnumValues(r,n){const a=resolveObjMapThunk(n);return Object.entries(a).map(([i,o])=>new GraphQLEnumValue(r,i,o))}function didYouMeanEnumValue(r,n){const a=r.getValues().map(o=>o.name),i=suggestionList(n,a);return didYouMean("the enum value",i)}class GraphQLEnumValue{constructor(n,a,i){this.__kind=enumValueSymbol,this.parentEnum=n,this.name=assertEnumValueName(a),this.description=i.description,this.value=i.value!==void 0?i.value:a,this.deprecationReason=i.deprecationReason,this.extensions=toObjMapWithSymbols(i.extensions),this.astNode=i.astNode}get[Symbol.toStringTag](){return"GraphQLEnumValue"}toConfig(){return{description:this.description,value:this.value,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentEnum.name}.${this.name}`}toJSON(){return this.toString()}}class GraphQLInputObjectType{constructor(n){this.__kind=inputObjectSymbol,this.name=assertName(n.name),this.description=n.description,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this.isOneOf=n.isOneOf??!1,this._fields=defineInputFieldMap.bind(void 0,this,n.fields)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){return{name:this.name,description:this.description,fields:mapValue(this.getFields(),n=>n.toConfig()),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function defineInputFieldMap(r,n){const a=resolveObjMapThunk(n);return mapValue(a,(i,o)=>new GraphQLInputField(r,o,i))}class GraphQLInputField{constructor(n,a,i){"resolve"in i&&devAssert(!1,`${n}.${a} field has a resolve property, but Input Types cannot define resolvers.`),this.__kind=inputFieldSymbol,this.parentType=n,this.name=assertName(a),this.description=i.description,this.type=i.type,this.defaultValue=i.defaultValue,this.default=i.default,this._memoizedCoercedDefaultValue=void 0,this.deprecationReason=i.deprecationReason,this.extensions=toObjMapWithSymbols(i.extensions),this.astNode=i.astNode}get[Symbol.toStringTag](){return"GraphQLInputField"}toConfig(){return{description:this.description,type:this.type,defaultValue:this.defaultValue,default:this.default,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode}}toString(){return`${this.parentType}.${this.name}`}toJSON(){return this.toString()}}function isRequiredInputField(r){return isNonNullType(r.type)&&r.defaultValue===void 0&&r.default===void 0}function isEqualType(r,n){return r===n?!0:isNonNullType(r)&&isNonNullType(n)||isListType(r)&&isListType(n)?isEqualType(r.ofType,n.ofType):!1}function isTypeSubTypeOf(r,n,a){return n===a?!0:isNonNullType(a)?isNonNullType(n)?isTypeSubTypeOf(r,n.ofType,a.ofType):!1:isNonNullType(n)?isTypeSubTypeOf(r,n.ofType,a):isListType(a)?isListType(n)?isTypeSubTypeOf(r,n.ofType,a.ofType):!1:isListType(n)?!1:isAbstractType(a)&&(isInterfaceType(n)||isObjectType(n))&&r.isSubType(a,n)}function doTypesOverlap(r,n,a){return n===a?!0:isAbstractType(n)?isAbstractType(a)?r.getPossibleTypes(n).some(i=>r.isSubType(a,i)):r.isSubType(n,a):isAbstractType(a)?r.isSubType(a,n):!1}function addPath(r,n,a){return{prev:r,key:n,typename:a}}function pathToArray(r){const n=[];let a=r;for(;a;)n.push(a.key),a=a.prev;return n.reverse()}function valueToLiteral(r,n){if(isNonNullType(n))return r==null?void 0:valueToLiteral(r,n.ofType);if(r==null)return{kind:NULL};if(isListType(n)){if(!isIterableObject(r))return valueToLiteral(r,n.ofType);const i=[];for(const o of r){const s=valueToLiteral(o,n.ofType);if(!s)return;i.push(s)}return{kind:LIST,values:i}}if(isInputObjectType(n)){if(!isObjectLike(r))return;const i=[],o=n.getFields();if(Object.keys(r).some(l=>r[l]!==void 0&&!Object.hasOwn(o,l)))return;for(const l of Object.values(n.getFields()))if(r[l.name]===void 0){if(isRequiredInputField(l))return}else{const d=valueToLiteral(r[l.name],l.type);if(!d)return;i.push({kind:OBJECT_FIELD,name:{kind:NAME,value:l.name},value:d})}return{kind:OBJECT,fields:i}}const a=assertLeafType(n);if(a.valueToLiteral)try{return a.valueToLiteral(r)}catch{return}return defaultScalarValueToLiteral(r)}function defaultScalarValueToLiteral(r){if(r==null)return{kind:NULL};switch(typeof r){case"boolean":return{kind:BOOLEAN,value:r};case"string":return{kind:STRING,value:r,block:!1};case"bigint":return{kind:INT,value:r.toString()};case"number":{if(!Number.isFinite(r))return{kind:NULL};const n=String(r);return/^-?(?:0|[1-9][0-9]*)$/.test(n)?{kind:INT,value:n}:{kind:FLOAT,value:n}}case"object":{if(isIterableObject(r))return{kind:LIST,values:Array.from(r,defaultScalarValueToLiteral)};const n=r,a=[];for(const i of Object.keys(n)){const o=n[i];o!==void 0&&a.push({kind:OBJECT_FIELD,name:{kind:NAME,value:i},value:defaultScalarValueToLiteral(o)})}return{kind:OBJECT,fields:a}}}throw new TypeError(`Cannot convert value to AST: ${inspect(r)}.`)}function replaceVariables(r,n,a){switch(r.kind){case VARIABLE:{const i=r.name.value,o=a?.sources[i];if(o){const l=o.value;if(l===void 0){const f=o.signature.default;return f!==void 0?f.literal:{kind:NULL}}return replaceVariables(l,n,o.fragmentVariableValues)}const s=n?.sources[i];if(s==null)return{kind:NULL};if(s.value===void 0){const l=s.signature.default;if(l!==void 0)return l.literal}return valueToLiteral(s.value,s.signature.type)}case OBJECT:{const i=[];for(const o of r.fields){if(o.value.kind===VARIABLE){const l=a?.sources[o.value.name.value]??n?.sources[o.value.name.value];if(l?.value===void 0&&l?.signature.default===void 0)continue}const s=replaceVariables(o.value,n,a);i.push({...o,value:s})}return{...r,fields:i}}case LIST:{const i=[];for(const o of r.values){const s=replaceVariables(o,n,a);i.push(s)}return{...r,values:i}}default:return r}}function validateInputValue(r,n,a,i){return validateInputValueImpl(r,n,a,i,void 0)}function validateInputValueImpl(r,n,a,i,o){if(isNonNullType(n)){if(r===void 0){reportInvalidValue(a,`Expected a value of non-null type "${n}" to be provided.`,o);return}if(r===null){reportInvalidValue(a,`Expected value of non-null type "${n}" not to be null.`,o);return}return validateInputValueImpl(r,n.ofType,a,i,o)}if(r!=null)if(isListType(n))if(!isIterableObject(r))validateInputValueImpl(r,n.ofType,a,i,o);else{let s=0;for(const l of r)validateInputValueImpl(l,n.ofType,a,i,addPath(o,s++,void 0))}else if(isInputObjectType(n)){if(!isObjectLike(r)||Array.isArray(r)){reportInvalidValue(a,`Expected value of type "${n}" to be an object, found: ${inspect(r)}.`,o);return}const s=n.getFields();for(const f of Object.values(s)){const d=r[f.name];d===void 0?isRequiredInputField(f)&&reportInvalidValue(a,`Expected value of type "${n}" to include required field "${f.name}", found: ${inspect(r)}.`,o):validateInputValueImpl(d,f.type,a,i,addPath(o,f.name,n.name))}const l=[];for(const f of Object.keys(r))if(r[f]!==void 0){if(!Object.hasOwn(s,f)){const d=i?"":didYouMean(suggestionList(f,Object.keys(s)));reportInvalidValue(a,`Expected value of type "${n}" not to include unknown field "${f}"${d?`.${d} Found`:", found"}: ${inspect(r)}.`,o);continue}l.push(f)}if(n.isOneOf){l.length!==1&&reportInvalidValue(a,getOneOfInputObjectErrorMessage(n),o);const f=l[0];r[f]===null&&reportInvalidValue(a,getOneOfInputObjectErrorMessage(n),addPath(o,f,n.name))}}else{assertLeafType(n);let s,l;try{s=n.coerceInputValue(r,i)}catch(f){if(f instanceof GraphQLError){a(f,pathToArray(o));return}l=f}s===void 0&&reportInvalidValue(a,`Expected value of type "${n}"${l!=null?`, but encountered error "${getCaughtErrorMessage(l)}"; found`:", found"}: ${inspect(r)}.`,o,ensureGraphQLError(l))}}function reportInvalidValue(r,n,a,i){r(new GraphQLError(n,{originalError:i}),pathToArray(a))}function validateInputLiteral(r,n,a,i,o,s){return validateInputLiteralImpl({static:!i&&!o,onError:a,variables:i,fragmentVariableValues:o},r,n,s,void 0)}function validateInputLiteralImpl(r,n,a,i,o){if(n.kind===VARIABLE){if(r.static)return;const l=getScopedVariableValues(r,n)?.coerced[n.name.value];isNonNullType(a)&&(l===void 0?reportInvalidLiteral(r.onError,`Expected variable "$${n.name.value}" provided to type "${a}" to provide a runtime value.`,n,o):l===null&&reportInvalidLiteral(r.onError,`Expected variable "$${n.name.value}" provided to non-null type "${a}" not to be null.`,n,o));return}if(isNonNullType(a)){if(n.kind===NULL){reportInvalidLiteral(r.onError,`Expected value of non-null type "${a}" not to be null.`,n,o);return}return validateInputLiteralImpl(r,n,a.ofType,i,o)}if(n.kind!==NULL)if(isListType(a))if(n.kind!==LIST)validateInputLiteralImpl(r,n,a.ofType,i,o);else{let s=0;for(const l of n.values)validateInputLiteralImpl(r,l,a.ofType,i,addPath(o,s++,void 0))}else if(isInputObjectType(a)){if(n.kind!==OBJECT){reportInvalidLiteral(r.onError,`Expected value of type "${a}" to be an object, found: ${print(n)}.`,n,o);return}const s=a.getFields(),l=keyMap(n.fields,u=>u.name.value);for(const u of Object.values(s)){const c=l[u.name];if(c===void 0)isRequiredInputField(u)&&reportInvalidLiteral(r.onError,`Expected value of type "${a}" to include required field "${u.name}", found: ${print(n)}.`,n,o);else{const v=c.value;if(v.kind===VARIABLE&&!r.static){const h=getScopedVariableValues(r,v),m=v.name.value,g=h?.coerced[m];if(a.isOneOf)g===void 0?reportInvalidLiteral(r.onError,`Expected variable "$${m}" provided to field "${u.name}" for OneOf Input Object type "${a}" to provide a runtime value.`,n,o):g===null&&reportInvalidLiteral(r.onError,`Expected variable "$${m}" provided to field "${u.name}" for OneOf Input Object type "${a}" not to be null.`,n,o);else if(g===void 0&&!isRequiredInputField(u))continue}validateInputLiteralImpl(r,v,u.type,i,addPath(o,u.name,a.name))}}const f=n.fields,d=[];for(const u of f){const c=u.name.value;if(Object.hasOwn(s,c))d.push(u);else{const v=i?"":didYouMean(suggestionList(c,Object.keys(s)));reportInvalidLiteral(r.onError,`Expected value of type "${a}" not to include unknown field "${c}"${v?`.${v} Found`:", found"}: ${print(n)}.`,u,o)}}if(a.isOneOf){if(d.length!==1){reportInvalidLiteral(r.onError,getOneOfInputObjectErrorMessage(a),n,o);return}if(d[0].value.kind===NULL){const v=d[0].name.value;reportInvalidLiteral(r.onError,getOneOfInputObjectErrorMessage(a),n,addPath(o,v,void 0))}}}else{assertLeafType(a);let s,l;try{s=a.coerceInputLiteral?a.coerceInputLiteral(replaceVariables(n,r.variables,r.fragmentVariableValues),i):a.parseLiteral(n,void 0,i)}catch(f){if(f instanceof GraphQLError){r.onError(f,pathToArray(o));return}l=f}s===void 0&&reportInvalidLiteral(r.onError,`Expected value of type "${a}"${l!=null?`, but encountered error "${getCaughtErrorMessage(l)}"; found`:", found"}: ${print(n)}.`,n,o,ensureGraphQLError(l))}}function getScopedVariableValues(r,n){const a=n.name.value,{fragmentVariableValues:i,variables:o}=r;return i?.sources[a]?i:o}function reportInvalidLiteral(r,n,a,i,o){r(new GraphQLError(n,{nodes:a,originalError:o}),pathToArray(i))}function getCaughtErrorMessage(r){if(isObjectLike(r)){const n=r.message;if(typeof n=="string"&&n!=="")return n}return String(r)}function getOneOfInputObjectErrorMessage(r){return`Within OneOf Input Object type "${r}", exactly one field must be specified, and the value for that field must be non-null.`}const DirectiveLocation={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"},GRAPHQL_MAX_INT=2147483647,GRAPHQL_MIN_INT=-2147483648,GraphQLInt=new GraphQLScalarType({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",coerceOutputValue(r){const n=coerceOutputValueObject(r);if(typeof n=="number")return coerceIntFromNumber(n);if(typeof n=="boolean")return n?1:0;if(typeof n=="string")return coerceIntFromString(n);if(typeof n=="bigint")return coerceIntFromBigInt(n);throw new GraphQLError(`Int cannot represent non-integer value: ${inspect(n)}`)},coerceInputValue(r){if(typeof r=="number")return coerceIntFromNumber(r);if(typeof r=="bigint")return coerceIntFromBigInt(r);throw new GraphQLError(`Int cannot represent non-integer value: ${inspect(r)}`)},coerceInputLiteral(r){if(r.kind!==INT)throw new GraphQLError(`Int cannot represent non-integer value: ${print(r)}`,{nodes:r});const n=parseInt(r.value,10);if(n>GRAPHQL_MAX_INT||n<GRAPHQL_MIN_INT)throw new GraphQLError(`Int cannot represent non 32-bit signed integer value: ${r.value}`,{nodes:r});return n},valueToLiteral(r){if((typeof r=="number"&&Number.isInteger(r)||typeof r=="bigint")&&r<=GRAPHQL_MAX_INT&&r>=GRAPHQL_MIN_INT)return{kind:INT,value:String(r)}}}),GraphQLFloat=new GraphQLScalarType({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",coerceOutputValue(r){const n=coerceOutputValueObject(r);if(typeof n=="number")return coerceFloatFromNumber(n);if(typeof n=="boolean")return n?1:0;if(typeof n=="string")return coerceFloatFromString(n);if(typeof n=="bigint")return coerceFloatFromBigInt(n);throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(n)}`)},coerceInputValue(r){if(typeof r=="number")return coerceFloatFromNumber(r);if(typeof r=="bigint")return coerceFloatFromBigInt(r);throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)}`)},coerceInputLiteral(r){if(r.kind!==FLOAT&&r.kind!==INT)throw new GraphQLError(`Float cannot represent non numeric value: ${print(r)}`,{nodes:r});return parseFloat(r.value)},valueToLiteral(r){const n=defaultScalarValueToLiteral(r);if(n.kind===FLOAT||n.kind===INT)return n}}),GraphQLString=new GraphQLScalarType({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",coerceOutputValue(r){const n=coerceOutputValueObject(r);if(typeof n=="string")return n;if(typeof n=="boolean")return n?"true":"false";if(typeof n=="number")return coerceStringFromNumber(n);if(typeof n=="bigint")return String(n);throw new GraphQLError(`String cannot represent value: ${inspect(r)}`)},coerceInputValue(r){if(typeof r!="string")throw new GraphQLError(`String cannot represent a non string value: ${inspect(r)}`);return r},coerceInputLiteral(r){if(r.kind!==STRING)throw new GraphQLError(`String cannot represent a non string value: ${print(r)}`,{nodes:r});return r.value},valueToLiteral(r){const n=defaultScalarValueToLiteral(r);if(n.kind===STRING)return n}}),GraphQLBoolean=new GraphQLScalarType({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",coerceOutputValue(r){const n=coerceOutputValueObject(r);if(typeof n=="boolean")return n;if(typeof n=="number")return coerceBooleanFromNumber(n);if(typeof n=="bigint")return n!==0n;throw new GraphQLError(`Boolean cannot represent a non boolean value: ${inspect(n)}`)},coerceInputValue(r){if(typeof r!="boolean")throw new GraphQLError(`Boolean cannot represent a non boolean value: ${inspect(r)}`);return r},coerceInputLiteral(r){if(r.kind!==BOOLEAN)throw new GraphQLError(`Boolean cannot represent a non boolean value: ${print(r)}`,{nodes:r});return r.value},valueToLiteral(r){const n=defaultScalarValueToLiteral(r);if(n.kind===BOOLEAN)return n}}),GraphQLID=new GraphQLScalarType({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',coerceOutputValue(r){const n=coerceOutputValueObject(r);if(typeof n=="string")return n;if(typeof n=="number")return coerceIDFromNumber(n);if(typeof n=="bigint")return String(n);throw new GraphQLError(`ID cannot represent value: ${inspect(r)}`)},coerceInputValue(r){if(typeof r=="string")return r;if(typeof r=="number")return coerceIDFromNumber(r);if(typeof r=="bigint")return String(r);throw new GraphQLError(`ID cannot represent value: ${inspect(r)}`)},coerceInputLiteral(r){if(r.kind!==STRING&&r.kind!==INT)throw new GraphQLError("ID cannot represent a non-string and non-integer value: "+print(r),{nodes:r});return r.value},valueToLiteral(r){if(typeof r=="string")return/^-?(?:0|[1-9][0-9]*)$/.test(r)?{kind:INT,value:r}:{kind:STRING,value:r,block:!1};if(typeof r=="number")return{kind:INT,value:coerceIDFromNumber(r)};if(typeof r=="bigint")return{kind:INT,value:String(r)}}}),specifiedScalarTypes=Object.freeze([GraphQLString,GraphQLInt,GraphQLFloat,GraphQLBoolean,GraphQLID]);function isSpecifiedScalarType(r){return specifiedScalarTypes.some(({name:n})=>r.name===n)}function coerceOutputValueObject(r){if(isObjectLike(r)){if(typeof r.valueOf=="function"){const n=r.valueOf();if(!isObjectLike(n))return n}if(typeof r.toJSON=="function")return r.toJSON()}return r}function coerceIntFromNumber(r){if(!Number.isInteger(r))throw new GraphQLError(`Int cannot represent non-integer value: ${inspect(r)}`);if(r>GRAPHQL_MAX_INT||r<GRAPHQL_MIN_INT)throw new GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inspect(r)}`);return r}function coerceIntFromString(r){if(r==="")throw new GraphQLError(`Int cannot represent non-integer value: ${inspect(r)}`);const n=Number(r);if(!Number.isInteger(n))throw new GraphQLError(`Int cannot represent non-integer value: ${inspect(r)}`);if(n>GRAPHQL_MAX_INT||n<GRAPHQL_MIN_INT)throw new GraphQLError(`Int cannot represent non 32-bit signed integer value: ${inspect(r)}`);return n}function coerceIntFromBigInt(r){if(r>GRAPHQL_MAX_INT||r<GRAPHQL_MIN_INT)throw new GraphQLError(`Int cannot represent non 32-bit signed integer value: ${String(r)}`);return Number(r)}function coerceFloatFromNumber(r){if(!Number.isFinite(r))throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)}`);return r}function coerceFloatFromString(r){if(r==="")throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)}`);const n=Number(r);if(!Number.isFinite(n))throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)}`);return n}function coerceFloatFromBigInt(r){const n=Number(r);if(!Number.isFinite(n))throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)} (value is too large)`);if(BigInt(n)!==r)throw new GraphQLError(`Float cannot represent non numeric value: ${inspect(r)} (value would lose precision)`);return n}function coerceStringFromNumber(r){if(!Number.isFinite(r))throw new GraphQLError(`String cannot represent value: ${inspect(r)}`);return String(r)}function coerceBooleanFromNumber(r){if(!Number.isFinite(r))throw new GraphQLError(`Boolean cannot represent a non boolean value: ${inspect(r)}`);return r!==0}function coerceIDFromNumber(r){if(!Number.isInteger(r))throw new GraphQLError(`ID cannot represent value: ${inspect(r)}`);return String(r)}const directiveSymbol=Symbol("Directive");function isDirective(r){return instanceOf(r,directiveSymbol,GraphQLDirective)}function assertDirective(r){if(!isDirective(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL directive.`);return r}class GraphQLDirective{constructor(n){this.__kind=directiveSymbol,this.name=assertName(n.name),this.description=n.description,this.locations=n.locations,this.isRepeatable=n.isRepeatable??!1,this.deprecationReason=n.deprecationReason,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],Array.isArray(n.locations)||devAssert(!1,`@${this.name} locations must be an Array.`);const a=n.args??{};isObjectLike(a)&&!Array.isArray(a)||devAssert(!1,`@${this.name} args must be an object with argument names as keys.`),this.args=Object.entries(a).map(([i,o])=>new GraphQLArgument(this,i,o))}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:keyValMap(this.args,n=>n.name,n=>n.toConfig()),isRepeatable:this.isRepeatable,deprecationReason:this.deprecationReason,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const GraphQLIncludeDirective=new GraphQLDirective({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Included when true."}}}),GraphQLSkipDirective=new GraphQLDirective({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[DirectiveLocation.FIELD,DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Skipped when true."}}}),GraphQLDeferDirective=new GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[DirectiveLocation.FRAGMENT_SPREAD,DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Deferred when true or undefined.",default:{value:!0}},label:{type:GraphQLString,description:"Unique name"}}}),GraphQLStreamDirective=new GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[DirectiveLocation.FIELD],args:{initialCount:{default:{value:0},type:new GraphQLNonNull(GraphQLInt),description:"Number of items to return immediately"},if:{type:new GraphQLNonNull(GraphQLBoolean),description:"Stream when true or undefined.",default:{value:!0}},label:{type:GraphQLString,description:"Unique name"}}}),DEFAULT_DEPRECATION_REASON="No longer supported",GraphQLDeprecatedDirective=new GraphQLDirective({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[DirectiveLocation.FIELD_DEFINITION,DirectiveLocation.ARGUMENT_DEFINITION,DirectiveLocation.INPUT_FIELD_DEFINITION,DirectiveLocation.ENUM_VALUE,DirectiveLocation.DIRECTIVE_DEFINITION],args:{reason:{type:new GraphQLNonNull(GraphQLString),description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",default:{value:DEFAULT_DEPRECATION_REASON}}}}),GraphQLSpecifiedByDirective=new GraphQLDirective({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[DirectiveLocation.SCALAR],args:{url:{type:new GraphQLNonNull(GraphQLString),description:"The URL that specifies the behavior of this scalar."}}}),GraphQLOneOfDirective=new GraphQLDirective({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[DirectiveLocation.INPUT_OBJECT],args:{}}),GraphQLDisableErrorPropagationDirective=new GraphQLDirective({name:"experimental_disableErrorPropagation",description:"Disables error propagation.",locations:[DirectiveLocation.QUERY,DirectiveLocation.MUTATION,DirectiveLocation.SUBSCRIPTION]}),specifiedDirectives=Object.freeze([GraphQLIncludeDirective,GraphQLSkipDirective,GraphQLDeprecatedDirective,GraphQLSpecifiedByDirective,GraphQLOneOfDirective]);function isSpecifiedDirective(r){return specifiedDirectives.some(({name:n})=>n===r.name)}function astFromValue(r,n){if(isNonNullType(n)){const a=astFromValue(r,n.ofType);return a?.kind===NULL?null:a}if(r===null)return{kind:NULL};if(r===void 0)return null;if(isListType(n)){const a=n.ofType;if(isIterableObject(r)){const i=[];for(const o of r){const s=astFromValue(o,a);s!=null&&i.push(s)}return{kind:LIST,values:i}}return astFromValue(r,a)}if(isInputObjectType(n)){if(!isObjectLike(r))return null;const a=[];for(const i of Object.values(n.getFields())){const o=astFromValue(r[i.name],i.type);o&&a.push({kind:OBJECT_FIELD,name:{kind:NAME,value:i.name},value:o})}return{kind:OBJECT,fields:a}}if(isLeafType(n)){const a=n.coerceOutputValue(r);if(a==null)return null;if(typeof a=="boolean")return{kind:BOOLEAN,value:a};if(typeof a=="number"&&Number.isFinite(a)){const i=String(a);return integerStringRegExp.test(i)?{kind:INT,value:i}:{kind:FLOAT,value:i}}if(typeof a=="bigint")return{kind:INT,value:String(a)};if(typeof a=="string")return isEnumType(n)?{kind:ENUM,value:a}:n===GraphQLID&&integerStringRegExp.test(a)?{kind:INT,value:a}:{kind:STRING,value:a};throw new TypeError(`Cannot convert value to AST: ${inspect(a)}.`)}invariant(!1,"Unexpected input type: "+inspect(n))}const integerStringRegExp=/^-?(?:0|[1-9][0-9]*)$/;function getDefaultValueAST(r){const n=r.type,a=r.default;if(a){const o=a.literal??valueToLiteral(a.value,n);return o==null&&invariant(!1,"Invalid default value"),o}const i=r.defaultValue;if(i!==void 0){const o=astFromValue(i,n);return o==null&&invariant(!1,"Invalid default value"),o}}const __Schema=new GraphQLObjectType({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:GraphQLString,resolve:r=>r.description},types:{description:"A list of all types supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),resolve(r){return Object.values(r.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new GraphQLNonNull(__Type),resolve:r=>r.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:__Type,resolve:r=>r.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:__Type,resolve:r=>r.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve:(r,{includeDeprecated:n})=>n===!0?r.getDirectives():r.getDirectives().filter(a=>a.deprecationReason==null)}})}),__Directive=new GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
122
+
123
+ In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new GraphQLNonNull(GraphQLString),resolve:r=>r.name},description:{type:GraphQLString,resolve:r=>r.description},isRepeatable:{type:new GraphQLNonNull(GraphQLBoolean),resolve:r=>r.isRepeatable},locations:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),resolve:r=>r.locations},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve(r,{includeDeprecated:n}){return n===!0?r.args:r.args.filter(a=>a.deprecationReason==null)}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:r=>r.deprecationReason!=null},deprecationReason:{type:GraphQLString,resolve:r=>r.deprecationReason}})}),__DirectiveLocation=new GraphQLEnumType({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to an operation variable definition."},FRAGMENT_VARIABLE_DEFINITION:{value:DirectiveLocation.FRAGMENT_VARIABLE_DEFINITION,description:"Location adjacent to a fragment variable definition."},SCHEMA:{value:DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."},DIRECTIVE_DEFINITION:{value:DirectiveLocation.DIRECTIVE_DEFINITION,description:"Location adjacent to a directive definition."}}}),__Type=new GraphQLObjectType({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new GraphQLNonNull(__TypeKind),resolve(r){if(isScalarType(r))return TypeKind.SCALAR;if(isObjectType(r))return TypeKind.OBJECT;if(isInterfaceType(r))return TypeKind.INTERFACE;if(isUnionType(r))return TypeKind.UNION;if(isEnumType(r))return TypeKind.ENUM;if(isInputObjectType(r))return TypeKind.INPUT_OBJECT;if(isListType(r))return TypeKind.LIST;if(isNonNullType(r))return TypeKind.NON_NULL;invariant(!1,`Unexpected type: "${inspect(r)}".`)}},name:{type:GraphQLString,resolve:r=>"name"in r?r.name:void 0},description:{type:GraphQLString,resolve:r=>"description"in r?r.description:void 0},specifiedByURL:{type:GraphQLString,resolve:r=>"specifiedByURL"in r?r.specifiedByURL:void 0},fields:{type:new GraphQLList(new GraphQLNonNull(__Field)),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve(r,{includeDeprecated:n}){if(isObjectType(r)||isInterfaceType(r)){const a=Object.values(r.getFields());return n===!0?a:a.filter(i=>i.deprecationReason==null)}}},interfaces:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve(r){if(isObjectType(r)||isInterfaceType(r))return r.getInterfaces()}},possibleTypes:{type:new GraphQLList(new GraphQLNonNull(__Type)),resolve(r,n,a,{schema:i}){if(isAbstractType(r))return i.getPossibleTypes(r)}},enumValues:{type:new GraphQLList(new GraphQLNonNull(__EnumValue)),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve(r,{includeDeprecated:n}){if(isEnumType(r)){const a=r.getValues();return n===!0?a:a.filter(i=>i.deprecationReason==null)}}},inputFields:{type:new GraphQLList(new GraphQLNonNull(__InputValue)),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve(r,{includeDeprecated:n}){if(isInputObjectType(r)){const a=Object.values(r.getFields());return n===!0?a:a.filter(i=>i.deprecationReason==null)}}},ofType:{type:__Type,resolve:r=>"ofType"in r?r.ofType:void 0},isOneOf:{type:GraphQLBoolean,resolve:r=>{if(isInputObjectType(r))return r.isOneOf}}})}),__Field=new GraphQLObjectType({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new GraphQLNonNull(GraphQLString),resolve:r=>r.name},description:{type:GraphQLString,resolve:r=>r.description},args:{type:new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),args:{includeDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),default:{value:!1}}},resolve(r,{includeDeprecated:n}){return n===!0?r.args:r.args.filter(a=>a.deprecationReason==null)}},type:{type:new GraphQLNonNull(__Type),resolve:r=>r.type},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:r=>r.deprecationReason!=null},deprecationReason:{type:GraphQLString,resolve:r=>r.deprecationReason}})}),__InputValue=new GraphQLObjectType({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new GraphQLNonNull(GraphQLString),resolve:r=>r.name},description:{type:GraphQLString,resolve:r=>r.description},type:{type:new GraphQLNonNull(__Type),resolve:r=>r.type},defaultValue:{type:GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(r){const n=getDefaultValueAST(r);return n?print(n):null}},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:r=>r.deprecationReason!=null},deprecationReason:{type:GraphQLString,resolve:r=>r.deprecationReason}})}),__EnumValue=new GraphQLObjectType({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new GraphQLNonNull(GraphQLString),resolve:r=>r.name},description:{type:GraphQLString,resolve:r=>r.description},isDeprecated:{type:new GraphQLNonNull(GraphQLBoolean),resolve:r=>r.deprecationReason!=null},deprecationReason:{type:GraphQLString,resolve:r=>r.deprecationReason}})}),TypeKind={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},__TypeKind=new GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:TypeKind.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:TypeKind.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:TypeKind.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:TypeKind.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:TypeKind.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:TypeKind.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:TypeKind.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:TypeKind.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),SchemaMetaFieldDef=new GraphQLField(void 0,"__schema",{type:new GraphQLNonNull(__Schema),description:"Access the current type schema of this server.",resolve:(r,n,a,{schema:i})=>i}),TypeMetaFieldDef=new GraphQLField(void 0,"__type",{type:__Type,description:"Request the type information of a single type.",args:{name:{type:new GraphQLNonNull(GraphQLString)}},resolve:(r,{name:n},a,{schema:i})=>i.getType(n)}),TypeNameMetaFieldDef=new GraphQLField(void 0,"__typename",{type:new GraphQLNonNull(GraphQLString),description:"The name of the current Object type at runtime.",resolve:(r,n,a,{parentType:i})=>i.name}),introspectionTypes=Object.freeze([__Schema,__Directive,__DirectiveLocation,__Type,__Field,__InputValue,__EnumValue,__TypeKind]);function isIntrospectionType(r){return introspectionTypes.some(({name:n})=>r.name===n)}function isSchema(r){return instanceOf(r,schemaSymbol,GraphQLSchema)}function assertSchema(r){if(!isSchema(r))throw new Error(`Expected ${inspect(r)} to be a GraphQL schema.`);return r}const schemaSymbol=Symbol("Schema");class GraphQLSchema{constructor(n){this.__kind=schemaSymbol,this.assumeValid=n.assumeValid??!1,this.__validationErrors=n.assumeValid===!0?[]:void 0,this.description=n.description,this.extensions=toObjMapWithSymbols(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes??[],this._queryType=n.query,this._mutationType=n.mutation,this._subscriptionType=n.subscription,this._directives=n.directives??specifiedDirectives;const a=new Set(n.types);if(n.types!=null)for(const i of n.types)a.delete(i),collectReferencedTypes(i,a);this._queryType!=null&&collectReferencedTypes(this._queryType,a),this._mutationType!=null&&collectReferencedTypes(this._mutationType,a),this._subscriptionType!=null&&collectReferencedTypes(this._subscriptionType,a);for(const i of this._directives)if(isDirective(i))for(const o of i.args)collectReferencedTypes(o.type,a);collectReferencedTypes(__Schema,a),this._typeMap=Object.create(null),this._subTypeMap=new Map,this._implementationsMap=Object.create(null);for(const i of a){if(i==null)continue;const o=i.name;if(this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=i,isInterfaceType(i)){for(const s of i.getInterfaces())if(isInterfaceType(s)){let l=this._implementationsMap[s.name];l??=this._implementationsMap[s.name]={objects:[],interfaces:[]},l.interfaces.push(i)}}else if(isObjectType(i)){for(const s of i.getInterfaces())if(isInterfaceType(s)){let l=this._implementationsMap[s.name];l??=this._implementationsMap[s.name]={objects:[],interfaces:[]},l.objects.push(i)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(n){switch(n){case OperationTypeNode.QUERY:return this.getQueryType();case OperationTypeNode.MUTATION:return this.getMutationType();case OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(n){return this.getTypeMap()[n]}getPossibleTypes(n){return isUnionType(n)?n.getTypes():this.getImplementations(n).objects}getImplementations(n){return this._implementationsMap[n.name]??{objects:[],interfaces:[]}}isSubType(n,a){let i=this._subTypeMap.get(n);if(i===void 0){if(isUnionType(n))i=new Set(n.getTypes());else{const o=this.getImplementations(n);i=new Set([...o.objects,...o.interfaces])}this._subTypeMap.set(n,i)}return i.has(a)}getDirectives(){return this._directives}getDirective(n){return this.getDirectives().find(a=>a.name===n)}getField(n,a){switch(a){case SchemaMetaFieldDef.name:return this.getQueryType()===n?SchemaMetaFieldDef:void 0;case TypeMetaFieldDef.name:return this.getQueryType()===n?TypeMetaFieldDef:void 0;case TypeNameMetaFieldDef.name:return TypeNameMetaFieldDef}if("getFields"in n)return n.getFields()[a]}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.assumeValid}}}function collectReferencedTypes(r,n){const a=getNamedType(r);if(!n.has(a)){if(n.add(a),isUnionType(a))for(const i of a.getTypes())collectReferencedTypes(i,n);else if(isObjectType(a)||isInterfaceType(a)){for(const i of a.getInterfaces())collectReferencedTypes(i,n);for(const i of Object.values(a.getFields())){collectReferencedTypes(i.type,n);for(const o of i.args)collectReferencedTypes(o.type,n)}}else if(isInputObjectType(a))for(const i of Object.values(a.getFields()))collectReferencedTypes(i.type,n)}return n}function validateSchema(r){if(assertSchema(r),r.__validationErrors)return r.__validationErrors;const n=new SchemaValidationContext(r);validateRootTypes(n),validateDirectives(n),validateTypes(n);const a=n.getErrors();return r.__validationErrors=a,a}function assertValidSchema(r){const n=validateSchema(r);if(n.length!==0)throw new Error(n.map(a=>a.message).join(`
124
+
125
+ `))}class SchemaValidationContext{constructor(n){this._errors=[],this.schema=n}reportError(n,a){const i=Array.isArray(a)?a.filter(Boolean):a;this._errors.push(new GraphQLError(n,{nodes:i}))}getErrors(){return this._errors}}function validateRootTypes(r){const n=r.schema;n.getQueryType()==null&&r.reportError("Query root type must be provided.",n.astNode);const a=new AccumulatorMap;for(const i of Object.values(OperationTypeNode)){const o=n.getRootType(i);if(o!=null)if(isObjectType(o))a.add(o,i);else{const s=capitalize(i),l=inspect(o);r.reportError(i===OperationTypeNode.QUERY?`${s} root type must be Object type, it cannot be ${l}.`:`${s} root type must be Object type if provided, it cannot be ${l}.`,getOperationTypeNode(n,i)??o.astNode)}}for(const[i,o]of a)if(o.length>1){const s=andList(o);r.reportError(`All root types must be different, "${i}" type is used as ${s} root types.`,o.map(l=>getOperationTypeNode(n,l)))}}function getOperationTypeNode(r,n){return[r.astNode,...r.extensionASTNodes].flatMap(a=>a?.operationTypes??[]).find(a=>a.operation===n)?.type}function validateDirectives(r){for(const n of r.schema.getDirectives()){if(!isDirective(n)){r.reportError(`Expected directive but got: ${inspect(n)}.`,n?.astNode);continue}validateName(r,n),n.locations.length===0&&r.reportError(`Directive ${n} must include 1 or more locations.`,n.astNode);for(const a of n.args)validateName(r,a),isInputType(a.type)||r.reportError(`The type of ${a} must be Input Type but got: ${inspect(a.type)}.`,a.astNode),isRequiredArgument(a)&&a.deprecationReason!=null&&r.reportError(`Required argument ${a} cannot be deprecated.`,[getDeprecatedDirectiveNode(a.astNode),a.astNode?.type]),validateDefaultValue(r,a)}}function validateDefaultValue(r,n){const a=n.default;if(!a)return;const i=[];if(validateDefaultInput(a,n.type,(o,s)=>{i.push([o,s])}),i.length!==0){if(!a.literal)try{const o=uncoerceDefaultValue(a.value,n.type),s=[];if(validateInputValue(o,n.type,(l,f)=>{s.push([l,f])}),s.length===0){r.reportError(`${n} has invalid default value: ${inspect(a.value)}. Did you mean: ${inspect(o)}?`,n.astNode?.defaultValue);return}}catch{}for(const[o,s]of i)r.reportError(`${n} has invalid default value${printPathArray(s)}: ${o.message}`,o.nodes??n.astNode?.defaultValue)}}function validateDefaultInput(r,n,a,i){if(r.literal){validateInputLiteral(r.literal,n,a,void 0,void 0,i);return}validateInputValue(r.value,n,a,i)}function uncoerceDefaultValue(r,n){if(isNonNullType(n))return uncoerceDefaultValue(r,n.ofType);if(r===null)return null;if(isListType(n))return isIterableObject(r)?Array.from(r,a=>uncoerceDefaultValue(a,n.ofType)):[uncoerceDefaultValue(r,n.ofType)];if(isInputObjectType(n)){isObjectLike(r)||invariant();const a=n.getFields();return mapValue(r,(i,o)=>(o in a||invariant(),uncoerceDefaultValue(i,a[o].type)))}return assertLeafType(n),n.coerceOutputValue(r)}function validateName(r,n){n.name.startsWith("__")&&r.reportError(`Name "${n.name}" must not begin with "__", which is reserved by GraphQL introspection.`,n.astNode)}function validateTypes(r){const n=createInputObjectDefaultValueCircularRefsValidator(r),a=r.schema.getTypeMap(),i=new Map;for(const s of Object.values(a)){if(!isNamedType(s)){r.reportError(`Expected GraphQL named type but got: ${inspect(s)}.`,s.astNode);continue}isIntrospectionType(s)||validateName(r,s),isObjectType(s)||isInterfaceType(s)?(validateFields(r,s),validateInterfaces(r,s)):isUnionType(s)?validateUnionMembers(r,s):isEnumType(s)?validateEnumValues(r,s):isInputObjectType(s)&&(validateInputFields(r,s),o(s),n(s))}detectInputObjectNonFiniteValues(r,i);function o(s){i.set(s,{inputObj:s,targets:[],dependents:[],unresolvedTargetCount:0,hasFiniteValue:!1})}}function validateFields(r,n){const a=Object.values(n.getFields());a.length===0&&r.reportError(`Type ${n} must define one or more fields.`,[n.astNode,...n.extensionASTNodes]);for(const i of a){validateName(r,i),isOutputType(i.type)||r.reportError(`The type of ${i} must be Output Type but got: ${inspect(i.type)}.`,i.astNode?.type);for(const o of i.args)validateName(r,o),isInputType(o.type)||r.reportError(`The type of ${o} must be Input Type but got: ${inspect(o.type)}.`,o.astNode?.type),isRequiredArgument(o)&&o.deprecationReason!=null&&r.reportError(`Required argument ${o} cannot be deprecated.`,[getDeprecatedDirectiveNode(o.astNode),o.astNode?.type]),validateDefaultValue(r,o)}}function validateInterfaces(r,n){const a=new Set;for(const i of n.getInterfaces()){if(!isInterfaceType(i)){r.reportError(`Type ${n} must only implement Interface types, it cannot implement ${inspect(i)}.`,getAllImplementsInterfaceNodes(n,i));continue}if(n===i){r.reportError(`Type ${n} cannot implement itself because it would create a circular reference.`,getAllImplementsInterfaceNodes(n,i));continue}if(a.has(i.name)){r.reportError(`Type ${n} can only implement ${i} once.`,getAllImplementsInterfaceNodes(n,i));continue}a.add(i.name),validateTypeImplementsAncestors(r,n,i),validateTypeImplementsInterface(r,n,i)}}function validateTypeImplementsInterface(r,n,a){const i=n.getFields();for(const o of Object.values(a.getFields())){const s=i[o.name];if(s==null){r.reportError(`Interface field ${o} expected but ${n} does not provide it.`,[o.astNode,n.astNode,...n.extensionASTNodes]);continue}isTypeSubTypeOf(r.schema,s.type,o.type)||r.reportError(`Interface field ${o} expects type ${o.type} but ${s} is type ${s.type}.`,[o.astNode?.type,s.astNode?.type]);for(const l of o.args){const f=s.args.find(d=>d.name===l.name);if(!f){r.reportError(`Interface field argument ${l} expected but ${s} does not provide it.`,[l.astNode,s.astNode]);continue}isEqualType(l.type,f.type)||r.reportError(`Interface field argument ${l} expects type ${l.type} but ${f} is type ${f.type}.`,[l.astNode?.type,f.astNode?.type])}for(const l of s.args)isRequiredArgument(l)&&(o.args.find(d=>d.name===l.name)||r.reportError(`Argument "${l}" must not be required type "${l.type}" if not provided by the Interface field "${o}".`,[l.astNode,o.astNode]));s.deprecationReason!=null&&o.deprecationReason==null&&r.reportError(`Interface field ${a.name}.${o.name} is not deprecated, so implementation field ${n.name}.${s.name} must not be deprecated.`,[getDeprecatedDirectiveNode(s.astNode),s.astNode?.type])}}function validateTypeImplementsAncestors(r,n,a){const i=n.getInterfaces();for(const o of a.getInterfaces())i.includes(o)||r.reportError(o===n?`Type ${n} cannot implement ${a} because it would create a circular reference.`:`Type ${n} must implement ${o} because it is implemented by ${a}.`,[...getAllImplementsInterfaceNodes(a,o),...getAllImplementsInterfaceNodes(n,a)])}function validateUnionMembers(r,n){const a=n.getTypes();a.length===0&&r.reportError(`Union type ${n} must define one or more member types.`,[n.astNode,...n.extensionASTNodes]);const i=new Set;for(const o of a){if(i.has(o.name)){r.reportError(`Union type ${n} can only include type ${o} once.`,getUnionMemberTypeNodes(n,o.name));continue}i.add(o.name),isObjectType(o)||r.reportError(`Union type ${n} can only include Object types, it cannot include ${inspect(o)}.`,getUnionMemberTypeNodes(n,String(o)))}}function validateEnumValues(r,n){const a=n.getValues();a.length===0&&r.reportError(`Enum type ${n} must define one or more values.`,[n.astNode,...n.extensionASTNodes]);for(const i of a)validateName(r,i)}function validateInputFields(r,n){const a=Object.values(n.getFields());a.length===0&&r.reportError(`Input Object type ${n} must define one or more fields.`,[n.astNode,...n.extensionASTNodes]);for(const i of a)validateName(r,i),isInputType(i.type)||r.reportError(`The type of ${i} must be Input Type but got: ${inspect(i.type)}.`,i.astNode?.type),isRequiredInputField(i)&&i.deprecationReason!=null&&r.reportError(`Required input field ${i} cannot be deprecated.`,[getDeprecatedDirectiveNode(i.astNode),i.astNode?.type]),validateDefaultValue(r,i),n.isOneOf&&validateOneOfInputObjectField(n,i,r)}function validateOneOfInputObjectField(r,n,a){isNonNullType(n.type)&&a.reportError(`OneOf input field ${r}.${n.name} must be nullable.`,n.astNode?.type),(n.default!==void 0||n.defaultValue!==void 0)&&a.reportError(`OneOf input field ${r}.${n.name} cannot have a default value.`,n.astNode)}function detectInputObjectNonFiniteValues(r,n){const a=[];for(const u of n.values()){const c=u.inputObj,v=Object.values(c.getFields());for(const h of v){const m=getFiniteValueTarget(c,h.type);if(m===void 0)continue;u.targets.push({field:h,target:m});const g=n.get(m);g!==void 0&&g.dependents.push(u)}c.isOneOf?(v.length===0||u.targets.length<v.length)&&f(u):(u.unresolvedTargetCount=u.targets.length,u.targets.length===0&&f(u))}let i;for(;(i=a.pop())!==void 0;)for(const u of i.dependents)if(!u.hasFiniteValue){if(u.inputObj.isOneOf){f(u);continue}--u.unresolvedTargetCount,u.unresolvedTargetCount===0&&f(u)}const o=new Set,s=[],l=new Map;for(const u of n.values())u.hasFiniteValue||d(u);function f(u){u.hasFiniteValue||(u.hasFiniteValue=!0,a.push(u))}function d(u){const c=u.inputObj;if(!o.has(c)){o.add(c),l.set(c,s.length);for(const{field:v,target:h}of u.targets){const m=n.get(h);if(m?.hasFiniteValue!==!1)continue;const g=l.get(h);if(s.push({fieldStr:`${c}.${v.name}`,astNode:v.astNode}),g===void 0)d(m);else{const _=s.slice(g),S=_.map(N=>N.fieldStr).join(", ");r.reportError(`Input Object ${h} cannot be provided a finite value because it references itself through fields: ${S}.`,_.map(N=>N.astNode))}s.pop()}l.delete(c)}}}function getFiniteValueTarget(r,n){if(r.isOneOf)return isInputObjectType(n)?n:void 0;if(isNonNullType(n)&&isInputObjectType(n.ofType))return n.ofType}function createInputObjectDefaultValueCircularRefsValidator(r){const n=Object.create(null),a=[],i=Object.create(null);return function(d){return o(d,Object.create(null))};function o(f,d){if(isIterableObject(d)){for(const u of d)o(f,u);return}else if(!isObjectLike(d))return;for(const u of Object.values(f.getFields())){const c=getNamedType(u.type);isInputObjectType(c)&&(Object.hasOwn(d,u.name)?o(c,d[u.name]):l(u,c,`${f}.${u.name}`))}}function s(f,d){if(d.kind===LIST){for(const c of d.values)s(f,c);return}else if(d.kind!==OBJECT)return;const u=keyMap(d.fields,c=>c.name.value);for(const c of Object.values(f.getFields())){const v=getNamedType(c.type);isInputObjectType(v)&&(Object.hasOwn(u,c.name)?s(v,u[c.name].value):l(c,v,`${f}.${c.name}`))}}function l(f,d,u){const c=f.default;if(c===void 0)return;const v=i[u];if(v!==void 0){r.reportError(`Invalid circular reference. The default value of Input Object field ${u} references itself${v<a.length?` via the default values of: ${a.slice(v).map(([h])=>h).join(", ")}`:""}.`,a.slice(v-1).map(([,h])=>h));return}n[u]===void 0&&(n[u]=!0,i[u]=a.push([u,f.astNode?.defaultValue]),c.literal?s(d,c.literal):o(d,c.value),a.pop(),i[u]=void 0)}}function getAllImplementsInterfaceNodes(r,n){const{astNode:a,extensionASTNodes:i}=r;return(a!=null?[a,...i]:i).flatMap(s=>s.interfaces??[]).filter(s=>s.name.value===n.name)}function getUnionMemberTypeNodes(r,n){const{astNode:a,extensionASTNodes:i}=r;return(a!=null?[a,...i]:i).flatMap(s=>s.types??[]).filter(s=>s.name.value===n)}function getDeprecatedDirectiveNode(r){return r?.directives?.find(n=>n.name.value===GraphQLDeprecatedDirective.name)}function syntaxError(r,n,a){return new GraphQLError(`Syntax Error: ${a}`,{source:r,positions:[n]})}function resolveDiagnosticsChannel(){let r;try{const n=globalThis.process;typeof n?.getBuiltinModule=="function"&&(r=n.getBuiltinModule("node:diagnostics_channel"))}catch{}return r}const dc=resolveDiagnosticsChannel(),parseChannel=dc?.tracingChannel("graphql:parse"),validateChannel=dc?.tracingChannel("graphql:validate"),executeChannel=dc?.tracingChannel("graphql:execute"),executeVariableCoercionChannel=dc?.tracingChannel("graphql:execute:variableCoercion"),executeRootSelectionSetChannel=dc?.tracingChannel("graphql:execute:rootSelectionSet"),subscribeChannel=dc?.tracingChannel("graphql:subscribe"),resolveChannel=dc?.tracingChannel("graphql:resolve"),SUB_CHANNEL_KEYS=["start","end","asyncStart","asyncEnd","error"];function shouldTrace(r){if(r==null)return!1;const n=r.hasSubscribers;if(n!==void 0)return n;for(const a of SUB_CHANNEL_KEYS)if(r[a].hasSubscribers)return!0;return!1}function traceMixed(r,n,a){const i=n;return r.start.runStores(i,()=>{let o;try{o=a()}catch(s){throw i.error=s,r.error.publish(i),r.end.publish(i),s}return isPromiseLike(o)?(r.end.publish(i),o.then(s=>(i.result=s,r.asyncStart.publish(i),r.asyncEnd.publish(i),s),s=>{throw i.error=s,r.error.publish(i),r.asyncStart.publish(i),r.asyncEnd.publish(i),s})):(i.result=o,r.end.publish(i),o)})}const TokenKind$1={SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",DOT:".",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"};class Lexer{constructor(n){const a=new Token(TokenKind$1.SOF,0,0,0,0);this.source=n,this.lastToken=a,this.token=a,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let n=this.token;if(n.kind!==TokenKind$1.EOF)do if(n.next)n=n.next;else{const a=readNextToken$1(this,n.end);n.next=a,a.prev=n,n=a}while(n.kind===TokenKind$1.COMMENT);return n}}function isPunctuatorTokenKind(r){return r===TokenKind$1.BANG||r===TokenKind$1.DOLLAR||r===TokenKind$1.AMP||r===TokenKind$1.PAREN_L||r===TokenKind$1.PAREN_R||r===TokenKind$1.DOT||r===TokenKind$1.SPREAD||r===TokenKind$1.COLON||r===TokenKind$1.EQUALS||r===TokenKind$1.AT||r===TokenKind$1.BRACKET_L||r===TokenKind$1.BRACKET_R||r===TokenKind$1.BRACE_L||r===TokenKind$1.PIPE||r===TokenKind$1.BRACE_R}function isUnicodeScalarValue(r){return r>=0&&r<=55295||r>=57344&&r<=1114111}function isSupplementaryCodePoint(r,n){return isLeadingSurrogate(r.charCodeAt(n))&&isTrailingSurrogate(r.charCodeAt(n+1))}function isLeadingSurrogate(r){return r>=55296&&r<=56319}function isTrailingSurrogate(r){return r>=56320&&r<=57343}function printCodePointAt(r,n){const a=r.source.body.codePointAt(n);if(a===void 0)return TokenKind$1.EOF;if(a>=32&&a<=126){const i=String.fromCodePoint(a);return i==='"'?`'"'`:`"${i}"`}return"U+"+a.toString(16).toUpperCase().padStart(4,"0")}function createToken$1(r,n,a,i,o){const s=r.line,l=1+a-r.lineStart;return new Token(n,a,i,s,l,o)}function readNextToken$1(r,n){const a=r.source.body,i=a.length;let o=n;for(;o<i;){const s=a.charCodeAt(o);switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++r.line,r.lineStart=o;continue;case 13:a.charCodeAt(o+1)===10?o+=2:++o,++r.line,r.lineStart=o;continue;case 35:return readComment(r,o);case 33:return createToken$1(r,TokenKind$1.BANG,o,o+1);case 36:return createToken$1(r,TokenKind$1.DOLLAR,o,o+1);case 38:return createToken$1(r,TokenKind$1.AMP,o,o+1);case 40:return createToken$1(r,TokenKind$1.PAREN_L,o,o+1);case 41:return createToken$1(r,TokenKind$1.PAREN_R,o,o+1);case 46:{const l=a.charCodeAt(o+1);if(l===46&&a.charCodeAt(o+2)===46)return createToken$1(r,TokenKind$1.SPREAD,o,o+3);if(l===46)throw syntaxError(r.source,o,'Unexpected "..", did you mean "..."?');if(isDigit(l)){const f=r.source.body.slice(o+1,readDigits(r,o+1,l));throw syntaxError(r.source,o,`Invalid number, expected digit before ".", did you mean "0.${f}"?`)}break}case 58:return createToken$1(r,TokenKind$1.COLON,o,o+1);case 61:return createToken$1(r,TokenKind$1.EQUALS,o,o+1);case 64:return createToken$1(r,TokenKind$1.AT,o,o+1);case 91:return createToken$1(r,TokenKind$1.BRACKET_L,o,o+1);case 93:return createToken$1(r,TokenKind$1.BRACKET_R,o,o+1);case 123:return createToken$1(r,TokenKind$1.BRACE_L,o,o+1);case 124:return createToken$1(r,TokenKind$1.PIPE,o,o+1);case 125:return createToken$1(r,TokenKind$1.BRACE_R,o,o+1);case 34:return a.charCodeAt(o+1)===34&&a.charCodeAt(o+2)===34?readBlockString(r,o):readString(r,o)}if(isDigit(s)||s===45)return readNumber(r,o,s);if(isNameStart(s))return readName(r,o);throw syntaxError(r.source,o,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:isUnicodeScalarValue(s)||isSupplementaryCodePoint(a,o)?`Unexpected character: ${printCodePointAt(r,o)}.`:`Invalid character: ${printCodePointAt(r,o)}.`)}return createToken$1(r,TokenKind$1.EOF,i,i)}function readComment(r,n){const a=r.source.body,i=a.length;let o=n+1;for(;o<i;){const s=a.charCodeAt(o);if(s===10||s===13)break;if(isUnicodeScalarValue(s))++o;else if(isSupplementaryCodePoint(a,o))o+=2;else break}return createToken$1(r,TokenKind$1.COMMENT,n,o,a.slice(n+1,o))}function readNumber(r,n,a){const i=r.source.body;let o=n,s=a,l=!1;if(s===45&&(s=i.charCodeAt(++o)),s===48){if(s=i.charCodeAt(++o),isDigit(s))throw syntaxError(r.source,o,`Invalid number, unexpected digit after 0: ${printCodePointAt(r,o)}.`)}else o=readDigits(r,o,s),s=i.charCodeAt(o);if(s===46&&(l=!0,s=i.charCodeAt(++o),o=readDigits(r,o,s),s=i.charCodeAt(o)),(s===69||s===101)&&(l=!0,s=i.charCodeAt(++o),(s===43||s===45)&&(s=i.charCodeAt(++o)),o=readDigits(r,o,s),s=i.charCodeAt(o)),s===46||isNameStart(s))throw syntaxError(r.source,o,`Invalid number, expected digit but got: ${printCodePointAt(r,o)}.`);return createToken$1(r,l?TokenKind$1.FLOAT:TokenKind$1.INT,n,o,i.slice(n,o))}function readDigits(r,n,a){if(!isDigit(a))throw syntaxError(r.source,n,`Invalid number, expected digit but got: ${printCodePointAt(r,n)}.`);const i=r.source.body;let o=n+1;for(;isDigit(i.charCodeAt(o));)++o;return o}function readString(r,n){const a=r.source.body,i=a.length;let o=n+1,s=o,l="";for(;o<i;){const f=a.charCodeAt(o);if(f===34)return l+=a.slice(s,o),createToken$1(r,TokenKind$1.STRING,n,o+1,l);if(f===92){l+=a.slice(s,o);const d=a.charCodeAt(o+1)===117?a.charCodeAt(o+2)===123?readEscapedUnicodeVariableWidth(r,o):readEscapedUnicodeFixedWidth(r,o):readEscapedCharacter(r,o);l+=d.value,o+=d.size,s=o;continue}if(f===10||f===13)break;if(isUnicodeScalarValue(f))++o;else if(isSupplementaryCodePoint(a,o))o+=2;else throw syntaxError(r.source,o,`Invalid character within String: ${printCodePointAt(r,o)}.`)}throw syntaxError(r.source,o,"Unterminated string.")}function readEscapedUnicodeVariableWidth(r,n){const a=r.source.body;let i=0,o=3;for(;o<12;){const s=a.charCodeAt(n+o++);if(s===125){if(o<5||!isUnicodeScalarValue(i))break;return{value:String.fromCodePoint(i),size:o}}if(i=i<<4|readHexDigit(s),i<0)break}throw syntaxError(r.source,n,`Invalid Unicode escape sequence: "${a.slice(n,n+o)}".`)}function readEscapedUnicodeFixedWidth(r,n){const a=r.source.body,i=read16BitHexCode(a,n+2);if(isUnicodeScalarValue(i))return{value:String.fromCodePoint(i),size:6};if(isLeadingSurrogate(i)&&a.charCodeAt(n+6)===92&&a.charCodeAt(n+7)===117){const o=read16BitHexCode(a,n+8);if(isTrailingSurrogate(o))return{value:String.fromCodePoint(i,o),size:12}}throw syntaxError(r.source,n,`Invalid Unicode escape sequence: "${a.slice(n,n+6)}".`)}function read16BitHexCode(r,n){return readHexDigit(r.charCodeAt(n))<<12|readHexDigit(r.charCodeAt(n+1))<<8|readHexDigit(r.charCodeAt(n+2))<<4|readHexDigit(r.charCodeAt(n+3))}function readHexDigit(r){return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:-1}function readEscapedCharacter(r,n){const a=r.source.body;switch(a.charCodeAt(n+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
126
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw syntaxError(r.source,n,`Invalid character escape sequence: "${a.slice(n,n+2)}".`)}function readBlockString(r,n){const a=r.source.body,i=a.length;let o=r.lineStart,s=n+3,l=s,f="";const d=[];for(;s<i;){const u=a.charCodeAt(s);if(u===34&&a.charCodeAt(s+1)===34&&a.charCodeAt(s+2)===34){f+=a.slice(l,s),d.push(f);const c=createToken$1(r,TokenKind$1.BLOCK_STRING,n,s+3,dedentBlockStringLines(d).join(`
127
+ `));return r.line+=d.length-1,r.lineStart=o,c}if(u===92&&a.charCodeAt(s+1)===34&&a.charCodeAt(s+2)===34&&a.charCodeAt(s+3)===34){f+=a.slice(l,s),l=s+1,s+=4;continue}if(u===10||u===13){f+=a.slice(l,s),d.push(f),u===13&&a.charCodeAt(s+1)===10?s+=2:++s,f="",l=s,o=s;continue}if(isUnicodeScalarValue(u))++s;else if(isSupplementaryCodePoint(a,s))s+=2;else throw syntaxError(r.source,s,`Invalid character within String: ${printCodePointAt(r,s)}.`)}throw syntaxError(r.source,s,"Unterminated string.")}function readName(r,n){const a=r.source.body,i=a.length;let o=n+1;for(;o<i;){const s=a.charCodeAt(o);if(isNameContinue(s))++o;else break}return createToken$1(r,TokenKind$1.NAME,n,o,a.slice(n,o))}class SchemaCoordinateLexer{constructor(n){this.line=1,this.lineStart=0;const a=new Token(TokenKind$1.SOF,0,0,0,0);this.source=n,this.lastToken=a,this.token=a}get[Symbol.toStringTag](){return"SchemaCoordinateLexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let n=this.token;if(n.kind!==TokenKind$1.EOF){const a=readNextToken(this,n.end);n.next=a,a.prev=n,n=a}return n}}function readNextToken(r,n){const a=r.source.body,i=a.length,o=n;if(o<i){const s=a.charCodeAt(o);switch(s){case 46:return createToken$1(r,TokenKind$1.DOT,o,o+1);case 40:return createToken$1(r,TokenKind$1.PAREN_L,o,o+1);case 41:return createToken$1(r,TokenKind$1.PAREN_R,o,o+1);case 58:return createToken$1(r,TokenKind$1.COLON,o,o+1);case 64:return createToken$1(r,TokenKind$1.AT,o,o+1)}if(isNameStart(s))return readName(r,o);throw syntaxError(r.source,o,`Invalid character: ${printCodePointAt(r,o)}.`)}return createToken$1(r,TokenKind$1.EOF,i,i)}const sourceSymbol=Symbol("Source");class Source{constructor(n,a="GraphQL request",i={line:1,column:1}){this.__kind=sourceSymbol,this.body=n,this.name=a,this.locationOffset=i,this.locationOffset.line>0||devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function isSource(r){return instanceOf(r,sourceSymbol,Source)}function parse(r,n){return shouldTrace(parseChannel)?parseChannel.traceSync(()=>parseImpl(r,n),{source:r}):parseImpl(r,n)}function parseImpl(r,n){const a=new Parser(r,n),i=a.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:a.tokenCount}),i}function parseValue(r,n){const a=new Parser(r,n);a.expectToken(TokenKind$1.SOF);const i=a.parseValueLiteral(!1);return a.expectToken(TokenKind$1.EOF),i}function parseConstValue(r,n){const a=new Parser(r,n);a.expectToken(TokenKind$1.SOF);const i=a.parseConstValueLiteral();return a.expectToken(TokenKind$1.EOF),i}function parseType(r,n){const a=new Parser(r,n);a.expectToken(TokenKind$1.SOF);const i=a.parseTypeReference();return a.expectToken(TokenKind$1.EOF),i}function parseSchemaCoordinate(r){const n=isSource(r)?r:new Source(r),a=new SchemaCoordinateLexer(n),i=new Parser(r,{lexer:a});i.expectToken(TokenKind$1.SOF);const o=i.parseSchemaCoordinate();return i.expectToken(TokenKind$1.EOF),o}class Parser{constructor(n,a={}){const{lexer:i,...o}=a;if(i)this._lexer=i;else{const s=isSource(n)?n:new Source(n);this._lexer=new Lexer(s)}this._options=o,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const n=this.expectToken(TokenKind$1.NAME);return this.node(n,{kind:NAME,value:n.value})}parseDocument(){return this.node(this._lexer.token,{kind:DOCUMENT,definitions:this.many(TokenKind$1.SOF,this.parseDefinition,TokenKind$1.EOF)})}parseDefinition(){if(this.peek(TokenKind$1.BRACE_L))return this.parseOperationDefinition();const n=this.peekDescription(),a=n?this._lexer.lookahead():this._lexer.token;if(n&&a.kind===TokenKind$1.BRACE_L)throw syntaxError(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(a.kind===TokenKind$1.NAME){switch(a.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(a.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(n)throw syntaxError(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(a.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(a)}parseOperationDefinition(){const n=this._lexer.token;if(this.peek(TokenKind$1.BRACE_L))return this.node(n,{kind:OPERATION_DEFINITION,operation:OperationTypeNode.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});const a=this.parseDescription(),i=this.parseOperationType();let o;return this.peek(TokenKind$1.NAME)&&(o=this.parseName()),this.node(n,{kind:OPERATION_DEFINITION,operation:i,description:a,name:o,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const n=this.expectToken(TokenKind$1.NAME);switch(n.value){case"query":return OperationTypeNode.QUERY;case"mutation":return OperationTypeNode.MUTATION;case"subscription":return OperationTypeNode.SUBSCRIPTION}throw this.unexpected(n)}parseVariableDefinitions(){return this.optionalMany(TokenKind$1.PAREN_L,this.parseVariableDefinition,TokenKind$1.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(TokenKind$1.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(TokenKind$1.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const n=this._lexer.token;return this.expectToken(TokenKind$1.DOLLAR),this.node(n,{kind:VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:SELECTION_SET,selections:this.many(TokenKind$1.BRACE_L,this.parseSelection,TokenKind$1.BRACE_R)})}parseSelection(){return this.peek(TokenKind$1.SPREAD)?this.parseFragment():this.parseField()}parseField(){const n=this._lexer.token,a=this.parseName();let i,o;return this.expectOptionalToken(TokenKind$1.COLON)?(i=a,o=this.parseName()):o=a,this.node(n,{kind:FIELD,alias:i,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(TokenKind$1.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(n){const a=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(TokenKind$1.PAREN_L,a,TokenKind$1.PAREN_R)}parseFragmentArguments(){const n=this.parseFragmentArgument;return this.optionalMany(TokenKind$1.PAREN_L,n,TokenKind$1.PAREN_R)}parseArgument(n=!1){const a=this._lexer.token,i=this.parseName();return this.expectToken(TokenKind$1.COLON),this.node(a,{kind:ARGUMENT,name:i,value:this.parseValueLiteral(n)})}parseConstArgument(){return this.parseArgument(!0)}parseFragmentArgument(){const n=this._lexer.token,a=this.parseName();return this.expectToken(TokenKind$1.COLON),this.node(n,{kind:FRAGMENT_ARGUMENT,name:a,value:this.parseValueLiteral(!1)})}parseFragment(){const n=this._lexer.token;this.expectToken(TokenKind$1.SPREAD);const a=this.expectOptionalKeyword("on");if(!a&&this.peek(TokenKind$1.NAME)){const i=this.parseFragmentName();return this.peek(TokenKind$1.PAREN_L)&&this._options.experimentalFragmentArguments?this.node(n,{kind:FRAGMENT_SPREAD,name:i,arguments:this.parseFragmentArguments(),directives:this.parseDirectives(!1)}):this.node(n,{kind:FRAGMENT_SPREAD,name:i,directives:this.parseDirectives(!1)})}return this.node(n,{kind:INLINE_FRAGMENT,typeCondition:a?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const n=this._lexer.token,a=this.parseDescription();return this.expectKeyword("fragment"),this._options.experimentalFragmentArguments===!0?this.node(n,{kind:FRAGMENT_DEFINITION,description:a,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(n,{kind:FRAGMENT_DEFINITION,description:a,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(n){const a=this._lexer.token;switch(a.kind){case TokenKind$1.BRACKET_L:return this.parseList(n);case TokenKind$1.BRACE_L:return this.parseObject(n);case TokenKind$1.INT:return this.advanceLexer(),this.node(a,{kind:INT,value:a.value});case TokenKind$1.FLOAT:return this.advanceLexer(),this.node(a,{kind:FLOAT,value:a.value});case TokenKind$1.STRING:case TokenKind$1.BLOCK_STRING:return this.parseStringLiteral();case TokenKind$1.NAME:switch(this.advanceLexer(),a.value){case"true":return this.node(a,{kind:BOOLEAN,value:!0});case"false":return this.node(a,{kind:BOOLEAN,value:!1});case"null":return this.node(a,{kind:NULL});default:return this.node(a,{kind:ENUM,value:a.value})}case TokenKind$1.DOLLAR:if(n)if(this.expectToken(TokenKind$1.DOLLAR),this._lexer.token.kind===TokenKind$1.NAME){const i=this._lexer.token.value;throw syntaxError(this._lexer.source,a.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(a);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const n=this._lexer.token;return this.advanceLexer(),this.node(n,{kind:STRING,value:n.value,block:n.kind===TokenKind$1.BLOCK_STRING})}parseList(n){const a=()=>this.parseValueLiteral(n);return this.node(this._lexer.token,{kind:LIST,values:this.any(TokenKind$1.BRACKET_L,a,TokenKind$1.BRACKET_R)})}parseObject(n){const a=()=>this.parseObjectField(n);return this.node(this._lexer.token,{kind:OBJECT,fields:this.any(TokenKind$1.BRACE_L,a,TokenKind$1.BRACE_R)})}parseObjectField(n){const a=this._lexer.token,i=this.parseName();return this.expectToken(TokenKind$1.COLON),this.node(a,{kind:OBJECT_FIELD,name:i,value:this.parseValueLiteral(n)})}parseDirectives(n){const a=[];for(;this.peek(TokenKind$1.AT);)a.push(this.parseDirective(n));if(a.length)return a}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(n){const a=this._lexer.token;return this.expectToken(TokenKind$1.AT),this.node(a,{kind:DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n)})}parseTypeReference(){const n=this._lexer.token;let a;if(this.expectOptionalToken(TokenKind$1.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(TokenKind$1.BRACKET_R),a=this.node(n,{kind:LIST_TYPE,type:i})}else a=this.parseNamedType();return this.expectOptionalToken(TokenKind$1.BANG)?this.node(n,{kind:NON_NULL_TYPE,type:a}):a}parseNamedType(){return this.node(this._lexer.token,{kind:NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(TokenKind$1.STRING)||this.peek(TokenKind$1.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),o=this.many(TokenKind$1.BRACE_L,this.parseOperationTypeDefinition,TokenKind$1.BRACE_R);return this.node(n,{kind:SCHEMA_DEFINITION,description:a,directives:i,operationTypes:o})}parseOperationTypeDefinition(){const n=this._lexer.token,a=this.parseOperationType();this.expectToken(TokenKind$1.COLON);const i=this.parseNamedType();return this.node(n,{kind:OPERATION_TYPE_DEFINITION,operation:a,type:i})}parseScalarTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),o=this.parseConstDirectives();return this.node(n,{kind:SCALAR_TYPE_DEFINITION,description:a,name:i,directives:o})}parseObjectTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),l=this.parseFieldsDefinition();return this.node(n,{kind:OBJECT_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:l})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(TokenKind$1.AMP,this.parseNamedType):void 0}parseFieldsDefinition(){return this.optionalMany(TokenKind$1.BRACE_L,this.parseFieldDefinition,TokenKind$1.BRACE_R)}parseFieldDefinition(){const n=this._lexer.token,a=this.parseDescription(),i=this.parseName(),o=this.parseArgumentDefs();this.expectToken(TokenKind$1.COLON);const s=this.parseTypeReference(),l=this.parseConstDirectives();return this.node(n,{kind:FIELD_DEFINITION,description:a,name:i,arguments:o,type:s,directives:l})}parseArgumentDefs(){return this.optionalMany(TokenKind$1.PAREN_L,this.parseInputValueDef,TokenKind$1.PAREN_R)}parseInputValueDef(){const n=this._lexer.token,a=this.parseDescription(),i=this.parseName();this.expectToken(TokenKind$1.COLON);const o=this.parseTypeReference();let s;this.expectOptionalToken(TokenKind$1.EQUALS)&&(s=this.parseConstValueLiteral());const l=this.parseConstDirectives();return this.node(n,{kind:INPUT_VALUE_DEFINITION,description:a,name:i,type:o,defaultValue:s,directives:l})}parseInterfaceTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),l=this.parseFieldsDefinition();return this.node(n,{kind:INTERFACE_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:l})}parseUnionTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),o=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(n,{kind:UNION_TYPE_DEFINITION,description:a,name:i,directives:o,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(TokenKind$1.EQUALS)?this.delimitedMany(TokenKind$1.PIPE,this.parseNamedType):void 0}parseEnumTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),o=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(n,{kind:ENUM_TYPE_DEFINITION,description:a,name:i,directives:o,values:s})}parseEnumValuesDefinition(){return this.optionalMany(TokenKind$1.BRACE_L,this.parseEnumValueDefinition,TokenKind$1.BRACE_R)}parseEnumValueDefinition(){const n=this._lexer.token,a=this.parseDescription(),i=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(n,{kind:ENUM_VALUE_DEFINITION,description:a,name:i,directives:o})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw syntaxError(this._lexer.source,this._lexer.token.start,`${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),o=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(n,{kind:INPUT_OBJECT_TYPE_DEFINITION,description:a,name:i,directives:o,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(TokenKind$1.BRACE_L,this.parseInputValueDef,TokenKind$1.BRACE_R)}parseTypeSystemExtension(){const n=this._lexer.lookahead();if(n.kind===TokenKind$1.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":return this.parseDirectiveExtension()}throw this.unexpected(n)}parseSchemaExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const a=this.parseConstDirectives(),i=this.optionalMany(TokenKind$1.BRACE_L,this.parseOperationTypeDefinition,TokenKind$1.BRACE_R);if(a===void 0&&i===void 0)throw this.unexpected();return this.node(n,{kind:SCHEMA_EXTENSION,directives:a,operationTypes:i})}parseScalarTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const a=this.parseName(),i=this.parseConstDirectives();if(i===void 0)throw this.unexpected();return this.node(n,{kind:SCALAR_TYPE_EXTENSION,name:a,directives:i})}parseObjectTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i===void 0&&o===void 0&&s===void 0)throw this.unexpected();return this.node(n,{kind:OBJECT_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s})}parseInterfaceTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i===void 0&&o===void 0&&s===void 0)throw this.unexpected();return this.node(n,{kind:INTERFACE_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s})}parseUnionTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const a=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(i===void 0&&o===void 0)throw this.unexpected();return this.node(n,{kind:UNION_TYPE_EXTENSION,name:a,directives:i,types:o})}parseEnumTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const a=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(i===void 0&&o===void 0)throw this.unexpected();return this.node(n,{kind:ENUM_TYPE_EXTENSION,name:a,directives:i,values:o})}parseInputObjectTypeExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const a=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(i===void 0&&o===void 0)throw this.unexpected();return this.node(n,{kind:INPUT_OBJECT_TYPE_EXTENSION,name:a,directives:i,fields:o})}parseDirectiveExtension(){const n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(TokenKind$1.AT);const a=this.parseName(),i=this.parseConstDirectives();if(i===void 0)throw this.unexpected();return this.node(n,{kind:DIRECTIVE_EXTENSION,name:a,directives:i})}parseDirectiveDefinition(){const n=this._lexer.token,a=this.parseDescription();this.expectKeyword("directive"),this.expectToken(TokenKind$1.AT);const i=this.parseName(),o=this.parseArgumentDefs(),s=this.parseConstDirectives(),l=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const f=this.parseDirectiveLocations();return this.node(n,{kind:DIRECTIVE_DEFINITION,description:a,name:i,arguments:o,directives:s,repeatable:l,locations:f})}parseDirectiveLocations(){return this.delimitedMany(TokenKind$1.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const n=this._lexer.token,a=this.parseName();if(Object.hasOwn(DirectiveLocation,a.value))return a;throw this.unexpected(n)}parseSchemaCoordinate(){const n=this._lexer.token,a=this.expectOptionalToken(TokenKind$1.AT),i=this.parseName();let o;!a&&this.expectOptionalToken(TokenKind$1.DOT)&&(o=this.parseName());let s;return(a||o)&&this.expectOptionalToken(TokenKind$1.PAREN_L)&&(s=this.parseName(),this.expectToken(TokenKind$1.COLON),this.expectToken(TokenKind$1.PAREN_R)),a?s?this.node(n,{kind:DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:s}):this.node(n,{kind:DIRECTIVE_COORDINATE,name:i}):o?s?this.node(n,{kind:ARGUMENT_COORDINATE,name:i,fieldName:o,argumentName:s}):this.node(n,{kind:MEMBER_COORDINATE,name:i,memberName:o}):this.node(n,{kind:TYPE_COORDINATE,name:i})}node(n,a){return this._options.noLocation!==!0&&(a.loc=new Location$1(n,this._lexer.lastToken,this._lexer.source)),a}peek(n){return this._lexer.token.kind===n}expectToken(n){const a=this._lexer.token;if(a.kind===n)return this.advanceLexer(),a;throw syntaxError(this._lexer.source,a.start,`Expected ${getTokenKindDesc(n)}, found ${getTokenDesc(a)}.`)}expectOptionalToken(n){return this._lexer.token.kind===n?(this.advanceLexer(),!0):!1}expectKeyword(n){const a=this._lexer.token;if(a.kind===TokenKind$1.NAME&&a.value===n)this.advanceLexer();else throw syntaxError(this._lexer.source,a.start,`Expected "${n}", found ${getTokenDesc(a)}.`)}expectOptionalKeyword(n){const a=this._lexer.token;return a.kind===TokenKind$1.NAME&&a.value===n?(this.advanceLexer(),!0):!1}unexpected(n){const a=n??this._lexer.token;return syntaxError(this._lexer.source,a.start,`Unexpected ${getTokenDesc(a)}.`)}any(n,a,i){this.expectToken(n);const o=[];for(;!this.expectOptionalToken(i);)o.push(a.call(this));return o}optionalMany(n,a,i){if(this.expectOptionalToken(n)){const o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o}}many(n,a,i){this.expectToken(n);const o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o}delimitedMany(n,a){this.expectOptionalToken(n);const i=[];do i.push(a.call(this));while(this.expectOptionalToken(n));return i}advanceLexer(){const{maxTokens:n}=this._options,a=this._lexer.advance();if(a.kind!==TokenKind$1.EOF&&(++this._tokenCounter,n!==void 0&&this._tokenCounter>n))throw syntaxError(this._lexer.source,a.start,`Document contains more than ${n} tokens. Parsing aborted.`)}}function getTokenDesc(r){const n=r.value;return getTokenKindDesc(r.kind)+(n!=null?` "${n}"`:"")}function getTokenKindDesc(r){return isPunctuatorTokenKind(r)?`"${r}"`:r}function typeFromAST(r,n){switch(n.kind){case LIST_TYPE:{const a=typeFromAST(r,n.type);return a&&new GraphQLList(a)}case NON_NULL_TYPE:{const a=typeFromAST(r,n.type);return a&&new GraphQLNonNull(a)}case NAMED_TYPE:return r.getType(n.name.value)}}class TypeInfo{constructor(n,a,i){this._schema=n,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._fragmentSignaturesByName=i??(()=>null),this._fragmentSignature=null,this._fragmentArgument=null,a&&(isInputType(a)&&this._inputTypeStack.push(a),isCompositeType(a)&&this._parentTypeStack.push(a),isOutputType(a)&&this._typeStack.push(a))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){return this._typeStack.at(-1)}getParentType(){return this._parentTypeStack.at(-1)}getInputType(){return this._inputTypeStack.at(-1)}getParentInputType(){return this._inputTypeStack.at(-2)}getFieldDef(){return this._fieldDefStack.at(-1)}getDefaultValue(){return this._defaultValueStack.at(-1)}getDirective(){return this._directive}getArgument(){return this._argument}getFragmentSignature(){return this._fragmentSignature}getFragmentSignatureByName(){return this._fragmentSignaturesByName}getFragmentArgument(){return this._fragmentArgument}getEnumValue(){return this._enumValue}enter(n){const a=this._schema;switch(n.kind){case DOCUMENT:{const i=getFragmentSignatures(n);this._fragmentSignaturesByName=o=>i.get(o);break}case SELECTION_SET:{const i=getNamedType(this.getType());this._parentTypeStack.push(isCompositeType(i)?i:void 0);break}case FIELD:{const i=this.getParentType();let o,s;i&&(o=a.getField(i,n.name.value),o&&(s=o.type)),this._fieldDefStack.push(o),this._typeStack.push(isOutputType(s)?s:void 0);break}case DIRECTIVE:this._directive=a.getDirective(n.name.value);break;case OPERATION_DEFINITION:{const i=a.getRootType(n.operation);this._typeStack.push(isObjectType(i)?i:void 0);break}case FRAGMENT_SPREAD:{this._fragmentSignature=this.getFragmentSignatureByName()(n.name.value);break}case INLINE_FRAGMENT:case FRAGMENT_DEFINITION:{const i=n.typeCondition,o=i?typeFromAST(a,i):getNamedType(this.getType());this._typeStack.push(isOutputType(o)?o:void 0);break}case VARIABLE_DEFINITION:{const i=typeFromAST(a,n.type);this._inputTypeStack.push(isInputType(i)?i:void 0);break}case ARGUMENT:{let i,o;const s=this.getDirective()??this.getFieldDef();s&&(i=s.args.find(l=>l.name===n.name.value),i&&(o=i.type)),this._argument=i,this._defaultValueStack.push(i?.default??i?.defaultValue??void 0),this._inputTypeStack.push(isInputType(o)?o:void 0);break}case FRAGMENT_ARGUMENT:{const o=this.getFragmentSignature()?.variableDefinitions.get(n.name.value);this._fragmentArgument=o;let s;o&&(s=typeFromAST(this._schema,o.type)),this._inputTypeStack.push(isInputType(s)?s:void 0);break}case LIST:{const i=getNullableType(this.getInputType()),o=isListType(i)?i.ofType:void 0;this._defaultValueStack.push(void 0),this._inputTypeStack.push(isInputType(o)?o:void 0);break}case OBJECT_FIELD:{const i=getNamedType(this.getInputType());let o,s;isInputObjectType(i)&&(s=i.getFields()[n.name.value],s!=null&&(o=s.type)),this._defaultValueStack.push(s?.default??s?.defaultValue??void 0),this._inputTypeStack.push(isInputType(o)?o:void 0);break}case ENUM:{const i=getNamedType(this.getInputType());let o;isEnumType(i)&&(o=i.getValue(n.value)),this._enumValue=o;break}}}leave(n){switch(n.kind){case DOCUMENT:this._fragmentSignaturesByName=()=>null;break;case SELECTION_SET:this._parentTypeStack.pop();break;case FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case DIRECTIVE:this._directive=null;break;case FRAGMENT_SPREAD:this._fragmentSignature=null;break;case OPERATION_DEFINITION:case INLINE_FRAGMENT:case FRAGMENT_DEFINITION:this._typeStack.pop();break;case VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case FRAGMENT_ARGUMENT:{this._fragmentArgument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break}case LIST:case OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case ENUM:this._enumValue=null;break}}}function getFragmentSignatures(r){const n=new Map;for(const a of r.definitions)if(a.kind===FRAGMENT_DEFINITION){const i=new Map;if(a.variableDefinitions)for(const s of a.variableDefinitions)i.set(s.variable.name.value,s);const o={definition:a,variableDefinitions:i};n.set(a.name.value,o)}return n}function visitWithTypeInfo(r,n){return{enter(...a){const i=a[0];r.enter(i);const o=getEnterLeaveForKind$1(n,i.kind).enter;if(o){const s=o.apply(n,a);return s!==void 0&&(r.leave(i),isNode(s)&&r.enter(s)),s}},leave(...a){const i=a[0],o=getEnterLeaveForKind$1(n,i.kind).leave;let s;return o&&(s=o.apply(n,a)),r.leave(i),s}}}function DeferStreamDirectiveLabelRule(r){const n=new Map;return{Directive(a){if(a.name.value===GraphQLDeferDirective.name||a.name.value===GraphQLStreamDirective.name){const o=a.arguments?.find(l=>l.name.value==="label")?.value;if(!o||o.kind===NULL)return;if(o.kind!==STRING){r.reportError(new GraphQLError(`Argument "@${a.name.value}(label:)" must be a static string.`,{nodes:a}));return}const s=n.get(o.value);s!=null?r.reportError(new GraphQLError('Value for arguments "defer(label:)" and "stream(label:)" must be unique across all Defer/Stream directive usages.',{nodes:[s,a]})):n.set(o.value,a)}}}}function DeferStreamDirectiveOnRootFieldRule(r){return{OperationDefinition(n){const a=r.getDocument(),i=new Map;for(const l of a.definitions)l.kind===FRAGMENT_DEFINITION&&i.set(l.name.value,l);if(n.operation!=="subscription"&&n.operation!=="mutation")return;const s=r.getSchema().getRootType(n.operation);s&&forbidDeferStream({context:r,operationType:n.operation,rootType:s,fragments:i,selectionSet:n.selectionSet,visitedFragments:new Set})}}}function forbidDeferStream({context:r,operationType:n,rootType:a,fragments:i,selectionSet:o,visitedFragments:s}){for(const l of o.selections)if(l.kind==="Field"){const f=l.directives?.find(d=>d.name.value===GraphQLStreamDirective.name);f&&r.reportError(new GraphQLError(`Stream directive cannot be used on root ${n} type "${a}".`,{nodes:f}))}else if(l.kind==="FragmentSpread"){const f=l.name.value;if(s.has(f))continue;const d=i.get(f);if(d){const u=getDeferDirective(l);u!==void 0&&r.reportError(new GraphQLError(`Defer directive cannot be used on root ${n} type "${a}".`,{nodes:u})),forbidDeferStream({context:r,operationType:n,rootType:a,fragments:i,selectionSet:d.selectionSet,visitedFragments:s})}s.add(f)}else if(l.kind==="InlineFragment"){const f=getDeferDirective(l);f!==void 0&&r.reportError(new GraphQLError(`Defer directive cannot be used on root ${n} type "${a}".`,{nodes:f})),forbidDeferStream({context:r,operationType:n,rootType:a,fragments:i,selectionSet:l.selectionSet,visitedFragments:s})}}function getDeferDirective(r){return r.directives?.find(n=>n.name.value===GraphQLDeferDirective.name)}function ifArgumentCanBeFalse(r){const n=r.arguments?.find(a=>a.name.value==="if");if(!n)return!1;if(n.value.kind===BOOLEAN){if(n.value.value)return!1}else if(n.value.kind!==VARIABLE)return!1;return!0}function canBeSkippedViaSkipDirective(r){const n=r.arguments?.find(a=>a.name.value==="if");return n&&n.value.kind===BOOLEAN?!!n.value.value:!0}function canBeSkippedViaIncludeDirective(r){const n=r.arguments?.find(a=>a.name.value==="if");return n?n?.value.kind===BOOLEAN?!n.value.value:!0:!1}function DeferStreamDirectiveOnValidOperationsRule(r){return{OperationDefinition(n){if(n.operation!==OperationTypeNode.SUBSCRIPTION)return;const a=r.getDocument(),i=new Map;for(const s of a.definitions)s.kind===FRAGMENT_DEFINITION&&i.set(s.name.value,s);const o=new Set;forbidUnconditionalDeferStream({context:r,fragments:i,selectionSet:n.selectionSet,parentNodes:[],visitedFragments:o})}}}function forbidUnconditionalDeferStream({context:r,fragments:n,selectionSet:a,parentNodes:i,visitedFragments:o}){for(const s of a.selections){const l=s.directives?.find(d=>d.name.value===GraphQLSkipDirective.name);if(l&&canBeSkippedViaSkipDirective(l))continue;const f=s.directives?.find(d=>d.name.value===GraphQLIncludeDirective.name);if(!(f&&canBeSkippedViaIncludeDirective(f))){for(const d of s.directives??[])d.name.value===GraphQLDeferDirective.name?ifArgumentCanBeFalse(d)||r.reportError(new GraphQLError("Defer directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.",{nodes:[d,...i]})):d.name.value===GraphQLStreamDirective.name&&(ifArgumentCanBeFalse(d)||r.reportError(new GraphQLError("Stream directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.",{nodes:[d,...i]})));if(s.kind==="FragmentSpread"){const d=s.name.value;if(o.has(d))continue;o.add(d);const u=n.get(d);u&&forbidUnconditionalDeferStream({context:r,fragments:n,parentNodes:[s,...i],selectionSet:u?.selectionSet,visitedFragments:o})}else s.selectionSet&&forbidUnconditionalDeferStream({context:r,fragments:n,selectionSet:s.selectionSet,parentNodes:i,visitedFragments:o})}}}function isDefinitionNode(r){return isExecutableDefinitionNode(r)||isTypeSystemDefinitionNode(r)||isTypeSystemExtensionNode(r)}function isExecutableDefinitionNode(r){return r.kind===OPERATION_DEFINITION||r.kind===FRAGMENT_DEFINITION}function isSubscriptionOperationDefinitionNode(r){return r.operation===OperationTypeNode.SUBSCRIPTION}function isSelectionNode(r){return r.kind===FIELD||r.kind===FRAGMENT_SPREAD||r.kind===INLINE_FRAGMENT}function isValueNode(r){return r.kind===VARIABLE||r.kind===INT||r.kind===FLOAT||r.kind===STRING||r.kind===BOOLEAN||r.kind===NULL||r.kind===ENUM||r.kind===LIST||r.kind===OBJECT}function isConstValueNode(r){return isValueNode(r)&&(r.kind===LIST?r.values.some(isConstValueNode):r.kind===OBJECT?r.fields.some(n=>isConstValueNode(n.value)):r.kind!==VARIABLE)}function isTypeNode(r){return r.kind===NAMED_TYPE||r.kind===LIST_TYPE||r.kind===NON_NULL_TYPE}function isTypeSystemDefinitionNode(r){return r.kind===SCHEMA_DEFINITION||isTypeDefinitionNode(r)||r.kind===DIRECTIVE_DEFINITION}function isTypeDefinitionNode(r){return r.kind===SCALAR_TYPE_DEFINITION||r.kind===OBJECT_TYPE_DEFINITION||r.kind===INTERFACE_TYPE_DEFINITION||r.kind===UNION_TYPE_DEFINITION||r.kind===ENUM_TYPE_DEFINITION||r.kind===INPUT_OBJECT_TYPE_DEFINITION}function isTypeSystemExtensionNode(r){return r.kind===SCHEMA_EXTENSION||r.kind===DIRECTIVE_EXTENSION||isTypeExtensionNode(r)}function isTypeExtensionNode(r){return r.kind===SCALAR_TYPE_EXTENSION||r.kind===OBJECT_TYPE_EXTENSION||r.kind===INTERFACE_TYPE_EXTENSION||r.kind===UNION_TYPE_EXTENSION||r.kind===ENUM_TYPE_EXTENSION||r.kind===INPUT_OBJECT_TYPE_EXTENSION}function isSchemaCoordinateNode(r){return r.kind===TYPE_COORDINATE||r.kind===MEMBER_COORDINATE||r.kind===ARGUMENT_COORDINATE||r.kind===DIRECTIVE_COORDINATE||r.kind===DIRECTIVE_ARGUMENT_COORDINATE}function ExecutableDefinitionsRule(r){return{Document(n){for(const a of n.definitions)if(!isExecutableDefinitionNode(a)){const i=a.kind===SCHEMA_DEFINITION||a.kind===SCHEMA_EXTENSION?"schema":'"'+a.name.value+'"';r.reportError(new GraphQLError(`The ${i} definition is not executable.`,{nodes:a}))}return!1}}}function FieldsOnCorrectTypeRule(r){return{Field(n){const a=r.getParentType();if(a&&!r.getFieldDef()){const o=r.getSchema(),s=n.name.value;let l=didYouMean("to use an inline fragment on",r.hideSuggestions?[]:getSuggestedTypeNames(o,a,s));l===""&&(l=didYouMean(r.hideSuggestions?[]:getSuggestedFieldNames(a,s))),r.reportError(new GraphQLError(`Cannot query field "${s}" on type "${a}".`+l,{nodes:n}))}}}}function getSuggestedTypeNames(r,n,a){if(!isAbstractType(n))return[];const i=new Set,o=Object.create(null);for(const s of r.getPossibleTypes(n))if(s.getFields()[a]!=null){i.add(s),o[s.name]=1;for(const l of s.getInterfaces())l.getFields()[a]!=null&&(i.add(l),o[l.name]=(o[l.name]??0)+1)}return[...i].sort((s,l)=>{const f=o[l.name]-o[s.name];return f!==0?f:isInterfaceType(s)&&r.isSubType(s,l)?-1:isInterfaceType(l)&&r.isSubType(l,s)?1:naturalCompare(s.name,l.name)}).map(s=>s.name)}function getSuggestedFieldNames(r,n){if(isObjectType(r)||isInterfaceType(r)){const a=Object.keys(r.getFields());return suggestionList(n,a)}return[]}function FragmentsOnCompositeTypesRule(r){return{InlineFragment(n){const a=n.typeCondition;if(a){const i=typeFromAST(r.getSchema(),a);if(i&&!isCompositeType(i)){const o=print(a);r.reportError(new GraphQLError(`Fragment cannot condition on non composite type "${o}".`,{nodes:a}))}}},FragmentDefinition(n){const a=typeFromAST(r.getSchema(),n.typeCondition);if(a&&!isCompositeType(a)){const i=print(n.typeCondition);r.reportError(new GraphQLError(`Fragment "${n.name.value}" cannot condition on non composite type "${i}".`,{nodes:n.typeCondition}))}}}}function KnownArgumentNamesRule(r){return{...KnownArgumentNamesOnDirectivesRule(r),FragmentArgument(n){const a=r.getFragmentSignature();if(a&&!a.variableDefinitions.get(n.name.value)){const o=n.name.value,s=r.hideSuggestions?[]:suggestionList(o,Array.from(a.variableDefinitions.values()).map(l=>l.variable.name.value));r.reportError(new GraphQLError(`Unknown argument "${o}" on fragment "${a.definition.name.value}".`+didYouMean(s),{nodes:n}))}},Argument(n){const a=r.getArgument(),i=r.getFieldDef();if(!a&&i){const o=n.name.value,s=r.hideSuggestions?[]:suggestionList(o,i.args.map(l=>l.name));r.reportError(new GraphQLError(`Unknown argument "${o}" on field "${i}".`+didYouMean(s),{nodes:n}))}}}}function KnownArgumentNamesOnDirectivesRule(r){const n=new Map,a=r.getSchema(),i=a?a.getDirectives():specifiedDirectives;for(const s of i)n.set(s.name,s.args.map(l=>l.name));const o=r.getDocument().definitions;for(const s of o)if(s.kind===DIRECTIVE_DEFINITION){const l=s.arguments??[];n.set(s.name.value,l.map(f=>f.name.value))}return{Directive(s){const l=s.name.value,f=n.get(l);if(s.arguments!=null&&f!=null)for(const d of s.arguments){const u=d.name.value;if(!f.includes(u)){const c=suggestionList(u,f);r.reportError(new GraphQLError(`Unknown argument "${u}" on directive "@${l}".`+(r.hideSuggestions?"":didYouMean(c)),{nodes:d}))}}return!1}}}function KnownDirectivesRule(r){const n=new Map,a=r.getSchema(),i=a?a.getDirectives():specifiedDirectives;for(const s of i)n.set(s.name,s.locations);const o=r.getDocument().definitions;for(const s of o)s.kind===DIRECTIVE_DEFINITION&&n.set(s.name.value,s.locations.map(l=>l.value));return{Directive(s,l,f,d,u){const c=s.name.value,v=n.get(c);if(v==null){r.reportError(new GraphQLError(`Unknown directive "@${c}".`,{nodes:s}));return}const h=getDirectiveLocationForASTPath(u);h!=null&&!v.includes(h)&&r.reportError(new GraphQLError(`Directive "@${c}" may not be used on ${h}.`,{nodes:s}))}}}function getDirectiveLocationForASTPath(r){const n=r.at(-1);switch(n!=null&&"kind"in n||invariant(),n.kind){case OPERATION_DEFINITION:return getDirectiveLocationForOperation(n.operation);case FIELD:return DirectiveLocation.FIELD;case FRAGMENT_SPREAD:return DirectiveLocation.FRAGMENT_SPREAD;case INLINE_FRAGMENT:return DirectiveLocation.INLINE_FRAGMENT;case FRAGMENT_DEFINITION:return DirectiveLocation.FRAGMENT_DEFINITION;case VARIABLE_DEFINITION:{const a=r[r.length-3];return"kind"in a||invariant(),a.kind===OPERATION_DEFINITION?DirectiveLocation.VARIABLE_DEFINITION:DirectiveLocation.FRAGMENT_VARIABLE_DEFINITION}case SCHEMA_DEFINITION:case SCHEMA_EXTENSION:return DirectiveLocation.SCHEMA;case SCALAR_TYPE_DEFINITION:case SCALAR_TYPE_EXTENSION:return DirectiveLocation.SCALAR;case OBJECT_TYPE_DEFINITION:case OBJECT_TYPE_EXTENSION:return DirectiveLocation.OBJECT;case FIELD_DEFINITION:return DirectiveLocation.FIELD_DEFINITION;case INTERFACE_TYPE_DEFINITION:case INTERFACE_TYPE_EXTENSION:return DirectiveLocation.INTERFACE;case UNION_TYPE_DEFINITION:case UNION_TYPE_EXTENSION:return DirectiveLocation.UNION;case ENUM_TYPE_DEFINITION:case ENUM_TYPE_EXTENSION:return DirectiveLocation.ENUM;case ENUM_VALUE_DEFINITION:return DirectiveLocation.ENUM_VALUE;case INPUT_OBJECT_TYPE_DEFINITION:case INPUT_OBJECT_TYPE_EXTENSION:return DirectiveLocation.INPUT_OBJECT;case INPUT_VALUE_DEFINITION:{const a=r.at(-3);return a!=null&&"kind"in a||invariant(),a.kind===INPUT_OBJECT_TYPE_DEFINITION||a.kind===INPUT_OBJECT_TYPE_EXTENSION?DirectiveLocation.INPUT_FIELD_DEFINITION:DirectiveLocation.ARGUMENT_DEFINITION}case DIRECTIVE_DEFINITION:case DIRECTIVE_EXTENSION:return DirectiveLocation.DIRECTIVE_DEFINITION;default:invariant(!1,"Unexpected kind: "+inspect(n.kind))}}function getDirectiveLocationForOperation(r){switch(r){case OperationTypeNode.QUERY:return DirectiveLocation.QUERY;case OperationTypeNode.MUTATION:return DirectiveLocation.MUTATION;case OperationTypeNode.SUBSCRIPTION:return DirectiveLocation.SUBSCRIPTION}}function KnownFragmentNamesRule(r){return{FragmentSpread(n){const a=n.name.value;r.getFragment(a)||r.reportError(new GraphQLError(`Unknown fragment "${a}".`,{nodes:n.name}))}}}function KnownOperationTypesRule(r){const n=r.getSchema();return{OperationDefinition(a){const i=a.operation;n.getRootType(i)||r.reportError(new GraphQLError(`The ${i} operation is not supported by the schema.`,{nodes:a}))}}}function KnownTypeNamesRule(r){const{definitions:n}=r.getDocument(),a=r.getSchema()?.getTypeMap()??{},i=new Set([...Object.keys(a),...n.filter(isTypeDefinitionNode).map(o=>o.name.value)]);return{NamedType(o,s,l,f,d){const u=o.name.value;if(!i.has(u)){const c=d[2]??l,v=c!=null&&isSDLNode(c);if(v&&standardTypeNames.has(u))return;const h=r.hideSuggestions?[]:suggestionList(u,v?[...standardTypeNames,...i]:[...i]);r.reportError(new GraphQLError(`Unknown type "${u}".`+didYouMean(h),{nodes:o}))}}}}const standardTypeNames=new Set([...specifiedScalarTypes,...introspectionTypes].map(r=>r.name));function isSDLNode(r){return"kind"in r&&(isTypeSystemDefinitionNode(r)||isTypeSystemExtensionNode(r))}function LoneAnonymousOperationRule(r){let n=0;return{Document(a){n=a.definitions.filter(i=>i.kind===OPERATION_DEFINITION).length},OperationDefinition(a){!a.name&&n>1&&r.reportError(new GraphQLError("This anonymous operation must be the only defined operation.",{nodes:a}))}}}function LoneSchemaDefinitionRule(r){const n=r.getSchema(),a=n?.astNode??n?.getQueryType()??n?.getMutationType()??n?.getSubscriptionType();let i=0;return{SchemaDefinition(o){if(a){r.reportError(new GraphQLError("Cannot define a new schema within a schema extension.",{nodes:o}));return}i>0&&r.reportError(new GraphQLError("Must provide only one schema definition.",{nodes:o})),++i}}}const MAX_LISTS_DEPTH=3;function MaxIntrospectionDepthRule(r){function n(a,i=Object.create(null),o=0){if(a.kind===FRAGMENT_SPREAD){const s=a.name.value;if(i[s]===!0)return!1;const l=r.getFragment(s);if(!l)return!1;try{return i[s]=!0,n(l,i,o)}finally{i[s]=void 0}}if(a.kind===FIELD&&(a.name.value==="fields"||a.name.value==="interfaces"||a.name.value==="possibleTypes"||a.name.value==="inputFields")&&(o++,o>=MAX_LISTS_DEPTH))return!0;if("selectionSet"in a&&a.selectionSet){for(const s of a.selectionSet.selections)if(n(s,i,o))return!0}return!1}return{Field(a){if((a.name.value==="__schema"||a.name.value==="__type")&&n(a))return r.reportError(new GraphQLError("Maximum introspection depth exceeded",{nodes:[a]})),!1}}}function NoFragmentCyclesRule$1(r){const n=new Set,a=[],i=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return o(s),!1}};function o(s){if(n.has(s.name.value))return;const l=s.name.value;n.add(l);const f=r.getFragmentSpreads(s.selectionSet);if(f.length!==0){i[l]=a.length;for(const d of f){const u=d.name.value,c=i[u];if(a.push(d),c===void 0){const v=r.getFragment(u);v&&o(v)}else{const v=a.slice(c),h=v.slice(0,-1).map(m=>'"'+m.name.value+'"').join(", ");r.reportError(new GraphQLError(`Cannot spread fragment "${u}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:v}))}a.pop()}i[l]=void 0}}}function NoUndefinedVariablesRule(r){return{OperationDefinition(n){const a=new Set(n.variableDefinitions?.map(o=>o.variable.name.value)),i=r.getRecursiveVariableUsages(n);for(const{node:o,fragmentVariableDefinition:s}of i){if(s)continue;const l=o.name.value;a.has(l)||r.reportError(new GraphQLError(n.name?`Variable "$${l}" is not defined by operation "${n.name.value}".`:`Variable "$${l}" is not defined.`,{nodes:[o,n]}))}}}}function NoUnusedFragmentsRule(r){const n=new Set,a=[];return{OperationDefinition(i){for(const o of r.getRecursivelyReferencedFragments(i))n.add(o.name.value);return!1},FragmentDefinition(i){return a.push(i),!1},Document:{leave(){for(const i of a){const o=i.name.value;n.has(o)||r.reportError(new GraphQLError(`Fragment "${o}" is never used.`,{nodes:i}))}}}}}function NoUnusedVariablesRule(r){return{FragmentDefinition(n){const a=r.getVariableUsages(n),i=new Set(a.map(({node:s})=>s.name.value)),o=n.variableDefinitions??[];for(const s of o){const l=s.variable.name.value;i.has(l)||r.reportError(new GraphQLError(`Variable "$${l}" is never used in fragment "${n.name.value}".`,{nodes:s}))}},OperationDefinition(n){const a=r.getRecursiveVariableUsages(n),i=new Set;for(const{node:s,fragmentVariableDefinition:l}of a){const f=s.name.value;l||i.add(f)}const o=n.variableDefinitions??[];for(const s of o){const l=s.variable.name.value;i.has(l)||r.reportError(new GraphQLError(n.name?`Variable "$${l}" is never used in operation "${n.name.value}".`:`Variable "$${l}" is never used.`,{nodes:s}))}}}}function sortValueNode(r){switch(r.kind){case OBJECT:return{...r,fields:sortFields(r.fields)};case LIST:return{...r,values:r.values.map(sortValueNode)};case INT:case FLOAT:case STRING:case BOOLEAN:case NULL:case ENUM:case VARIABLE:return r}}function sortFields(r){return r.map(n=>({...n,value:sortValueNode(n.value)})).sort((n,a)=>naturalCompare(n.name.value,a.name.value))}function reasonMessage(r){return Array.isArray(r)?r.map(([n,a])=>`subfields "${n}" conflict because `+reasonMessage(a)).join(" and "):r}function OverlappingFieldsCanBeMergedRule(r){const n=new OrderedPairSet,a=new PairSet,i=new Map;return{SelectionSet(o){const s=findConflictsWithinSelectionSet(r,i,n,a,r.getParentType(),o);for(const[[l,f],d,u]of s){const c=reasonMessage(f);r.reportError(new GraphQLError(`Fields "${l}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:d.concat(u)}))}}}}function findConflictsWithinSelectionSet(r,n,a,i,o,s){const l=[],[f,d]=getFieldsAndFragmentSpreads(r,n,o,s,void 0);if(collectConflictsWithin(r,l,n,a,i,f),d.length!==0)for(let u=0;u<d.length;u++){collectConflictsBetweenFieldsAndFragment(r,l,n,a,i,!1,f,d[u]);for(let c=u+1;c<d.length;c++)collectConflictsBetweenFragments(r,l,n,a,i,!1,d[u],d[c])}return l}function collectConflictsBetweenFieldsAndFragment(r,n,a,i,o,s,l,f){if(i.has(l,f.key,s))return;i.add(l,f.key,s);const d=r.getFragment(f.node.name.value);if(!d)return;const[u,c]=getReferencedFieldsAndFragmentSpreads(r,a,d,f.varMap);if(l!==u){collectConflictsBetween(r,n,a,i,o,s,l,void 0,u,f.varMap);for(const v of c)collectConflictsBetweenFieldsAndFragment(r,n,a,i,o,s,l,v)}}function collectConflictsBetweenFragments(r,n,a,i,o,s,l,f){if(l.key===f.key)return;if(l.node.name.value===f.node.name.value&&!sameArguments(l.node.arguments,l.varMap,f.node.arguments,f.varMap)){r.reportError(new GraphQLError(`Spreads "${l.node.name.value}" conflict because ${l.key} and ${f.key} have different fragment arguments.`,{nodes:[l.node,f.node]}));return}if(o.has(l.key,f.key,s))return;o.add(l.key,f.key,s);const d=r.getFragment(l.node.name.value),u=r.getFragment(f.node.name.value);if(!d||!u)return;const[c,v]=getReferencedFieldsAndFragmentSpreads(r,a,d,l.varMap),[h,m]=getReferencedFieldsAndFragmentSpreads(r,a,u,f.varMap);collectConflictsBetween(r,n,a,i,o,s,c,l.varMap,h,f.varMap);for(const g of m)collectConflictsBetweenFragments(r,n,a,i,o,s,l,g);for(const g of v)collectConflictsBetweenFragments(r,n,a,i,o,s,g,f)}function findConflictsBetweenSubSelectionSets(r,n,a,i,o,s,l,f,d,u,c){const v=[],[h,m]=getFieldsAndFragmentSpreads(r,n,s,l,f),[g,_]=getFieldsAndFragmentSpreads(r,n,d,u,c);collectConflictsBetween(r,v,n,a,i,o,h,f,g,c);for(const S of _)collectConflictsBetweenFieldsAndFragment(r,v,n,a,i,o,h,S);for(const S of m)collectConflictsBetweenFieldsAndFragment(r,v,n,a,i,o,g,S);for(const S of m)for(const N of _)collectConflictsBetweenFragments(r,v,n,a,i,o,S,N);return v}function collectConflictsWithin(r,n,a,i,o,s){for(const[l,f]of s.entries())if(f.length>1)for(let d=0;d<f.length;d++)for(let u=d+1;u<f.length;u++){const c=findConflict(r,a,i,o,!1,l,f[d],void 0,f[u],void 0);c&&n.push(c)}}function collectConflictsBetween(r,n,a,i,o,s,l,f,d,u){for(const[c,v]of l.entries()){const h=d.get(c);if(h!=null)for(const m of v)for(const g of h){const _=findConflict(r,a,i,o,s,c,m,f,g,u);_&&n.push(_)}}}function findConflict(r,n,a,i,o,s,l,f,d,u){const[c,v,h]=l,[m,g,_]=d,S=o||c!==m&&isObjectType(c)&&isObjectType(m);if(!S){const U=v.name.value,B=g.name.value;if(U!==B)return[[s,`"${U}" and "${B}" are different fields`],[v],[g]];if(!sameArguments(v.arguments,f,g.arguments,u))return[[s,"they have differing arguments"],[v],[g]]}const N=v.directives,O=g.directives,M=hasNoOverlappingStreams(N,f,O,u);if(M!==void 0)return[[s,M],[v],[g]];const F=h?.type,L=_?.type;if(F&&L&&doTypesConflict(F,L))return[[s,`they return conflicting types "${inspect(F)}" and "${inspect(L)}"`],[v],[g]];const k=v.selectionSet,P=g.selectionSet;if(k&&P){const U=findConflictsBetweenSubSelectionSets(r,n,a,i,S,getNamedType(F),k,f,getNamedType(L),P,u);return subfieldConflicts(U,s,v,g)}}function sameArguments(r,n,a,i){if(r===void 0||r.length===0)return a===void 0||a.length===0;if(a===void 0||a.length===0||r.length!==a.length)return!1;const o=new Map(a.map(({name:s,value:l})=>[s.value,i===void 0?l:replaceFragmentVariables(l,i)]));return r.every(s=>{let l=s.value;n&&(l=replaceFragmentVariables(l,n));const f=o.get(s.name.value);return f===void 0?!1:stringifyValue(l)===stringifyValue(f)})}function replaceFragmentVariables(r,n){switch(r.kind){case VARIABLE:return n.get(r.name.value)??r;case LIST:return{...r,values:r.values.map(a=>replaceFragmentVariables(a,n))};case OBJECT:return{...r,fields:r.fields.map(a=>({...a,value:replaceFragmentVariables(a.value,n)}))};default:return r}}function stringifyValue(r){return print(sortValueNode(r))}function getStreamDirective(r){return r?.find(n=>n.name.value==="stream")}function hasNoOverlappingStreams(r,n,a,i){const o=getStreamDirective(r),s=getStreamDirective(a);if(!(!o&&!s))return o&&s&&sameArguments(o.arguments,n,s.arguments,i)?"they have overlapping stream directives. See https://github.com/graphql/defer-stream-wg/discussions/100":"they have overlapping stream directives"}function doTypesConflict(r,n){return isListType(r)?isListType(n)?doTypesConflict(r.ofType,n.ofType):!0:isListType(n)?!0:isNonNullType(r)?isNonNullType(n)?doTypesConflict(r.ofType,n.ofType):!0:isNonNullType(n)?!0:isLeafType(r)||isLeafType(n)?r!==n:!1}function getFieldsAndFragmentSpreads(r,n,a,i,o){const s=n.get(i);if(s)return s;const l=new Map,f=new Map;_collectFieldsAndFragmentSpreads(r,a,i,l,f,o);const d=[l,Array.from(f.values())];return n.set(i,d),d}function getReferencedFieldsAndFragmentSpreads(r,n,a,i){const o=n.get(a.selectionSet);if(o)return o;const s=typeFromAST(r.getSchema(),a.typeCondition);return getFieldsAndFragmentSpreads(r,n,s,a.selectionSet,i)}function _collectFieldsAndFragmentSpreads(r,n,a,i,o,s){for(const l of a.selections)switch(l.kind){case FIELD:{const f=l.name.value;let d;(isObjectType(n)||isInterfaceType(n))&&(d=n.getFields()[f]);const u=l.alias?l.alias.value:f;let c=i.get(u);c==null&&(c=[],i.set(u,c)),c.push([n,l,d]);break}case FRAGMENT_SPREAD:{const f=getFragmentSpread(r,l,s);o.set(f.key,f);break}case INLINE_FRAGMENT:{const f=l.typeCondition,d=f?typeFromAST(r.getSchema(),f):n;_collectFieldsAndFragmentSpreads(r,d,l.selectionSet,i,o,s);break}}}function getFragmentSpread(r,n,a){let i="";const o=new Map,s=r.getFragmentSignatureByName()(n.name.value),l=new Map;if(n.arguments)for(const f of n.arguments)l.set(f.name.value,f.value);if(s?.variableDefinitions){i+=n.name.value+"(";for(const[f,d]of s.variableDefinitions){const u=l.get(f);u&&(i+=f+": "+print(sortValueNode(u)));const c=l.get(f);c!==void 0?o.set(f,a!==void 0?replaceFragmentVariables(c,a):c):d.defaultValue&&o.set(f,d.defaultValue)}i+=")"}return{key:i,node:n,varMap:o.size>0?o:void 0}}function subfieldConflicts(r,n,a,i){if(r.length>0)return[[n,r.map(([o])=>o)],[a,...r.map(([,o])=>o).flat()],[i,...r.map(([,,o])=>o).flat()]]}class OrderedPairSet{constructor(){this._data=new Map}has(n,a,i){const o=this._data.get(n)?.get(a);return o===void 0?!1:i?!0:i===o}add(n,a,i){const o=this._data.get(n);o===void 0?this._data.set(n,new Map([[a,i]])):o.set(a,i)}}class PairSet{constructor(){this._orderedPairSet=new OrderedPairSet}has(n,a,i){return n<a?this._orderedPairSet.has(n,a,i):this._orderedPairSet.has(a,n,i)}add(n,a,i){n<a?this._orderedPairSet.add(n,a,i):this._orderedPairSet.add(a,n,i)}}function PossibleFragmentSpreadsRule(r){return{InlineFragment(n){const a=r.getType(),i=r.getParentType();if(isCompositeType(a)&&isCompositeType(i)&&!doTypesOverlap(r.getSchema(),a,i)){const o=inspect(i),s=inspect(a);r.reportError(new GraphQLError(`Fragment cannot be spread here as objects of type "${o}" can never be of type "${s}".`,{nodes:n}))}},FragmentSpread(n){const a=n.name.value,i=getFragmentType(r,a),o=r.getParentType();if(i&&o&&!doTypesOverlap(r.getSchema(),i,o)){const s=inspect(o),l=inspect(i);r.reportError(new GraphQLError(`Fragment "${a}" cannot be spread here as objects of type "${s}" can never be of type "${l}".`,{nodes:n}))}}}}function getFragmentType(r,n){const a=r.getFragment(n);if(a){const i=typeFromAST(r.getSchema(),a.typeCondition);if(isCompositeType(i))return i}}function PossibleTypeExtensionsRule(r){const n=r.getSchema(),a=new Map;for(const o of r.getDocument().definitions)isTypeDefinitionNode(o)&&a.set(o.name.value,o);return{ScalarTypeExtension:i,ObjectTypeExtension:i,InterfaceTypeExtension:i,UnionTypeExtension:i,EnumTypeExtension:i,InputObjectTypeExtension:i};function i(o){const s=o.name.value,l=a.get(s),f=n?.getType(s);let d;if(l!=null?d=defKindToExtKind[l.kind]:f&&(d=typeToExtKind(f)),d!=null){if(d!==o.kind){const u=extensionKindToTypeName(o.kind);r.reportError(new GraphQLError(`Cannot extend non-${u} type "${s}".`,{nodes:l?[l,o]:o}))}}else{const u=[...a.keys(),...Object.keys(n?.getTypeMap()??{})];r.reportError(new GraphQLError(`Cannot extend type "${s}" because it is not defined.`+didYouMean(suggestionList(s,u)),{nodes:o.name}))}}}const defKindToExtKind={[SCALAR_TYPE_DEFINITION]:SCALAR_TYPE_EXTENSION,[OBJECT_TYPE_DEFINITION]:OBJECT_TYPE_EXTENSION,[INTERFACE_TYPE_DEFINITION]:INTERFACE_TYPE_EXTENSION,[UNION_TYPE_DEFINITION]:UNION_TYPE_EXTENSION,[ENUM_TYPE_DEFINITION]:ENUM_TYPE_EXTENSION,[INPUT_OBJECT_TYPE_DEFINITION]:INPUT_OBJECT_TYPE_EXTENSION};function typeToExtKind(r){if(isScalarType(r))return SCALAR_TYPE_EXTENSION;if(isObjectType(r))return OBJECT_TYPE_EXTENSION;if(isInterfaceType(r))return INTERFACE_TYPE_EXTENSION;if(isUnionType(r))return UNION_TYPE_EXTENSION;if(isEnumType(r))return ENUM_TYPE_EXTENSION;if(isInputObjectType(r))return INPUT_OBJECT_TYPE_EXTENSION;invariant(!1,"Unexpected type: "+inspect(r))}function extensionKindToTypeName(r){switch(r){case SCALAR_TYPE_EXTENSION:return"scalar";case OBJECT_TYPE_EXTENSION:return"object";case INTERFACE_TYPE_EXTENSION:return"interface";case UNION_TYPE_EXTENSION:return"union";case ENUM_TYPE_EXTENSION:return"enum";case INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:invariant(!1,"Unexpected kind: "+inspect(r))}}function ProvidedRequiredArgumentsRule(r){return{...ProvidedRequiredArgumentsOnDirectivesRule(r),Field:{leave(n){const a=r.getFieldDef();if(!a)return!1;const i=new Set(n.arguments?.map(o=>o.name.value));for(const o of a.args)!i.has(o.name)&&isRequiredArgument(o)&&r.reportError(new GraphQLError(`Argument "${o}" of type "${o.type}" is required, but it was not provided.`,{nodes:n}))}},FragmentSpread:{leave(n){const a=r.getFragmentSignature();if(!a)return!1;const i=new Set(n.arguments?.map(o=>o.name.value));for(const[o,s]of a.variableDefinitions)if(!i.has(o)&&isRequiredArgumentNode(s)){const l=typeFromAST(r.getSchema(),s.type),f=inspect(l);r.reportError(new GraphQLError(`Fragment "${n.name.value}" argument "${o}" of type "${f}" is required, but it was not provided.`,{nodes:n}))}}}}}function ProvidedRequiredArgumentsOnDirectivesRule(r){const n=new Map,i=r.getSchema()?.getDirectives()??specifiedDirectives;for(const s of i)n.set(s.name,new Map(s.args.filter(isRequiredArgument).map(l=>[l.name,l])));const o=r.getDocument().definitions;for(const s of o)if(s.kind===DIRECTIVE_DEFINITION){const l=s.arguments??[];n.set(s.name.value,new Map(l.filter(isRequiredArgumentNode).map(f=>[f.name.value,f])))}return{Directive:{leave(s){const l=s.name.value,f=n.get(l);if(f!=null){const d=s.arguments??[],u=new Set(d.map(c=>c.name.value));for(const[c,v]of f.entries())if(!u.has(c)){const h=isType(v.type)?inspect(v.type):print(v.type);r.reportError(new GraphQLError(`Argument "@${l}(${c}:)" of type "${h}" is required, but it was not provided.`,{nodes:s}))}}}}}}function isRequiredArgumentNode(r){return r.type.kind===NON_NULL_TYPE&&r.defaultValue==null}function ScalarLeafsRule(r){return{Field(n){const a=r.getType(),i=n.selectionSet;if(a)if(isLeafType(getNamedType(a))){if(i){const o=n.name.value,s=inspect(a);r.reportError(new GraphQLError(`Field "${o}" must not have a selection since type "${s}" has no subfields.`,{nodes:i}))}}else if(i){if(i.selections.length===0){const o=n.name.value,s=inspect(a);r.reportError(new GraphQLError(`Field "${o}" of type "${s}" must have at least one field selected.`,{nodes:n}))}}else{const o=n.name.value,s=inspect(a);r.reportError(new GraphQLError(`Field "${o}" of type "${s}" must have a selection of subfields. Did you mean "${o} { ... }"?`,{nodes:n}))}}}}function coerceInputValue(r,n){if(isNonNullType(n))return r==null?void 0:coerceInputValue(r,n.ofType);if(r==null)return null;if(isListType(n)){if(!isIterableObject(r)){const o=coerceInputValue(r,n.ofType);return o===void 0?void 0:[o]}const i=[];for(const o of r){const s=coerceInputValue(o,n.ofType);if(s===void 0)return;i.push(s)}return i}if(isInputObjectType(n)){if(!isObjectLike(r)||Array.isArray(r))return;const i=Object.create(null),o=n.getFields();let s=0;for(const l of Object.keys(r))if(r[l]!==void 0&&(s++,!Object.hasOwn(o,l)))return;for(const l of Object.values(o)){const f=r[l.name];if(f===void 0){if(isRequiredInputField(l))return;const d=coerceDefaultValue(l);d!==void 0&&(i[l.name]=d)}else{const d=coerceInputValue(f,l.type);if(d===void 0)return;i[l.name]=d}}if(n.isOneOf){const l=Object.keys(i);if(s!==1||l.length!==1)return;const f=l[0];if(i[f]===null)return}return i}const a=assertLeafType(n);try{return a.coerceInputValue(r)}catch{}}function coerceInputLiteral(r,n,a,i){if(r.kind===VARIABLE){const s=getCoercedVariableValue(r,a,i);return s==null&&isNonNullType(n)?void 0:s}if(isNonNullType(n))return r.kind===NULL?void 0:coerceInputLiteral(r,n.ofType,a,i);if(r.kind===NULL)return null;if(isListType(n)){if(r.kind!==LIST){const l=coerceInputLiteral(r,n.ofType,a,i);return l===void 0?void 0:[l]}const s=[];for(const l of r.values){let f=coerceInputLiteral(l,n.ofType,a,i);if(f===void 0)if(l.kind===VARIABLE&&getCoercedVariableValue(l,a,i)==null&&!isNonNullType(n.ofType))f=null;else return;s.push(f)}return s}if(isInputObjectType(n)){if(r.kind!==OBJECT)return;const s=Object.create(null),l=n.getFields();if(r.fields.some(u=>!Object.hasOwn(l,u.name.value)))return;const d=new Map(r.fields.map(u=>[u.name.value,u]));for(const u of Object.values(l)){const c=d.get(u.name);if(!c||c.value.kind===VARIABLE&&isMissingVariable$1(c.value,a,i)){if(isRequiredInputField(u))return;const v=coerceDefaultValue(u);v!==void 0&&(s[u.name]=v)}else{const v=coerceInputLiteral(c.value,u.type,a,i);if(v===void 0)return;s[u.name]=v}}if(n.isOneOf){const u=Object.keys(s);if(d.size!==1||u.length!==1)return;for(const[c,v]of d)if(v.value.kind===NULL||s[c]===null)return}return s}const o=assertLeafType(n);try{return o.coerceInputLiteral?o.coerceInputLiteral(replaceVariables(r,a,i)):o.parseLiteral(r,a?.coerced)}catch{}}function getCoercedVariableValue(r,n,a){const i=r.name.value;return a?.sources[i]!==void 0?a.coerced[i]:n?.coerced[i]}function isMissingVariable$1(r,n,a){const i=r.name.value;return(a?.sources[i]!==void 0?a.coerced:n?.coerced)?.[i]===void 0}function coerceDefaultValue(r){let n=r._memoizedCoercedDefaultValue;if(n!==void 0)return n;const a=r.default;if(a!==void 0)return n=a.literal?coerceInputLiteral(a.literal,r.type):coerceInputValue(a.value,r.type),n===void 0&&invariant(!1,`Expected value of type "${r.type}" to be valid, found: ${inspect(a.literal??a.value)}.`),r._memoizedCoercedDefaultValue=n,n;const i=r.defaultValue;return i!==void 0&&(r._memoizedCoercedDefaultValue=i),i}function getVariableSignature(r,n){const a=n.variable.name.value,i=typeFromAST(r,n.type);if(!isInputType(i)){const s=print(n.type);return new GraphQLError(`Variable "$${a}" expected value of type "${s}" which cannot be used as an input type.`,{nodes:n.type})}const o=n.defaultValue;return{name:a,type:i,default:o&&{literal:o}}}function getVariableValues(r,n,a,i){const o=[],s=i?.maxErrors;try{const l=coerceVariableValues(r,n,a,f=>{if(s!=null&&o.length>=s)throw new GraphQLError("Too many errors processing variables, error limit reached. Execution aborted.");o.push(f)},i?.hideSuggestions);if(o.length===0)return{variableValues:l}}catch(l){o.push(ensureGraphQLError(l))}return{errors:o}}function coerceVariableValues(r,n,a,i,o){const s=Object.create(null),l=Object.create(null);for(const f of n){const d=getVariableSignature(r,f);if(d instanceof GraphQLError){i(d);continue}const{name:u,type:c}=d,v=Object.hasOwn(a,u)?a[u]:void 0;if(v===void 0){if(s[u]={signature:d},f.defaultValue){maybeUseDefaultValue(l,u,d,(m,g)=>{i(new GraphQLError(`Variable "$${u}" has invalid default value${printPathArray(g)}: ${m.message}`,{nodes:f}))},o);continue}else if(!isNonNullType(c))continue}else s[u]={signature:d,value:v};const h=coerceInputValue(v,c);h!==void 0?l[u]=h:validateInputValue(v,c,(m,g)=>{i(new GraphQLError(`Variable "$${u}" has invalid value${printPathArray(g)}: ${m.message}`,{nodes:f,originalError:m}))},o)}return{sources:s,coerced:l}}function maybeUseDefaultValue(r,n,a,i,o){try{const s=coerceDefaultValue(a);s!==void 0&&(r[n]=s)}catch(s){const l=a.default;if(l===void 0)throw s;let f=!1;validateDefaultInput(l,a.type,(d,u)=>{f=!0,i(d,u)},o),f||i(ensureGraphQLError(s),[])}}function getFragmentVariableValues(r,n,a,i,o){const s=r.arguments??[],l=new Map(s.map(u=>[u.name.value,u])),f=Object.create(null),d=Object.create(null);for(const[u,c]of Object.entries(n)){const v=l.get(u);v!==void 0?f[u]=i==null?{signature:c,value:v.value}:{signature:c,value:v.value,fragmentVariableValues:i}:f[u]={signature:c},coerceArgument(d,r,u,c,v,a,i,o)}return{sources:f,coerced:d}}function getArgumentValues(r,n,a,i,o){const s=Object.create(null),l=n.arguments??[],f=new Map(l.map(d=>[d.name.value,d]));for(const d of r.args){const u=d.name;coerceArgument(s,n,u,d,f.get(d.name),a,i,o)}return s}function coerceArgument(r,n,a,i,o,s,l,f){const d=i.type,u=(h,m)=>{throw new GraphQLError(`${printArgumentOrFragmentVariable(i,n)} has invalid default value${printPathArray(m)}: ${h.message}`,{nodes:n})};if(!o){if(isRequiredArgument(i))throw new GraphQLError(`${printArgumentOrFragmentVariable(i,n)} of required type "${d}" was not provided.`,{nodes:n});maybeUseDefaultValue(r,a,i,u,f);return}const c=o.value;if(c.kind===VARIABLE){const h=c.name.value,m=l?.sources[h]?l:s;if((m==null||!Object.hasOwn(m.coerced,h))&&!isRequiredArgument(i)){maybeUseDefaultValue(r,a,i,u,f);return}}const v=coerceInputLiteral(c,d,s,l);v===void 0&&(validateInputLiteral(c,d,(h,m)=>{throw h.message=`${printArgumentOrFragmentVariable(i,n)} has invalid value${printPathArray(m)}: ${h.message}`,h},s,l,f),invariant(!1,"Invalid argument")),r[a]=v}function printArgumentOrFragmentVariable(r,n){return isArgument(r)?`Argument "${r}"`:`Variable "$${r.name}" defined by fragment "${n.name.value}"`}function getDirectiveValues(r,n,a,i,o){const s=n.directives?.find(l=>l.name.value===r.name);if(s)return getArgumentValues(r,s,a,i,o)}function collectFields(r,n,a,i,o,s,l=!1){const f=new AccumulatorMap,d=[],u={schema:r,fragments:n,variableValues:a,runtimeType:i,visitedFragmentNames:new Map,hideSuggestions:s,forbiddenDirectiveInstances:[],forbidSkipAndInclude:l};return collectFieldsImpl(u,o,f,d),{groupedFieldSet:f,newDeferUsages:d,forbiddenDirectiveInstances:u.forbiddenDirectiveInstances}}function collectSubfields$1(r,n,a,i,o,s){const l={schema:r,fragments:n,variableValues:a,runtimeType:i,visitedFragmentNames:new Map,hideSuggestions:s,forbiddenDirectiveInstances:[],forbidSkipAndInclude:!1},f=new AccumulatorMap,d=[];for(const u of o){const c=u.node.selectionSet;if(c){const{deferUsage:v,fragmentVariableValues:h}=u;collectFieldsImpl(l,c,f,d,v,h)}}return{groupedFieldSet:f,newDeferUsages:d}}function collectFieldsImpl(r,n,a,i,o,s){const{schema:l,fragments:f,variableValues:d,runtimeType:u,visitedFragmentNames:c,hideSuggestions:v}=r;for(const h of n.selections)switch(h.kind){case FIELD:{if(!shouldIncludeNode(r,h,d,s))continue;a.add(getFieldEntryKey(h),{node:h,deferUsage:o,fragmentVariableValues:s});break}case INLINE_FRAGMENT:{if(!shouldIncludeNode(r,h,d,s)||!doesFragmentConditionMatch(l,h,u))continue;const m=getDeferUsage(d,s,h,o);m?(i.push(m),collectFieldsImpl(r,h.selectionSet,a,i,m,s)):collectFieldsImpl(r,h.selectionSet,a,i,o,s);break}case FRAGMENT_SPREAD:{const m=h.name.value;if(!shouldIncludeNode(r,h,d,s))continue;const g=f[m];if(g==null||!doesFragmentConditionMatch(l,g.definition,u))continue;const _=getDeferUsage(d,s,h,o),S=c.get(m);let N;if(_){if(S!==void 0)continue;c.set(m,!0),i.push(_),N=_}else{if(S===!1)continue;c.set(m,!1),N=o}const O=g.variableSignatures;let M;O&&(M=getFragmentVariableValues(h,O,d,s,v)),collectFieldsImpl(r,g.definition.selectionSet,a,i,N,M);break}}}function getDeferUsage(r,n,a,i){const o=getDirectiveValues(GraphQLDeferDirective,a,r,n);if(o&&o.if!==!1)return{label:typeof o.label=="string"?o.label:void 0,parentDeferUsage:i}}function shouldIncludeNode(r,n,a,i){const o=n.directives?.find(d=>d.name.value===GraphQLSkipDirective.name);if(o&&r.forbidSkipAndInclude)return r.forbiddenDirectiveInstances.push(o),!1;if((o?getArgumentValues(GraphQLSkipDirective,o,a,i,r.hideSuggestions):void 0)?.if===!0)return!1;const l=n.directives?.find(d=>d.name.value===GraphQLIncludeDirective.name);return l&&r.forbidSkipAndInclude?(r.forbiddenDirectiveInstances.push(l),!1):(l?getArgumentValues(GraphQLIncludeDirective,l,a,i,r.hideSuggestions):void 0)?.if!==!1}function doesFragmentConditionMatch(r,n,a){const i=n.typeCondition;if(!i)return!0;const o=typeFromAST(r,i);return o===a?!0:isAbstractType(o)?r.isSubType(o,a):!1}function getFieldEntryKey(r){return r.alias?r.alias.value:r.name.value}function toNodes$3(r){return r.map(n=>n.node)}function SingleFieldSubscriptionsRule(r){return{OperationDefinition(n){if(n.operation==="subscription"){const a=r.getSchema(),i=a.getSubscriptionType();if(i){const o=n.name?n.name.value:null,s=Object.create(null),l=r.getDocument(),f=Object.create(null);for(const c of l.definitions)c.kind===FRAGMENT_DEFINITION&&(f[c.name.value]={definition:c});const{groupedFieldSet:d,forbiddenDirectiveInstances:u}=collectFields(a,f,s,i,n.selectionSet,r.hideSuggestions,!0);if(u.length>0){r.reportError(new GraphQLError(o!=null?`Subscription "${o}" must not use \`@skip\` or \`@include\` directives in the top level selection.`:"Anonymous Subscription must not use `@skip` or `@include` directives in the top level selection.",{nodes:u}));return}if(d.size>1){const h=[...d.values()].slice(1).flatMap(m=>toNodes$3(m));r.reportError(new GraphQLError(o!=null?`Subscription "${o}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:h}))}for(const c of d.values())toNodes$3(c)[0].name.value.startsWith("__")&&r.reportError(new GraphQLError(o!=null?`Subscription "${o}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:toNodes$3(c)}))}}}}}function StreamDirectiveOnListFieldRule(r){return{Directive(n){const a=r.getFieldDef(),i=r.getParentType();a&&i&&n.name.value===GraphQLStreamDirective.name&&!(isListType(a.type)||isWrappingType(a.type)&&isListType(a.type.ofType))&&r.reportError(new GraphQLError(`Directive "@stream" cannot be used on non-list field "${i}.${a.name}".`,{nodes:n}))}}}function groupBy(r,n){const a=new AccumulatorMap;for(const i of r)a.add(n(i),i);return a}function UniqueArgumentDefinitionNamesRule(r){return{DirectiveDefinition(i){const o=i.arguments??[];return a(`@${i.name.value}`,o)},InterfaceTypeDefinition:n,InterfaceTypeExtension:n,ObjectTypeDefinition:n,ObjectTypeExtension:n};function n(i){const o=i.name.value,s=i.fields??[];for(const l of s){const f=l.name.value,d=l.arguments??[];a(`${o}.${f}`,d)}return!1}function a(i,o){const s=groupBy(o,l=>l.name.value);for(const[l,f]of s)f.length>1&&r.reportError(new GraphQLError(`Argument "${i}(${l}:)" can only be defined once.`,{nodes:f.map(d=>d.name)}));return!1}}function UniqueArgumentNamesRule(r){return{Field:n,Directive:n};function n(a){const i=a.arguments??[],o=groupBy(i,s=>s.name.value);for(const[s,l]of o)l.length>1&&r.reportError(new GraphQLError(`There can be only one argument named "${s}".`,{nodes:l.map(f=>f.name)}))}}function UniqueDirectiveNamesRule(r){const n=new Map,a=r.getSchema();return{DirectiveDefinition(i){const o=i.name.value;if(a?.getDirective(o)){r.reportError(new GraphQLError(`Directive "@${o}" already exists in the schema. It cannot be redefined.`,{nodes:i.name}));return}const s=n.get(o);return s?r.reportError(new GraphQLError(`There can be only one directive named "@${o}".`,{nodes:[s,i.name]})):n.set(o,i.name),!1}}}function UniqueDirectivesPerLocationRule(r){const n=new Map,a=r.getSchema(),i=a?a.getDirectives():specifiedDirectives;for(const d of i)n.set(d.name,!d.isRepeatable);const o=r.getDocument().definitions;for(const d of o)d.kind===DIRECTIVE_DEFINITION&&n.set(d.name.value,!d.repeatable);const s=new Map,l=new Map,f=new Map;return{enter(d){if(!("directives"in d)||!d.directives)return;let u;if(d.kind===SCHEMA_DEFINITION||d.kind===SCHEMA_EXTENSION)u=s;else if(isTypeDefinitionNode(d)||isTypeExtensionNode(d)){const c=d.name.value;u=l.get(c),u===void 0&&(u=new Map,l.set(c,u))}else if(d.kind===DIRECTIVE_DEFINITION||d.kind===DIRECTIVE_EXTENSION){const c=d.name.value;u=f.get(c),u===void 0&&(u=new Map,f.set(c,u))}else u=new Map;for(const c of d.directives){const v=c.name.value;if(n.get(v)===!0){const h=u.get(v);h!=null?r.reportError(new GraphQLError(`The directive "@${v}" can only be used once at this location.`,{nodes:[h,c]})):u.set(v,c)}}}}}function UniqueEnumValueNamesRule(r){const n=r.getSchema(),a=n?n.getTypeMap():Object.create(null),i=new Map;return{EnumTypeDefinition:o,EnumTypeExtension:o};function o(s){const l=s.name.value;let f=i.get(l);f==null&&(f=new Map,i.set(l,f));const d=s.values??[];for(const u of d){const c=u.name.value,v=a[l];if(isEnumType(v)&&v.getValue(c)){r.reportError(new GraphQLError(`Enum value "${l}.${c}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:u.name}));continue}const h=f.get(c);h!=null?r.reportError(new GraphQLError(`Enum value "${l}.${c}" can only be defined once.`,{nodes:[h,u.name]})):f.set(c,u.name)}return!1}}function UniqueFieldDefinitionNamesRule(r){const n=r.getSchema(),a=n?n.getTypeMap():Object.create(null),i=new Map;return{InputObjectTypeDefinition:o,InputObjectTypeExtension:o,InterfaceTypeDefinition:o,InterfaceTypeExtension:o,ObjectTypeDefinition:o,ObjectTypeExtension:o};function o(s){const l=s.name.value;let f=i.get(l);f==null&&(f=new Map,i.set(l,f));const d=s.fields??[];for(const u of d){const c=u.name.value;if(hasField(a[l],c)){r.reportError(new GraphQLError(`Field "${l}.${c}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:u.name}));continue}const v=f.get(c);v!=null?r.reportError(new GraphQLError(`Field "${l}.${c}" can only be defined once.`,{nodes:[v,u.name]})):f.set(c,u.name)}return!1}}function hasField(r,n){return isObjectType(r)||isInterfaceType(r)||isInputObjectType(r)?r.getFields()[n]!=null:!1}function UniqueFragmentNamesRule(r){const n=new Map;return{OperationDefinition:()=>!1,FragmentDefinition(a){const i=a.name.value,o=n.get(i);return o!=null?r.reportError(new GraphQLError(`There can be only one fragment named "${i}".`,{nodes:[o,a.name]})):n.set(i,a.name),!1}}}function UniqueInputFieldNamesRule(r){const n=[];let a=new Map;return{ObjectValue:{enter(){n.push(a),a=new Map},leave(){const i=n.pop();i==null&&invariant(),a=i}},ObjectField(i){const o=i.name.value,s=a.get(o);s!=null?r.reportError(new GraphQLError(`There can be only one input field named "${o}".`,{nodes:[s,i.name]})):a.set(o,i.name)}}}function UniqueOperationNamesRule(r){const n=new Map;return{OperationDefinition(a){const i=a.name;if(i!=null){const o=n.get(i.value);o!=null?r.reportError(new GraphQLError(`There can be only one operation named "${i.value}".`,{nodes:[o,i]})):n.set(i.value,i)}return!1},FragmentDefinition:()=>!1}}function UniqueOperationTypesRule(r){const n=r.getSchema(),a=new Map,i=n?{query:n.getQueryType(),mutation:n.getMutationType(),subscription:n.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(s){const l=s.operationTypes??[];for(const f of l){const d=f.operation,u=a.get(d);i[d]?r.reportError(new GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:f})):u?r.reportError(new GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[u,f]})):a.set(d,f)}return!1}}function UniqueTypeNamesRule(r){const n=new Map,a=r.getSchema();return{ScalarTypeDefinition:i,ObjectTypeDefinition:i,InterfaceTypeDefinition:i,UnionTypeDefinition:i,EnumTypeDefinition:i,InputObjectTypeDefinition:i};function i(o){const s=o.name.value;if(a?.getType(s)){r.reportError(new GraphQLError(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:o.name}));return}const l=n.get(s);return l!=null?r.reportError(new GraphQLError(`There can be only one type named "${s}".`,{nodes:[l,o.name]})):n.set(s,o.name),!1}}function UniqueVariableNamesRule(r){return{OperationDefinition(n){const a=n.variableDefinitions??[],i=groupBy(a,o=>o.variable.name.value);for(const[o,s]of i)s.length>1&&r.reportError(new GraphQLError(`There can be only one variable named "$${o}".`,{nodes:s.map(l=>l.variable.name)}))}}}function ValuesOfCorrectTypeRule(r){return{NullValue:n=>isValidValueNode(r,n,r.getInputType()),ListValue:n=>isValidValueNode(r,n,r.getParentInputType()),ObjectValue:n=>isValidValueNode(r,n,r.getInputType()),EnumValue:n=>isValidValueNode(r,n,r.getInputType()),IntValue:n=>isValidValueNode(r,n,r.getInputType()),FloatValue:n=>isValidValueNode(r,n,r.getInputType()),StringValue:n=>isValidValueNode(r,n,r.getInputType()),BooleanValue:n=>isValidValueNode(r,n,r.getInputType())}}function isValidValueNode(r,n,a){return a&&validateInputLiteral(n,a,i=>{r.reportError(i)},void 0,void 0,r.hideSuggestions),!1}function VariablesAreInputTypesRule(r){return{VariableDefinition(n){const a=typeFromAST(r.getSchema(),n.type);if(a!==void 0&&!isInputType(a)){const i=n.variable.name.value,o=print(n.type);r.reportError(new GraphQLError(`Variable "$${i}" cannot be non-input type "${o}".`,{nodes:n.type}))}}}}function VariablesInAllowedPositionRule(r){let n;return{OperationDefinition:{enter(){n=new Map},leave(a){const i=r.getRecursiveVariableUsages(a);for(const{node:o,type:s,parentType:l,defaultValue:f,fragmentVariableDefinition:d}of i){const u=o.name.value;let c=d;if(c??=n.get(u),c&&s){const v=r.getSchema(),h=typeFromAST(v,c.type);h&&!allowedVariableUsage(v,h,c.defaultValue,s,f)&&r.reportError(new GraphQLError(`Variable "$${u}" of type "${h}" used in position expecting type "${s}".`,{nodes:[c,o]})),isInputObjectType(l)&&l.isOneOf&&isNullableType(h)&&r.reportError(new GraphQLError(`Variable "$${u}" is of type "${h}" but must be non-nullable to be used for OneOf Input Object "${l}".`,{nodes:[c,o]}))}}}},VariableDefinition(a){n.set(a.variable.name.value,a)}}}function allowedVariableUsage(r,n,a,i,o){if(isNonNullType(i)&&!isNonNullType(n)){if(!(a!=null&&a.kind!==NULL)&&!(o!==void 0))return!1;const f=i.ofType;return isTypeSubTypeOf(r,n,f)}return isTypeSubTypeOf(r,n,i)}const recommendedRules=Object.freeze([MaxIntrospectionDepthRule]),specifiedRules=Object.freeze([ExecutableDefinitionsRule,KnownOperationTypesRule,UniqueOperationNamesRule,LoneAnonymousOperationRule,SingleFieldSubscriptionsRule,KnownTypeNamesRule,FragmentsOnCompositeTypesRule,VariablesAreInputTypesRule,ScalarLeafsRule,FieldsOnCorrectTypeRule,UniqueFragmentNamesRule,KnownFragmentNamesRule,NoUnusedFragmentsRule,PossibleFragmentSpreadsRule,NoFragmentCyclesRule$1,UniqueVariableNamesRule,NoUndefinedVariablesRule,NoUnusedVariablesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,DeferStreamDirectiveOnRootFieldRule,DeferStreamDirectiveOnValidOperationsRule,DeferStreamDirectiveLabelRule,StreamDirectiveOnListFieldRule,KnownArgumentNamesRule,UniqueArgumentNamesRule,ValuesOfCorrectTypeRule,ProvidedRequiredArgumentsRule,VariablesInAllowedPositionRule,OverlappingFieldsCanBeMergedRule,UniqueInputFieldNamesRule,...recommendedRules]),specifiedSDLRules=Object.freeze([LoneSchemaDefinitionRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueArgumentDefinitionNamesRule,UniqueDirectiveNamesRule,KnownTypeNamesRule,KnownDirectivesRule,UniqueDirectivesPerLocationRule,PossibleTypeExtensionsRule,KnownArgumentNamesOnDirectivesRule,UniqueArgumentNamesRule,UniqueInputFieldNamesRule,ProvidedRequiredArgumentsOnDirectivesRule]);class ASTValidationContext{constructor(n,a){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=a}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(n){this._onError(n)}getDocument(){return this._ast}getFragment(n){let a;if(this._fragments)a=this._fragments;else{a=Object.create(null);for(const i of this.getDocument().definitions)i.kind===FRAGMENT_DEFINITION&&(a[i.name.value]=i);this._fragments=a}return a[n]}getFragmentSpreads(n){let a=this._fragmentSpreads.get(n);if(!a){a=[];const i=[n];let o;for(;o=i.pop();)for(const s of o.selections)s.kind===FRAGMENT_SPREAD?a.push(s):s.selectionSet&&i.push(s.selectionSet);this._fragmentSpreads.set(n,a)}return a}getRecursivelyReferencedFragments(n){let a=this._recursivelyReferencedFragments.get(n);if(!a){a=[];const i=new Set,o=[n.selectionSet];let s;for(;s=o.pop();)for(const l of this.getFragmentSpreads(s)){const f=l.name.value;if(!i.has(f)){i.add(f);const d=this.getFragment(f);d&&(a.push(d),o.push(d.selectionSet))}}this._recursivelyReferencedFragments.set(n,a)}return a}}class SDLValidationContext extends ASTValidationContext{constructor(n,a,i){super(n,i),this._schema=a}get hideSuggestions(){return!1}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class ValidationContext extends ASTValidationContext{constructor(n,a,i,o,s){super(a,o),this._schema=n,this._typeInfo=i,this._variableUsages=new Map,this._recursiveVariableUsages=new Map,this._hideSuggestions=s??!1}get[Symbol.toStringTag](){return"ValidationContext"}get hideSuggestions(){return this._hideSuggestions}getSchema(){return this._schema}getVariableUsages(n){let a=this._variableUsages.get(n);if(!a){const i=[],o=new TypeInfo(this._schema,void 0,this._typeInfo.getFragmentSignatureByName()),s=n.kind===FRAGMENT_DEFINITION?n:void 0;visit$1(n,visitWithTypeInfo(o,{VariableDefinition:()=>!1,Variable(l){let f;s?(f=o.getFragmentSignatureByName()(s.name.value)?.variableDefinitions.get(l.name.value),i.push({node:l,type:o.getInputType(),parentType:o.getParentInputType(),defaultValue:void 0,fragmentVariableDefinition:f})):i.push({node:l,type:o.getInputType(),parentType:o.getParentInputType(),defaultValue:o.getDefaultValue(),fragmentVariableDefinition:void 0})}})),a=i,this._variableUsages.set(n,a)}return a}getRecursiveVariableUsages(n){let a=this._recursiveVariableUsages.get(n);if(!a){a=this.getVariableUsages(n);for(const i of this.getRecursivelyReferencedFragments(n))a=a.concat(this.getVariableUsages(i));this._recursiveVariableUsages.set(n,a)}return a}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getFragmentSignature(){return this._typeInfo.getFragmentSignature()}getFragmentSignatureByName(){return this._typeInfo.getFragmentSignatureByName()}getEnumValue(){return this._typeInfo.getEnumValue()}}const QueryDocumentKeysToValidate=mapValue(QueryDocumentKeys,r=>r.filter(n=>n!=="description")),tooManyValidationErrorsError=new GraphQLError("Too many validation errors, error limit reached. Validation aborted.");function validate(r,n,a=specifiedRules,i){return shouldTrace(validateChannel)?validateChannel.traceSync(()=>validateImpl(r,n,a,i),{schema:r,document:n}):validateImpl(r,n,a,i)}function validateImpl(r,n,a,i){const o=i?.maxErrors??100,s=i?.hideSuggestions??!1;assertValidSchema(r);const l=[],f=new TypeInfo(r),d=new ValidationContext(r,n,f,c=>{if(l.length>=o)throw tooManyValidationErrorsError;l.push(c)},s),u=visitInParallel(a.map(c=>c(d)));try{visit$1(n,visitWithTypeInfo(f,u),QueryDocumentKeysToValidate)}catch(c){if(c===tooManyValidationErrorsError)l.push(tooManyValidationErrorsError);else throw c}return l}function validateSDL(r,n,a=specifiedSDLRules){const i=[],o=new SDLValidationContext(r,n,l=>{i.push(l)}),s=a.map(l=>l(o));return visit$1(r,visitInParallel(s)),i}function assertValidSDL(r){const n=validateSDL(r);if(n.length!==0)throw new Error(n.map(a=>a.message).join(`
128
+
129
+ `))}function assertValidSDLExtension(r,n){const a=validateSDL(r,n);if(a.length!==0)throw new Error(a.map(i=>i.message).join(`
130
+
131
+ `))}function isAsyncIterable(r){return typeof r?.[Symbol.asyncIterator]=="function"}function locatedError(r,n,a){const i=toError(r);return isLocatedGraphQLError(i)?i:new GraphQLError(i.message,{nodes:i.nodes??n,source:i.source,positions:i.positions,path:a,originalError:i})}function isLocatedGraphQLError(r){return Array.isArray(r.path)}function getOperationAST(r,n){let a=null;for(const i of r.definitions)if(i.kind===OPERATION_DEFINITION){if(n==null){if(a)return null;a=i}else if(i.name?.value===n)return i}return a}function buildResolveInfo(r,n,a,i,o,s,l){const{schema:f,fragmentDefinitions:d,rootValue:u,operation:c,variableValues:v}=r;return{fieldName:n.name,fieldNodes:a,returnType:n.type,parentType:i,path:o,schema:f,fragments:d,rootValue:u,operation:c,variableValues:v,getAbortSignal:s,getAsyncHelpers:l}}function promiseWithResolvers(){let r,n;return{promise:new Promise((i,o)=>{r=i,n=o}),resolve:r,reject:n}}function withCancellation(r){const{promise:n,resolve:a,reject:i}=promiseWithResolvers();let o=!1;const s=f=>{o||(o=!0,a(f))},l=f=>{o||(o=!0,i(f))};return r.then(s,l),{promise:n,abort(f){l(f)}}}function cancellablePromise(r,n){const a=withCancellation(r);if(n.aborted)return a.abort(n.reason),a.promise;const i=()=>{n.removeEventListener("abort",i),a.abort(n.reason)};return n.addEventListener("abort",i),a.promise.then(()=>{n.removeEventListener("abort",i)},()=>{n.removeEventListener("abort",i)}),a.promise}class AsyncWorkTracker{constructor(){this.pendingAsyncWork=new Set}add(n){const a=this.pendingAsyncWork,i=n.then(()=>{a.delete(i)},()=>{a.delete(i)});a.add(i)}addValues(n){for(const a of n)isPromiseLike(a)&&this.add(a)}wait(){if(this.pendingAsyncWork.size!==0)return this.waitForPendingAsyncWork()}promiseAllTrackOnReject(n){const a=Promise.all(n);return a.then(void 0,()=>{this.addValues(n)}),a}async waitForPendingAsyncWork(){for(;this.pendingAsyncWork.size>0;)await Promise.allSettled(Array.from(this.pendingAsyncWork))}}function createSharedExecutionContext(r){const n=new AsyncWorkTracker;let a;const i=s=>n.promiseAllTrackOnReject(s);return{asyncWorkTracker:n,getAbortSignal:()=>r,getAsyncHelpers:()=>a??={promiseAll:i,track:s=>n.addValues(s)},promiseAll:i}}function memoize2(r){let n;return function(i,o){n??=new WeakMap;let s=n.get(i);s===void 0&&(s=new WeakMap,n.set(i,s));let l=s.get(o);return l===void 0&&(l=r(i,o),s.set(o,l)),l}}function memoize3(r){let n;return function(i,o,s){n??=new WeakMap;let l=n.get(i);l===void 0&&(l=new WeakMap,n.set(i,l));let f=l.get(o);f===void 0&&(f=new WeakMap,l.set(o,f));let d=f.get(s);return d===void 0&&(d=r(i,o,s),f.set(s,d)),d}}function promiseForObject(r,n){const a=Object.keys(r),i=Object.values(r);return n(i).then(o=>{const s=Object.create(null);for(let l=0;l<a.length;++l)s[a[l]]=o[l];return s})}function promiseReduce(r,n,a){let i=a;for(const o of r)i=isPromise(i)?i.then(s=>n(s,o)):n(i,o);return i}class AbortedGraphQLExecutionError extends Error{constructor(n,a){super(getAbortReasonMessage(n),{cause:n}),this.name="AbortedGraphQLExecutionError",this.abortedResult=a}get[Symbol.toStringTag](){return"AbortedGraphQLExecutionError"}}function getAbortReasonMessage(r){return r instanceof Error||typeof r=="object"&&r!==null&&"message"in r&&typeof r.message=="string"?r.message:String(r)}function collectIteratorPromises(r){const n=[];try{for(;;){const a=r.next();if(a.done)return n;isPromiseLike(a.value)&&n.push(a.value)}}catch{return n}}function getStreamUsage$1(r,n){const{operation:a,variableValues:i}=r,o=getDirectiveValues(GraphQLStreamDirective,n[0].node,i,n[0].fragmentVariableValues);if(!o||o.if===!1)return;typeof o.initialCount!="number"&&invariant(!1,"initialCount must be a number"),o.initialCount>=0||invariant(!1,"initialCount must be a positive integer"),a.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@stream` directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.");const s=n.map(l=>({node:l.node,deferUsage:void 0,fragmentVariableValues:l.fragmentVariableValues}));return{initialCount:o.initialCount,label:typeof o.label=="string"?o.label:void 0,fieldDetailsList:s}}function runHookSafely(r,n){try{r?.(n)}catch{}}function runAsyncWorkFinishedHook(r,n,a){const i=n.asyncWorkTracker.wait();if(i===void 0){runHookSafely(a,{validatedExecutionArgs:r});return}i.then(()=>{runHookSafely(a,{validatedExecutionArgs:r})}).catch(()=>{})}async function returnIteratorCatchingErrors(r){try{await r.return?.()}catch{}}const collectSubfields=memoize3((r,n,a)=>{const{schema:i,fragments:o,variableValues:s,hideSuggestions:l}=r;return collectSubfields$1(i,o,s,n,a,l)}),getStreamUsage=memoize2((r,n)=>getStreamUsage$1(r,n));class CollectedErrors{constructor(){this._errorPositions=new Set,this._errors=[]}get errors(){return this._errors}add(n,a){this.hasNulledPosition(a)||(this._errorPositions.add(a),this._errors.push(n))}hasNulledPosition(n){let a=n;for(;a!==void 0;){if(this._errorPositions.has(a))return!0;a=a.prev}return this._errorPositions.has(void 0)}}const defaultAbortReason=new Error("This operation was aborted");class Executor{constructor(n,a){this.validatedExecutionArgs=n,this.aborted=!1,this.abortReason=defaultAbortReason,this.collectedErrors=new CollectedErrors,a===void 0?(this.resolverAbortController=new AbortController,this.sharedExecutionContext=createSharedExecutionContext(this.resolverAbortController.signal)):this.sharedExecutionContext=a;const{getAbortSignal:i,getAsyncHelpers:o,promiseAll:s}=this.sharedExecutionContext;this.getAbortSignal=i,this.getAsyncHelpers=o,this.promiseAll=s}executeRootSelectionSet(n){return shouldTrace(executeRootSelectionSetChannel)?traceMixed(executeRootSelectionSetChannel,this.buildExecuteContextFromValidatedArgs(this.validatedExecutionArgs),()=>this.executeRootSelectionSetImpl(n)):this.executeRootSelectionSetImpl(n)}buildExecuteContextFromValidatedArgs(n){return{schema:n.schema,document:n.document,operation:n.operation,rawVariableValues:n.rawVariableValues,operationName:n.operation.name?.value,operationType:n.operation.operation}}executeRootSelectionSetImpl(n){const a=this.validatedExecutionArgs.externalAbortSignal;let i;if(a){a.throwIfAborted();const l=()=>{this.abort(a.reason)};i=()=>a.removeEventListener("abort",l),a.addEventListener("abort",l)}const o=()=>{i?.()};let s;try{const{schema:l,fragments:f,rootValue:d,operation:u,variableValues:c,hideSuggestions:v}=this.validatedExecutionArgs,{operation:h,selectionSet:m}=u,g=l.getRootType(h);if(g==null)throw new GraphQLError(`Schema is not configured to execute ${h} operation.`,{nodes:u});const{groupedFieldSet:_,newDeferUsages:S}=collectFields(l,f,c,g,m,v);if(s=this.executeCollectedRootFields(g,d,_,n??h===OperationTypeNode.MUTATION,S),isPromise(s)){const N=s.then(F=>(o(),this.buildResponse(F)),F=>(o(),this.collectedErrors.add(ensureGraphQLError(F),void 0),this.buildResponse(null)));this.sharedExecutionContext.asyncWorkTracker.add(N);const{promise:O,abort:M}=withCancellation(N.then(F=>this.finish(F)));return this.abortResultPromise=()=>{M(this.createAbortedExecutionError(N))},this.aborted&&this.abortResultPromise(),O}o()}catch(l){return o(),this.collectedErrors.add(ensureGraphQLError(l),void 0),this.finish(this.buildResponse(null))}return this.finish(this.buildResponse(s))}abort(n){this.aborted||(this.aborted=!0,n!==void 0&&(this.abortReason=n),this.abortResultPromise?.(),this.resolverAbortController?.abort(this.abortReason))}finish(n){if(this.aborted)throw this.createAbortedExecutionError(n);return this.aborted=!0,n}createAbortedExecutionError(n){return new AbortedGraphQLExecutionError(this.abortReason,n)}getFinishSharedExecution(){const n=this.resolverAbortController,a=this.validatedExecutionArgs.hooks?.asyncWorkFinished;if(a===void 0)return()=>n?.abort();const i=this.validatedExecutionArgs,o=this.sharedExecutionContext;return()=>{n?.abort(),runAsyncWorkFinishedHook(i,o,a)}}buildResponse(n){this.getFinishSharedExecution()();const a=this.collectedErrors.errors;return a.length?{errors:a,data:n}:{data:n}}executeCollectedRootFields(n,a,i,o,s){return this.executeRootGroupedFieldSet(n,a,i,o,void 0)}executeRootGroupedFieldSet(n,a,i,o,s){return o?this.executeFieldsSerially(n,a,void 0,i,s):this.executeFields(n,a,void 0,i,s)}executeFieldsSerially(n,a,i,o,s){let l=shouldTrace(resolveChannel)?resolveChannel:void 0;return promiseReduce(o,(f,[d,u])=>{if(this.aborted)throw new Error("Aborted!");const c=addPath(i,d,n.name),v=this.executeField(n,a,u,c,s,l);return v===void 0?f:isPromise(v)?v.then(h=>(f[d]=h,l=shouldTrace(resolveChannel)?resolveChannel:void 0,f)):(f[d]=v,f)},Object.create(null))}executeFields(n,a,i,o,s){const l=Object.create(null);let f=!1;const d=shouldTrace(resolveChannel)?resolveChannel:void 0;try{for(const[u,c]of o){const v=addPath(i,u,n.name),h=this.executeField(n,a,c,v,s,d);h!==void 0&&(l[u]=h,isPromise(h)&&(f=!0))}}catch(u){throw f&&this.sharedExecutionContext.asyncWorkTracker.addValues(Object.values(l)),u}return f?promiseForObject(l,this.promiseAll):l}executeField(n,a,i,o,s,l){const f=this.validatedExecutionArgs,{schema:d,contextValue:u,variableValues:c,hideSuggestions:v}=f,h=i[0],m=h.node,g=m.name.value,_=d.getField(n,g);if(!_)return;const S=_.type;let N=_.resolve??f.fieldResolver;if(l!==void 0){const M=N;N=(F,L,k,P)=>traceMixed(l,this.buildResolveContext(L,P,_.resolve===void 0),()=>M(F,L,k,P))}const O=buildResolveInfo(f,_,toNodes$2(i),n,o,this.getAbortSignal,this.getAsyncHelpers);try{const M=getArgumentValues(_,m,c,h.fragmentVariableValues,v),F=N(a,M,u,O);if(isPromiseLike(F))return this.completePromisedValue(S,i,O,o,F,s);const L=this.completeValue(S,i,O,o,F,s);return isPromise(L)?L.then(void 0,k=>(this.handleFieldError(k,S,i,o),null)):L}catch(M){return this.handleFieldError(M,S,i,o),null}}buildResolveContext(n,a,i){let o;return{fieldName:a.fieldName,alias:String(a.path.key),parentType:a.parentType.name,fieldType:String(a.returnType),args:n,isDefaultResolver:i,get fieldPath(){return o??=pathToArray(a.path).join("."),o}}}handleFieldError(n,a,i,o){const s=locatedError(n,toNodes$2(i),pathToArray(o));if(this.validatedExecutionArgs.errorPropagation&&isNonNullType(a))throw s;this.collectedErrors.add(s,o)}completeValue(n,a,i,o,s,l){if(s instanceof Error)throw s;if(isNonNullType(n)){const f=this.completeValue(n.ofType,a,i,o,s,l);if(f===null)throw new Error(`Cannot return null for non-nullable field ${i.parentType}.${i.fieldName}.`);return f}if(s==null)return null;if(isListType(n))return this.completeListValue(n,a,i,o,s,l);if(isLeafType(n))return this.completeLeafValue(n,s);if(isAbstractType(n))return this.completeAbstractValue(n,a,i,o,s,l);if(isObjectType(n))return this.completeObjectValue(n,a,i,o,s,l);invariant(!1,"Cannot complete value of unexpected output type: "+inspect(n))}async completePromisedValue(n,a,i,o,s,l){try{const f=await s;if(this.aborted)throw new Error("Aborted!");let d=this.completeValue(n,a,i,o,f,l);return isPromise(d)&&(d=await d),d}catch(f){return this.handleFieldError(f,n,a,o),null}}async completeAsyncIterableValue(n,a,i,o,s,l){const f=typeof o.key=="number"?void 0:getStreamUsage(this.validatedExecutionArgs,a);let d=!1;const u=[],c=s[Symbol.asyncIterator]();let v=0,h;try{for(;!(f?.initialCount===v&&this.handleStream(v,o,{handle:c,isAsync:!0},f,i,n));){const m=addPath(o,v,void 0);try{h=await c.next()}catch(_){throw locatedError(_,toNodes$2(a),pathToArray(o))}if(this.aborted||h.done)break;const g=h.value;this.completeMaybePromisedListItemValue(g,u,n,a,i,m,l)&&(d=!0),v++}}catch(m){throw this.sharedExecutionContext.asyncWorkTracker.add(returnIteratorCatchingErrors(c)),d&&this.sharedExecutionContext.asyncWorkTracker.addValues(u),m}if(this.aborted)throw h?.done||this.sharedExecutionContext.asyncWorkTracker.add(returnIteratorCatchingErrors(c)),new Error("Aborted!");return d?this.promiseAll(u):u}handleStream(n,a,i,o,s,l){return!1}completeListValue(n,a,i,o,s,l){const f=n.ofType;if(isAsyncIterable(s))return this.completeAsyncIterableValue(f,a,i,o,s,l);if(!isIterableObject(s))throw new GraphQLError(`Expected Iterable, but did not find one for field "${i.parentType}.${i.fieldName}".`);return this.completeIterableValue(f,a,i,o,s,l)}completeIterableValue(n,a,i,o,s,l){const f=typeof o.key=="number"?void 0:getStreamUsage(this.validatedExecutionArgs,a);let d=!1;const u=[];let c=0;const v=s[Symbol.iterator]();try{for(;!(f?.initialCount===c&&this.handleStream(c,o,{handle:v},f,i,n));){const h=v.next();if(h.done)break;const m=h.value,g=addPath(o,c,void 0);this.completeMaybePromisedListItemValue(m,u,n,a,i,g,l)&&(d=!0),c++}}catch(h){const m=this.sharedExecutionContext.asyncWorkTracker;throw d&&m.addValues(u),m.addValues(collectIteratorPromises(v)),h}return d?this.promiseAll(u):u}completeMaybePromisedListItemValue(n,a,i,o,s,l,f){return isPromiseLike(n)?(a.push(this.completePromisedListItemValue(n,i,o,s,l,f)),!0):!!this.completeListItemValue(n,a,i,o,s,l,f)}completeListItemValue(n,a,i,o,s,l,f){try{const d=this.completeValue(i,o,s,l,n,f);if(isPromise(d))return a.push(d.then(void 0,u=>(this.handleFieldError(u,i,o,l),null))),!0;a.push(d)}catch(d){this.handleFieldError(d,i,o,l),a.push(null)}return!1}async completePromisedListItemValue(n,a,i,o,s,l){try{const f=await n;if(this.aborted)throw new Error("Aborted!");let d=this.completeValue(a,i,o,s,f,l);return isPromise(d)&&(d=await d),d}catch(f){return this.handleFieldError(f,a,i,s),null}}completeLeafValue(n,a){const i=n.coerceOutputValue(a);if(i==null)throw new Error(`Expected \`${inspect(n)}.coerceOutputValue(${inspect(a)})\` to return non-nullable value, returned: ${inspect(i)}`);return i}completeAbstractValue(n,a,i,o,s,l){const f=this.validatedExecutionArgs,{schema:d,contextValue:u}=f,v=(n.resolveType??f.typeResolver)(s,u,i,n);return isPromiseLike(v)?v.then(h=>{if(this.aborted)throw new Error("Aborted!");return this.completeObjectValue(this.ensureValidRuntimeType(h,d,n,a,i,s),a,i,o,s,l)}):this.completeObjectValue(this.ensureValidRuntimeType(v,d,n,a,i,s),a,i,o,s,l)}ensureValidRuntimeType(n,a,i,o,s,l){if(n==null)throw new GraphQLError(`Abstract type "${i}" must resolve to an Object type at runtime for field "${s.parentType}.${s.fieldName}". Either the "${i}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,{nodes:toNodes$2(o)});if(typeof n!="string")throw new GraphQLError(`Abstract type "${i}" must resolve to an Object type at runtime for field "${s.parentType}.${s.fieldName}" with value ${inspect(l)}, received "${inspect(n)}", which is not a valid Object type name.`);const f=a.getType(n);if(f==null)throw new GraphQLError(`Abstract type "${i}" was resolved to a type "${n}" that does not exist inside the schema.`,{nodes:toNodes$2(o)});if(!isObjectType(f))throw new GraphQLError(`Abstract type "${i}" was resolved to a non-object type "${n}".`,{nodes:toNodes$2(o)});if(!a.isSubType(i,f))throw new GraphQLError(`Runtime Object type "${f}" is not a possible type for "${i}".`,{nodes:toNodes$2(o)});return f}completeObjectValue(n,a,i,o,s,l){if(n.isTypeOf){const f=n.isTypeOf(s,this.validatedExecutionArgs.contextValue,i);if(isPromiseLike(f))return f.then(d=>{if(this.aborted)throw new Error("Aborted!");if(!d)throw this.invalidReturnTypeError(n,s,a);return this.collectAndExecuteSubfields(n,a,o,s,l)});if(!f)throw this.invalidReturnTypeError(n,s,a)}return this.collectAndExecuteSubfields(n,a,o,s,l)}invalidReturnTypeError(n,a,i){return new GraphQLError(`Expected value of type "${n}" but got: ${inspect(a)}.`,{nodes:toNodes$2(i)})}collectAndExecuteSubfields(n,a,i,o,s){const{groupedFieldSet:l,newDeferUsages:f}=collectSubfields(this.validatedExecutionArgs,n,a);return this.executeCollectedSubfields(n,o,i,l,f,s)}executeCollectedSubfields(n,a,i,o,s,l){return this.executeFields(n,a,i,o,void 0)}}function toNodes$2(r){return r.map(n=>n.node)}const UNEXPECTED_MULTIPLE_PAYLOADS="Executing this GraphQL operation would unexpectedly produce multiple payloads (due to @defer or @stream directive)";class ExecutorThrowingOnIncremental extends Executor{executeCollectedRootFields(n,a,i,o,s){if(s.length>0){this.validatedExecutionArgs.operation.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");const l=new Error(UNEXPECTED_MULTIPLE_PAYLOADS);throw this.abort(l),l}return this.executeRootGroupedFieldSet(n,a,i,o,void 0)}executeCollectedSubfields(n,a,i,o,s){if(s.length>0){this.validatedExecutionArgs.operation.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");const l=new Error(UNEXPECTED_MULTIPLE_PAYLOADS);throw this.abort(l),l}return this.executeFields(n,a,i,o,void 0)}completeListValue(n,a,i,o,s,l){if(getStreamUsage(this.validatedExecutionArgs,a)!==void 0){this.validatedExecutionArgs.operation.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@stream` directive not supported on subscription operations. Disable `@stream` by setting the `if` argument to `false`.");const d=new Error(UNEXPECTED_MULTIPLE_PAYLOADS);throw this.abort(d),d}return super.completeListValue(n,a,i,o,s,l)}}function memoize1(r){let n;return function(i){n??=new WeakMap;let o=n.get(i);return o===void 0&&(o=r(i),n.set(i,o)),o}}function isSameSet(r,n){if(r.size!==n.size)return!1;for(const a of r)if(!n.has(a))return!1;return!0}function getBySet(r,n){for(const a of r.keys())if(isSameSet(a,n))return r.get(a)}function buildExecutionPlan(r,n=new Set){const a=new Map,i=new Map;for(const[o,s]of r){const l=getFilteredDeferUsageSet(s);if(isSameSet(l,n)){a.set(o,s);continue}let f=getBySet(i,l);f===void 0&&(f=new Map,i.set(l,f)),f.set(o,s)}return{groupedFieldSet:a,newGroupedFieldSets:i}}function getFilteredDeferUsageSet(r){const n=new Set;for(const a of r){const i=a.deferUsage;if(i===void 0)return n.clear(),n;n.add(i)}for(const a of n){let i=a.parentDeferUsage;for(;i!==void 0;){if(n.has(i)){n.delete(a);break}i=i.parentDeferUsage}}return n}class Computation{constructor(n,a){this._fn=n,this._onAbort=a}prime(){if(this._maybePromise)return this._maybePromise;try{const n=this._fn();isPromise(n)?(this._maybePromise={status:"pending",promise:n},n.then(a=>{this._maybePromise={status:"fulfilled",value:a}},a=>{this._maybePromise={status:"rejected",reason:a}})):this._maybePromise={status:"fulfilled",value:n}}catch(n){this._maybePromise={status:"rejected",reason:n}}return this._maybePromise}result(){const n=this.prime();switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;case"pending":return n.promise}}abort(n){const a=this._maybePromise;if(!a){this._maybePromise={status:"rejected",reason:n};return}if(a.status==="pending"&&(this._maybePromise={status:"rejected",reason:n},this._onAbort))return this._onAbort(n)}}const asyncDispose=Symbol.asyncDispose??Symbol.for("Symbol.asyncDispose");function withConcurrentAbruptClose(r,n,a=n){let i=!1,o=!1;const s=l=>{if(!(i||o))return o=!0,ignoreErrors(l)};return{[Symbol.asyncIterator](){return this},next(){const l=r.next();return l.then(f=>{f.done&&(i=!0)}).catch(()=>{}),l},async return(){return await s(n),r.return()},async throw(l){return await s(()=>a(l)),r.throw(l)},async[asyncDispose](){await s(n),typeof r[asyncDispose]=="function"&&await r[asyncDispose]()}}}function ignoreErrors(r){try{const n=r();if(isPromise(n))return n.catch(()=>{})}catch{}}function mapAsyncIterable(r,n){const a=r[Symbol.asyncIterator](),i=a.return?.bind(a),o=a.throw?.bind(a),s=i?()=>callIgnoringErrors(i):()=>Promise.resolve(),l=o?f=>callIgnoringErrors(()=>o(f)):s;return withConcurrentAbruptClose(mapAsyncIterableImpl(r,n),s,l)}async function callIgnoringErrors(r){try{await r()}catch{}}async function*mapAsyncIterableImpl(r,n){for await(const a of r){const i=n(a);if(isPromise(i)){yield await i;continue}yield i}}class Queue{constructor(n,a=1){this._backlog=0,this._waiters=[],this._entries=[],this._isStopped=!1,this._stopRequested=!1,this._stopCleanupCallbacks=[],this._batchRequests=new Set,this._capacity=this._normalizeCapacity(a);const{promise:i,resolve:o}=promiseWithResolvers();this._resolveStarted=o;try{const s=n({push:this._push.bind(this),stop:this._stop.bind(this),onStop:this._onStop.bind(this),started:i});isPromise(s)&&s.catch(this._stop.bind(this))}catch(s){const l=this._stop(s);isPromise(l)&&l.catch(()=>{})}}subscribe(n=a=>Array.from(a)){const a=this._iteratorLoop(n);return withConcurrentAbruptClose(a,()=>this.cancel(),this.abort.bind(this))}cancel(){return this._stopRequested?this._stopCompletion:this._terminate(void 0,()=>{this._isStopped=!0,this._batchRequests.forEach(n=>n.resolve(void 0)),this._batchRequests.clear()})}abort(n){return this._stopRequested?this._stopCompletion:this._terminate(n,()=>{if(this._isStopped=!0,this._batchRequests.size){this._batchRequests.forEach(a=>a.reject(n)),this._batchRequests.clear();return}this._entries.push({kind:"item",settled:{status:"rejected",reason:n}})})}async forEachBatch(n){const a=this.subscribe(async i=>{const{promise:o,resolve:s}=promiseWithResolvers(),l=function*(){yield*i,s()}();await Promise.all([n(l),o])});for await(const i of a);}setCapacity(n){this._capacity=this._normalizeCapacity(n),this._flush()}getCapacity(){return this._capacity}isStopped(){return this._isStopped}_normalizeCapacity(n){return Math.max(1,Math.floor(n))}_flush(){for(;this._waiters.length>0&&this._backlog<this._capacity;)this._waiters.shift()?.()}_reserve(){if(this._backlog+=1,this._backlog<this._capacity)return;const{promise:n,resolve:a}=promiseWithResolvers();return this._waiters.push(a),n}_release(){this._backlog>0&&(this._backlog-=1),this._flush()}_onStop(n){if(this._stopRequested)throw new Error("Cannot register onStop cleanup after stop has been requested.");this._stopCleanupCallbacks.push(n)}_runStopCleanup(n,a){this._stopRequested=!0;const i=this._stopCleanupCallbacks.flatMap(s=>{try{const l=s(n);return isPromise(l)?[l]:[]}catch{return[]}}),o=i.length>0?Promise.allSettled(i).then(()=>{}):void 0;if(isPromise(o))return this._stopCompletion=o.then(a,a).then(()=>{}),this._stopCompletion;a()}async*_iteratorLoop(n){this._resolveStarted();let a;for(;a=await this._waitForNextBatch();){let i=n(a);isPromise(i)&&(i=await i),i!==void 0&&(yield i)}}_waitForNextBatch(){const{promise:n,resolve:a,reject:i}=promiseWithResolvers();return this._batchRequests.add({resolve:a,reject:i}),this._deliverBatchIfReady(),n}_push(n){if(this._stopRequested)return;const a=this._reserve();if(isPromise(n)){const i={kind:"item"};this._entries.push(i),n.then(o=>{i.settled={status:"fulfilled",value:o},this._deliverBatchIfReady()},o=>{i.settled={status:"rejected",reason:o},this._deliverBatchIfReady()})}else this._entries.push({kind:"item",settled:{status:"fulfilled",value:n}}),this._deliverBatchIfReady();return a}_terminate(n,a){for(const i of this._entries)i.kind==="item"&&this._release();return this._entries.length=0,this._runStopCleanup(n,a)}_stop(n){if(this._stopRequested)return this._stopCompletion;const a=this._runStopCleanup(n,()=>{if(n===void 0){if(this._entries.length===0){this._isStopped=!0,this._deliverBatchIfReady();return}this._entries.push({kind:"stop"}),this._deliverBatchIfReady();return}this._entries.push({kind:"item",settled:{status:"rejected",reason:n}}),this._entries.push({kind:"stop"}),this._deliverBatchIfReady()});return isPromise(a)&&a.catch(()=>{}),a}_deliverBatchIfReady(){if(!this._batchRequests.size)return;const n=this._entries[0],a=this._batchRequests;if(n!==void 0){n.kind==="stop"&&invariant();const i=n.settled;if(i!==void 0){if(i.status==="fulfilled"){this._batchRequests=new Set,a.forEach(o=>o.resolve(this._drainBatch()));return}this._entries.shift(),this._release(),this._isStopped=!0,this._batchRequests=new Set,a.forEach(o=>o.reject(i.reason))}}else this._isStopped&&(this._batchRequests=new Set,a.forEach(i=>i.resolve(void 0)))}*_drainBatch(){for(;;){const n=this._entries[0];if(n===void 0)return;if(n.kind==="stop"){this._isStopped=!0,this._entries.shift();return}const a=n.settled;if(a===void 0||a.status==="rejected")return;this._entries.shift(),this._release(),yield a.value}}}function createWorkQueue(r){const n=new Set,a=new Set,i=new Map,o=new Map;let s,l;const{newGroups:f,newStreams:d}=_(r),u=F(f);for(const I of u)n.add(I);for(const I of d)a.add(I);const c=new Queue(({push:I,stop:T,onStop:C,started:x})=>{s=I,l=T,x.then(()=>{for(const w of n)k(w);for(const w of a)U(w)}),C(w=>v(w))},1).subscribe(I=>B(I));return{initialGroups:u,initialStreams:d,events:c};function v(I){const T=[];for(const C of n)h(C,I,T);for(const C of a)g(C,I,T);if(T.length>0)return Promise.allSettled(T).then(()=>{})}function h(I,T,C){const x=i.get(I);if(x){for(const w of x.tasks)m(w,T,C);for(const w of x.childGroups)h(w,T,C)}}function m(I,T,C){const x=I.computation.abort(T);isPromise(x)&&C.push(x);const w=o.get(I);if(w)for(const E of w.childStreams)g(E,T,C)}function g(I,T,C){const x=I.queue.abort(T);isPromise(x)&&C.push(x)}function _(I,T){if(!I)return{newGroups:[],newStreams:[]};const{groups:C,tasks:x,streams:w}=I,E=C?S(C,T):[];if(x)for(const G of x)O(G);const q=w?M(w,T):[];return{newGroups:E,newStreams:q}}function S(I,T){const C=new Set(I),x=new Set,w=[];for(const E of I)N(E,C,w,x,T);return w}function N(I,T,C,x,w){if(x.has(I))return;x.add(I);const E=I.parent;E!==void 0&&T.has(E)&&N(E,T,C,x,w);const q={childGroups:[],tasks:new Set,pending:0};i.set(I,q),w===void 0&&!E?C.push(I):E&&i.get(E)?.childGroups.push(I)}function O(I){for(const T of I.groups){const C=i.get(T);C&&(C.tasks.add(I),C.pending++,n.has(T)&&P(I))}}function M(I,T){if(!T)return I;const C=o.get(T);return C&&C.childStreams.push(...I),[]}function F(I,T=[]){for(const C of I){const x=i.get(C);x&&(x.pending===0?(i.delete(C),F(x.childGroups,T)):T.push(C))}return T}function L(I,T){for(const C of I)n.add(C),k(C);for(const C of T)a.add(C),U(C)}function k(I){const T=i.get(I);if(T)for(const C of T.tasks)P(C)}function P(I){if(!o.has(I)){o.set(I,{value:void 0,childStreams:[]});try{const T=I.computation.result();isPromise(T)?T.then(C=>{s({kind:"TASK_SUCCESS",task:I,result:C})},C=>{s({kind:"TASK_FAILURE",task:I,error:C})}):s({kind:"TASK_SUCCESS",task:I,result:T})}catch(T){s({kind:"TASK_FAILURE",task:I,error:T})}}}async function U(I){try{await I.queue.forEachBatch(async T=>{const C=s({kind:"STREAM_ITEMS",stream:I,items:T});isPromise(C)&&await C}),s({kind:"STREAM_SUCCESS",stream:I})}catch(T){s({kind:"STREAM_FAILURE",stream:I,error:T})}}function B(I){const T=[];for(const C of I)switch(C.kind){case"TASK_SUCCESS":T.push(...j(C));break;case"TASK_FAILURE":T.push(...$(C));break;case"STREAM_ITEMS":T.push(...A(C));break;case"STREAM_SUCCESS":a.has(C.stream)&&(a.delete(C.stream),T.push(C));break;case"STREAM_FAILURE":a.delete(C.stream),T.push(C);break}return n.size===0&&a.size===0&&(l(),T.push({kind:"WORK_QUEUE_TERMINATION"})),T.length>0?T:void 0}function j(I){const{task:T,result:C}=I,{value:x,work:w}=C,E=o.get(T);E&&(E.value=x),_(w,T);const q=[],G=[],z=[];for(const H of T.groups){const V=i.get(H);if(V&&(V.pending--,n.has(H)&&V.pending===0)){const{groupValuesEvent:K,groupSuccessEvent:Z,newGroups:re,newStreams:W}=R(H,V);K&&q.push(K),q.push(Z),G.push(...re),z.push(...W)}}return L(G,z),q}function $(I){const{task:T,error:C}=I;o.delete(T);const x=[];for(const w of T.groups){const E=i.get(w);E&&x.push(y(w,E,C))}return x}function A(I){const{stream:T,items:C}=I,x=[],w=[],E=[];for(const{value:G,work:z}of C){const{newGroups:H,newStreams:V}=_(z),K=F(H);L(K,V),x.push(G),w.push(...K),E.push(...V)}const q={kind:"STREAM_VALUES",stream:T,values:x,newGroups:w,newStreams:E};return T.queue.isStopped()?(a.delete(T),[q,{kind:"STREAM_SUCCESS",stream:T}]):[q]}function R(I,T){i.delete(I);const C=[],x=[];for(const E of T.tasks){const q=o.get(E);if(q){const{value:G,childStreams:z}=q;G!==void 0&&C.push(G);for(const H of z)x.push(H);D(E)}}const w=F(T.childGroups);return n.delete(I),{groupValuesEvent:C.length?{kind:"GROUP_VALUES",group:I,values:C}:void 0,groupSuccessEvent:{kind:"GROUP_SUCCESS",group:I,newGroups:w,newStreams:x},newGroups:w,newStreams:x}}function y(I,T,C){return b(I,T),n.delete(I),{kind:"GROUP_FAILURE",group:I,error:C}}function b(I,T){i.delete(I);for(const C of T.tasks)C.groups.every(x=>!i.has(x))&&D(C);for(const C of T.childGroups){const x=i.get(C);x&&b(C,x)}}function D(I){for(const T of I.groups)i.get(T)?.tasks.delete(I);o.delete(I)}}class IncrementalPublisher{constructor(){this._ids=new Map,this._nextId=0}buildResponse(n,a,i,o,s){const{initialGroups:l,initialStreams:f,events:d}=createWorkQueue(i);function u(){m.throw(o?.reason).catch(()=>{})}o&&o.addEventListener("abort",u);const c=()=>{s(),o?.removeEventListener("abort",u)},v=this._toPendingResults(l,f),h=a.length?{errors:a,data:n,pending:v,hasNext:!0}:{data:n,pending:v,hasNext:!0},m=withConcurrentAbruptClose(mapAsyncIterable(d,g=>this._handleBatch(g,c)),()=>c());return{initialResult:h,subsequentResults:m}}_ensureId(n){let a=this._ids.get(n);return a!==void 0||(a=String(this._nextId++),this._ids.set(n,a)),a}_toPendingResults(n,a){const i=[];for(const o of[n,a])for(const s of o){const f={id:this._ensureId(s),path:pathToArray(s.path)};s.label!==void 0&&(f.label=s.label),i.push(f)}return i}_handleBatch(n,a){const i={pending:[],incremental:[],completed:[],hasNext:!0};for(const u of n)this._handleWorkQueueEvent(u,i,a);const{incremental:o,completed:s,pending:l,hasNext:f}=i,d={hasNext:f};return l.length>0&&(d.pending=l),o.length>0&&(d.incremental=o),s.length>0&&(d.completed=s),d}_handleWorkQueueEvent(n,a,i){switch(n.kind){case"GROUP_VALUES":{const o=n.group,s=this._ensureId(o);for(const l of n.values){const{bestId:f,subPath:d}=this._getBestIdAndSubPath(s,o,l),u={id:f,data:l.data};l.errors!==void 0&&(u.errors=l.errors),d!==void 0&&(u.subPath=d),a.incremental.push(u)}break}case"GROUP_SUCCESS":{const o=n.group,s=this._ensureId(o);a.completed.push({id:s}),this._ids.delete(o),(n.newGroups.length>0||n.newStreams.length>0)&&a.pending.push(...this._toPendingResults(n.newGroups,n.newStreams));break}case"GROUP_FAILURE":{const{group:o,error:s}=n,l=this._ensureId(o);a.completed.push({id:l,errors:[ensureGraphQLError(s)]}),this._ids.delete(o);break}case"STREAM_VALUES":{const o=n.stream,s=this._ensureId(o),{values:l,newGroups:f,newStreams:d}=n,u=[],c=[];for(const v of l)u.push(v.item),v.errors!==void 0&&c.push(...v.errors);a.incremental.push(c.length>0?{id:s,items:u,errors:c}:{id:s,items:u}),(f.length>0||d.length>0)&&a.pending.push(...this._toPendingResults(f,d));break}case"STREAM_SUCCESS":{const o=n.stream;a.completed.push({id:this._ensureId(o)}),this._ids.delete(o);break}case"STREAM_FAILURE":{const o=n.stream;a.completed.push({id:this._ensureId(o),errors:[ensureGraphQLError(n.error)]}),this._ids.delete(o);break}case"WORK_QUEUE_TERMINATION":{i?.(),a.hasNext=!1;break}}}_getBestIdAndSubPath(n,a,i){let o=pathToArray(a.path).length,s=n;for(const f of i.deliveryGroups){if(f===a)continue;const d=this._ids.get(f);if(d===void 0)continue;const c=pathToArray(f.path).length;c>o&&(o=c,s=d)}const l=i.path.slice(o);return{bestId:s,subPath:l.length>0?l:void 0}}}const buildExecutionPlanFromInitial=memoize1(r=>buildExecutionPlan(r)),buildExecutionPlanFromDeferred=memoize2((r,n)=>buildExecutionPlan(r,n));class IncrementalExecutor extends Executor{constructor(n,a,i){super(n,a),this.deferUsageSet=i,this.groups=[],this.tasks=[],this.streams=[]}getCreateSubExecutor(){const n=this.validatedExecutionArgs,a=this.sharedExecutionContext;return i=>new IncrementalExecutor(n,a,i)}abort(n){super.abort(n);for(const a of this.tasks){const i=a.computation.abort(n);isPromise(i)&&invariant()}for(const a of this.streams){const i=a.queue.abort(n);isPromise(i)&&invariant()}}buildResponse(n){const a=this.getIncrementalWork(),{tasks:i,streams:o}=a;if(i?.length===0&&o?.length===0)return super.buildResponse(n);const s=this.collectedErrors.errors;return n===null&&invariant(),new IncrementalPublisher().buildResponse(n,s,a,this.validatedExecutionArgs.externalAbortSignal,this.getFinishSharedExecution())}executeCollectedRootFields(n,a,i,o,s){if(s.length===0)return this.executeRootGroupedFieldSet(n,a,i,o,void 0);this.validatedExecutionArgs.operation.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`.");const{newDeliveryGroups:l,newDeliveryGroupMap:f}=this.getNewDeliveryGroupMap(s,void 0,void 0),{groupedFieldSet:d,newGroupedFieldSets:u}=this.buildRootExecutionPlan(i),c=this.executeRootGroupedFieldSet(n,a,d,o,f);return this.groups.push(...l),u.size>0&&this.collectExecutionGroups(n,a,void 0,u,f),c}buildRootExecutionPlan(n){return buildExecutionPlanFromInitial(n)}executeCollectedSubfields(n,a,i,o,s,l){if(s.length>0&&this.validatedExecutionArgs.operation.operation===OperationTypeNode.SUBSCRIPTION&&invariant(!1,"`@defer` directive not supported on subscription operations. Disable `@defer` by setting the `if` argument to `false`."),l===void 0&&s.length===0)return this.executeFields(n,a,i,o,l);const{newDeliveryGroups:f,newDeliveryGroupMap:d}=this.getNewDeliveryGroupMap(s,l,i),{groupedFieldSet:u,newGroupedFieldSets:c}=this.buildSubExecutionPlan(o),v=this.executeFields(n,a,i,u,d);return this.groups.push(...f),c.size>0&&this.collectExecutionGroups(n,a,i,c,d),v}buildSubExecutionPlan(n){return this.deferUsageSet===void 0?buildExecutionPlanFromInitial(n):buildExecutionPlanFromDeferred(n,this.deferUsageSet)}collectExecutionGroups(n,a,i,o,s){const l=this.getCreateSubExecutor();for(const[f,d]of o){const u=getDeliveryGroups(f,s),c=l(f),v={groups:u,path:i,computation:new Computation(()=>c.executeExecutionGroup(u,n,a,i,d,s),m=>c.abort(m))},h=this.deferUsageSet;this.validatedExecutionArgs.enableEarlyExecution&&(this.shouldDefer(h,f)?Promise.resolve().then(()=>v.computation.prime()):v.computation.prime()),this.tasks.push(v)}}executeExecutionGroup(n,a,i,o,s,l){let f;try{f=this.executeFields(a,i,o,s,l)}catch(d){throw this.abort(),d}return isPromise(f)?f.then(d=>this.buildExecutionGroupResult(n,o,d),d=>{throw this.abort(),d}):this.buildExecutionGroupResult(n,o,f)}buildExecutionGroupResult(n,a,i){const o=i,s=this.collectedErrors.errors;return this.finish({value:s.length?{deliveryGroups:n,path:pathToArray(a),errors:s,data:o}:{deliveryGroups:n,path:pathToArray(a),data:o},work:this.getIncrementalWork()})}getIncrementalWork(){const{groups:n,tasks:a,streams:i,collectedErrors:o}=this;if(o.errors.length===0)return{groups:n,tasks:a,streams:i};const s=new Error("Cancelled secondary to null within original result"),l=[];for(const d of a)if(o.hasNulledPosition(d.path)){const u=d.computation.abort(s);isPromise(u)&&invariant()}else l.push(d);const f=[];for(const d of i)if(o.hasNulledPosition(d.path)){const u=d.queue.abort(s);isPromise(u)&&invariant()}else f.push(d);return{groups:n,tasks:l,streams:f}}getNewDeliveryGroupMap(n,a,i){const o=[],s=new Map(a);for(const l of n){const f=l.parentDeferUsage,d=f===void 0?void 0:deliveryGroupFromDeferUsage(f,s),u={path:i,label:l.label,parent:d};o.push(u),s.set(l,u)}return{newDeliveryGroups:o,newDeliveryGroupMap:s}}shouldDefer(n,a){return n===void 0||!Array.from(a).every(i=>n.has(i))}handleStream(n,a,i,o,s,l){const{handle:f,isAsync:d}=i,u=this.buildStreamItemQueue(n,a,f,o.fieldDetailsList,s,l,d),c={label:o.label,path:a,queue:u,initialCount:n};return this.streams.push(c),!0}buildStreamItemQueue(n,a,i,o,s,l,f){const d=this.getCreateSubExecutor(),{enableEarlyExecution:u}=this.validatedExecutionArgs,c=this.sharedExecutionContext;return new Queue(async({push:h,stop:m,onStop:g,started:_})=>{const S=new Set;let N=!1,O=!1;if(g(F=>{if(O=!0,!N){for(const L of S)L(F);f?c.asyncWorkTracker.add(returnIteratorCatchingErrors(i)):c.asyncWorkTracker.addValues(collectIteratorPromises(i))}}),await(u?Promise.resolve():_),O)return;let M=n;for(;;){let F;try{if(f){if(F=await i.next(),O)return}else F=i.next()}catch(B){throw locatedError(B,toNodes$1(o),pathToArray(a))}if(F.done){N=!0;const B=m();isPromise(B)&&B.catch(()=>{});return}const L=addPath(a,M,void 0),k=d();let P=k.completeStreamItem(L,F.value,o,s,l);if(isPromise(P)){if(u){const B=j=>k.abort(j);S.add(B),P=P.finally(()=>{S.delete(B)})}else if(P=await P,O)return}const U=h(P);if(isPromise(U)&&(await U,O))return;M+=1}},100)}completeStreamItem(n,a,i,o,s){if(isPromiseLike(a))return this.completePromisedValue(s,i,o,n,a,void 0).then(f=>this.buildStreamItemResult(f),f=>(this.handleFieldError(f,s,i,n),this.buildStreamItemResult(null))).then(void 0,f=>{throw this.abort(),f});let l;try{try{l=this.completeValue(s,i,o,n,a,void 0)}catch(f){return this.handleFieldError(f,s,i,n),this.buildStreamItemResult(null)}}catch(f){throw this.abort(),f}return isPromise(l)?l.then(f=>this.buildStreamItemResult(f),f=>(this.handleFieldError(f,s,i,n),this.buildStreamItemResult(null))).then(void 0,f=>{throw this.abort(),f}):this.buildStreamItemResult(l)}buildStreamItemResult(n){const a=n,i=this.collectedErrors.errors,o=this.getIncrementalWork();return this.finish(i.length>0?{value:{item:a,errors:i},work:o}:{value:{item:a},work:o})}}function toNodes$1(r){return r.map(n=>n.node)}function getDeliveryGroups(r,n){return Array.from(r).map(a=>deliveryGroupFromDeferUsage(a,n))}function deliveryGroupFromDeferUsage(r,n){return n.get(r)}const UNEXPECTED_EXPERIMENTAL_DIRECTIVES="The provided schema unexpectedly contains experimental directives (@defer or @stream). These directives may only be utilized if experimental execution features are explicitly enabled.";function execute(r){return shouldTrace(executeChannel)?traceMixed(executeChannel,buildOperationContextFromArgs(r),()=>executeImpl(r)):executeImpl(r)}function buildOperationContextFromArgs(r){let n;const a=()=>(n===void 0&&(n=getOperationAST(r.document,r.operationName)),n);return{schema:r.schema,document:r.document,rawVariableValues:r.variableValues,get operationName(){return r.operationName??a()?.name?.value},get operationType(){return a()?.operation}}}function executeImpl(r){if(r.schema.getDirective("defer")||r.schema.getDirective("stream"))throw new Error(UNEXPECTED_EXPERIMENTAL_DIRECTIVES);const n=validateExecutionArgs(r);return"schema"in n?executeRootSelectionSet(n):{errors:n}}function experimentalExecuteIncrementally(r){return shouldTrace(executeChannel)?traceMixed(executeChannel,buildOperationContextFromArgs(r),()=>experimentalExecuteIncrementallyImpl(r)):experimentalExecuteIncrementallyImpl(r)}function experimentalExecuteIncrementallyImpl(r){const n=validateExecutionArgs(r);return"schema"in n?experimentalExecuteRootSelectionSet(n):{errors:n}}function executeRootSelectionSet(r){return new ExecutorThrowingOnIncremental(r).executeRootSelectionSet()}function experimentalExecuteRootSelectionSet(r){return new IncrementalExecutor(r).executeRootSelectionSet()}function executeSync(r){const n=experimentalExecuteIncrementally(r);if(isPromise(n)||"initialResult"in n)throw new Error("GraphQL execution failed to complete synchronously.");return n}function executeSubscriptionEvent(r){return new ExecutorThrowingOnIncremental(r).executeRootSelectionSet(!1)}function subscribe(r){return shouldTrace(subscribeChannel)?traceMixed(subscribeChannel,buildOperationContextFromArgs(r),()=>subscribeImpl(r)):subscribeImpl(r)}function subscribeImpl(r){const n=validateSubscriptionArgs(r);if(!("schema"in n))return{errors:n};const a=createSourceEventStream(n);return isPromise(a)?a.then(i=>isAsyncIterable(i)?mapSourceToResponseEvent(n,i):i):isAsyncIterable(a)?mapSourceToResponseEvent(n,a):a}function createSourceEventStream(r){if(!("operation"in r))throw new GraphQLError("Passing ExecutionArgs to createSourceEventStream() was removed in graphql-js@17.0.0; call validateSubscriptionArgs() first and pass the result instead, or use subscribe() for the full subscription pipeline.");try{const n=executeSubscription(r);return isPromise(n)?n.then(void 0,a=>({errors:[ensureGraphQLError(a)]})):n}catch(n){return{errors:[ensureGraphQLError(n)]}}}function validateExecutionArgs(r){const{schema:n,document:a,rootValue:i,contextValue:o,variableValues:s,operationName:l,fieldResolver:f,typeResolver:d,subscribeFieldResolver:u,abortSignal:c,enableEarlyExecution:v,hooks:h,options:m}=r;assertValidSchema(n);let g;const _=Object.create(null),S=Object.create(null),N=[];for(const B of a.definitions)switch(B.kind){case OPERATION_DEFINITION:if(l==null){if(g!==void 0)return[new GraphQLError("Must provide operation name if query contains multiple operations.")];g=B}else B.name?.value===l&&(g=B);break;case FRAGMENT_DEFINITION:{_[B.name.value]=B;let j;if(B.variableDefinitions){const $=Object.create(null);for(const A of B.variableDefinitions){const R=getVariableSignature(n,A);if(R instanceof GraphQLError){N.push(R);continue}$[R.name]=R}j=$}S[B.name.value]={definition:B,variableSignatures:j};break}}if(!g)return l!=null?[new GraphQLError(`Unknown operation named "${l}".`)]:[new GraphQLError("Must provide an operation.")];if(N.length>0)return N;const O=g.variableDefinitions??[],M=r.hideSuggestions??!1,F=s??{},L={maxErrors:m?.maxCoercionErrors??50,hideSuggestions:M},k=executeVariableCoercionChannel,P=shouldTrace(k)?traceMixed(k,{schema:n,document:a,operation:g,rawVariableValues:s,operationName:g.name?.value,operationType:g.operation},()=>getVariableValues(n,O,F,L)):getVariableValues(n,O,F,L);if(P.errors)return P.errors;const U=!g.directives?.find(B=>B.name.value===GraphQLDisableErrorPropagationDirective.name);return{schema:n,document:a,fragmentDefinitions:_,fragments:S,rootValue:i,contextValue:o,operation:g,variableValues:P.variableValues,fieldResolver:f??defaultFieldResolver,typeResolver:d??defaultTypeResolver,subscribeFieldResolver:u??defaultFieldResolver,hideSuggestions:M,errorPropagation:U,externalAbortSignal:c??void 0,enableEarlyExecution:v===!0,hooks:h??void 0,rawVariableValues:s}}function validateSubscriptionArgs(r){const n=validateExecutionArgs(r);return"schema"in n&&assertSubscriptionExecutionArgs(n),n}function assertSubscriptionExecutionArgs(r){if(!isSubscriptionOperationDefinitionNode(r.operation))throw new GraphQLError("Expected subscription operation.")}const defaultTypeResolver=function(r,n,a,i){if(isObjectLike(r)&&typeof r.__typename=="string")return r.__typename;const o=a.schema.getPossibleTypes(i),s=[];try{for(let l=0;l<o.length;l++){const f=o[l];if(f.isTypeOf){const d=f.isTypeOf(r,n,a);if(isPromiseLike(d))s[l]=d;else if(d)return s.length&&a.getAsyncHelpers().track(s),f.name}}}catch(l){throw s.length&&a.getAsyncHelpers().track(s),l}if(s.length)return a.getAsyncHelpers().promiseAll(s).then(l=>{for(let f=0;f<l.length;f++)if(l[f])return o[f].name})},defaultFieldResolver=function(r,n,a,i){if(isObjectLike(r)||typeof r=="function"){const o=r[i.fieldName];return typeof o=="function"?r[i.fieldName](n,a,i):o}};function mapSourceToResponseEvent(r,n,a=executeSubscriptionEvent){function i(s){const l={...r,rootValue:s};return a(l)}const o=r.externalAbortSignal;if(o){const s=mapAsyncIterable(n,i);return{...s,next:()=>cancellablePromise(s.next(),o)}}return mapAsyncIterable(n,i)}function executeSubscription(r){const{schema:n,fragments:a,rootValue:i,contextValue:o,operation:s,variableValues:l,hideSuggestions:f,externalAbortSignal:d}=r,u=n.getSubscriptionType();if(u==null)throw new GraphQLError("Schema is not configured to execute subscription operation.",{nodes:s});const{groupedFieldSet:c}=collectFields(n,a,l,u,s.selectionSet,f),v=c.entries().next().value,[h,m]=v,g=m[0],_=g.node,S=_.name.value,N=n.getField(u,S),O=m.map(k=>k.node);if(!N)throw new GraphQLError(`The subscription field "${S}" is not defined.`,{nodes:O});const M=createSharedExecutionContext(d),F=addPath(void 0,h,u.name),L=buildResolveInfo(r,N,O,u,F,M.getAbortSignal,M.getAsyncHelpers);try{const k=getArgumentValues(N,_,l,g.fragmentVariableValues,f),U=(N.subscribe??r.subscribeFieldResolver)(i,k,o,L);if(isPromiseLike(U)){const B=Promise.resolve(U);return(d?cancellablePromise(B,d):B).then(assertEventStream).then(void 0,$=>{throw locatedError($,toNodes(m),pathToArray(F))})}return assertEventStream(U)}catch(k){throw locatedError(k,O,pathToArray(F))}}function assertEventStream(r){if(r instanceof Error)throw r;if(!isAsyncIterable(r))throw new GraphQLError(`Subscription field must return Async Iterable. Received: ${inspect(r)}.`);return r}function toNodes(r){return r.map(n=>n.node)}const defaultHarness={parse,validate,execute,subscribe};function graphql$1(r){return new Promise(n=>n(graphqlImpl(r)))}function graphqlSync(r){const n=graphqlImpl(r);if(isPromise(n))throw new Error("GraphQL execution failed to complete synchronously.");return n}function graphqlImpl(r){const n=r.harness??defaultHarness,{schema:a,source:i}=r,o=validateSchema(a);if(o.length>0)return{errors:o};let s;try{s=n.parse(i,r)}catch(l){return{errors:[ensureGraphQLError(l)]}}return isPromise(s)?s.then(l=>validateAndExecute(n,r,a,l),l=>({errors:[ensureGraphQLError(l)]})):validateAndExecute(n,r,a,s)}function validateAndExecute(r,n,a,i){const o=r.validate(a,i,n.rules,n);return isPromise(o)?o.then(s=>checkValidationAndExecute(r,n,s,i)):checkValidationAndExecute(r,n,o,i)}function checkValidationAndExecute(r,n,a,i){return a.length>0?{errors:a}:r.execute({...n,document:i})}class BranchingIncrementalPublisher{constructor(){this._indices=new Map}buildResponse(n,a,i,o,s){const{initialStreams:l,events:f}=createWorkQueue(i);for(const h of l)this._indices.set(h,h.initialCount);function d(){v.throw(o?.reason).catch(()=>{})}o&&o.addEventListener("abort",d);const u=()=>{s(),o?.removeEventListener("abort",d)},c=a.length?{errors:a,data:n,hasNext:!0}:{data:n,hasNext:!0},v=withConcurrentAbruptClose(mapAsyncIterable(f,h=>this._handleBatch(h,u)),()=>u());return{initialResult:c,subsequentResults:v}}_handleBatch(n,a){const i={incremental:[],hasNext:!0};for(const f of n)this._handleWorkQueueEvent(f,i,a);const{incremental:o,hasNext:s}=i,l={hasNext:s};return o.length>0&&(l.incremental=o),l}_handleWorkQueueEvent(n,a,i){switch(n.kind){case"GROUP_VALUES":{const o=n.group;for(const s of n.values)a.incremental.push(buildIncrementalResult({data:s.data,path:pathToArray(o.path)},o.label,s.errors));break}case"GROUP_SUCCESS":break;case"GROUP_FAILURE":{const o=n.group;a.incremental.push(buildIncrementalResult({data:null,path:pathToArray(o.path)},o.label,[ensureGraphQLError(n.error)]));break}case"STREAM_VALUES":{const o=n.stream,{values:s}=n,l=[],f=[];for(const u of s)l.push(u.item),u.errors!==void 0&&f.push(...u.errors);let d=this._indices.get(o);d===void 0&&(d=o.initialCount,this._indices.set(o,d)),this._indices.set(o,d+l.length),a.incremental.push(buildIncrementalResult({items:l,path:pathToArray(addPath(o.path,d,void 0))},o.label,f.length>0?f:void 0));break}case"STREAM_SUCCESS":{this._indices.delete(n.stream);break}case"STREAM_FAILURE":{this._indices.delete(n.stream);const o=n.stream;a.incremental.push(buildIncrementalResult({items:null,path:pathToArray(o.path)},o.label,[ensureGraphQLError(n.error)]));break}case"WORK_QUEUE_TERMINATION":{i?.(),a.hasNext=!1;break}}}}function buildIncrementalResult(r,n,a){const i=r;return a!==void 0&&(i.errors=a),n!==void 0&&(i.label=n),i}const buildBranchingExecutionPlanFromInitial=memoize1(r=>buildBranchingExecutionPlan(r)),buildBranchingExecutionPlanFromDeferred=memoize2((r,n)=>buildBranchingExecutionPlan(r,n));class BranchingIncrementalExecutor extends IncrementalExecutor{getCreateSubExecutor(){const n=this.validatedExecutionArgs,a=this.sharedExecutionContext;return i=>new BranchingIncrementalExecutor(n,a,i)}buildResponse(n){const a=this.getIncrementalWork(),{tasks:i,streams:o}=a;if(i?.length===0&&o?.length===0)return super.buildResponse(n);const s=this.collectedErrors.errors;return n===null&&invariant(),new BranchingIncrementalPublisher().buildResponse(n,s,a,this.validatedExecutionArgs.externalAbortSignal,this.getFinishSharedExecution())}buildRootExecutionPlan(n){return buildBranchingExecutionPlanFromInitial(n)}buildSubExecutionPlan(n){return this.deferUsageSet===void 0?buildBranchingExecutionPlanFromInitial(n):buildBranchingExecutionPlanFromDeferred(n,this.deferUsageSet)}}function buildBranchingExecutionPlan(r,n=new Set){const a=new AccumulatorMap,i=new Map;for(const[o,s]of r)for(const l of s){const f=l.deferUsage,d=f===void 0?new Set:new Set([f]);if(isSameSet(n,d))a.add(o,l);else{let u=getBySet(i,d);u===void 0&&(u=new AccumulatorMap,i.set(d,u)),u.add(o,l)}}return{groupedFieldSet:a,newGroupedFieldSets:i}}function legacyExecuteIncrementally(r){const n=validateExecutionArgs(r);return"schema"in n?legacyExecuteRootSelectionSet(n):{errors:n}}function legacyExecuteRootSelectionSet(r){return new BranchingIncrementalExecutor(r).executeRootSelectionSet()}function NoDeprecatedCustomRule(r){return{Field(n){const a=r.getFieldDef(),i=a?.deprecationReason;a&&i!=null&&r.reportError(new GraphQLError(`The field ${a} is deprecated. ${i}`,{nodes:n}))},Argument(n){const a=r.getArgument(),i=a?.deprecationReason;a&&i!=null&&r.reportError(new GraphQLError(`The argument "${a}" is deprecated. ${i}`,{nodes:n}))},ObjectField(n){const a=getNamedType(r.getParentInputType());if(isInputObjectType(a)){const i=a.getFields()[n.name.value],o=i?.deprecationReason;o!=null&&r.reportError(new GraphQLError(`The input field ${i} is deprecated. ${o}`,{nodes:n}))}},EnumValue(n){const a=r.getEnumValue(),i=a?.deprecationReason;a&&i!=null&&r.reportError(new GraphQLError(`The enum value "${a}" is deprecated. ${i}`,{nodes:n}))}}}function NoSchemaIntrospectionCustomRule(r){return{Field(n){const a=getNamedType(r.getType());a&&isIntrospectionType(a)&&r.reportError(new GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${n.name.value}".`,{nodes:n}))}}}function getIntrospectionQuery$1(r){const n={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,experimentalDirectiveDeprecation:!1,oneOf:!1,typeDepth:9,...r},a=n.descriptions?"description":"",i=n.specifiedByUrl?"specifiedByURL":"",o=n.directiveIsRepeatable?"isRepeatable":"",s=n.schemaDescription?a:"";function l(c){return n.inputValueDeprecation?c:""}function f(c){return n.experimentalDirectiveDeprecation?c:""}const d=n.oneOf?"isOneOf":"";function u(c,v){if(c<=0)return"";if(c>100)throw new Error("Please set typeDepth to a reasonable value between 0 and 100; the default is 9.");return`
132
+ ${v}ofType {
133
+ ${v} name
134
+ ${v} kind${u(c-1,v+" ")}
135
+ ${v}}`}return`
136
+ query IntrospectionQuery {
137
+ __schema {
138
+ ${s}
139
+ queryType { name kind }
140
+ mutationType { name kind }
141
+ subscriptionType { name kind }
142
+ types {
143
+ ...FullType
144
+ }
145
+ directives${f("(includeDeprecated: true)")} {
146
+ name
147
+ ${a}
148
+ ${o}
149
+ ${f("isDeprecated")}
150
+ ${f("deprecationReason")}
151
+ locations
152
+ args${l("(includeDeprecated: true)")} {
153
+ ...InputValue
154
+ }
155
+ }
156
+ }
157
+ }
158
+
159
+ fragment FullType on __Type {
160
+ kind
161
+ name
162
+ ${a}
163
+ ${i}
164
+ ${d}
165
+ fields(includeDeprecated: true) {
166
+ name
167
+ ${a}
168
+ args${l("(includeDeprecated: true)")} {
169
+ ...InputValue
170
+ }
171
+ type {
172
+ ...TypeRef
173
+ }
174
+ isDeprecated
175
+ deprecationReason
176
+ }
177
+ inputFields${l("(includeDeprecated: true)")} {
178
+ ...InputValue
179
+ }
180
+ interfaces {
181
+ ...TypeRef
182
+ }
183
+ enumValues(includeDeprecated: true) {
184
+ name
185
+ ${a}
186
+ isDeprecated
187
+ deprecationReason
188
+ }
189
+ possibleTypes {
190
+ ...TypeRef
191
+ }
192
+ }
193
+
194
+ fragment InputValue on __InputValue {
195
+ name
196
+ ${a}
197
+ type { ...TypeRef }
198
+ defaultValue
199
+ ${l("isDeprecated")}
200
+ ${l("deprecationReason")}
201
+ }
202
+
203
+ fragment TypeRef on __Type {
204
+ kind
205
+ name${u(n.typeDepth," ")}
206
+ }
207
+ `}function introspectionFromSchema(r,n){const a={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,experimentalDirectiveDeprecation:!0,oneOf:!0,...n},i=parse(getIntrospectionQuery$1(a)),o=executeSync({schema:r,document:i});return o.errors==null&&o.data!=null||invariant(),o.data}function buildClientSchema(r,n){isObjectLike(r)&&isObjectLike(r.__schema)||devAssert(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${inspect(r)}.`);const a=r.__schema,i=new Map(a.types.map(B=>[B.name,h(B)]));for(const B of[...specifiedScalarTypes,...introspectionTypes])i.has(B.name)&&i.set(B.name,B);const o=a.queryType!=null?c(a.queryType):null,s=a.mutationType!=null?c(a.mutationType):null,l=a.subscriptionType!=null?c(a.subscriptionType):null,f=a.directives!=null?a.directives.map(U):[];return new GraphQLSchema({description:a.description,query:o,mutation:s,subscription:l,types:[...i.values()],directives:f,assumeValid:n?.assumeValid});function d(B){if(B.kind===TypeKind.LIST){const j=B.ofType;if(j==null)throw new Error("Decorated type deeper than introspection query.");return new GraphQLList(d(j))}if(B.kind===TypeKind.NON_NULL){const j=B.ofType;if(j==null)throw new Error("Decorated type deeper than introspection query.");const $=d(j);return new GraphQLNonNull(assertNullableType($))}return u(B)}function u(B){const j=B.name;if(!j)throw new Error(`Unknown type reference: ${inspect(B)}.`);const $=i.get(j);if($==null)throw new Error(`Invalid or incomplete schema, unknown type: ${j}. Ensure that a full introspection query is used in order to build a client schema.`);return $}function c(B){return assertObjectType(u(B))}function v(B){return assertInterfaceType(u(B))}function h(B){switch(B.kind){case TypeKind.SCALAR:return m(B);case TypeKind.OBJECT:return _(B);case TypeKind.INTERFACE:return S(B);case TypeKind.UNION:return N(B);case TypeKind.ENUM:return O(B);case TypeKind.INPUT_OBJECT:return M(B);default:throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${inspect(B)}.`)}}function m(B){return new GraphQLScalarType({name:B.name,description:B.description,specifiedByURL:B.specifiedByURL})}function g(B){if(B.interfaces===null&&B.kind===TypeKind.INTERFACE)return[];if(B.interfaces==null){const j=inspect(B);throw new Error(`Introspection result missing interfaces: ${j}.`)}return B.interfaces.map(v)}function _(B){return new GraphQLObjectType({name:B.name,description:B.description,interfaces:()=>g(B),fields:()=>F(B)})}function S(B){return new GraphQLInterfaceType({name:B.name,description:B.description,interfaces:()=>g(B),fields:()=>F(B)})}function N(B){if(B.possibleTypes==null){const j=inspect(B);throw new Error(`Introspection result missing possibleTypes: ${j}.`)}return new GraphQLUnionType({name:B.name,description:B.description,types:()=>B.possibleTypes.map(c)})}function O(B){if(B.enumValues==null){const j=inspect(B);throw new Error(`Introspection result missing enumValues: ${j}.`)}return new GraphQLEnumType({name:B.name,description:B.description,values:keyValMap(B.enumValues,j=>j.name,j=>({description:j.description,deprecationReason:j.deprecationReason}))})}function M(B){if(B.inputFields==null){const j=inspect(B);throw new Error(`Introspection result missing inputFields: ${j}.`)}return new GraphQLInputObjectType({name:B.name,description:B.description,fields:()=>k(B.inputFields),isOneOf:B.isOneOf})}function F(B){if(B.fields==null)throw new Error(`Introspection result missing fields: ${inspect(B)}.`);return keyValMap(B.fields,j=>j.name,L)}function L(B){const j=d(B.type);if(!isOutputType(j)){const $=inspect(j);throw new Error(`Introspection must provide output type for fields, but received: ${$}.`)}if(B.args==null){const $=inspect(B);throw new Error(`Introspection result missing field args: ${$}.`)}return{description:B.description,deprecationReason:B.deprecationReason,type:j,args:k(B.args)}}function k(B){return keyValMap(B,j=>j.name,P)}function P(B){const j=d(B.type);if(!isInputType(j)){const $=inspect(j);throw new Error(`Introspection must provide input type for arguments, but received: ${$}.`)}return{description:B.description,type:j,default:B.defaultValue!=null?{literal:parseConstValue(B.defaultValue)}:void 0,deprecationReason:B.deprecationReason}}function U(B){if(B.args==null){const j=inspect(B);throw new Error(`Introspection result missing directive args: ${j}.`)}if(B.locations==null){const j=inspect(B);throw new Error(`Introspection result missing directive locations: ${j}.`)}return new GraphQLDirective({name:B.name,description:B.description,isRepeatable:B.isRepeatable,deprecationReason:B.deprecationReason,locations:B.locations.slice(),args:k(B.args)})}}const SchemaElementKind={SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD:"FIELD",ARGUMENT:"ARGUMENT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD:"INPUT_FIELD",DIRECTIVE:"DIRECTIVE"};function mapSchemaConfig(r,n){const a=n({getNamedType:d,setNamedType:u,getNamedTypes:c}),i=new Map;for(const P of r.types){const U=P.name,B=v(P);B&&i.set(U,B)}const o=[];for(const P of r.directives){if(isSpecifiedDirective(P)){o.push(P);continue}const U=k(P.toConfig());U&&o.push(new GraphQLDirective(U))}const s={...r,query:r.query&&d(r.query.name),mutation:r.mutation&&d(r.mutation.name),subscription:r.subscription&&d(r.subscription.name),types:Array.from(i.values()),directives:o},l=a[SchemaElementKind.SCHEMA];return l==null?s:l(s);function f(P){return isListType(P)?new GraphQLList(f(P.ofType)):isNonNullType(P)?new GraphQLNonNull(f(P.ofType)):d(P.name)}function d(P){const U=stdTypeMap$1.get(P)??i.get(P);return U===void 0&&invariant(!1,`Unknown type: "${P}".`),U}function u(P){i.set(P.name,P)}function c(){return Array.from(i.values())}function v(P){if(isIntrospectionType(P)||isSpecifiedScalarType(P))return P;if(isScalarType(P))return h(P);if(isObjectType(P))return m(P);if(isInterfaceType(P))return S(P);if(isUnionType(P))return N(P);if(isEnumType(P))return O(P);if(isInputObjectType(P))return F(P);invariant(!1,"Unexpected type: "+inspect(P))}function h(P){let U=P.toConfig();const B=a[SchemaElementKind.SCALAR];return U=B==null?U:B(U),new GraphQLScalarType(U)}function m(P){const U=P.toConfig();let B={...U,interfaces:()=>U.interfaces.map($=>d($.name)),fields:()=>g(U.fields,P.name)};const j=a[SchemaElementKind.OBJECT];return B=j==null?B:j(B),new GraphQLObjectType(B)}function g(P,U){const B=Object.create(null);for(const[j,$]of Object.entries(P)){let A={...$,type:f($.type),args:_($.args,j,U)};const R=a[SchemaElementKind.FIELD];R&&(A=R(A,U)),B[j]=A}return B}function _(P,U,B){const j=Object.create(null);for(const[$,A]of Object.entries(P)){let R={...A,type:f(A.type)};const y=a[SchemaElementKind.ARGUMENT];y&&(R=y(R,U,B)),j[$]=R}return j}function S(P){const U=P.toConfig();let B={...U,interfaces:()=>U.interfaces.map($=>d($.name)),fields:()=>g(U.fields,P.name)};const j=a[SchemaElementKind.INTERFACE];return B=j==null?B:j(B),new GraphQLInterfaceType(B)}function N(P){const U=P.toConfig();let B={...U,types:()=>U.types.map($=>d($.name))};const j=a[SchemaElementKind.UNION];return B=j==null?B:j(B),new GraphQLUnionType(B)}function O(P){const U=P.toConfig();let B={...U,values:()=>{const $=Object.create(null);for(const[A,R]of Object.entries(U.values)){const y=M(R,A,P.name);$[A]=y}return $}};const j=a[SchemaElementKind.ENUM];return B=j==null?B:j(B),new GraphQLEnumType(B)}function M(P,U,B){const j={...P},$=a[SchemaElementKind.ENUM_VALUE];return $==null?j:$(j,U,B)}function F(P){const U=P.toConfig();let B={...U,fields:()=>{const $=Object.create(null);for(const[A,R]of Object.entries(U.fields)){const y=L(R,A,P.name);$[A]=y}return $}};const j=a[SchemaElementKind.INPUT_OBJECT];return B=j==null?B:j(B),new GraphQLInputObjectType(B)}function L(P,U,B){const j={...P,type:f(P.type)},$=a[SchemaElementKind.INPUT_FIELD];return $==null?j:$(j,U,B)}function k(P){const U={...P,args:_(P.args,P.name,void 0)},B=a[SchemaElementKind.DIRECTIVE];return B==null?U:B(U)}}const stdTypeMap$1=new Map([...specifiedScalarTypes,...introspectionTypes].map(r=>[r.name,r]));function extendSchema(r,n,a){assertSchema(r),a?.assumeValid!==!0&&a?.assumeValidSDL!==!0&&assertValidSDLExtension(n,r);const i=r.toConfig(),o=extendSchemaImpl(i,n,a);return i===o?r:new GraphQLSchema(o)}function extendSchemaImpl(r,n,a){const i=[],o=new AccumulatorMap,s=new AccumulatorMap,l=new AccumulatorMap,f=new AccumulatorMap,d=new AccumulatorMap,u=new AccumulatorMap,c=new AccumulatorMap,v=[];let h;const m=[];let g=!1;for(const _ of n.definitions){switch(_.kind){case SCHEMA_DEFINITION:h=_;break;case SCHEMA_EXTENSION:m.push(_);break;case DIRECTIVE_DEFINITION:v.push(_);break;case DIRECTIVE_EXTENSION:c.add(_.name.value,_);break;case SCALAR_TYPE_DEFINITION:case OBJECT_TYPE_DEFINITION:case INTERFACE_TYPE_DEFINITION:case UNION_TYPE_DEFINITION:case ENUM_TYPE_DEFINITION:case INPUT_OBJECT_TYPE_DEFINITION:i.push(_);break;case SCALAR_TYPE_EXTENSION:o.add(_.name.value,_);break;case OBJECT_TYPE_EXTENSION:s.add(_.name.value,_);break;case INTERFACE_TYPE_EXTENSION:l.add(_.name.value,_);break;case UNION_TYPE_EXTENSION:f.add(_.name.value,_);break;case ENUM_TYPE_EXTENSION:d.add(_.name.value,_);break;case INPUT_OBJECT_TYPE_EXTENSION:u.add(_.name.value,_);break;default:continue}g=!0}return g?mapSchemaConfig(r,_=>{const{getNamedType:S,setNamedType:N,getNamedTypes:O}=_;return{[SchemaElementKind.SCHEMA]:b=>{for(const I of i){const T=stdTypeMap.get(I.name.value)??y(I);N(T)}const D={query:b.query&&S(b.query.name),mutation:b.mutation&&S(b.mutation.name),subscription:b.subscription&&S(b.subscription.name),...h&&M([h]),...M(m)};return{description:h?.description?.value??b.description,...D,types:O(),directives:[...b.directives.map(P),...v.map(k)],extensions:b.extensions,astNode:h??b.astNode,extensionASTNodes:b.extensionASTNodes.concat(m),assumeValid:a?.assumeValid??!1}},[SchemaElementKind.INPUT_OBJECT]:b=>{const D=u.get(b.name)??[];return{...b,fields:()=>({...b.fields(),...j(D)}),extensionASTNodes:b.extensionASTNodes.concat(D)}},[SchemaElementKind.ENUM]:b=>{const D=d.get(b.name)??[];return{...b,values:()=>({...b.values(),...$(D)}),extensionASTNodes:b.extensionASTNodes.concat(D)}},[SchemaElementKind.SCALAR]:b=>{const D=o.get(b.name)??[];let I=b.specifiedByURL;for(const T of D)I=getSpecifiedByURL(T)??I;return{...b,specifiedByURL:I,extensionASTNodes:b.extensionASTNodes.concat(D)}},[SchemaElementKind.OBJECT]:b=>{const D=s.get(b.name)??[];return{...b,interfaces:()=>[...b.interfaces(),...A(D)],fields:()=>({...b.fields(),...U(D)}),extensionASTNodes:b.extensionASTNodes.concat(D)}},[SchemaElementKind.INTERFACE]:b=>{const D=l.get(b.name)??[];return{...b,interfaces:()=>[...b.interfaces(),...A(D)],fields:()=>({...b.fields(),...U(D)}),extensionASTNodes:b.extensionASTNodes.concat(D)}},[SchemaElementKind.UNION]:b=>{const D=f.get(b.name)??[];return{...b,types:()=>[...b.types(),...R(D)],extensionASTNodes:b.extensionASTNodes.concat(D)}}};function M(b){const D={};for(const I of b){const T=I.operationTypes??[];for(const C of T)D[C.operation]=F(C.type)}return D}function F(b){const D=b.name.value,I=S(D);return I===void 0&&invariant(!1,`Unknown type: "${D}".`),I}function L(b){return b.kind===LIST_TYPE?new GraphQLList(L(b.type)):b.kind===NON_NULL_TYPE?new GraphQLNonNull(L(b.type)):F(b)}function k(b){const D=c.get(b.name.value)??[],I=getDeprecationReason(b)??D.map(T=>getDeprecationReason(T)).find(T=>T!=null);return new GraphQLDirective({name:b.name.value,description:b.description?.value,locations:b.locations.map(({value:T})=>T),isRepeatable:b.repeatable,args:B(b.arguments),deprecationReason:I,astNode:b,extensionASTNodes:D})}function P(b){const D=c.get(b.name)??[];if(D.length===0)return b;const I=b.deprecationReason??D.map(T=>getDeprecationReason(T)).find(T=>T!=null);return new GraphQLDirective({...b.toConfig(),deprecationReason:I,extensionASTNodes:b.extensionASTNodes.concat(D)})}function U(b){const D=Object.create(null);for(const I of b){const T=I.fields??[];for(const C of T)D[C.name.value]={type:L(C.type),description:C.description?.value,args:B(C.arguments),deprecationReason:getDeprecationReason(C),astNode:C}}return D}function B(b){const D=b??[],I=Object.create(null);for(const T of D){const C=L(T.type);I[T.name.value]={type:C,description:T.description?.value,default:T.defaultValue&&{literal:T.defaultValue},deprecationReason:getDeprecationReason(T),astNode:T}}return I}function j(b){const D=Object.create(null);for(const I of b){const T=I.fields??[];for(const C of T){const x=L(C.type);D[C.name.value]={type:x,description:C.description?.value,default:C.defaultValue&&{literal:C.defaultValue},deprecationReason:getDeprecationReason(C),astNode:C}}}return D}function $(b){const D=Object.create(null);for(const I of b){const T=I.values??[];for(const C of T)D[C.name.value]={description:C.description?.value,deprecationReason:getDeprecationReason(C),astNode:C}}return D}function A(b){return b.flatMap(D=>D.interfaces?.map(F)??[])}function R(b){return b.flatMap(D=>D.types?.map(F)??[])}function y(b){const D=b.name.value;switch(b.kind){case OBJECT_TYPE_DEFINITION:{const I=s.get(D)??[],T=[b,...I];return new GraphQLObjectType({name:D,description:b.description?.value,interfaces:()=>A(T),fields:()=>U(T),astNode:b,extensionASTNodes:I})}case INTERFACE_TYPE_DEFINITION:{const I=l.get(D)??[],T=[b,...I];return new GraphQLInterfaceType({name:D,description:b.description?.value,interfaces:()=>A(T),fields:()=>U(T),astNode:b,extensionASTNodes:I})}case ENUM_TYPE_DEFINITION:{const I=d.get(D)??[],T=[b,...I];return new GraphQLEnumType({name:D,description:b.description?.value,values:()=>$(T),astNode:b,extensionASTNodes:I})}case UNION_TYPE_DEFINITION:{const I=f.get(D)??[],T=[b,...I];return new GraphQLUnionType({name:D,description:b.description?.value,types:()=>R(T),astNode:b,extensionASTNodes:I})}case SCALAR_TYPE_DEFINITION:{const I=o.get(D)??[];let T=getSpecifiedByURL(b);for(const C of I)T=getSpecifiedByURL(C)??T;return new GraphQLScalarType({name:D,description:b.description?.value,specifiedByURL:T,astNode:b,extensionASTNodes:I})}case INPUT_OBJECT_TYPE_DEFINITION:{const I=u.get(D)??[],T=[b,...I];return new GraphQLInputObjectType({name:D,description:b.description?.value,fields:()=>j(T),astNode:b,extensionASTNodes:I,isOneOf:isOneOf(b)})}}}}):r}const stdTypeMap=new Map([...specifiedScalarTypes,...introspectionTypes].map(r=>[r.name,r]));function getDeprecationReason(r){return getDirectiveValues(GraphQLDeprecatedDirective,r)?.reason}function getSpecifiedByURL(r){return getDirectiveValues(GraphQLSpecifiedByDirective,r)?.url}function isOneOf(r){return!!getDirectiveValues(GraphQLOneOfDirective,r)}function buildASTSchema(r,n){n?.assumeValid!==!0&&n?.assumeValidSDL!==!0&&assertValidSDL(r);const i=extendSchemaImpl({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r,n);if(i.astNode==null)for(const s of i.types)switch(s.name){case"Query":i.query=s;break;case"Mutation":i.mutation=s;break;case"Subscription":i.subscription=s;break}const o=[...i.directives,...specifiedDirectives.filter(s=>i.directives.every(l=>l.name!==s.name))];return new GraphQLSchema({...i,directives:o})}function buildSchema(r,n){const a=parse(r,{noLocation:n?.noLocation,experimentalFragmentArguments:n?.experimentalFragmentArguments});return buildASTSchema(a,{assumeValidSDL:n?.assumeValidSDL,assumeValid:n?.assumeValid})}function lexicographicSortSchema(r){return new GraphQLSchema(mapSchemaConfig(r.toConfig(),()=>({[SchemaElementKind.OBJECT]:n=>({...n,interfaces:()=>sortByName(n.interfaces()),fields:()=>sortObjMap(n.fields())}),[SchemaElementKind.FIELD]:n=>({...n,args:sortObjMap(n.args)}),[SchemaElementKind.INTERFACE]:n=>({...n,interfaces:()=>sortByName(n.interfaces()),fields:()=>sortObjMap(n.fields())}),[SchemaElementKind.UNION]:n=>({...n,types:()=>sortByName(n.types())}),[SchemaElementKind.ENUM]:n=>({...n,values:()=>sortObjMap(n.values())}),[SchemaElementKind.INPUT_OBJECT]:n=>({...n,fields:()=>sortObjMap(n.fields())}),[SchemaElementKind.DIRECTIVE]:n=>({...n,locations:sortBy(n.locations,a=>a),args:sortObjMap(n.args)}),[SchemaElementKind.SCHEMA]:n=>({...n,types:sortByName(n.types),directives:sortByName(n.directives)})})))}function sortObjMap(r){const n=Object.create(null);for(const a of Object.keys(r).sort(naturalCompare))n[a]=r[a];return n}function sortByName(r){return sortBy(r,n=>n.name)}function sortBy(r,n){return r.slice().sort((a,i)=>{const o=n(a),s=n(i);return naturalCompare(o,s)})}function printSchema(r){return printFilteredSchema(r,n=>!isSpecifiedDirective(n),isDefinedType)}function printIntrospectionSchema(r){return printFilteredSchema(r,isSpecifiedDirective,isIntrospectionType)}function isDefinedType(r){return!isSpecifiedScalarType(r)&&!isIntrospectionType(r)}function printFilteredSchema(r,n,a){const i=r.getDirectives().filter(n),o=Object.values(r.getTypeMap()).filter(a);return[printSchemaDefinition(r),...i.map(s=>printDirective(s)),...o.map(s=>printType(s))].filter(Boolean).join(`
208
+
209
+ `)}function printSchemaDefinition(r){const n=r.getQueryType(),a=r.getMutationType(),i=r.getSubscriptionType();if(!(!n&&!a&&!i)&&(r.description!=null||!hasDefaultRootOperationTypes(r)))return printDescription(r)+`schema {
210
+ `+(n?` query: ${n}
211
+ `:"")+(a?` mutation: ${a}
212
+ `:"")+(i?` subscription: ${i}
213
+ `:"")+"}"}function hasDefaultRootOperationTypes(r){return r.getQueryType()==r.getType("Query")&&r.getMutationType()==r.getType("Mutation")&&r.getSubscriptionType()==r.getType("Subscription")}function printType(r){if(isScalarType(r))return printScalar(r);if(isObjectType(r))return printObject(r);if(isInterfaceType(r))return printInterface(r);if(isUnionType(r))return printUnion(r);if(isEnumType(r))return printEnum(r);if(isInputObjectType(r))return printInputObject(r);invariant(!1,"Unexpected type: "+inspect(r))}function printScalar(r){return printDescription(r)+`scalar ${r}`+printSpecifiedByURL(r)}function printImplementedInterfaces(r){const n=r.getInterfaces();return n.length?" implements "+n.map(a=>a.name).join(" & "):""}function printObject(r){return printDescription(r)+`type ${r}`+printImplementedInterfaces(r)+printFields(r)}function printInterface(r){return printDescription(r)+`interface ${r}`+printImplementedInterfaces(r)+printFields(r)}function printUnion(r){const n=r.getTypes(),a=n.length?" = "+n.join(" | "):"";return printDescription(r)+`union ${r.name}`+a}function printEnum(r){const n=r.getValues().map((a,i)=>printDescription(a," ",!i)+" "+a.name+printDeprecated(a.deprecationReason));return printDescription(r)+`enum ${r}`+printBlock(n)}function printInputObject(r){const n=Object.values(r.getFields()).map((a,i)=>printDescription(a," ",!i)+" "+printInputValue(a));return printDescription(r)+`input ${r}`+(r.isOneOf?" @oneOf":"")+printBlock(n)}function printFields(r){const n=Object.values(r.getFields()).map((a,i)=>printDescription(a," ",!i)+" "+a.name+printArgs(a.args," ")+": "+String(a.type)+printDeprecated(a.deprecationReason));return printBlock(n)}function printBlock(r){return r.length!==0?` {
214
+ `+r.join(`
215
+ `)+`
216
+ }`:""}function printArgs(r,n=""){return r.length===0?"":r.every(a=>a.description==null)?"("+r.map(printInputValue).join(", ")+")":`(
217
+ `+r.map((a,i)=>printDescription(a," "+n,!i)+" "+n+printInputValue(a)).join(`
218
+ `)+`
219
+ `+n+")"}function printInputValue(r){let n=r.name+": "+String(r.type);const a=getDefaultValueAST(r);return a&&(n+=` = ${print(a)}`),n+printDeprecated(r.deprecationReason)}function printDirective(r){return printDescription(r)+`directive ${r}`+printArgs(r.args)+printDeprecated(r.deprecationReason)+(r.isRepeatable?" repeatable":"")+" on "+r.locations.join(" | ")}function printDeprecated(r){return r==null?"":r!==DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${print({kind:STRING,value:r})})`:" @deprecated"}function printSpecifiedByURL(r){return r.specifiedByURL==null?"":` @specifiedBy(url: ${print({kind:STRING,value:r.specifiedByURL})})`}function printDescription(r,n="",a=!0){const{description:i}=r;if(i==null)return"";const o=print({kind:STRING,value:i,block:isPrintableAsBlockString(i)});return(n&&!a?`
220
+ `+n:n)+o.replaceAll(`
221
+ `,`
222
+ `+n)+`
223
+ `}function valueFromAST(r,n,a){if(r){if(r.kind===VARIABLE){const i=r.name.value;if(a==null||!Object.hasOwn(a,i))return;const o=a[i];return o===void 0||o===null&&isNonNullType(n)?void 0:o}if(isNonNullType(n))return r.kind===NULL?void 0:valueFromAST(r,n.ofType,a);if(r.kind===NULL)return null;if(isListType(n)){const i=n.ofType;if(r.kind===LIST){const s=[];for(const l of r.values)if(isMissingVariable(l,a)){if(isNonNullType(i))return;s.push(null)}else{const f=valueFromAST(l,i,a);if(f===void 0)return;s.push(f)}return s}const o=valueFromAST(r,i,a);return o===void 0?void 0:[o]}if(isInputObjectType(n)){if(r.kind!==OBJECT)return;const i=Object.create(null),o=n.getFields();if(r.fields.some(f=>!Object.hasOwn(o,f.name.value)))return;const l=new Map(r.fields.map(f=>[f.name.value,f]));for(const f of Object.values(o)){const d=l.get(f.name);if(d==null||isMissingVariable(d.value,a)){if(f.defaultValue!==void 0)i[f.name]=f.defaultValue;else if(isNonNullType(f.type))return;continue}const u=valueFromAST(d.value,f.type,a);if(u===void 0)return;i[f.name]=u}if(n.isOneOf){const f=Object.keys(i);if(l.size!==1||f.length!==1)return;for(const[d,u]of l)if(u.value.kind===NULL||i[d]===null)return}return i}if(isLeafType(n)){let i;try{i=n.parseLiteral(r,a)}catch{return}return i===void 0?void 0:i}invariant(!1,"Unexpected input type: "+inspect(n))}}function isMissingVariable(r,n){return r.kind===VARIABLE&&(n?.[r.name.value]===void 0||!Object.hasOwn(n,r.name.value))}function concatAST(r){const n=[];for(const a of r)n.push(...a.definitions);return{kind:DOCUMENT,definitions:n}}function separateOperations(r){const n=[],a=Object.create(null);for(const o of r.definitions)switch(o.kind){case OPERATION_DEFINITION:n.push(o);break;case FRAGMENT_DEFINITION:a[o.name.value]=collectDependencies(o.selectionSet);break}const i=Object.create(null);for(const o of n){const s=new Set;for(const f of collectDependencies(o.selectionSet))collectTransitiveDependencies(s,a,f);const l=o.name?o.name.value:"";i[l]={kind:DOCUMENT,definitions:r.definitions.filter(f=>f===o||f.kind===FRAGMENT_DEFINITION&&s.has(f.name.value))}}return i}function collectTransitiveDependencies(r,n,a){if(!r.has(a)){r.add(a);const i=n[a];if(i!==void 0)for(const o of i)collectTransitiveDependencies(r,n,o)}}function collectDependencies(r){const n=[];return visit$1(r,{FragmentSpread(a){n.push(a.name.value)}}),n}function stripIgnoredCharacters(r){const n=isSource(r)?r:new Source(r),a=n.body,i=new Lexer(n);let o="",s=!1;for(;i.advance().kind!==TokenKind$1.EOF;){const l=i.token,f=l.kind,d=!isPunctuatorTokenKind(l.kind);s&&(d||l.kind===TokenKind$1.SPREAD)&&(o+=" ");const u=a.slice(l.start,l.end);f===TokenKind$1.BLOCK_STRING?o+=printBlockString(l.value,{minimize:!0}):o+=u,s=d}return o}const BreakingChangeType={TYPE_REMOVED:"TYPE_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",REQUIRED_INPUT_FIELD_ADDED:"REQUIRED_INPUT_FIELD_ADDED",IMPLEMENTED_INTERFACE_REMOVED:"IMPLEMENTED_INTERFACE_REMOVED",FIELD_REMOVED:"FIELD_REMOVED",FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",REQUIRED_ARG_ADDED:"REQUIRED_ARG_ADDED",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",REQUIRED_DIRECTIVE_ARG_ADDED:"REQUIRED_DIRECTIVE_ARG_ADDED",DIRECTIVE_REPEATABLE_REMOVED:"DIRECTIVE_REPEATABLE_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED"},DangerousChangeType={VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",IMPLEMENTED_INTERFACE_ADDED:"IMPLEMENTED_INTERFACE_ADDED",ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE",INPUT_FIELD_DEFAULT_VALUE_CHANGE:"INPUT_FIELD_DEFAULT_VALUE_CHANGE"},SafeChangeType={DESCRIPTION_CHANGED:"DESCRIPTION_CHANGED",TYPE_ADDED:"TYPE_ADDED",OPTIONAL_INPUT_FIELD_ADDED:"OPTIONAL_INPUT_FIELD_ADDED",OPTIONAL_ARG_ADDED:"OPTIONAL_ARG_ADDED",DIRECTIVE_ADDED:"DIRECTIVE_ADDED",FIELD_ADDED:"FIELD_ADDED",DIRECTIVE_REPEATABLE_ADDED:"DIRECTIVE_REPEATABLE_ADDED",DIRECTIVE_LOCATION_ADDED:"DIRECTIVE_LOCATION_ADDED",OPTIONAL_DIRECTIVE_ARG_ADDED:"OPTIONAL_DIRECTIVE_ARG_ADDED",FIELD_CHANGED_KIND_SAFE:"FIELD_CHANGED_KIND_SAFE",ARG_CHANGED_KIND_SAFE:"ARG_CHANGED_KIND_SAFE",ARG_DEFAULT_VALUE_ADDED:"ARG_DEFAULT_VALUE_ADDED",INPUT_FIELD_DEFAULT_VALUE_ADDED:"INPUT_FIELD_DEFAULT_VALUE_ADDED"};function findBreakingChanges(r,n){return findSchemaChanges(r,n).filter(a=>a.type in BreakingChangeType)}function findDangerousChanges(r,n){return findSchemaChanges(r,n).filter(a=>a.type in DangerousChangeType)}function findSchemaChanges(r,n){return[...findTypeChanges(r,n),...findDirectiveChanges(r,n)]}function findDirectiveChanges(r,n){const a=[],i=diff(r.getDirectives(),n.getDirectives());for(const o of i.removed)a.push({type:BreakingChangeType.DIRECTIVE_REMOVED,description:`Directive ${o} was removed.`});for(const o of i.added)a.push({type:SafeChangeType.DIRECTIVE_ADDED,description:`Directive @${o.name} was added.`});for(const[o,s]of i.persisted){const l=diff(o.args,s.args);for(const f of l.added)isRequiredArgument(f)?a.push({type:BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required argument ${f} was added.`}):a.push({type:SafeChangeType.OPTIONAL_DIRECTIVE_ARG_ADDED,description:`An optional argument @${o.name}(${f.name}:) was added.`});for(const f of l.removed)a.push({type:BreakingChangeType.DIRECTIVE_ARG_REMOVED,description:`Argument ${f} was removed.`});for(const[f,d]of l.persisted){const u=isChangeSafeForInputObjectFieldOrFieldArg(f.type,d.type),c=getDefaultValue(f),v=getDefaultValue(d);u?c!==void 0?v===void 0?a.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:`@${o.name}(${f.name}:) defaultValue was removed.`}):c!==v&&a.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:`@${o.name}(${f.name}:) has changed defaultValue from ${c} to ${v}.`}):v!==void 0&&c===void 0?a.push({type:SafeChangeType.ARG_DEFAULT_VALUE_ADDED,description:`@${o.name}(${f.name}:) added a defaultValue ${v}.`}):f.type.toString()!==d.type.toString()&&a.push({type:SafeChangeType.ARG_CHANGED_KIND_SAFE,description:`Argument @${o.name}(${f.name}:) has changed type from ${String(f.type)} to ${String(d.type)}.`}):a.push({type:BreakingChangeType.ARG_CHANGED_KIND,description:`Argument @${o.name}(${f.name}:) has changed type from ${String(f.type)} to ${String(d.type)}.`}),f.description!==d.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of @${o.name}(${o.name}) has changed to "${d.description}".`})}o.isRepeatable&&!s.isRepeatable?a.push({type:BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${o}.`}):s.isRepeatable&&!o.isRepeatable&&a.push({type:SafeChangeType.DIRECTIVE_REPEATABLE_ADDED,description:`Repeatable flag was added to @${o.name}.`}),o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of @${o.name} has changed to "${s.description}".`});for(const f of o.locations)s.locations.includes(f)||a.push({type:BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,description:`${f} was removed from ${o}.`});for(const f of s.locations)o.locations.includes(f)||a.push({type:SafeChangeType.DIRECTIVE_LOCATION_ADDED,description:`${f} was added to @${o.name}.`})}return a}function findTypeChanges(r,n){const a=[],i=diff(Object.values(r.getTypeMap()),Object.values(n.getTypeMap()));for(const o of i.removed)a.push({type:BreakingChangeType.TYPE_REMOVED,description:isSpecifiedScalarType(o)?`Standard scalar ${o} was removed because it is not referenced anymore.`:`${o} was removed.`});for(const o of i.added)a.push({type:SafeChangeType.TYPE_ADDED,description:`${o} was added.`});for(const[o,s]of i.persisted)o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of ${o.name} has changed to "${s.description}".`}),isEnumType(o)&&isEnumType(s)?a.push(...findEnumTypeChanges(o,s)):isUnionType(o)&&isUnionType(s)?a.push(...findUnionTypeChanges(o,s)):isInputObjectType(o)&&isInputObjectType(s)?a.push(...findInputObjectTypeChanges(o,s)):isObjectType(o)&&isObjectType(s)?a.push(...findFieldChanges(o,s),...findImplementedInterfacesChanges(o,s)):isInterfaceType(o)&&isInterfaceType(s)?a.push(...findFieldChanges(o,s),...findImplementedInterfacesChanges(o,s)):o.constructor!==s.constructor&&a.push({type:BreakingChangeType.TYPE_CHANGED_KIND,description:`${o} changed from ${typeKindName(o)} to ${typeKindName(s)}.`});return a}function findInputObjectTypeChanges(r,n){const a=[],i=diff(Object.values(r.getFields()),Object.values(n.getFields()));for(const o of i.added)isRequiredInputField(o)?a.push({type:BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${o} was added.`}):a.push({type:DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${o} was added.`});for(const o of i.removed)a.push({type:BreakingChangeType.FIELD_REMOVED,description:`Field ${o} was removed.`});for(const[o,s]of i.persisted){const l=isChangeSafeForInputObjectFieldOrFieldArg(o.type,s.type),f=getDefaultValue(o),d=getDefaultValue(s);l?f!==void 0?d===void 0?a.push({type:DangerousChangeType.INPUT_FIELD_DEFAULT_VALUE_CHANGE,description:`${o} defaultValue was removed.`}):f!==d&&a.push({type:DangerousChangeType.INPUT_FIELD_DEFAULT_VALUE_CHANGE,description:`${o} has changed defaultValue from ${f} to ${d}.`}):d!==void 0&&f===void 0?a.push({type:SafeChangeType.INPUT_FIELD_DEFAULT_VALUE_ADDED,description:`${o} added a defaultValue ${d}.`}):o.type.toString()!==s.type.toString()&&a.push({type:SafeChangeType.FIELD_CHANGED_KIND_SAFE,description:`Field ${r}.${o.name} changed type from ${String(o.type)} to ${String(s.type)}.`}):a.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:`Field ${s} changed type from ${o.type} to ${s.type}.`}),o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of input-field ${n}.${s.name} has changed to "${s.description}".`})}return a}function findUnionTypeChanges(r,n){const a=[],i=diff(r.getTypes(),n.getTypes());for(const o of i.added)a.push({type:DangerousChangeType.TYPE_ADDED_TO_UNION,description:`${o} was added to union type ${r}.`});for(const o of i.removed)a.push({type:BreakingChangeType.TYPE_REMOVED_FROM_UNION,description:`${o} was removed from union type ${r}.`});return a}function findEnumTypeChanges(r,n){const a=[],i=diff(r.getValues(),n.getValues());for(const o of i.added)a.push({type:DangerousChangeType.VALUE_ADDED_TO_ENUM,description:`Enum value ${o} was added.`});for(const o of i.removed)a.push({type:BreakingChangeType.VALUE_REMOVED_FROM_ENUM,description:`Enum value ${o} was removed.`});for(const[o,s]of i.persisted)o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of enum value ${r}.${o.name} has changed to "${s.description}".`});return a}function findImplementedInterfacesChanges(r,n){const a=[],i=diff(r.getInterfaces(),n.getInterfaces());for(const o of i.added)a.push({type:DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,description:`${o} added to interfaces implemented by ${r}.`});for(const o of i.removed)a.push({type:BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,description:`${r} no longer implements interface ${o}.`});return a}function findFieldChanges(r,n){const a=[],i=diff(Object.values(r.getFields()),Object.values(n.getFields()));for(const o of i.removed)a.push({type:BreakingChangeType.FIELD_REMOVED,description:`Field ${o} was removed.`});for(const o of i.added)a.push({type:SafeChangeType.FIELD_ADDED,description:`Field ${r}.${o.name} was added.`});for(const[o,s]of i.persisted)a.push(...findArgChanges(o,s)),isChangeSafeForObjectOrInterfaceField(o.type,s.type)?o.type.toString()!==s.type.toString()&&a.push({type:SafeChangeType.FIELD_CHANGED_KIND_SAFE,description:`Field ${r}.${o.name} changed type from ${String(o.type)} to ${String(s.type)}.`}):a.push({type:BreakingChangeType.FIELD_CHANGED_KIND,description:`Field ${s} changed type from ${o.type} to ${s.type}.`}),o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of field ${r}.${o.name} has changed to "${s.description}".`});return a}function findArgChanges(r,n){const a=[],i=diff(r.args,n.args);for(const o of i.removed)a.push({type:BreakingChangeType.ARG_REMOVED,description:`Argument ${o} was removed.`});for(const[o,s]of i.persisted){const l=isChangeSafeForInputObjectFieldOrFieldArg(o.type,s.type),f=getDefaultValue(o),d=getDefaultValue(s);l?f!==void 0?d===void 0?a.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:`${o} defaultValue was removed.`}):f!==d&&a.push({type:DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,description:`${o} has changed defaultValue from ${f} to ${d}.`}):d!==void 0&&f===void 0?a.push({type:SafeChangeType.ARG_DEFAULT_VALUE_ADDED,description:`${o} added a defaultValue ${d}.`}):o.type.toString()!==s.type.toString()&&a.push({type:SafeChangeType.ARG_CHANGED_KIND_SAFE,description:`Argument ${o} has changed type from ${String(o.type)} to ${String(s.type)}.`}):a.push({type:BreakingChangeType.ARG_CHANGED_KIND,description:`Argument ${s} has changed type from ${o.type} to ${s.type}.`}),o.description!==s.description&&a.push({type:SafeChangeType.DESCRIPTION_CHANGED,description:`Description of argument ${o} has changed to "${s.description}".`})}for(const o of i.added)isRequiredArgument(o)?a.push({type:BreakingChangeType.REQUIRED_ARG_ADDED,description:`A required argument ${o} was added.`}):a.push({type:DangerousChangeType.OPTIONAL_ARG_ADDED,description:`An optional argument ${o} was added.`});return a}function isChangeSafeForObjectOrInterfaceField(r,n){return isListType(r)?isListType(n)&&isChangeSafeForObjectOrInterfaceField(r.ofType,n.ofType)||isNonNullType(n)&&isChangeSafeForObjectOrInterfaceField(r,n.ofType):isNonNullType(r)?isNonNullType(n)&&isChangeSafeForObjectOrInterfaceField(r.ofType,n.ofType):isNamedType(n)&&r.name===n.name||isNonNullType(n)&&isChangeSafeForObjectOrInterfaceField(r,n.ofType)}function isChangeSafeForInputObjectFieldOrFieldArg(r,n){return isListType(r)?isListType(n)&&isChangeSafeForInputObjectFieldOrFieldArg(r.ofType,n.ofType):isNonNullType(r)?isNonNullType(n)&&isChangeSafeForInputObjectFieldOrFieldArg(r.ofType,n.ofType)||!isNonNullType(n)&&isChangeSafeForInputObjectFieldOrFieldArg(r.ofType,n):isNamedType(n)&&r.name===n.name}function typeKindName(r){if(isScalarType(r))return"a Scalar type";if(isObjectType(r))return"an Object type";if(isInterfaceType(r))return"an Interface type";if(isUnionType(r))return"a Union type";if(isEnumType(r))return"an Enum type";if(isInputObjectType(r))return"an Input type";invariant(!1,"Unexpected type: "+inspect(r))}function getDefaultValue(r){const n=getDefaultValueAST(r);if(n)return print(sortValueNode(n))}function diff(r,n){const a=[],i=[],o=[],s=keyMap(r,({name:f})=>f),l=keyMap(n,({name:f})=>f);for(const f of r){const d=l[f.name];d===void 0?i.push(f):o.push([f,d])}for(const f of n)s[f.name]===void 0&&a.push(f);return{added:a,persisted:o,removed:i}}function resolveSchemaCoordinate(r,n){return resolveASTSchemaCoordinate(r,parseSchemaCoordinate(n))}function resolveTypeCoordinate(r,n){const a=n.name.value,i=r.getType(a);if(i!=null)return{kind:"NamedType",type:i}}function resolveMemberCoordinate(r,n){const a=n.name.value,i=r.getType(a);if(!i)throw new Error(`Expected ${inspect(a)} to be defined as a type in the schema.`);if(!isEnumType(i)&&!isInputObjectType(i)&&!isObjectType(i)&&!isInterfaceType(i))throw new Error(`Expected ${inspect(a)} to be an Enum, Input Object, Object or Interface type.`);if(isEnumType(i)){const l=n.memberName.value,f=i.getValue(l);return f==null?void 0:{kind:"EnumValue",type:i,enumValue:f}}if(isInputObjectType(i)){const l=n.memberName.value,f=i.getFields()[l];return f==null?void 0:{kind:"InputField",type:i,inputField:f}}const o=n.memberName.value,s=r.getField(i,o);if(s!=null)return{kind:"Field",type:i,field:s}}function resolveArgumentCoordinate(r,n){const a=n.name.value,i=r.getType(a);if(i==null)throw new Error(`Expected ${inspect(a)} to be defined as a type in the schema.`);if(!isObjectType(i)&&!isInterfaceType(i))throw new Error(`Expected ${inspect(a)} to be an object type or interface type.`);const o=n.fieldName.value,s=r.getField(i,o);if(s==null)throw new Error(`Expected ${inspect(o)} to exist as a field of type ${inspect(a)} in the schema.`);const l=n.argumentName.value,f=s.args.find(d=>d.name===l);if(f!=null)return{kind:"FieldArgument",type:i,field:s,fieldArgument:f}}function resolveDirectiveCoordinate(r,n){const a=n.name.value,i=r.getDirective(a);if(i)return{kind:"Directive",directive:i}}function resolveDirectiveArgumentCoordinate(r,n){const a=n.name.value,i=r.getDirective(a);if(!i)throw new Error(`Expected ${inspect(a)} to be defined as a directive in the schema.`);const{argumentName:{value:o}}=n,s=i.args.find(l=>l.name===o);if(s)return{kind:"DirectiveArgument",directive:i,directiveArgument:s}}function resolveASTSchemaCoordinate(r,n){switch(n.kind){case TYPE_COORDINATE:return resolveTypeCoordinate(r,n);case MEMBER_COORDINATE:return resolveMemberCoordinate(r,n);case ARGUMENT_COORDINATE:return resolveArgumentCoordinate(r,n);case DIRECTIVE_COORDINATE:return resolveDirectiveCoordinate(r,n);case DIRECTIVE_ARGUMENT_COORDINATE:return resolveDirectiveArgumentCoordinate(r,n)}}var graphql=Object.freeze({__proto__:null,AbortedGraphQLExecutionError,BREAK:BREAK$1,BreakingChangeType,DEFAULT_DEPRECATION_REASON,DangerousChangeType,DeferStreamDirectiveLabelRule,DeferStreamDirectiveOnRootFieldRule,DeferStreamDirectiveOnValidOperationsRule,DirectiveLocation,ExecutableDefinitionsRule,FieldsOnCorrectTypeRule,FragmentsOnCompositeTypesRule,GRAPHQL_MAX_INT,GRAPHQL_MIN_INT,GraphQLBoolean,GraphQLDeferDirective,GraphQLDeprecatedDirective,GraphQLDirective,GraphQLEnumType,GraphQLError,GraphQLFloat,GraphQLID,GraphQLIncludeDirective,GraphQLInputObjectType,GraphQLInt,GraphQLInterfaceType,GraphQLList,GraphQLNonNull,GraphQLObjectType,GraphQLOneOfDirective,GraphQLScalarType,GraphQLSchema,GraphQLSkipDirective,GraphQLSpecifiedByDirective,GraphQLStreamDirective,GraphQLString,GraphQLUnionType,Kind,KnownArgumentNamesRule,KnownDirectivesRule,KnownFragmentNamesRule,KnownOperationTypesRule,KnownTypeNamesRule,Lexer,Location:Location$1,LoneAnonymousOperationRule,LoneSchemaDefinitionRule,MaxIntrospectionDepthRule,NoDeprecatedCustomRule,NoFragmentCyclesRule:NoFragmentCyclesRule$1,NoSchemaIntrospectionCustomRule,NoUndefinedVariablesRule,NoUnusedFragmentsRule,NoUnusedVariablesRule,OperationTypeNode,OverlappingFieldsCanBeMergedRule,PossibleFragmentSpreadsRule,PossibleTypeExtensionsRule,ProvidedRequiredArgumentsRule,SafeChangeType,ScalarLeafsRule,SchemaMetaFieldDef,SingleFieldSubscriptionsRule,Source,StreamDirectiveOnListFieldRule,Token,TokenKind:TokenKind$1,TypeInfo,TypeKind,TypeMetaFieldDef,TypeNameMetaFieldDef,UniqueArgumentDefinitionNamesRule,UniqueArgumentNamesRule,UniqueDirectiveNamesRule,UniqueDirectivesPerLocationRule,UniqueEnumValueNamesRule,UniqueFieldDefinitionNamesRule,UniqueFragmentNamesRule,UniqueInputFieldNamesRule,UniqueOperationNamesRule,UniqueOperationTypesRule,UniqueTypeNamesRule,UniqueVariableNamesRule,ValidationContext,ValuesOfCorrectTypeRule,VariablesAreInputTypesRule,VariablesInAllowedPositionRule,__Directive,__DirectiveLocation,__EnumValue,__Field,__InputValue,__Schema,__Type,__TypeKind,assertAbstractType,assertArgument,assertCompositeType,assertDirective,assertEnumType,assertEnumValue,assertEnumValueName,assertField,assertInputField,assertInputObjectType,assertInputType,assertInterfaceType,assertLeafType,assertListType,assertName,assertNamedType,assertNonNullType,assertNullableType,assertObjectType,assertOutputType,assertScalarType,assertSchema,assertType,assertUnionType,assertValidSchema,assertWrappingType,astFromValue,buildASTSchema,buildClientSchema,buildSchema,coerceInputLiteral,coerceInputValue,concatAST,createSourceEventStream,defaultFieldResolver,defaultHarness,defaultTypeResolver,doTypesOverlap,enableDevMode,execute,executeRootSelectionSet,executeSubscriptionEvent,executeSync,experimentalExecuteIncrementally,experimentalExecuteRootSelectionSet,extendSchema,findBreakingChanges,findDangerousChanges,findSchemaChanges,getArgumentValues,getDirectiveValues,getEnterLeaveForKind:getEnterLeaveForKind$1,getIntrospectionQuery:getIntrospectionQuery$1,getLocation:getLocation$1,getNamedType,getNullableType,getOperationAST,getVariableValues,graphql:graphql$1,graphqlSync,introspectionFromSchema,introspectionTypes,isAbstractType,isArgument,isCompositeType,isConstValueNode,isDefinitionNode,isDevModeEnabled,isDirective,isEnumType,isEnumValue,isEqualType,isExecutableDefinitionNode,isField,isInputField,isInputObjectType,isInputType,isInterfaceType,isIntrospectionType,isLeafType,isListType,isNamedType,isNonNullType,isNullableType,isObjectType,isOutputType,isRequiredArgument,isRequiredInputField,isScalarType,isSchema,isSchemaCoordinateNode,isSelectionNode,isSpecifiedDirective,isSpecifiedScalarType,isSubscriptionOperationDefinitionNode,isType,isTypeDefinitionNode,isTypeExtensionNode,isTypeNode,isTypeSubTypeOf,isTypeSystemDefinitionNode,isTypeSystemExtensionNode,isUnionType,isValueNode,isWrappingType,legacyExecuteIncrementally,legacyExecuteRootSelectionSet,lexicographicSortSchema,locatedError,mapSourceToResponseEvent,parse,parseConstValue,parseSchemaCoordinate,parseType,parseValue,print,printDirective,printIntrospectionSchema,printLocation,printSchema,printSourceLocation,printType,recommendedRules,replaceVariables,resolveASTSchemaCoordinate,resolveObjMapThunk,resolveReadonlyArrayThunk,resolveSchemaCoordinate,responsePathAsArray:pathToArray,separateOperations,specifiedDirectives,specifiedRules,specifiedScalarTypes,stripIgnoredCharacters,subscribe,syntaxError,typeFromAST,validate,validateExecutionArgs,validateInputLiteral,validateInputValue,validateSchema,validateSubscriptionArgs,valueFromAST,valueFromASTUntyped,valueToLiteral,version,versionInfo,visit:visit$1,visitInParallel,visitWithTypeInfo});function isObject$3(r){return typeof r=="object"&&r!==null}var ControlChars;(function(r){r[r.NewLine=10]="NewLine",r[r.CchunkiageReturn=13]="CchunkiageReturn",r[r.Space=32]="Space",r[r.Colon=58]="Colon"})(ControlChars||(ControlChars={}));function createParser(){let r,n,a,i=!1,o={event:"",data:""},s=[];const l=new TextDecoder;return function(d){if(r===void 0)r=d,n=0,a=-1;else{const v=new Uint8Array(r.length+d.length);v.set(r),v.set(d,r.length),r=v}const u=r.length;let c=0;for(;n<u;){i&&(r[n]===ControlChars.NewLine&&(c=++n),i=!1);let v=-1;for(;n<u&&v===-1;++n)switch(r[n]){case ControlChars.Colon:a===-1&&(a=n-c);break;case ControlChars.CchunkiageReturn:i=!0;case ControlChars.NewLine:v=n;break}if(v===-1)break;if(c===v){if(o.event||o.data){if(!o.event)throw new Error("Missing message event");const h=validateStreamEvent(o.event),m=parseStreamData(h,o.data);s.push({event:h,data:m}),o={event:"",data:""}}}else if(a>0){const h=r.subarray(c,v),m=l.decode(h.subarray(0,a)),g=a+(h[a+1]===ControlChars.Space?2:1),_=l.decode(h.subarray(g));switch(m){case"event":o.event=_;break;case"data":o.data=o.data?o.data+`
224
+ `+_:_;break}}c=n,a=-1}if(c===u){r=void 0;const v=[...s];return s=[],v}else c!==0&&(r=r.subarray(c),n-=c)}}var __asyncValues=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],a;return n?n.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a);function i(s){a[s]=r[s]&&function(l){return new Promise(function(f,d){l=r[s](l),o(f,d,l.done,l.value)})}}function o(s,l,f,d){Promise.resolve(d).then(function(u){s({value:u,done:f})},l)}},__await$1=function(r){return this instanceof __await$1?(this.v=r,this):new __await$1(r)},__asyncGenerator$1=function(r,n,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(r,n||[]),o,s=[];return o={},l("next"),l("throw"),l("return"),o[Symbol.asyncIterator]=function(){return this},o;function l(h){i[h]&&(o[h]=function(m){return new Promise(function(g,_){s.push([h,m,g,_])>1||f(h,m)})})}function f(h,m){try{d(i[h](m))}catch(g){v(s[0][3],g)}}function d(h){h.value instanceof __await$1?Promise.resolve(h.value.v).then(u,c):v(s[0][2],h)}function u(h){f("next",h)}function c(h){f("throw",h)}function v(h,m){h(m),s.shift(),s.length&&f(s[0][0],s[0][1])}};function createClient$1(r){const{singleConnection:n=!1,lazy:a=!0,lazyCloseTimeout:i=0,onNonLazyError:o=console.error,generateID:s=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,k=>{const P=Math.random()*16|0;return(k=="x"?P:P&3|8).toString(16)})},retryAttempts:l=5,retry:f=async function(k){let P=1e3;for(let U=0;U<k;U++)P*=2;await new Promise(U=>setTimeout(U,P+Math.floor(Math.random()*2700+300)))},credentials:d="same-origin",referrer:u,referrerPolicy:c,onMessage:v}=r,h=r.fetchFn||fetch,m=r.abortControllerImpl||AbortController,g=(()=>{let L=!1;const k=[];return{get disposed(){return L},onDispose(P){return L?(setTimeout(()=>P(),0),()=>{}):(k.push(P),()=>{k.splice(k.indexOf(P),1)})},dispose(){if(!L){L=!0;for(const P of[...k])P()}}}})();let _,S,N=0,O=null,M=0;async function F(){try{if(g.disposed)throw new Error("Client has been disposed");return await(S??(S=(async()=>{var L;if(O){if(await f(M),_.signal.aborted)throw new Error("Connection aborted by the client");M++}_=new m;const k=g.onDispose(()=>_.abort());_.signal.addEventListener("abort",()=>{k(),S=void 0});const P=typeof r.url=="function"?await r.url():r.url;if(_.signal.aborted)throw new Error("Connection aborted by the client");const U=typeof r.headers=="function"?await r.headers():(L=r.headers)!==null&&L!==void 0?L:{};if(_.signal.aborted)throw new Error("Connection aborted by the client");let B;try{B=await h(P,{signal:_.signal,method:"PUT",credentials:d,referrer:u,referrerPolicy:c,headers:U})}catch(A){throw new NetworkError(A)}if(B.status!==201)throw new NetworkError(B);const j=await B.text();U[TOKEN_HEADER_KEY]=j;const $=await connect({signal:_.signal,headers:U,credentials:d,referrer:u,referrerPolicy:c,url:P,fetchFn:h,onMessage:v});return O=null,M=0,$.waitForThrow().catch(()=>S=void 0),$})()))}catch(L){throw S=void 0,L}}return n&&!a&&(async()=>{for(N++;;)try{const{waitForThrow:L}=await F();await L()}catch(L){if(g.disposed)return;if(!(L instanceof NetworkError)||(S=void 0,!l||M>=l))return o?.(L);O=L}})(),{subscribe(L,k){if(!n){const B=new m,j=g.onDispose(()=>{j(),B.abort()});return(async()=>{var $,A,R,y,b;let D=null,I=0;for(;;)try{if(D){if(await f(I),B.signal.aborted)throw new Error("Connection aborted by the client");I++}const w=typeof r.url=="function"?await r.url():r.url;if(B.signal.aborted)throw new Error("Connection aborted by the client");const E=typeof r.headers=="function"?await r.headers():(b=r.headers)!==null&&b!==void 0?b:{};if(B.signal.aborted)throw new Error("Connection aborted by the client");const{getResults:q}=await connect({signal:B.signal,headers:Object.assign(Object.assign({},E),{"content-type":"application/json; charset=utf-8"}),credentials:d,referrer:u,referrerPolicy:c,url:w,body:JSON.stringify(L),fetchFn:h,onMessage:v});D=null,I=0;try{for(var T=!0,C=(A=void 0,__asyncValues(q())),x;x=await C.next(),$=x.done,!$;){y=x.value,T=!1;try{const G=y;k.next(G)}finally{T=!0}}}catch(G){A={error:G}}finally{try{!T&&!$&&(R=C.return)&&await R.call(C)}finally{if(A)throw A.error}}return B.abort()}catch(w){if(B.signal.aborted)return;if(!(w instanceof NetworkError)||!l||I>=l)throw w;D=w}})().then(()=>k.complete()).catch($=>k.error($)),()=>B.abort()}N++;const P=new m,U=g.onDispose(()=>{U(),P.abort()});return(async()=>{var B,j,$,A;const R=s();L=Object.assign(Object.assign({},L),{extensions:Object.assign(Object.assign({},L.extensions),{operationId:R})});let y=null;for(;;){y=null;try{const{url:T,headers:C,getResults:x}=await F();let w;try{w=await h(T,{signal:P.signal,method:"POST",credentials:d,referrer:u,referrerPolicy:c,headers:Object.assign(Object.assign({},C),{"content-type":"application/json; charset=utf-8"}),body:JSON.stringify(L)})}catch(E){throw new NetworkError(E)}if(w.status!==202)throw new NetworkError(w);y=async()=>{let E;try{const q=new m,G=g.onDispose(()=>{G(),q.abort()});E=await h(T+"?operationId="+R,{signal:q.signal,method:"DELETE",credentials:d,referrer:u,referrerPolicy:c,headers:C})}catch(q){throw new NetworkError(q)}if(E.status!==200)throw new NetworkError(E)};try{for(var b=!0,D=(j=void 0,__asyncValues(x({signal:P.signal,operationId:R}))),I;I=await D.next(),B=I.done,!B;){A=I.value,b=!1;try{const E=A;k.next(E)}finally{b=!0}}}catch(E){j={error:E}}finally{try{!b&&!B&&($=D.return)&&await $.call(D)}finally{if(j)throw j.error}}return y=null,P.abort()}catch(T){if(P.signal.aborted)return await y?.();if(!(T instanceof NetworkError)||(a&&(S=void 0),!l||M>=l))throw P.abort(),T;O=T}finally{P.signal.aborted&&--N===0&&(isFinite(i)&&i>0?setTimeout(()=>{N||_.abort()},i):_.abort())}}})().then(()=>k.complete()).catch(B=>k.error(B)),()=>P.abort()},dispose(){g.dispose()}}}class NetworkError extends Error{constructor(n){let a,i;isResponseLike(n)?(i=n,a="Server responded with "+n.status+": "+n.statusText):n instanceof Error?a=n.message:a=String(n),super(a),this.name=this.constructor.name,this.response=i}}function isResponseLike(r){return isObject$3(r)&&typeof r.ok=="boolean"&&typeof r.status=="number"&&typeof r.statusText=="string"}async function connect(r){const{signal:n,url:a,credentials:i,headers:o,body:s,referrer:l,referrerPolicy:f,fetchFn:d,onMessage:u}=r,c={},v={};let h;try{h=await d(a,{signal:n,method:s?"POST":"GET",credentials:i,referrer:l,referrerPolicy:f,headers:Object.assign(Object.assign({},o),{accept:"text/event-stream"}),body:s})}catch(_){throw new NetworkError(_)}if(!h.ok)throw new NetworkError(h);if(!h.body)throw new Error("Missing response body");let m=null,g;return(async()=>{var _,S,N,O,M;try{const P=createParser();try{for(var F=!0,L=__asyncValues(toAsyncIterator(h.body)),k;k=await L.next(),_=k.done,!_;){O=k.value,F=!1;try{const U=O;if(typeof U=="string")throw m=new Error(`Unexpected string chunk "${U}"`);let B;try{B=P(U)}catch(j){throw m=j}if(!B)continue;for(const j of B){try{u?.(j)}catch(A){throw m=A}const $=j.data&&"id"in j.data?j.data.id:"";switch($ in v||(v[$]=[]),j.event){case"next":$?v[$].push(j.data.payload):v[$].push(j.data);break;case"complete":v[$].push("complete");break;default:throw m=new Error(`Unexpected message event "${j.event}"`)}(M=c[$])===null||M===void 0||M.proceed()}}finally{F=!0}}}catch(U){S={error:U}}finally{try{!F&&!_&&(N=L.return)&&await N.call(L)}finally{if(S)throw S.error}}if(Object.keys(c).length)throw new Error("Connection closed while having active streams")}catch(P){!m&&Object.keys(c).length?m=new NetworkError(P):m=P,g?.(m)}finally{Object.values(c).forEach(({proceed:P})=>P())}})(),{url:a,headers:o,waitForThrow:()=>new Promise((_,S)=>{if(m)return S(m);g=S}),getResults(_){var S;return __asyncGenerator$1(this,arguments,function*(){const{signal:O,operationId:M=""}=_??{};try{for(;;){for(;!((S=v[M])===null||S===void 0)&&S.length;){const F=v[M].shift();if(F==="complete")return yield __await$1(void 0);yield yield __await$1(F)}if(m)throw m;if(O?.aborted)throw new Error("Getting results aborted by the client");yield __await$1(new Promise(F=>{const L=()=>{O?.removeEventListener("abort",L),delete c[M],F()};O?.addEventListener("abort",L),c[M]={proceed:L}}))}}finally{delete v[M]}})}}}function toAsyncIterator(r){return typeof Object(r)[Symbol.asyncIterator]=="function"?(r=r,r[Symbol.asyncIterator]()):function(){return __asyncGenerator$1(this,arguments,function*(){const n=r.getReader();let a;do a=yield __await$1(n.read()),a.value!==void 0&&(yield yield __await$1(a.value));while(!a.done)})}()}async function e(r,n){if(!r.ok||!r.body||r.bodyUsed)return r;let a=r.headers.get("content-type");if(!a||!~a.indexOf("multipart/"))return r;let i=a.indexOf("boundary="),o="-";if(~i){let s=i+9,l=a.indexOf(";",s);o=a.slice(s,l>-1?l:void 0).trim().replace(/"/g,"")}return async function*(s,l,f){let d,u,c,v=new TextDecoder("utf8"),h=s.getReader(),m=!0,g=l.length,_="",S=[];try{let N;e:for(;!(N=await h.read()).done;){let O=v.decode(N.value,{stream:!0});d=_.length,_+=O;let M=O.indexOf(l);for(~M?d+=M:d=_.indexOf(l),S=[];~d;){let F=_.slice(0,d),L=_.slice(d+g);if(u){let k=F.indexOf(`\r
225
+ \r
226
+ `)+4,P=F.lastIndexOf(`\r
227
+ `,k),U=!1,B=F.slice(k,P>-1?void 0:P),j=String(F.slice(0,k)).trim().split(`\r
228
+ `),$={},A=j.length;for(;c=j[--A];c=c.split(": "),$[c.shift().toLowerCase()]=c.join(": "));if(c=$["content-type"],c&&~c.indexOf("application/json"))try{B=JSON.parse(B),U=!0}catch{}if(c={headers:$,body:B,json:U},m?yield c:S.push(c),L.slice(0,2)==="--")break e}else l=`\r
229
+ `+l,u=g+=2;_=L,d=_.indexOf(l)}S.length&&(yield S)}}finally{S.length&&(yield S),await h.cancel()}}(r.body,`--${o}`)}const fetchGraphQL=(r,n)=>{async function a(i,o,s){try{const{uri:l,headers:f}=o;f.set(HEADER_CONTENT_TYPE,"application/json");const d=await fetch(l,{body:JSON.stringify(r.id?{id:r.id,variables:n}:{query:r.text,variables:n}),headers:f,method:"POST",signal:s}),u=await e(d);if(isAsyncIterable$1(u))for await(const c of u){if(!c.json){i.error(new Error("Failed to parse part as json."));break}if("data"in c.body&&i.next(c.body),"incremental"in c.body)for(const v of c.body.incremental)if("data"in v)i.next({...v,hasNext:c.body.hasNext});else if(v.items){const h=v.path.slice(0,-1);let m=v.path.at(-1);for(const g of v.items)i.next({...v,path:h.concat(m++),data:g,hasNext:c.body.hasNext})}else i.next({...v,data:v.items,hasNext:c.body.hasNext})}else i.next(await u.json());i.complete()}catch(l){if(s.aborted)return;l instanceof Error?i.error(l,!0):i.error(new Error("Unknown error"),!0)}}return relayRuntimeExports.Observable.from(getHttpOptions("/graphql")).mergeMap(i=>relayRuntimeExports.Observable.create(o=>{const s=new AbortController;return relayRuntimeExports.Observable.from(new Promise((l,f)=>{a(o,i,s.signal).then(l,f)})).subscribe({}),()=>s.abort()}))},subscribeGraphQL=(r,n)=>relayRuntimeExports.Observable.from(getHttpOptions("/graphql")).map(({uri:a,headers:i})=>{const o={};return i.forEach((s,l)=>{o[l]=s}),createClient$1({url:a,headers:o})}).mergeMap(a=>relayRuntimeExports.Observable.create(i=>{const o=a.subscribe({id:r.id??void 0,query:r.text??"",variables:n},{next:({data:s,errors:l,extensions:f})=>i.next({data:s??void 0,errors:l?.map(d=>({message:d.message,locations:d.locations?.map(({line:u,column:c})=>({line:u,column:c}))}))??[],extensions:f}),complete:i.complete,error:s=>{s instanceof Error?i.error(s,!0):i.error(new Error("Unknown error"),!0)}});return{closed:i.closed,unsubscribe:o}})),relayEnvironment=new relayRuntimeExports.Environment({network:relayRuntimeExports.Network.create(fetchGraphQL,subscribeGraphQL),store:new relayRuntimeExports.Store(new relayRuntimeExports.RecordSource),deferDeduplicatedFields:!0});var ASTNodeKind=(r=>(r.NAME="Name",r.DOCUMENT="Document",r.OPERATION_DEFINITION="OperationDefinition",r.VARIABLES_DEFINITION="VariablesDefinition",r.VARIABLE_DEFINITION="VariableDefinition",r.SELECTION_SET="SelectionSet",r.FIELD="Field",r.ARGUMENT_DICT="ArgumentDict",r.ARGUMENT="Argument",r.FRAGMENT_SPREAD="FragmentSpread",r.INLINE_FRAGMENT="InlineFragment",r.FRAGMENT_DEFINITION="FragmentDefinition",r.VARIABLE="Variable",r.NUMBER="NumberValue",r.STRING="StringValue",r.BOOLEAN="BooleanValue",r.NULL="NullValue",r.ENUM="EnumValue",r.LIST="ListValue",r.OBJECT="ObjectValue",r.OBJECT_FIELD="ObjectField",r.DIRECTIVE="Directive",r.NAMED_TYPE="NamedType",r.LIST_TYPE="ListType",r.NON_NULL_TYPE="NonNullType",r))(ASTNodeKind||{}),TokenKind=(r=>(r.SOF="<SOF>",r.EOF="<EOF>",r.BANG="!",r.QUESTION_MARK="?",r.DOLLAR="$",r.AMP="&",r.PAREN_L="(",r.PAREN_R=")",r.SPREAD="...",r.COLON=":",r.EQUALS="=",r.AT="@",r.BRACKET_L="[",r.BRACKET_R="]",r.BRACE_L="{",r.PIPE="|",r.BRACE_R="}",r.NAME="Name",r.BOOLEAN="Boolean",r.NUMBER="Number",r.STRING="String",r.BLOCK_STRING="BlockString",r.COMMENT="Comment",r.KEYWORD="Keyword",r.INVALID="Invalid",r))(TokenKind||{});const OperationDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variablesDefinition","directives","selectionSet"],VariablesDefinition:["variableDefinitions"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","argumentDict","directives","selectionSet"],ArgumentDict:["arguments"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","typeCondition","directives","selectionSet"],NumberValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","argumentDict"],NamedType:["name"],ListType:["type"],NonNullType:["type"]};var OperationType=(r=>(r.QUERY="query",r.MUTATION="mutation",r.SUBSCRIPTION="subscription",r))(OperationType||{});function isASTNode(r){return!!r&&typeof r=="object"&&"kind"in r&&Object.values(ASTNodeKind).includes(r.kind)}function isOperationDefinitionTypeNode(r){return isSpecificASTNode(r,ASTNodeKind.OPERATION_DEFINITION)}function isSpecificASTNode(r,n){return!!r&&typeof r=="object"&&"kind"in r&&r.kind===n&&!("isConst"in r)}var DocumentUri;(function(r){function n(a){return typeof a=="string"}r.is=n})(DocumentUri||(DocumentUri={}));var URI;(function(r){function n(a){return typeof a=="string"}r.is=n})(URI||(URI={}));var integer;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647;function n(a){return typeof a=="number"&&r.MIN_VALUE<=a&&a<=r.MAX_VALUE}r.is=n})(integer||(integer={}));var uinteger;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647;function n(a){return typeof a=="number"&&r.MIN_VALUE<=a&&a<=r.MAX_VALUE}r.is=n})(uinteger||(uinteger={}));var Position;(function(r){function n(i,o){return i===Number.MAX_VALUE&&(i=uinteger.MAX_VALUE),o===Number.MAX_VALUE&&(o=uinteger.MAX_VALUE),{line:i,character:o}}r.create=n;function a(i){let o=i;return Is.objectLiteral(o)&&Is.uinteger(o.line)&&Is.uinteger(o.character)}r.is=a})(Position||(Position={}));var Range;(function(r){function n(i,o,s,l){if(Is.uinteger(i)&&Is.uinteger(o)&&Is.uinteger(s)&&Is.uinteger(l))return{start:Position.create(i,o),end:Position.create(s,l)};if(Position.is(i)&&Position.is(o))return{start:i,end:o};throw new Error(`Range#create called with invalid arguments[${i}, ${o}, ${s}, ${l}]`)}r.create=n;function a(i){let o=i;return Is.objectLiteral(o)&&Position.is(o.start)&&Position.is(o.end)}r.is=a})(Range||(Range={}));var Location;(function(r){function n(i,o){return{uri:i,range:o}}r.create=n;function a(i){let o=i;return Is.objectLiteral(o)&&Range.is(o.range)&&(Is.string(o.uri)||Is.undefined(o.uri))}r.is=a})(Location||(Location={}));var LocationLink;(function(r){function n(i,o,s,l){return{targetUri:i,targetRange:o,targetSelectionRange:s,originSelectionRange:l}}r.create=n;function a(i){let o=i;return Is.objectLiteral(o)&&Range.is(o.targetRange)&&Is.string(o.targetUri)&&Range.is(o.targetSelectionRange)&&(Range.is(o.originSelectionRange)||Is.undefined(o.originSelectionRange))}r.is=a})(LocationLink||(LocationLink={}));var Color;(function(r){function n(i,o,s,l){return{red:i,green:o,blue:s,alpha:l}}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Is.numberRange(o.red,0,1)&&Is.numberRange(o.green,0,1)&&Is.numberRange(o.blue,0,1)&&Is.numberRange(o.alpha,0,1)}r.is=a})(Color||(Color={}));var ColorInformation;(function(r){function n(i,o){return{range:i,color:o}}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Range.is(o.range)&&Color.is(o.color)}r.is=a})(ColorInformation||(ColorInformation={}));var ColorPresentation;(function(r){function n(i,o,s){return{label:i,textEdit:o,additionalTextEdits:s}}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Is.string(o.label)&&(Is.undefined(o.textEdit)||TextEdit.is(o))&&(Is.undefined(o.additionalTextEdits)||Is.typedArray(o.additionalTextEdits,TextEdit.is))}r.is=a})(ColorPresentation||(ColorPresentation={}));var FoldingRangeKind;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(FoldingRangeKind||(FoldingRangeKind={}));var FoldingRange;(function(r){function n(i,o,s,l,f,d){const u={startLine:i,endLine:o};return Is.defined(s)&&(u.startCharacter=s),Is.defined(l)&&(u.endCharacter=l),Is.defined(f)&&(u.kind=f),Is.defined(d)&&(u.collapsedText=d),u}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Is.uinteger(o.startLine)&&Is.uinteger(o.startLine)&&(Is.undefined(o.startCharacter)||Is.uinteger(o.startCharacter))&&(Is.undefined(o.endCharacter)||Is.uinteger(o.endCharacter))&&(Is.undefined(o.kind)||Is.string(o.kind))}r.is=a})(FoldingRange||(FoldingRange={}));var DiagnosticRelatedInformation;(function(r){function n(i,o){return{location:i,message:o}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Location.is(o.location)&&Is.string(o.message)}r.is=a})(DiagnosticRelatedInformation||(DiagnosticRelatedInformation={}));var DiagnosticSeverity;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(DiagnosticSeverity||(DiagnosticSeverity={}));var DiagnosticTag;(function(r){r.Unnecessary=1,r.Deprecated=2})(DiagnosticTag||(DiagnosticTag={}));var CodeDescription;(function(r){function n(a){const i=a;return Is.objectLiteral(i)&&Is.string(i.href)}r.is=n})(CodeDescription||(CodeDescription={}));var Diagnostic;(function(r){function n(i,o,s,l,f,d){let u={range:i,message:o};return Is.defined(s)&&(u.severity=s),Is.defined(l)&&(u.code=l),Is.defined(f)&&(u.source=f),Is.defined(d)&&(u.relatedInformation=d),u}r.create=n;function a(i){var o;let s=i;return Is.defined(s)&&Range.is(s.range)&&Is.string(s.message)&&(Is.number(s.severity)||Is.undefined(s.severity))&&(Is.integer(s.code)||Is.string(s.code)||Is.undefined(s.code))&&(Is.undefined(s.codeDescription)||Is.string((o=s.codeDescription)===null||o===void 0?void 0:o.href))&&(Is.string(s.source)||Is.undefined(s.source))&&(Is.undefined(s.relatedInformation)||Is.typedArray(s.relatedInformation,DiagnosticRelatedInformation.is))}r.is=a})(Diagnostic||(Diagnostic={}));var Command;(function(r){function n(i,o,...s){let l={title:i,command:o};return Is.defined(s)&&s.length>0&&(l.arguments=s),l}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.string(o.title)&&Is.string(o.command)}r.is=a})(Command||(Command={}));var TextEdit;(function(r){function n(s,l){return{range:s,newText:l}}r.replace=n;function a(s,l){return{range:{start:s,end:s},newText:l}}r.insert=a;function i(s){return{range:s,newText:""}}r.del=i;function o(s){const l=s;return Is.objectLiteral(l)&&Is.string(l.newText)&&Range.is(l.range)}r.is=o})(TextEdit||(TextEdit={}));var ChangeAnnotation;(function(r){function n(i,o,s){const l={label:i};return o!==void 0&&(l.needsConfirmation=o),s!==void 0&&(l.description=s),l}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Is.string(o.label)&&(Is.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(Is.string(o.description)||o.description===void 0)}r.is=a})(ChangeAnnotation||(ChangeAnnotation={}));var ChangeAnnotationIdentifier;(function(r){function n(a){const i=a;return Is.string(i)}r.is=n})(ChangeAnnotationIdentifier||(ChangeAnnotationIdentifier={}));var AnnotatedTextEdit;(function(r){function n(s,l,f){return{range:s,newText:l,annotationId:f}}r.replace=n;function a(s,l,f){return{range:{start:s,end:s},newText:l,annotationId:f}}r.insert=a;function i(s,l){return{range:s,newText:"",annotationId:l}}r.del=i;function o(s){const l=s;return TextEdit.is(l)&&(ChangeAnnotation.is(l.annotationId)||ChangeAnnotationIdentifier.is(l.annotationId))}r.is=o})(AnnotatedTextEdit||(AnnotatedTextEdit={}));var TextDocumentEdit;(function(r){function n(i,o){return{textDocument:i,edits:o}}r.create=n;function a(i){let o=i;return Is.defined(o)&&OptionalVersionedTextDocumentIdentifier.is(o.textDocument)&&Array.isArray(o.edits)}r.is=a})(TextDocumentEdit||(TextDocumentEdit={}));var CreateFile;(function(r){function n(i,o,s){let l={kind:"create",uri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(l.options=o),s!==void 0&&(l.annotationId=s),l}r.create=n;function a(i){let o=i;return o&&o.kind==="create"&&Is.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||Is.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Is.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ChangeAnnotationIdentifier.is(o.annotationId))}r.is=a})(CreateFile||(CreateFile={}));var RenameFile;(function(r){function n(i,o,s,l){let f={kind:"rename",oldUri:i,newUri:o};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(f.options=s),l!==void 0&&(f.annotationId=l),f}r.create=n;function a(i){let o=i;return o&&o.kind==="rename"&&Is.string(o.oldUri)&&Is.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||Is.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||Is.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||ChangeAnnotationIdentifier.is(o.annotationId))}r.is=a})(RenameFile||(RenameFile={}));var DeleteFile;(function(r){function n(i,o,s){let l={kind:"delete",uri:i};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(l.options=o),s!==void 0&&(l.annotationId=s),l}r.create=n;function a(i){let o=i;return o&&o.kind==="delete"&&Is.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||Is.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||Is.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||ChangeAnnotationIdentifier.is(o.annotationId))}r.is=a})(DeleteFile||(DeleteFile={}));var WorkspaceEdit;(function(r){function n(a){let i=a;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(o=>Is.string(o.kind)?CreateFile.is(o)||RenameFile.is(o)||DeleteFile.is(o):TextDocumentEdit.is(o)))}r.is=n})(WorkspaceEdit||(WorkspaceEdit={}));var TextDocumentIdentifier;(function(r){function n(i){return{uri:i}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.string(o.uri)}r.is=a})(TextDocumentIdentifier||(TextDocumentIdentifier={}));var VersionedTextDocumentIdentifier;(function(r){function n(i,o){return{uri:i,version:o}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.string(o.uri)&&Is.integer(o.version)}r.is=a})(VersionedTextDocumentIdentifier||(VersionedTextDocumentIdentifier={}));var OptionalVersionedTextDocumentIdentifier;(function(r){function n(i,o){return{uri:i,version:o}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.string(o.uri)&&(o.version===null||Is.integer(o.version))}r.is=a})(OptionalVersionedTextDocumentIdentifier||(OptionalVersionedTextDocumentIdentifier={}));var TextDocumentItem;(function(r){function n(i,o,s,l){return{uri:i,languageId:o,version:s,text:l}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.string(o.uri)&&Is.string(o.languageId)&&Is.integer(o.version)&&Is.string(o.text)}r.is=a})(TextDocumentItem||(TextDocumentItem={}));var MarkupKind;(function(r){r.PlainText="plaintext",r.Markdown="markdown";function n(a){const i=a;return i===r.PlainText||i===r.Markdown}r.is=n})(MarkupKind||(MarkupKind={}));var MarkupContent;(function(r){function n(a){const i=a;return Is.objectLiteral(a)&&MarkupKind.is(i.kind)&&Is.string(i.value)}r.is=n})(MarkupContent||(MarkupContent={}));var CompletionItemKind$1;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(CompletionItemKind$1||(CompletionItemKind$1={}));var InsertTextFormat;(function(r){r.PlainText=1,r.Snippet=2})(InsertTextFormat||(InsertTextFormat={}));var CompletionItemTag;(function(r){r.Deprecated=1})(CompletionItemTag||(CompletionItemTag={}));var InsertReplaceEdit;(function(r){function n(i,o,s){return{newText:i,insert:o,replace:s}}r.create=n;function a(i){const o=i;return o&&Is.string(o.newText)&&Range.is(o.insert)&&Range.is(o.replace)}r.is=a})(InsertReplaceEdit||(InsertReplaceEdit={}));var InsertTextMode;(function(r){r.asIs=1,r.adjustIndentation=2})(InsertTextMode||(InsertTextMode={}));var CompletionItemLabelDetails;(function(r){function n(a){const i=a;return i&&(Is.string(i.detail)||i.detail===void 0)&&(Is.string(i.description)||i.description===void 0)}r.is=n})(CompletionItemLabelDetails||(CompletionItemLabelDetails={}));var CompletionItem;(function(r){function n(a){return{label:a}}r.create=n})(CompletionItem||(CompletionItem={}));var CompletionList;(function(r){function n(a,i){return{items:a||[],isIncomplete:!!i}}r.create=n})(CompletionList||(CompletionList={}));var MarkedString;(function(r){function n(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=n;function a(i){const o=i;return Is.string(o)||Is.objectLiteral(o)&&Is.string(o.language)&&Is.string(o.value)}r.is=a})(MarkedString||(MarkedString={}));var Hover;(function(r){function n(a){let i=a;return!!i&&Is.objectLiteral(i)&&(MarkupContent.is(i.contents)||MarkedString.is(i.contents)||Is.typedArray(i.contents,MarkedString.is))&&(a.range===void 0||Range.is(a.range))}r.is=n})(Hover||(Hover={}));var ParameterInformation;(function(r){function n(a,i){return i?{label:a,documentation:i}:{label:a}}r.create=n})(ParameterInformation||(ParameterInformation={}));var SignatureInformation;(function(r){function n(a,i,...o){let s={label:a};return Is.defined(i)&&(s.documentation=i),Is.defined(o)?s.parameters=o:s.parameters=[],s}r.create=n})(SignatureInformation||(SignatureInformation={}));var DocumentHighlightKind;(function(r){r.Text=1,r.Read=2,r.Write=3})(DocumentHighlightKind||(DocumentHighlightKind={}));var DocumentHighlight;(function(r){function n(a,i){let o={range:a};return Is.number(i)&&(o.kind=i),o}r.create=n})(DocumentHighlight||(DocumentHighlight={}));var SymbolKind;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(SymbolKind||(SymbolKind={}));var SymbolTag;(function(r){r.Deprecated=1})(SymbolTag||(SymbolTag={}));var SymbolInformation;(function(r){function n(a,i,o,s,l){let f={name:a,kind:i,location:{uri:s,range:o}};return l&&(f.containerName=l),f}r.create=n})(SymbolInformation||(SymbolInformation={}));var WorkspaceSymbol;(function(r){function n(a,i,o,s){return s!==void 0?{name:a,kind:i,location:{uri:o,range:s}}:{name:a,kind:i,location:{uri:o}}}r.create=n})(WorkspaceSymbol||(WorkspaceSymbol={}));var DocumentSymbol;(function(r){function n(i,o,s,l,f,d){let u={name:i,detail:o,kind:s,range:l,selectionRange:f};return d!==void 0&&(u.children=d),u}r.create=n;function a(i){let o=i;return o&&Is.string(o.name)&&Is.number(o.kind)&&Range.is(o.range)&&Range.is(o.selectionRange)&&(o.detail===void 0||Is.string(o.detail))&&(o.deprecated===void 0||Is.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}r.is=a})(DocumentSymbol||(DocumentSymbol={}));var CodeActionKind;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(CodeActionKind||(CodeActionKind={}));var CodeActionTriggerKind;(function(r){r.Invoked=1,r.Automatic=2})(CodeActionTriggerKind||(CodeActionTriggerKind={}));var CodeActionContext;(function(r){function n(i,o,s){let l={diagnostics:i};return o!=null&&(l.only=o),s!=null&&(l.triggerKind=s),l}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.typedArray(o.diagnostics,Diagnostic.is)&&(o.only===void 0||Is.typedArray(o.only,Is.string))&&(o.triggerKind===void 0||o.triggerKind===CodeActionTriggerKind.Invoked||o.triggerKind===CodeActionTriggerKind.Automatic)}r.is=a})(CodeActionContext||(CodeActionContext={}));var CodeAction;(function(r){function n(i,o,s){let l={title:i},f=!0;return typeof o=="string"?(f=!1,l.kind=o):Command.is(o)?l.command=o:l.edit=o,f&&s!==void 0&&(l.kind=s),l}r.create=n;function a(i){let o=i;return o&&Is.string(o.title)&&(o.diagnostics===void 0||Is.typedArray(o.diagnostics,Diagnostic.is))&&(o.kind===void 0||Is.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Command.is(o.command))&&(o.isPreferred===void 0||Is.boolean(o.isPreferred))&&(o.edit===void 0||WorkspaceEdit.is(o.edit))}r.is=a})(CodeAction||(CodeAction={}));var CodeLens;(function(r){function n(i,o){let s={range:i};return Is.defined(o)&&(s.data=o),s}r.create=n;function a(i){let o=i;return Is.defined(o)&&Range.is(o.range)&&(Is.undefined(o.command)||Command.is(o.command))}r.is=a})(CodeLens||(CodeLens={}));var FormattingOptions;(function(r){function n(i,o){return{tabSize:i,insertSpaces:o}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Is.uinteger(o.tabSize)&&Is.boolean(o.insertSpaces)}r.is=a})(FormattingOptions||(FormattingOptions={}));var DocumentLink;(function(r){function n(i,o,s){return{range:i,target:o,data:s}}r.create=n;function a(i){let o=i;return Is.defined(o)&&Range.is(o.range)&&(Is.undefined(o.target)||Is.string(o.target))}r.is=a})(DocumentLink||(DocumentLink={}));var SelectionRange;(function(r){function n(i,o){return{range:i,parent:o}}r.create=n;function a(i){let o=i;return Is.objectLiteral(o)&&Range.is(o.range)&&(o.parent===void 0||r.is(o.parent))}r.is=a})(SelectionRange||(SelectionRange={}));var SemanticTokenTypes;(function(r){r.namespace="namespace",r.type="type",r.class="class",r.enum="enum",r.interface="interface",r.struct="struct",r.typeParameter="typeParameter",r.parameter="parameter",r.variable="variable",r.property="property",r.enumMember="enumMember",r.event="event",r.function="function",r.method="method",r.macro="macro",r.keyword="keyword",r.modifier="modifier",r.comment="comment",r.string="string",r.number="number",r.regexp="regexp",r.operator="operator",r.decorator="decorator"})(SemanticTokenTypes||(SemanticTokenTypes={}));var SemanticTokenModifiers;(function(r){r.declaration="declaration",r.definition="definition",r.readonly="readonly",r.static="static",r.deprecated="deprecated",r.abstract="abstract",r.async="async",r.modification="modification",r.documentation="documentation",r.defaultLibrary="defaultLibrary"})(SemanticTokenModifiers||(SemanticTokenModifiers={}));var SemanticTokens;(function(r){function n(a){const i=a;return Is.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}r.is=n})(SemanticTokens||(SemanticTokens={}));var InlineValueText;(function(r){function n(i,o){return{range:i,text:o}}r.create=n;function a(i){const o=i;return o!=null&&Range.is(o.range)&&Is.string(o.text)}r.is=a})(InlineValueText||(InlineValueText={}));var InlineValueVariableLookup;(function(r){function n(i,o,s){return{range:i,variableName:o,caseSensitiveLookup:s}}r.create=n;function a(i){const o=i;return o!=null&&Range.is(o.range)&&Is.boolean(o.caseSensitiveLookup)&&(Is.string(o.variableName)||o.variableName===void 0)}r.is=a})(InlineValueVariableLookup||(InlineValueVariableLookup={}));var InlineValueEvaluatableExpression;(function(r){function n(i,o){return{range:i,expression:o}}r.create=n;function a(i){const o=i;return o!=null&&Range.is(o.range)&&(Is.string(o.expression)||o.expression===void 0)}r.is=a})(InlineValueEvaluatableExpression||(InlineValueEvaluatableExpression={}));var InlineValueContext;(function(r){function n(i,o){return{frameId:i,stoppedLocation:o}}r.create=n;function a(i){const o=i;return Is.defined(o)&&Range.is(i.stoppedLocation)}r.is=a})(InlineValueContext||(InlineValueContext={}));var InlayHintKind;(function(r){r.Type=1,r.Parameter=2;function n(a){return a===1||a===2}r.is=n})(InlayHintKind||(InlayHintKind={}));var InlayHintLabelPart;(function(r){function n(i){return{value:i}}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&(o.tooltip===void 0||Is.string(o.tooltip)||MarkupContent.is(o.tooltip))&&(o.location===void 0||Location.is(o.location))&&(o.command===void 0||Command.is(o.command))}r.is=a})(InlayHintLabelPart||(InlayHintLabelPart={}));var InlayHint;(function(r){function n(i,o,s){const l={position:i,label:o};return s!==void 0&&(l.kind=s),l}r.create=n;function a(i){const o=i;return Is.objectLiteral(o)&&Position.is(o.position)&&(Is.string(o.label)||Is.typedArray(o.label,InlayHintLabelPart.is))&&(o.kind===void 0||InlayHintKind.is(o.kind))&&o.textEdits===void 0||Is.typedArray(o.textEdits,TextEdit.is)&&(o.tooltip===void 0||Is.string(o.tooltip)||MarkupContent.is(o.tooltip))&&(o.paddingLeft===void 0||Is.boolean(o.paddingLeft))&&(o.paddingRight===void 0||Is.boolean(o.paddingRight))}r.is=a})(InlayHint||(InlayHint={}));var StringValue;(function(r){function n(a){return{kind:"snippet",value:a}}r.createSnippet=n})(StringValue||(StringValue={}));var InlineCompletionItem;(function(r){function n(a,i,o,s){return{insertText:a,filterText:i,range:o,command:s}}r.create=n})(InlineCompletionItem||(InlineCompletionItem={}));var InlineCompletionList;(function(r){function n(a){return{items:a}}r.create=n})(InlineCompletionList||(InlineCompletionList={}));var InlineCompletionTriggerKind;(function(r){r.Invoked=0,r.Automatic=1})(InlineCompletionTriggerKind||(InlineCompletionTriggerKind={}));var SelectedCompletionInfo;(function(r){function n(a,i){return{range:a,text:i}}r.create=n})(SelectedCompletionInfo||(SelectedCompletionInfo={}));var InlineCompletionContext;(function(r){function n(a,i){return{triggerKind:a,selectedCompletionInfo:i}}r.create=n})(InlineCompletionContext||(InlineCompletionContext={}));var WorkspaceFolder;(function(r){function n(a){const i=a;return Is.objectLiteral(i)&&URI.is(i.uri)&&Is.string(i.name)}r.is=n})(WorkspaceFolder||(WorkspaceFolder={}));var TextDocument;(function(r){function n(s,l,f,d){return new FullTextDocument(s,l,f,d)}r.create=n;function a(s){let l=s;return!!(Is.defined(l)&&Is.string(l.uri)&&(Is.undefined(l.languageId)||Is.string(l.languageId))&&Is.uinteger(l.lineCount)&&Is.func(l.getText)&&Is.func(l.positionAt)&&Is.func(l.offsetAt))}r.is=a;function i(s,l){let f=s.getText(),d=o(l,(c,v)=>{let h=c.range.start.line-v.range.start.line;return h===0?c.range.start.character-v.range.start.character:h}),u=f.length;for(let c=d.length-1;c>=0;c--){let v=d[c],h=s.offsetAt(v.range.start),m=s.offsetAt(v.range.end);if(m<=u)f=f.substring(0,h)+v.newText+f.substring(m,f.length);else throw new Error("Overlapping edit");u=h}return f}r.applyEdits=i;function o(s,l){if(s.length<=1)return s;const f=s.length/2|0,d=s.slice(0,f),u=s.slice(f);o(d,l),o(u,l);let c=0,v=0,h=0;for(;c<d.length&&v<u.length;)l(d[c],u[v])<=0?s[h++]=d[c++]:s[h++]=u[v++];for(;c<d.length;)s[h++]=d[c++];for(;v<u.length;)s[h++]=u[v++];return s}})(TextDocument||(TextDocument={}));class FullTextDocument{constructor(n,a,i,o){this._uri=n,this._languageId=a,this._version=i,this._content=o,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(n){if(n){let a=this.offsetAt(n.start),i=this.offsetAt(n.end);return this._content.substring(a,i)}return this._content}update(n,a){this._content=n.text,this._version=a,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let n=[],a=this._content,i=!0;for(let o=0;o<a.length;o++){i&&(n.push(o),i=!1);let s=a.charAt(o);i=s==="\r"||s===`
230
+ `,s==="\r"&&o+1<a.length&&a.charAt(o+1)===`
231
+ `&&o++}i&&a.length>0&&n.push(a.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let a=this.getLineOffsets(),i=0,o=a.length;if(o===0)return Position.create(0,n);for(;i<o;){let l=Math.floor((i+o)/2);a[l]>n?o=l:i=l+1}let s=i-1;return Position.create(s,n-a[s])}offsetAt(n){let a=this.getLineOffsets();if(n.line>=a.length)return this._content.length;if(n.line<0)return 0;let i=a[n.line],o=n.line+1<a.length?a[n.line+1]:this._content.length;return Math.max(Math.min(i+n.character,o),i)}get lineCount(){return this.getLineOffsets().length}}var Is;(function(r){const n=Object.prototype.toString;function a(m){return typeof m<"u"}r.defined=a;function i(m){return typeof m>"u"}r.undefined=i;function o(m){return m===!0||m===!1}r.boolean=o;function s(m){return n.call(m)==="[object String]"}r.string=s;function l(m){return n.call(m)==="[object Number]"}r.number=l;function f(m,g,_){return n.call(m)==="[object Number]"&&g<=m&&m<=_}r.numberRange=f;function d(m){return n.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}r.integer=d;function u(m){return n.call(m)==="[object Number]"&&0<=m&&m<=2147483647}r.uinteger=u;function c(m){return n.call(m)==="[object Function]"}r.func=c;function v(m){return m!==null&&typeof m=="object"}r.objectLiteral=v;function h(m,g){return Array.isArray(m)&&m.every(g)}r.typedArray=h})(Is||(Is={}));let CharacterStream$1=class{constructor(n){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const a=this._sourceText.charAt(this._pos);return this._pos++,a},this.eat=a=>{if(this._testNextCharacter(a))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=a=>{let i=this._testNextCharacter(a),o=!1;for(i&&(o=i,this._start=this._pos);i;)this._pos++,i=this._testNextCharacter(a),o=!0;return o},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=a=>{this._pos=a},this.match=(a,i=!0,o=!1)=>{let s=null,l=null;return typeof a=="string"?(l=new RegExp(a,o?"i":"g").test(this._sourceText.slice(this._pos,this._pos+a.length)),s=a):a instanceof RegExp&&(l=this._sourceText.slice(this._pos).match(a),s=l?.[0]),l!=null&&(typeof a=="string"||l instanceof Array&&this._sourceText.startsWith(l[0],this._pos))?(i&&(this._start=this._pos,s&&s.length&&(this._pos+=s.length)),l):!1},this.backUp=a=>{this._pos-=a},this.column=()=>this._pos,this.indentation=()=>{const a=this._sourceText.match(/\s*/);let i=0;if(a&&a.length!==0){const o=a[0];let s=0;for(;o.length>s;)o.charCodeAt(s)===9?i+=2:i++,s++}return i},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=n}_testNextCharacter(n){const a=this._sourceText.charAt(this._pos);let i=!1;return typeof n=="string"?i=a===n:i=n instanceof RegExp?n.test(a):n(a),i}};function opt(r){return{ofRule:r}}function list(r,n){return{ofRule:r,isList:!0,separator:n}}function butNot(r,n){const a=r.match;return r.match=i=>{let o=!1;return a&&(o=a(i)),o&&n.every(s=>s.match&&!s.match(i))},r}function t(r,n){return{style:n,match:a=>a.kind===r}}function p(r,n){return{style:n||"punctuation",match:a=>a.kind==="Punctuation"&&a.value===r}}const isIgnored=r=>r===" "||r===" "||r===","||r===`
232
+ `||r==="\r"||r==="\uFEFF"||r===" ",LexRules={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},ParseRules={Document:[list("Definition")],Definition(r){switch(r.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[word("query"),opt(name$1("def")),opt("VariableDefinitions"),list("Directive"),"SelectionSet"],Mutation:[word("mutation"),opt(name$1("def")),opt("VariableDefinitions"),list("Directive"),"SelectionSet"],Subscription:[word("subscription"),opt(name$1("def")),opt("VariableDefinitions"),list("Directive"),"SelectionSet"],VariableDefinitions:[p("("),list("VariableDefinition"),p(")")],VariableDefinition:["Variable",p(":"),"Type",opt("DefaultValue")],Variable:[p("$","variable"),name$1("variable")],DefaultValue:[p("="),"Value"],SelectionSet:[p("{"),list("Selection"),p("}")],Selection(r,n){return r.value==="..."?n.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":n.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[name$1("property"),p(":"),name$1("qualifier"),opt("Arguments"),list("Directive"),opt("SelectionSet")],Field:[name$1("property"),opt("Arguments"),list("Directive"),opt("SelectionSet")],Arguments:[p("("),list("Argument"),p(")")],Argument:[name$1("attribute"),p(":"),"Value"],FragmentSpread:[p("..."),name$1("def"),list("Directive")],InlineFragment:[p("..."),opt("TypeCondition"),list("Directive"),"SelectionSet"],FragmentDefinition:[word("fragment"),opt(butNot(name$1("def"),[word("on")])),"TypeCondition",list("Directive"),"SelectionSet"],TypeCondition:[word("on"),"NamedType"],Value(r){switch(r.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(r.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(r.value){case"true":case"false":return"BooleanValue"}return r.value==="null"?"NullValue":"EnumValue"}},NumberValue:[t("Number","number")],StringValue:[{style:"string",match:r=>r.kind==="String",update(r,n){n.value.startsWith('"""')&&(r.inBlockstring=!n.value.slice(3).endsWith('"""'))}}],BooleanValue:[t("Name","builtin")],NullValue:[t("Name","keyword")],EnumValue:[name$1("string-2")],ListValue:[p("["),list("Value"),p("]")],ObjectValue:[p("{"),list("ObjectField"),p("}")],ObjectField:[name$1("attribute"),p(":"),"Value"],Type(r){return r.value==="["?"ListType":"NonNullType"},ListType:[p("["),"Type",p("]"),opt(p("!"))],NonNullType:["NamedType",opt(p("!"))],NamedType:[type("atom")],Directive:[p("@","meta"),name$1("meta"),opt("Arguments")],DirectiveDef:[word("directive"),p("@","meta"),name$1("meta"),opt("ArgumentsDef"),word("on"),list("DirectiveLocation",p("|"))],InterfaceDef:[word("interface"),name$1("atom"),opt("Implements"),list("Directive"),opt("FieldsDef")],Implements:[word("implements"),list("NamedType",p("&"))],DirectiveLocation:[name$1("string-2")],SchemaDef:[word("schema"),list("Directive"),p("{"),list("OperationTypeDef"),p("}")],OperationTypeDef:[name$1("keyword"),p(":"),name$1("atom")],ScalarDef:[word("scalar"),name$1("atom"),list("Directive")],ObjectTypeDef:[word("type"),name$1("atom"),opt("Implements"),list("Directive"),opt("FieldsDef")],FieldsDef:[p("{"),list("FieldDef"),p("}")],FieldDef:[name$1("property"),opt("ArgumentsDef"),p(":"),"Type",list("Directive")],ArgumentsDef:[p("("),list("InputValueDef"),p(")")],InputValueDef:[name$1("attribute"),p(":"),"Type",opt("DefaultValue"),list("Directive")],UnionDef:[word("union"),name$1("atom"),list("Directive"),p("="),list("UnionMember",p("|"))],UnionMember:["NamedType"],EnumDef:[word("enum"),name$1("atom"),list("Directive"),opt("EnumValuesDef")],EnumValuesDef:[p("{"),list("EnumValueDef"),p("}")],EnumValueDef:[name$1("string-2"),list("Directive")],InputDef:[word("input"),name$1("atom"),list("Directive"),opt("InputFieldsDef")],InputFieldsDef:[p("{"),list("InputValueDef"),p("}")],ExtendDef:[word("extend"),"ExtensionDefinition"],ExtensionDefinition(r){switch(r.value){case"schema":return SCHEMA_EXTENSION;case"scalar":return SCALAR_TYPE_EXTENSION;case"type":return OBJECT_TYPE_EXTENSION;case"interface":return INTERFACE_TYPE_EXTENSION;case"union":return UNION_TYPE_EXTENSION;case"enum":return ENUM_TYPE_EXTENSION;case"input":return INPUT_OBJECT_TYPE_EXTENSION}},[SCHEMA_EXTENSION]:["SchemaDef"],[SCALAR_TYPE_EXTENSION]:["ScalarDef"],[OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[UNION_TYPE_EXTENSION]:["UnionDef"],[ENUM_TYPE_EXTENSION]:["EnumDef"],[INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function word(r){return{style:"keyword",match:n=>n.kind==="Name"&&n.value===r}}function name$1(r){return{style:r,match:n=>n.kind==="Name",update(n,a){n.name=a.value}}}function type(r){return{style:r,match:n=>n.kind==="Name",update(n,a){var i;!((i=n.prevState)===null||i===void 0)&&i.prevState&&(n.name=a.value,n.prevState.prevState.type=a.value)}}}function onlineParser$1(r={eatWhitespace:n=>n.eatWhile(isIgnored),lexRules:LexRules,parseRules:ParseRules,editorConfig:{}}){return{startState(){const n={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return pushRule(r.parseRules,n,DOCUMENT),n},token(n,a){return getToken(n,a,r)}}}function getToken(r,n,a){var i;if(n.inBlockstring)return r.match(/.*"""/)?(n.inBlockstring=!1,"string"):(r.skipToEnd(),"string");const{lexRules:o,parseRules:s,eatWhitespace:l,editorConfig:f}=a;if(n.rule&&n.rule.length===0?popRule(n):n.needsAdvance&&(n.needsAdvance=!1,advanceRule(n,!0)),r.sol()){const c=f?.tabSize||2;n.indentLevel=Math.floor(r.indentation()/c)}if(l(r))return"ws";const d=lex(o,r);if(!d)return r.match(/\S+/)||r.match(/\s/),pushRule(SpecialParseRules,n,"Invalid"),"invalidchar";if(d.kind==="Comment")return pushRule(SpecialParseRules,n,"Comment"),"comment";const u=assign({},n);if(d.kind==="Punctuation"){if(/^[{([]/.test(d.value))n.indentLevel!==void 0&&(n.levels=(n.levels||[]).concat(n.indentLevel+1));else if(/^[})\]]/.test(d.value)){const c=n.levels=(n.levels||[]).slice(0,-1);n.indentLevel&&c.length>0&&c.at(-1)<n.indentLevel&&(n.indentLevel=c.at(-1))}}for(;n.rule;){let c=typeof n.rule=="function"?n.step===0?n.rule(d,r):null:n.rule[n.step];if(n.needsSeparator&&(c=c?.separator),c){if(c.ofRule&&(c=c.ofRule),typeof c=="string"){pushRule(s,n,c);continue}if(!((i=c.match)===null||i===void 0)&&i.call(c,d))return c.update&&c.update(n,d),d.kind==="Punctuation"?advanceRule(n,!0):n.needsAdvance=!0,c.style}unsuccessful(n)}return assign(n,u),pushRule(SpecialParseRules,n,"Invalid"),"invalidchar"}function assign(r,n){const a=Object.keys(n);for(let i=0;i<a.length;i++)r[a[i]]=n[a[i]];return r}const SpecialParseRules={Invalid:[],Comment:[]};function pushRule(r,n,a){if(!r[a])throw new TypeError("Unknown rule: "+a);n.prevState=Object.assign({},n),n.kind=a,n.name=null,n.type=null,n.rule=r[a],n.step=0,n.needsSeparator=!1}function popRule(r){r.prevState&&(r.kind=r.prevState.kind,r.name=r.prevState.name,r.type=r.prevState.type,r.rule=r.prevState.rule,r.step=r.prevState.step,r.needsSeparator=r.prevState.needsSeparator,r.prevState=r.prevState.prevState)}function advanceRule(r,n){var a;if(isList(r)&&r.rule){const i=r.rule[r.step];if(i.separator){const{separator:o}=i;if(r.needsSeparator=!r.needsSeparator,!r.needsSeparator&&o.ofRule)return}if(n)return}for(r.needsSeparator=!1,r.step++;r.rule&&!(Array.isArray(r.rule)&&r.step<r.rule.length);)popRule(r),r.rule&&(isList(r)?!((a=r.rule)===null||a===void 0)&&a[r.step].separator&&(r.needsSeparator=!r.needsSeparator):(r.needsSeparator=!1,r.step++))}function isList(r){const n=Array.isArray(r.rule)&&typeof r.rule[r.step]!="string"&&r.rule[r.step];return n&&n.isList}function unsuccessful(r){for(;r.rule&&!(Array.isArray(r.rule)&&r.rule[r.step].ofRule);)popRule(r);r.rule&&advanceRule(r,!1)}function lex(r,n){const a=Object.keys(r);for(let i=0;i<a.length;i++){const o=n.match(r[a[i]]);if(o&&o instanceof Array)return{kind:a[i],value:o[0]}}}var GraphQLDocumentMode;(function(r){r.TYPE_SYSTEM="TYPE_SYSTEM",r.EXECUTABLE="EXECUTABLE",r.UNKNOWN="UNKNOWN"})(GraphQLDocumentMode||(GraphQLDocumentMode={}));const AdditionalRuleKinds={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},RuleKinds=Object.assign(Object.assign({},Kind),AdditionalRuleKinds);var CompletionItemKind;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(CompletionItemKind||(CompletionItemKind={}));CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function;CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Function,CompletionItemKind.Constructor;var nullthrows={exports:{}},hasRequiredNullthrows;function requireNullthrows(){if(hasRequiredNullthrows)return nullthrows.exports;hasRequiredNullthrows=1;function r(n,a){if(n!=null)return n;var i=new Error(a!==void 0?a:"Got unexpected "+n);throw i.framesToPop=1,i}return nullthrows.exports=r,nullthrows.exports.default=r,Object.defineProperty(nullthrows.exports,"__esModule",{value:!0}),nullthrows.exports}requireNullthrows();var parser={},CharacterStream={},hasRequiredCharacterStream;function requireCharacterStream(){if(hasRequiredCharacterStream)return CharacterStream;hasRequiredCharacterStream=1,Object.defineProperty(CharacterStream,"__esModule",{value:!0});let r=class{constructor(a){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const i=this._sourceText.charAt(this._pos);return this._pos++,i},this.eat=i=>{if(this._testNextCharacter(i))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=i=>{let o=this._testNextCharacter(i),s=!1;for(o&&(s=o,this._start=this._pos);o;)this._pos++,o=this._testNextCharacter(i),s=!0;return s},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=i=>{this._pos=i},this.match=(i,o=!0,s=!1)=>{let l=null,f=null;return typeof i=="string"?(f=new RegExp(i,s?"i":"g").test(this._sourceText.slice(this._pos,this._pos+i.length)),l=i):i instanceof RegExp&&(f=this._sourceText.slice(this._pos).match(i),l=f?.[0]),f!=null&&(typeof i=="string"||f instanceof Array&&this._sourceText.startsWith(f[0],this._pos))?(o&&(this._start=this._pos,l&&l.length&&(this._pos+=l.length)),f):!1},this.backUp=i=>{this._pos-=i},this.column=()=>this._pos,this.indentation=()=>{const i=this._sourceText.match(/\s*/);let o=0;if(i&&i.length!==0){const s=i[0];let l=0;for(;s.length>l;)s.charCodeAt(l)===9?o+=2:o++,l++}return o},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=a}_testNextCharacter(a){const i=this._sourceText.charAt(this._pos);let o=!1;return typeof a=="string"?o=i===a:o=a instanceof RegExp?a.test(i):a(i),o}};return CharacterStream.default=r,CharacterStream}var Rules={},RuleHelpers={},hasRequiredRuleHelpers;function requireRuleHelpers(){if(hasRequiredRuleHelpers)return RuleHelpers;hasRequiredRuleHelpers=1,Object.defineProperty(RuleHelpers,"__esModule",{value:!0}),RuleHelpers.opt=r,RuleHelpers.list=n,RuleHelpers.butNot=a,RuleHelpers.t=i,RuleHelpers.p=o;function r(s){return{ofRule:s}}function n(s,l){return{ofRule:s,isList:!0,separator:l}}function a(s,l){const f=s.match;return s.match=d=>{let u=!1;return f&&(u=f(d)),u&&l.every(c=>c.match&&!c.match(d))},s}function i(s,l){return{style:l,match:f=>f.kind===s}}function o(s,l){return{style:l||"punctuation",match:f=>f.kind==="Punctuation"&&f.value===s}}return RuleHelpers}var require$$0=getAugmentedNamespace(graphql),hasRequiredRules;function requireRules(){if(hasRequiredRules)return Rules;hasRequiredRules=1,Object.defineProperty(Rules,"__esModule",{value:!0}),Rules.ParseRules=Rules.LexRules=Rules.isIgnored=void 0;const r=requireRuleHelpers(),n=require$$0,a=l=>l===" "||l===" "||l===","||l===`
233
+ `||l==="\r"||l==="\uFEFF"||l===" ";Rules.isIgnored=a,Rules.LexRules={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},Rules.ParseRules={Document:[(0,r.list)("Definition")],Definition(l){switch(l.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return n.Kind.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[i("query"),(0,r.opt)(o("def")),(0,r.opt)("VariableDefinitions"),(0,r.list)("Directive"),"SelectionSet"],Mutation:[i("mutation"),(0,r.opt)(o("def")),(0,r.opt)("VariableDefinitions"),(0,r.list)("Directive"),"SelectionSet"],Subscription:[i("subscription"),(0,r.opt)(o("def")),(0,r.opt)("VariableDefinitions"),(0,r.list)("Directive"),"SelectionSet"],VariableDefinitions:[(0,r.p)("("),(0,r.list)("VariableDefinition"),(0,r.p)(")")],VariableDefinition:["Variable",(0,r.p)(":"),"Type",(0,r.opt)("DefaultValue")],Variable:[(0,r.p)("$","variable"),o("variable")],DefaultValue:[(0,r.p)("="),"Value"],SelectionSet:[(0,r.p)("{"),(0,r.list)("Selection"),(0,r.p)("}")],Selection(l,f){return l.value==="..."?f.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":f.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[o("property"),(0,r.p)(":"),o("qualifier"),(0,r.opt)("Arguments"),(0,r.list)("Directive"),(0,r.opt)("SelectionSet")],Field:[o("property"),(0,r.opt)("Arguments"),(0,r.list)("Directive"),(0,r.opt)("SelectionSet")],Arguments:[(0,r.p)("("),(0,r.list)("Argument"),(0,r.p)(")")],Argument:[o("attribute"),(0,r.p)(":"),"Value"],FragmentSpread:[(0,r.p)("..."),o("def"),(0,r.list)("Directive")],InlineFragment:[(0,r.p)("..."),(0,r.opt)("TypeCondition"),(0,r.list)("Directive"),"SelectionSet"],FragmentDefinition:[i("fragment"),(0,r.opt)((0,r.butNot)(o("def"),[i("on")])),"TypeCondition",(0,r.list)("Directive"),"SelectionSet"],TypeCondition:[i("on"),"NamedType"],Value(l){switch(l.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(l.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(l.value){case"true":case"false":return"BooleanValue"}return l.value==="null"?"NullValue":"EnumValue"}},NumberValue:[(0,r.t)("Number","number")],StringValue:[{style:"string",match:l=>l.kind==="String",update(l,f){f.value.startsWith('"""')&&(l.inBlockstring=!f.value.slice(3).endsWith('"""'))}}],BooleanValue:[(0,r.t)("Name","builtin")],NullValue:[(0,r.t)("Name","keyword")],EnumValue:[o("string-2")],ListValue:[(0,r.p)("["),(0,r.list)("Value"),(0,r.p)("]")],ObjectValue:[(0,r.p)("{"),(0,r.list)("ObjectField"),(0,r.p)("}")],ObjectField:[o("attribute"),(0,r.p)(":"),"Value"],Type(l){return l.value==="["?"ListType":"NonNullType"},ListType:[(0,r.p)("["),"Type",(0,r.p)("]"),(0,r.opt)((0,r.p)("!"))],NonNullType:["NamedType",(0,r.opt)((0,r.p)("!"))],NamedType:[s("atom")],Directive:[(0,r.p)("@","meta"),o("meta"),(0,r.opt)("Arguments")],DirectiveDef:[i("directive"),(0,r.p)("@","meta"),o("meta"),(0,r.opt)("ArgumentsDef"),i("on"),(0,r.list)("DirectiveLocation",(0,r.p)("|"))],InterfaceDef:[i("interface"),o("atom"),(0,r.opt)("Implements"),(0,r.list)("Directive"),(0,r.opt)("FieldsDef")],Implements:[i("implements"),(0,r.list)("NamedType",(0,r.p)("&"))],DirectiveLocation:[o("string-2")],SchemaDef:[i("schema"),(0,r.list)("Directive"),(0,r.p)("{"),(0,r.list)("OperationTypeDef"),(0,r.p)("}")],OperationTypeDef:[o("keyword"),(0,r.p)(":"),o("atom")],ScalarDef:[i("scalar"),o("atom"),(0,r.list)("Directive")],ObjectTypeDef:[i("type"),o("atom"),(0,r.opt)("Implements"),(0,r.list)("Directive"),(0,r.opt)("FieldsDef")],FieldsDef:[(0,r.p)("{"),(0,r.list)("FieldDef"),(0,r.p)("}")],FieldDef:[o("property"),(0,r.opt)("ArgumentsDef"),(0,r.p)(":"),"Type",(0,r.list)("Directive")],ArgumentsDef:[(0,r.p)("("),(0,r.list)("InputValueDef"),(0,r.p)(")")],InputValueDef:[o("attribute"),(0,r.p)(":"),"Type",(0,r.opt)("DefaultValue"),(0,r.list)("Directive")],UnionDef:[i("union"),o("atom"),(0,r.list)("Directive"),(0,r.p)("="),(0,r.list)("UnionMember",(0,r.p)("|"))],UnionMember:["NamedType"],EnumDef:[i("enum"),o("atom"),(0,r.list)("Directive"),(0,r.opt)("EnumValuesDef")],EnumValuesDef:[(0,r.p)("{"),(0,r.list)("EnumValueDef"),(0,r.p)("}")],EnumValueDef:[o("string-2"),(0,r.list)("Directive")],InputDef:[i("input"),o("atom"),(0,r.list)("Directive"),(0,r.opt)("InputFieldsDef")],InputFieldsDef:[(0,r.p)("{"),(0,r.list)("InputValueDef"),(0,r.p)("}")],ExtendDef:[i("extend"),"ExtensionDefinition"],ExtensionDefinition(l){switch(l.value){case"schema":return n.Kind.SCHEMA_EXTENSION;case"scalar":return n.Kind.SCALAR_TYPE_EXTENSION;case"type":return n.Kind.OBJECT_TYPE_EXTENSION;case"interface":return n.Kind.INTERFACE_TYPE_EXTENSION;case"union":return n.Kind.UNION_TYPE_EXTENSION;case"enum":return n.Kind.ENUM_TYPE_EXTENSION;case"input":return n.Kind.INPUT_OBJECT_TYPE_EXTENSION}},[n.Kind.SCHEMA_EXTENSION]:["SchemaDef"],[n.Kind.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[n.Kind.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[n.Kind.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[n.Kind.UNION_TYPE_EXTENSION]:["UnionDef"],[n.Kind.ENUM_TYPE_EXTENSION]:["EnumDef"],[n.Kind.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function i(l){return{style:"keyword",match:f=>f.kind==="Name"&&f.value===l}}function o(l){return{style:l,match:f=>f.kind==="Name",update(f,d){f.name=d.value}}}function s(l){return{style:l,match:f=>f.kind==="Name",update(f,d){var u;!((u=f.prevState)===null||u===void 0)&&u.prevState&&(f.name=d.value,f.prevState.prevState.type=d.value)}}}return Rules}var onlineParser={},hasRequiredOnlineParser;function requireOnlineParser(){if(hasRequiredOnlineParser)return onlineParser;hasRequiredOnlineParser=1,Object.defineProperty(onlineParser,"__esModule",{value:!0}),onlineParser.default=a;const r=requireRules(),n=require$$0;function a(h={eatWhitespace:m=>m.eatWhile(r.isIgnored),lexRules:r.LexRules,parseRules:r.ParseRules,editorConfig:{}}){return{startState(){const m={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return l(h.parseRules,m,n.Kind.DOCUMENT),m},token(m,g){return i(m,g,h)}}}function i(h,m,g){var _;if(m.inBlockstring)return h.match(/.*"""/)?(m.inBlockstring=!1,"string"):(h.skipToEnd(),"string");const{lexRules:S,parseRules:N,eatWhitespace:O,editorConfig:M}=g;if(m.rule&&m.rule.length===0?f(m):m.needsAdvance&&(m.needsAdvance=!1,d(m,!0)),h.sol()){const k=M?.tabSize||2;m.indentLevel=Math.floor(h.indentation()/k)}if(O(h))return"ws";const F=v(S,h);if(!F)return h.match(/\S+/)||h.match(/\s/),l(s,m,"Invalid"),"invalidchar";if(F.kind==="Comment")return l(s,m,"Comment"),"comment";const L=o({},m);if(F.kind==="Punctuation"){if(/^[{([]/.test(F.value))m.indentLevel!==void 0&&(m.levels=(m.levels||[]).concat(m.indentLevel+1));else if(/^[})\]]/.test(F.value)){const k=m.levels=(m.levels||[]).slice(0,-1);m.indentLevel&&k.length>0&&k.at(-1)<m.indentLevel&&(m.indentLevel=k.at(-1))}}for(;m.rule;){let k=typeof m.rule=="function"?m.step===0?m.rule(F,h):null:m.rule[m.step];if(m.needsSeparator&&(k=k?.separator),k){if(k.ofRule&&(k=k.ofRule),typeof k=="string"){l(N,m,k);continue}if(!((_=k.match)===null||_===void 0)&&_.call(k,F))return k.update&&k.update(m,F),F.kind==="Punctuation"?d(m,!0):m.needsAdvance=!0,k.style}c(m)}return o(m,L),l(s,m,"Invalid"),"invalidchar"}function o(h,m){const g=Object.keys(m);for(let _=0;_<g.length;_++)h[g[_]]=m[g[_]];return h}const s={Invalid:[],Comment:[]};function l(h,m,g){if(!h[g])throw new TypeError("Unknown rule: "+g);m.prevState=Object.assign({},m),m.kind=g,m.name=null,m.type=null,m.rule=h[g],m.step=0,m.needsSeparator=!1}function f(h){h.prevState&&(h.kind=h.prevState.kind,h.name=h.prevState.name,h.type=h.prevState.type,h.rule=h.prevState.rule,h.step=h.prevState.step,h.needsSeparator=h.prevState.needsSeparator,h.prevState=h.prevState.prevState)}function d(h,m){var g;if(u(h)&&h.rule){const _=h.rule[h.step];if(_.separator){const{separator:S}=_;if(h.needsSeparator=!h.needsSeparator,!h.needsSeparator&&S.ofRule)return}if(m)return}for(h.needsSeparator=!1,h.step++;h.rule&&!(Array.isArray(h.rule)&&h.step<h.rule.length);)f(h),h.rule&&(u(h)?!((g=h.rule)===null||g===void 0)&&g[h.step].separator&&(h.needsSeparator=!h.needsSeparator):(h.needsSeparator=!1,h.step++))}function u(h){const m=Array.isArray(h.rule)&&typeof h.rule[h.step]!="string"&&h.rule[h.step];return m&&m.isList}function c(h){for(;h.rule&&!(Array.isArray(h.rule)&&h.rule[h.step].ofRule);)f(h);h.rule&&d(h,!1)}function v(h,m){const g=Object.keys(h);for(let _=0;_<g.length;_++){const S=m.match(h[g[_]]);if(S&&S instanceof Array)return{kind:g[_],value:S[0]}}}return onlineParser}var api={},hasRequiredApi;function requireApi(){return hasRequiredApi||(hasRequiredApi=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TYPE_SYSTEM_KINDS=r.GraphQLDocumentMode=void 0,r.runOnlineParser=i,r.getDocumentMode=l,r.getTokenAtPosition=f,r.getContextAtPosition=d;const n=requireParser(),a=require$$0;function i(u,c){const v=u.split(`
234
+ `),h=(0,n.onlineParser)();let m=h.startState(),g="",_=new n.CharacterStream("");for(let S=0;S<v.length;S++){for(_=new n.CharacterStream(v[S]);!_.eol()&&(g=h.token(_,m),c(_,m,g,S)!=="BREAK"););c(_,m,g,S),m.kind||(m=h.startState())}return{start:_.getStartOfToken(),end:_.getCurrentPosition(),string:_.current(),state:m,style:g}}var o;(function(u){u.TYPE_SYSTEM="TYPE_SYSTEM",u.EXECUTABLE="EXECUTABLE",u.UNKNOWN="UNKNOWN"})(o||(r.GraphQLDocumentMode=o={})),r.TYPE_SYSTEM_KINDS=[a.Kind.SCHEMA_DEFINITION,a.Kind.OPERATION_TYPE_DEFINITION,a.Kind.SCALAR_TYPE_DEFINITION,a.Kind.OBJECT_TYPE_DEFINITION,a.Kind.INTERFACE_TYPE_DEFINITION,a.Kind.UNION_TYPE_DEFINITION,a.Kind.ENUM_TYPE_DEFINITION,a.Kind.INPUT_OBJECT_TYPE_DEFINITION,a.Kind.DIRECTIVE_DEFINITION,a.Kind.SCHEMA_EXTENSION,a.Kind.SCALAR_TYPE_EXTENSION,a.Kind.OBJECT_TYPE_EXTENSION,a.Kind.INTERFACE_TYPE_EXTENSION,a.Kind.UNION_TYPE_EXTENSION,a.Kind.ENUM_TYPE_EXTENSION,a.Kind.INPUT_OBJECT_TYPE_EXTENSION];const s=u=>{let c=o.UNKNOWN;if(u)try{(0,a.visit)((0,a.parse)(u),{enter(v){if(v.kind==="Document"){c=o.EXECUTABLE;return}return r.TYPE_SYSTEM_KINDS.includes(v.kind)?(c=o.TYPE_SYSTEM,a.BREAK):!1}})}catch{return c}return c};function l(u,c){return c?.endsWith(".graphqls")?o.TYPE_SYSTEM:s(u)}function f(u,c,v=0){let h=null,m=null,g=null;const _=i(u,(S,N,O,M)=>{if(!(M!==c.line||S.getCurrentPosition()+v<c.character+1))return h=O,m=Object.assign({},N),g=S.current(),"BREAK"});return{start:_.start,end:_.end,string:g||_.string,state:m||_.state,style:h||_.style}}function d(u,c,v,h,m,g=0){const _=h||f(u,c,g);if(!_)return null;const S=_.state.kind==="Invalid"?_.state.prevState:_.state;if(!S)return null;const N=(0,n.getTypeInfo)(v,_.state),O=m?.mode||l(u,m?.uri);return{token:_,state:S,typeInfo:N,mode:O}}}(api)),api}var getTypeInfo={},hasRequiredGetTypeInfo;function requireGetTypeInfo(){if(hasRequiredGetTypeInfo)return getTypeInfo;hasRequiredGetTypeInfo=1,Object.defineProperty(getTypeInfo,"__esModule",{value:!0}),getTypeInfo.getFieldDef=a,getTypeInfo.forEachState=i,getTypeInfo.getDefinitionState=o,getTypeInfo.getTypeInfo=s;const r=require$$0,n=requireParser();function a(l,f,d){return d===r.SchemaMetaFieldDef.name&&l.getQueryType()===f?r.SchemaMetaFieldDef:d===r.TypeMetaFieldDef.name&&l.getQueryType()===f?r.TypeMetaFieldDef:d===r.TypeNameMetaFieldDef.name&&(0,r.isCompositeType)(f)?r.TypeNameMetaFieldDef:"getFields"in f?f.getFields()[d]:null}function i(l,f){const d=[];let u=l;for(;u?.kind;)d.push(u),u=u.prevState;for(let c=d.length-1;c>=0;c--)f(d[c])}function o(l){let f;return i(l,d=>{switch(d.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":f=d;break}}),f}function s(l,f){let d,u,c,v,h,m,g,_,S,N,O;return i(f,M=>{var F;switch(M.kind){case n.RuleKinds.QUERY:case"ShortQuery":N=l.getQueryType();break;case n.RuleKinds.MUTATION:N=l.getMutationType();break;case n.RuleKinds.SUBSCRIPTION:N=l.getSubscriptionType();break;case n.RuleKinds.INLINE_FRAGMENT:case n.RuleKinds.FRAGMENT_DEFINITION:M.type&&(N=l.getType(M.type));break;case n.RuleKinds.FIELD:case n.RuleKinds.ALIASED_FIELD:{!N||!M.name?h=null:(h=S?a(l,S,M.name):null,N=h?h.type:null);break}case n.RuleKinds.SELECTION_SET:S=(0,r.getNamedType)(N);break;case n.RuleKinds.DIRECTIVE:c=M.name?l.getDirective(M.name):null;break;case n.RuleKinds.INTERFACE_DEF:M.name&&(g=null,O=new r.GraphQLInterfaceType({name:M.name,interfaces:[],fields:{}}));break;case n.RuleKinds.OBJECT_TYPE_DEF:M.name&&(O=null,g=new r.GraphQLObjectType({name:M.name,interfaces:[],fields:{}}));break;case n.RuleKinds.ARGUMENTS:{if(M.prevState)switch(M.prevState.kind){case n.RuleKinds.FIELD:u=h&&h.args;break;case n.RuleKinds.DIRECTIVE:u=c&&c.args;break;case n.RuleKinds.ALIASED_FIELD:{const B=(F=M.prevState)===null||F===void 0?void 0:F.name;if(!B){u=null;break}const j=S?a(l,S,B):null;if(!j){u=null;break}u=j.args;break}default:u=null;break}else u=null;break}case n.RuleKinds.ARGUMENT:if(u){for(let B=0;B<u.length;B++)if(u[B].name===M.name){d=u[B];break}}m=d?.type;break;case n.RuleKinds.VARIABLE_DEFINITION:case n.RuleKinds.VARIABLE:N=m;break;case n.RuleKinds.ENUM_VALUE:const L=(0,r.getNamedType)(m);v=L instanceof r.GraphQLEnumType?L.getValues().find(B=>B.value===M.name):null;break;case n.RuleKinds.LIST_VALUE:const k=(0,r.getNullableType)(m);m=k instanceof r.GraphQLList?k.ofType:null;break;case n.RuleKinds.OBJECT_VALUE:const P=(0,r.getNamedType)(m);_=P instanceof r.GraphQLInputObjectType?P.getFields():null;break;case n.RuleKinds.OBJECT_FIELD:const U=M.name&&_?_[M.name]:null;m=U?.type,h=U,N=h?h.type:null;break;case n.RuleKinds.NAMED_TYPE:M.name&&(N=l.getType(M.name));break}}),{argDef:d,argDefs:u,directiveDef:c,enumValue:v,fieldDef:h,inputType:m,objectFieldDefs:_,parentType:S,type:N,interfaceDef:O,objectTypeDef:g}}return getTypeInfo}var types={},hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.RuleKinds=r.AdditionalRuleKinds=void 0;const n=require$$0;r.AdditionalRuleKinds={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},r.RuleKinds=Object.assign(Object.assign({},n.Kind),r.AdditionalRuleKinds)}(types)),types}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(r){var n=parser&&parser.__createBinding||(Object.create?function(c,v,h,m){m===void 0&&(m=h);var g=Object.getOwnPropertyDescriptor(v,h);(!g||("get"in g?!v.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return v[h]}}),Object.defineProperty(c,m,g)}:function(c,v,h,m){m===void 0&&(m=h),c[m]=v[h]}),a=parser&&parser.__exportStar||function(c,v){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(v,h)&&n(v,c,h)},i=parser&&parser.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(r,"__esModule",{value:!0}),r.getFieldDef=r.getDefinitionState=r.getTypeInfo=r.getDocumentMode=r.GraphQLDocumentMode=r.getContextAtPosition=r.getTokenAtPosition=r.runOnlineParser=r.onlineParser=r.t=r.p=r.opt=r.list=r.butNot=r.isIgnored=r.ParseRules=r.LexRules=r.CharacterStream=void 0;var o=requireCharacterStream();Object.defineProperty(r,"CharacterStream",{enumerable:!0,get:function(){return i(o).default}});var s=requireRules();Object.defineProperty(r,"LexRules",{enumerable:!0,get:function(){return s.LexRules}}),Object.defineProperty(r,"ParseRules",{enumerable:!0,get:function(){return s.ParseRules}}),Object.defineProperty(r,"isIgnored",{enumerable:!0,get:function(){return s.isIgnored}});var l=requireRuleHelpers();Object.defineProperty(r,"butNot",{enumerable:!0,get:function(){return l.butNot}}),Object.defineProperty(r,"list",{enumerable:!0,get:function(){return l.list}}),Object.defineProperty(r,"opt",{enumerable:!0,get:function(){return l.opt}}),Object.defineProperty(r,"p",{enumerable:!0,get:function(){return l.p}}),Object.defineProperty(r,"t",{enumerable:!0,get:function(){return l.t}});var f=requireOnlineParser();Object.defineProperty(r,"onlineParser",{enumerable:!0,get:function(){return i(f).default}});var d=requireApi();Object.defineProperty(r,"runOnlineParser",{enumerable:!0,get:function(){return d.runOnlineParser}}),Object.defineProperty(r,"getTokenAtPosition",{enumerable:!0,get:function(){return d.getTokenAtPosition}}),Object.defineProperty(r,"getContextAtPosition",{enumerable:!0,get:function(){return d.getContextAtPosition}}),Object.defineProperty(r,"GraphQLDocumentMode",{enumerable:!0,get:function(){return d.GraphQLDocumentMode}}),Object.defineProperty(r,"getDocumentMode",{enumerable:!0,get:function(){return d.getDocumentMode}});var u=requireGetTypeInfo();Object.defineProperty(r,"getTypeInfo",{enumerable:!0,get:function(){return u.getTypeInfo}}),Object.defineProperty(r,"getDefinitionState",{enumerable:!0,get:function(){return u.getDefinitionState}}),Object.defineProperty(r,"getFieldDef",{enumerable:!0,get:function(){return u.getFieldDef}}),a(requireTypes(),r)}(parser)),parser}var parserExports=requireParser();function createNameNode(r){return{kind:ASTNodeKind.NAME,location:[r.index,r.index],value:r.value??""}}function createToken(r,n,a,i,o,s,l){return{kind:r,index:n,start:{line:a,column:i,position:s},end:{line:a,column:o,position:l}}}function createTokenWithValue(r,n,a,i,o,s,l,f){return{kind:r,index:a,start:{line:i,column:o,position:l},end:{line:i,column:s,position:f},value:n}}function getLocation(r,n){const a=r[n[0]],i=r[n[1]];return{start:a.start.position,startToken:a,end:i.end.position,endToken:i}}function findNextAncestorByKind(r,...n){let a,i=r.length-1;for(;i>=0&&(a=r[i--]);)if(n.includes(a?.kind))return a;throw new Error(`Ancestor for kind "${n}" not found!`)}function deleteUntilNextAncestor(r,...n){let a;for(;r.length>0&&(a=r[r.length-1]);){if(n.includes(a?.kind))return a;r.splice(-1,1)}throw new Error(`Ancestor for kind "${n}" not found!`)}function deleteUntilAndIncludingNextAncestor(r,...n){let a;for(;r.length>0&&(a=r[r.length-1]);)if(r.splice(-1,1),n.includes(a?.kind))return a;throw new Error(`Ancestor for kind "${n}" not found!`)}function setEndTokenForAllAncestor(r,n){for(let a=0;a<r.length;a++)setEndToken(r[a],n)}function setEndToken(r,n){r.location[1]=n.index}function getSchemaTypeFromAST(r,n){let a,i=!1,o=!0,s;return r.kind===ASTNodeKind.NON_NULL_TYPE?(o=!1,r.type.kind===ASTNodeKind.LIST_TYPE?(a=r.type.type,i=!0):a=r.type):r.kind===ASTNodeKind.LIST_TYPE?(a=r.type,i=!0):a=r,a?(a.kind===ASTNodeKind.LIST_TYPE||a.kind===ASTNodeKind.NON_NULL_TYPE?s=getSchemaTypeFromAST(a,n):s=n(a.name.value),s&&{kind:"value-type",isList:i,isOptional:o,type:s}):null}const TokenLevel={...RuleKinds,DEFAULT:"DefaultValue",NUMBER:"NumberValue"},OverwrittenParseRules={...parserExports.ParseRules,Definition:r=>{switch(r.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition"}}};function parseExecutableDocument(r){const n=onlineParser$1({eatWhitespace:g=>g.eatWhile(parserExports.isIgnored),lexRules:parserExports.LexRules,parseRules:OverwrittenParseRules,editorConfig:{}}),a=r.split(/\n/).map((g,_,{length:S})=>new CharacterStream$1(g+(S>_+1?`
235
+ `:""))),i=n.startState(),o=parseToken("document",TokenKind.SOF,0,1,1,1,0,0),s=[o],f=[{kind:ASTNodeKind.DOCUMENT,location:[0,0],definitions:[],tokens:s}];let d=o,u=0,c=1,v=1;for(let g=0;g<a.length;g++){const _=a[g];for(v=g+1;!_.eol();){c=_.column()+1;const S=_.getCurrentPosition(),N=n.token(_,i),O=i.kind,M=_.current();if(!(!O||N==="comment"||N==="ws")&&(d=parseToken(N,M,s.length,v,c,_.column()+1,u+S,u+_.getCurrentPosition()),s.push(d),d.kind!==TokenKind.INVALID))switch(O){case TokenLevel.DOCUMENT:parseVariablesDefinition(f,d),parseSelectionSet(f,d);break;case TokenLevel.QUERY:case TokenLevel.MUTATION:case TokenLevel.SUBSCRIPTION:parseOperation(f,d),parseVariablesDefinition(f,d),parseSelectionSet(f,d);break;case TokenLevel.FRAGMENT_DEFINITION:parseFragment(f,d),parseSelectionSet(f,d);break;case TokenLevel.INLINE_FRAGMENT:parseInlineFragment(f,d),parseSelectionSet(f,d);break;case TokenLevel.FRAGMENT_SPREAD:parseFragmentSpread(f,d);break;case TokenLevel.FIELD:parseField(f,d),parseArguments(f,d),parseSelectionSet(f,d);break;case TokenLevel.ALIASED_FIELD:parseAliasedField(f,d),parseArguments(f,d),parseSelectionSet(f,d);break;case TokenLevel.SELECTION_SET:parseOperation(f,d),parseSelectionSet(f,d);break;case TokenLevel.VARIABLE_DEFINITIONS:parseListValue(f,d),parseVariablesDefinition(f,d);break;case TokenLevel.VARIABLE_DEFINITION:parseNonNullableType(f,d),parseVariableDefinition(f,d);break;case TokenLevel.DEFAULT:parseDefaultValue(f,d);break;case TokenLevel.VARIABLE:parseVariable(f,d);break;case TokenLevel.DIRECTIVE:parseDirective(f,d);break;case TokenLevel.LIST_TYPE:parseNonNullableType(f,d),parseListType(f,d);break;case TokenLevel.NAMED_TYPE:parseNamedType(f,d);break;case TokenLevel.ARGUMENTS:parseListValue(f,d),parseObjectValue(f,d),parseArguments(f,d);break;case TokenLevel.ARGUMENT:parseArgument(f,d);break;case TokenLevel.LIST:parseListValue(f,d),parseObjectValue(f,d);break;case TokenLevel.OBJECT:parseListValue(f,d),parseObjectValue(f,d);break;case TokenLevel.OBJECT_FIELD:parseObjectField(f,d);break;case TokenLevel.BOOLEAN:parseBooleanValue(f,d);break;case TokenLevel.ENUM:parseEnumValue(f,d);break;case TokenLevel.NULL:parseNullValue(f,d);break;case TokenLevel.NUMBER:parseNumberValue(f,d);break;case TokenLevel.STRING:parseStringValue(f,d);break}}u+=_.getCurrentPosition(),c=_.column()+1}const h=deleteUntilAndIncludingNextAncestor(f,ASTNodeKind.DOCUMENT),m=parseToken("document",TokenKind.EOF,s.length,v,c,c,u,u);return s.push(m),h.location[1]=m.index,h}function parseAliasedField(r,n){switch(n.kind){case TokenKind.NAME:{let a=function(o){const s={kind:ASTNodeKind.FIELD,location:[n.index,n.index],alias:createNameNode(n)};o.selections.push(s),r.push(s)},i=findNextAncestorByKind(r,ASTNodeKind.SELECTION_SET,ASTNodeKind.FIELD);setEndTokenForAllAncestor(r,n),i.kind===ASTNodeKind.SELECTION_SET?a(i):i.alias?i.name=createNameNode(n):(i=deleteUntilNextAncestor(r,ASTNodeKind.SELECTION_SET),a(i))}break;case TokenKind.COLON:setEndTokenForAllAncestor(r,n);break}}function parseDirective(r,n){switch(n.kind){case TokenKind.AT:{const a=deleteUntilNextAncestor(r,ASTNodeKind.OPERATION_DEFINITION,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.FRAGMENT_DEFINITION,ASTNodeKind.FIELD,ASTNodeKind.FRAGMENT_SPREAD,ASTNodeKind.INLINE_FRAGMENT);if(setEndTokenForAllAncestor(r,n),a.kind===ASTNodeKind.VARIABLE_DEFINITION){const i={kind:ASTNodeKind.DIRECTIVE,location:[n.index,n.index],isConst:!0};a.directives?a.directives.push(i):a.directives=[i],r.push(i)}else{const i={kind:ASTNodeKind.DIRECTIVE,location:[n.index,n.index]};a.directives?a.directives.push(i):a.directives=[i],r.push(i)}}break;case TokenKind.NAME:setEndTokenForAllAncestor(r,n),findNextAncestorByKind(r,ASTNodeKind.DIRECTIVE).name=createNameNode(n);break}}function parseField(r,n){if(n.kind===TokenKind.NAME){const a=deleteUntilNextAncestor(r,ASTNodeKind.SELECTION_SET);setEndTokenForAllAncestor(r,n);const i={kind:ASTNodeKind.FIELD,location:[n.index,n.index],name:createNameNode(n)};a.selections.push(i),r.push(i)}}function parseFragment(r,n){switch(n.kind){case TokenKind.KEYWORD:if(setEndTokenForAllAncestor(r,n),n.value==="fragment"){const a=findNextAncestorByKind(r,ASTNodeKind.DOCUMENT),i={kind:ASTNodeKind.FRAGMENT_DEFINITION,location:[n.index,n.index]};a.definitions.push(i),r.push(i)}break;case TokenKind.NAME:setEndTokenForAllAncestor(r,n),findNextAncestorByKind(r,ASTNodeKind.FRAGMENT_DEFINITION).name=createNameNode(n);break}}function parseFragmentSpread(r,n){switch(n.kind){case TokenKind.SPREAD:{const a=deleteUntilNextAncestor(r,ASTNodeKind.SELECTION_SET);setEndTokenForAllAncestor(r,n);const i={kind:ASTNodeKind.FRAGMENT_SPREAD,location:[n.index,n.index]};a.selections.push(i),r.push(i)}break;case TokenKind.NAME:setEndTokenForAllAncestor(r,n),findNextAncestorByKind(r,ASTNodeKind.FRAGMENT_SPREAD).name=createNameNode(n);break}}function parseInlineFragment(r,n){switch(n.kind){case TokenKind.SPREAD:{const a=deleteUntilNextAncestor(r,ASTNodeKind.SELECTION_SET);setEndTokenForAllAncestor(r,n);const i={kind:ASTNodeKind.INLINE_FRAGMENT,location:[n.index,n.index]};a.selections.push(i),r.push(i)}break;case TokenKind.KEYWORD:setEndTokenForAllAncestor(r,n);break}}function parseOperation(r,n){switch(n.kind){case TokenKind.BRACE_L:if(r.length===1){const a=findNextAncestorByKind(r,ASTNodeKind.DOCUMENT),i={kind:ASTNodeKind.OPERATION_DEFINITION,operationType:OperationType.QUERY,location:[n.index,n.index]};setEndTokenForAllAncestor(r,n),a.definitions.push(i),r.push(i)}break;case TokenKind.KEYWORD:{const a=findNextAncestorByKind(r,ASTNodeKind.DOCUMENT);setEndTokenForAllAncestor(r,n);const i={kind:ASTNodeKind.OPERATION_DEFINITION,operationType:n.value,location:[n.index,n.index]};a.definitions.push(i),r.push(i)}break;case TokenKind.NAME:setEndTokenForAllAncestor(r,n),findNextAncestorByKind(r,ASTNodeKind.OPERATION_DEFINITION).name=createNameNode(n);break}}function parseSelectionSet(r,n){switch(n.kind){case TokenKind.BRACE_L:{const a={kind:ASTNodeKind.SELECTION_SET,location:[n.index,n.index],selections:[],closed:!1};let i=deleteUntilNextAncestor(r,ASTNodeKind.OPERATION_DEFINITION,ASTNodeKind.FRAGMENT_DEFINITION,ASTNodeKind.INLINE_FRAGMENT,ASTNodeKind.FIELD);setEndTokenForAllAncestor(r,n),i.selectionSet=a,r.push(a)}break;case TokenKind.BRACE_R:{const a=deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.SELECTION_SET,ASTNodeKind.FRAGMENT_SPREAD,ASTNodeKind.INLINE_FRAGMENT,ASTNodeKind.FIELD);if(setEndTokenForAllAncestor(r,n),a.kind===ASTNodeKind.SELECTION_SET)r.splice(-1,1),setEndToken(a,n),a.closed=!0;else{const[,i]=r.splice(-2,2);i.closed=!0}}break}}function parseVariablesDefinition(r,n){switch(n.kind){case TokenKind.PAREN_L:{const a={kind:ASTNodeKind.VARIABLES_DEFINITION,location:[n.index,n.index],variableDefinitions:[],closed:!1},i=findNextAncestorByKind(r,ASTNodeKind.OPERATION_DEFINITION);setEndTokenForAllAncestor(r,n),i.variablesDefinition=a,r.push(a)}break;case TokenKind.PAREN_R:{const a=deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.VARIABLES_DEFINITION);setEndTokenForAllAncestor(r,n),setEndToken(a,n),a.closed=!0}break}}function parseVariableDefinition(r,n){n.kind===TokenKind.COLON&&setEndTokenForAllAncestor(r,n)}function parseVariable(r,n){switch(n.kind){case TokenKind.DOLLAR:{const a=deleteUntilNextAncestor(r,ASTNodeKind.VARIABLES_DEFINITION,ASTNodeKind.ARGUMENT,ASTNodeKind.OBJECT_FIELD);switch(setEndTokenForAllAncestor(r,n),a.kind){case ASTNodeKind.VARIABLES_DEFINITION:{const i={kind:ASTNodeKind.VARIABLE_DEFINITION,location:[n.index,n.index],variable:{kind:ASTNodeKind.VARIABLE,location:[n.index,n.index]}};a.variableDefinitions.push(i),r.push(i)}break;case ASTNodeKind.ARGUMENT:case ASTNodeKind.OBJECT_FIELD:{const i={kind:ASTNodeKind.VARIABLE,location:[n.index,n.index]};a.value=i}break}}break;case TokenKind.NAME:{const a=findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.ARGUMENT,ASTNodeKind.OBJECT_FIELD);switch(setEndTokenForAllAncestor(r,n),a.kind){case ASTNodeKind.VARIABLE_DEFINITION:setEndToken(a.variable,n),a.variable.name=createNameNode(n);break;case ASTNodeKind.ARGUMENT:case ASTNodeKind.OBJECT_FIELD:a.value?.kind===ASTNodeKind.VARIABLE&&(setEndToken(a.value,n),a.value.name=createNameNode(n));break}}break}}function parseDefaultValue(r,n){n.kind===TokenKind.EQUALS&&setEndTokenForAllAncestor(r,n)}function parseListType(r,n){switch(n.kind){case TokenKind.BRACKET_L:{const a=findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.LIST_TYPE);switch(setEndTokenForAllAncestor(r,n),a.kind){case ASTNodeKind.VARIABLE_DEFINITION:{const i={kind:ASTNodeKind.LIST_TYPE,location:[n.index,n.index],closed:!1};a.type=i,r.push(i)}break;case ASTNodeKind.LIST_TYPE:{const i={kind:ASTNodeKind.LIST_TYPE,location:[n.index,n.index],closed:!1};a.type=i,r.push(i)}break}}break;case TokenKind.BRACKET_R:{const a=findNextAncestorByKind(r,ASTNodeKind.LIST_TYPE,ASTNodeKind.NON_NULL_TYPE,ASTNodeKind.NAMED_TYPE);switch(setEndTokenForAllAncestor(r,n),a.kind){case ASTNodeKind.LIST_TYPE:a.closed=!0;break;case ASTNodeKind.NON_NULL_TYPE:case ASTNodeKind.NAMED_TYPE:findNextAncestorByKind(r,ASTNodeKind.LIST_TYPE).closed=!0;break}}break}}function parseNonNullableType(r,n){if(n.kind===TokenKind.BANG){const a=deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.LIST_TYPE,ASTNodeKind.NAMED_TYPE),i={kind:ASTNodeKind.NON_NULL_TYPE,location:[a.location[0],n.index],type:a};setEndTokenForAllAncestor(r,n),findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.LIST_TYPE).type=i}}function parseNamedType(r,n){if(n.kind===TokenKind.NAME){const a=findNextAncestorByKind(r,ASTNodeKind.FRAGMENT_DEFINITION,ASTNodeKind.INLINE_FRAGMENT,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.LIST_TYPE),i={kind:ASTNodeKind.NAMED_TYPE,location:[n.index,n.index],name:createNameNode(n)};a.kind===ASTNodeKind.FRAGMENT_DEFINITION||a.kind===ASTNodeKind.INLINE_FRAGMENT?a.typeCondition=i:(a.type=i,r.push(i))}}function parseArguments(r,n){switch(n.kind){case TokenKind.PAREN_L:{const a=findNextAncestorByKind(r,ASTNodeKind.FIELD,ASTNodeKind.DIRECTIVE);if(a.kind===ASTNodeKind.DIRECTIVE&&"isConst"in a){const i={kind:ASTNodeKind.ARGUMENT_DICT,location:[n.index,n.index],isConst:!0,arguments:[],closed:!1};a.argumentDict=i,r.push(i)}else{const i={kind:ASTNodeKind.ARGUMENT_DICT,location:[n.index,n.index],arguments:[],closed:!1};a.argumentDict=i,r.push(i)}}break;case TokenKind.PAREN_R:{const a=deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.ARGUMENT_DICT);setEndTokenForAllAncestor(r,n),setEndToken(a,n),a.closed=!0}break}}function parseArgument(r,n){switch(n.kind){case TokenKind.NAME:{const a=deleteUntilNextAncestor(r,ASTNodeKind.ARGUMENT_DICT);if(setEndTokenForAllAncestor(r,n),"isConst"in a){const i={kind:ASTNodeKind.ARGUMENT,location:[n.index,n.index],isConst:!0,name:createNameNode(n)};a.arguments.push(i),r.push(i)}else{const i={kind:ASTNodeKind.ARGUMENT,location:[n.index,n.index],name:createNameNode(n)};a.arguments.push(i),r.push(i)}}break;case TokenKind.COLON:setEndTokenForAllAncestor(r,n);break}}function parseListValue(r,n){switch(n.kind){case TokenKind.BRACKET_L:{const a=findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.ARGUMENT,ASTNodeKind.OBJECT_FIELD);if(setEndTokenForAllAncestor(r,n),a.kind===ASTNodeKind.VARIABLE_DEFINITION){const i={kind:ASTNodeKind.LIST,location:[n.index,n.index],isConst:!0,values:[],closed:!1};a.defaultValue=i,r.push(i)}else{const i={kind:ASTNodeKind.LIST,location:[n.index,n.index],values:[],closed:!1};a.value=i,r.push(i)}}break;case TokenKind.BRACKET_R:setEndTokenForAllAncestor(r,n),deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.LIST).closed=!0;break}}function parseObjectValue(r,n){switch(n.kind){case TokenKind.BRACE_L:{const a=findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.ARGUMENT,ASTNodeKind.LIST,ASTNodeKind.OBJECT_FIELD);switch(setEndTokenForAllAncestor(r,n),a.kind){case ASTNodeKind.VARIABLE_DEFINITION:{const i={kind:ASTNodeKind.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};a.defaultValue=i,r.push(i)}break;case ASTNodeKind.LIST:if("isConst"in a){const i={kind:ASTNodeKind.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};a.values.push(i),r.push(i)}else{const i={kind:ASTNodeKind.OBJECT,location:[n.index,n.index],fields:[],closed:!1};a.values.push(i),r.push(i)}break;default:if("isConst"in a){const i={kind:ASTNodeKind.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};a.value=i,r.push(i)}else{const i={kind:ASTNodeKind.OBJECT,location:[n.index,n.index],fields:[],closed:!1};a.value=i,r.push(i)}}break}case TokenKind.BRACE_R:{const a=deleteUntilAndIncludingNextAncestor(r,ASTNodeKind.OBJECT);setEndTokenForAllAncestor(r,n),setEndToken(a,n),a.closed=!0}break}}function parseObjectField(r,n){switch(n.kind){case TokenKind.NAME:{const a=findNextAncestorByKind(r,ASTNodeKind.OBJECT);setEndTokenForAllAncestor(r,n);const i={kind:ASTNodeKind.OBJECT_FIELD,location:[n.index,n.index],name:createNameNode(n)};a.fields.push(i),r.push(i)}break;case TokenKind.COLON:setEndTokenForAllAncestor(r,n);break}}function parseBooleanValue(r,n){n.kind===TokenKind.BOOLEAN&&addOrSetValue(r,n,{kind:ASTNodeKind.BOOLEAN,location:[n.index,n.index],value:!!n.value})}function parseEnumValue(r,n){n.kind===TokenKind.NAME&&addOrSetValue(r,n,{kind:ASTNodeKind.ENUM,location:[n.index,n.index],value:n.value??""})}function parseNullValue(r,n){n.kind===TokenKind.KEYWORD&&addOrSetValue(r,n,{kind:ASTNodeKind.NULL,location:[n.index,n.index]})}function parseNumberValue(r,n){n.kind===TokenKind.NUMBER&&addOrSetValue(r,n,{kind:ASTNodeKind.NUMBER,location:[n.index,n.index],value:n.value??"0"})}function parseStringValue(r,n){if(n.kind===TokenKind.STRING){const a=findNextAncestorByKind(r,ASTNodeKind.ARGUMENT,ASTNodeKind.LIST,ASTNodeKind.OBJECT_FIELD,ASTNodeKind.STRING);let i=n.value??"";const o=a.kind===ASTNodeKind.STRING,s=/^""".*?"""$/gi.test(i),l=!o&&/^"""/gi.test(i),f=o&&/"""$/gi.test(i),d=!o&&!l,u=d&&/^".*?"$/gi.test(i)||s||f;if(d?i=u?i.slice(1,-1):i.slice(1):s?i=i.slice(0,-3):(l&&(i=i.slice(3)),f&&(i=i.slice(0,-3))),setEndTokenForAllAncestor(r,n),o)a.value+=`
236
+ `+i,a.closed=u,u&&r.splice(-1,1);else{const c={kind:ASTNodeKind.STRING,location:[n.index,n.index],value:i,closed:u,block:l};switch(a.kind){case ASTNodeKind.VARIABLE_DEFINITION:a.defaultValue=c;break;case ASTNodeKind.LIST:a.values.push(c);break;default:a.value=c;break}l&&!u&&r.push(c)}}}function addOrSetValue(r,n,a){const i=findNextAncestorByKind(r,ASTNodeKind.VARIABLE_DEFINITION,ASTNodeKind.ARGUMENT,ASTNodeKind.LIST,ASTNodeKind.OBJECT_FIELD);switch(setEndTokenForAllAncestor(r,n),i.kind){case ASTNodeKind.VARIABLE_DEFINITION:i.defaultValue=a;break;case ASTNodeKind.LIST:i.values.push(a);break;default:i.value=a;break}}function parseToken(r,n,a,i,o,s,l,f){switch(r){case"document":switch(n){case TokenKind.SOF:case TokenKind.EOF:return createToken(n,a,i,o,s,l,f);default:return createToken(TokenKind.INVALID,a,i,o,s,l,f)}case"punctuation":switch(n){case TokenKind.BANG:case TokenKind.BRACE_L:case TokenKind.BRACE_R:case TokenKind.BRACKET_L:case TokenKind.BRACKET_R:case TokenKind.COLON:case TokenKind.EQUALS:case TokenKind.PAREN_L:case TokenKind.PAREN_R:case TokenKind.SPREAD:return createToken(n,a,i,o,s,l,f);default:return createToken(TokenKind.INVALID,a,i,o,s,l,f)}case"attribute":case"atom":case"def":case"property":case"qualifier":case"string-2":return createTokenWithValue(TokenKind.NAME,n,a,i,o,s,l,f);case"builtin":return createTokenWithValue(TokenKind.BOOLEAN,n,a,i,o,s,l,f);case"keyword":return createTokenWithValue(TokenKind.KEYWORD,n,a,i,o,s,l,f);case"number":return createTokenWithValue(TokenKind.NUMBER,n,a,i,o,s,l,f);case"string":return createTokenWithValue(TokenKind.STRING,n,a,i,o,s,l,f);case"meta":case"variable":switch(n){case TokenKind.AT:case TokenKind.DOLLAR:return createToken(n,a,i,o,s,l,f);default:return createTokenWithValue(TokenKind.NAME,n,a,i,o,s,l,f)}default:return createToken(TokenKind.INVALID,a,i,o,s,l,f)}}const BREAK=Object.freeze({});function visit(r,n,a=OperationDocumentKeys){const i=new Map;for(const g of Object.values(ASTNodeKind))i.set(g,getEnterLeaveForKind(n,g));let o,s=Array.isArray(r),l=[r],f=-1,d=[],u=r,c,v;const h=[],m=[];do{f++;const g=f===l.length,_=g&&d.length!==0;if(g){if(c=m.length===0?void 0:h[h.length-1],u=v,v=m.pop(),_)if(s){u=u.slice();let N=0;for(const[O,M]of d){const F=O-N;M===null?(u.splice(F,1),N++):u[F]=M}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[N,O]of d)u[N]=O}f=o.index,l=o.keys,d=o.edits,s=o.inArray,o=o.prev}else if(v!=null){if(c=s?f:l[f],u=v[c],u==null)continue;h.push(c)}let S;if(!Array.isArray(u)){if(S=(g?i.get(u.kind)?.leave:i.get(u.kind)?.enter)?.call(n,u,c,v,h,m),S===BREAK)break;if(S===!1){if(!g){h.pop();continue}}else if(S!==void 0&&(d.push([c,S]),!g))if(isASTNode(S))u=S;else{h.pop();continue}}S===void 0&&_&&d.push([c,u]),g?h.pop():(o={inArray:s,index:f,keys:l,edits:d,prev:o},s=Array.isArray(u),l=s?u:a[u.kind]??[],f=-1,d=[],v!=null&&m.push(v),v=u)}while(o!==void 0);return d.length!==0?d.at(-1)[1]:r}function getEnterLeaveForKind(r,n){const a=r[n];return typeof a=="object"?a:typeof a=="function"?{enter:a,leave:void 0}:{enter:r.enter,leave:r.leave}}parserExports.p("@"),name("directiveName"),parserExports.opt("Argument"),name("typeName"),parserExports.opt("Member"),parserExports.p("."),name("memberName"),parserExports.opt("Argument"),parserExports.p("("),name("argumentName"),parserExports.p(":"),parserExports.p(")");function name(r){return{style:r,match:n=>n.kind==="Name",update(n,a){n.name=a.value}}}var IntrospectionField=(r=>(r.SCHEMA_FIELD="__schema",r.TYPENAME_FIELD="__typename",r.TYPE_FIELD="__type",r.TYPE_FIELDS_FIELD="fields",r.TYPE_INTERFACES_FIELD="interfaces",r.TYPE_POSSIBLE_TYPES_FIELD="possibleTypes",r.TYPE_INPUT_FIELDS_FIELD="inputFields",r))(IntrospectionField||{});const COLON=":",DOT=".",PAREN_L="(",PAREN_R=")";function createSchemaMemberCoordinate(r,n,a){const i=r+DOT+n;return a?withArgument(i,a):i}function withArgument(r,n){return r+PAREN_L+n+COLON+PAREN_R}function getInnerType(r){let n=r.kind==="argument"?r.type:r.kind==="field"?r.valueType:r;for(;n.kind==="value-type";)n=n.type;return n}function isSchemaType(r){return!!r&&(r.kind==="type"||r.kind==="query-type"||r.kind==="mutation-type"||r.kind==="subscription-type")}function getIntrospectionQuery(r,n){const a=r.directiveIsRepeatable?`
237
+ isRepeatable`:"",i=r.directiveLocations?`
238
+ locations`:`
239
+ onField
240
+ onFragment
241
+ onOperation`,o=r.directiveDeprecation?{includeDeprecated:"(includeDeprecated: true)",isDeprecated:`
242
+ isDeprecated`,deprecationReason:`
243
+ deprecationReason`}:{includeDeprecated:"",isDeprecated:"",deprecationReason:""},s=r.inputValueDeprecation?{includeDeprecated:"(includeDeprecated: true)",isDeprecated:`
244
+ isDeprecated`,deprecationReason:`
245
+ deprecationReason`}:{includeDeprecated:"",isDeprecated:"",deprecationReason:""},l=addOfTypeFieldRecursively(6),f=r.oneOf?`
246
+ oneOf`:"",d=r.specifiedByUrl?`
247
+ specifiedByURL`:"";return`query IntrospectionQuery {
248
+ __schema {
249
+ queryType {
250
+ name
251
+ }
252
+ mutationType {
253
+ name
254
+ }${r.subscription?`
255
+ subscriptionType {
256
+ name
257
+ }`:""}
258
+ types {
259
+ ...FullType
260
+ }
261
+ directives${o.includeDeprecated} {
262
+ name
263
+ description${a}
264
+ args${s.includeDeprecated} {
265
+ ...InputValue
266
+ }${i}${o.isDeprecated}${o.deprecationReason}
267
+ }
268
+ }
269
+ }
270
+
271
+ fragment FullType on __Type {
272
+ kind
273
+ name
274
+ description${d}${f}
275
+ fields(includeDeprecated: true) {
276
+ name
277
+ description
278
+ args${s.includeDeprecated} {
279
+ ...InputValue
280
+ }
281
+ type {
282
+ ...TypeRef
283
+ }
284
+ isDeprecated
285
+ deprecationReason
286
+ }
287
+ inputFields${s.includeDeprecated} {
288
+ ...InputValue
289
+ }
290
+ interfaces {
291
+ ...TypeRef
292
+ }
293
+ enumValues(includeDeprecated: true) {
294
+ name
295
+ description
296
+ isDeprecated
297
+ deprecationReason
298
+ }
299
+ possibleTypes {
300
+ ...TypeRef
301
+ }
302
+ }
303
+
304
+ fragment InputValue on __InputValue {
305
+ name
306
+ description
307
+ type {
308
+ ...TypeRef
309
+ }
310
+ defaultValue${s.isDeprecated}${s.deprecationReason}
311
+ }
312
+
313
+ fragment TypeRef on __Type {
314
+ kind
315
+ name${l}
316
+ }`}function addOfTypeFieldRecursively(r){let n="";for(let a=1;a<r;a++){const i=" ".repeat(r-a);n=`
317
+ ${i}ofType {
318
+ ${i} kind
319
+ ${i} name${n}
320
+ ${i}}`}return n}class DocumentValidatorContext{#e;#t;#r;#n;constructor(n){this.#e=n}get documentAST(){return this.#e}get error(){return this.#n}set error(n){this.#n=n}get hasError(){return!!this.#n}getFragment(n){if(!this.#t){this.#t=new Map;for(const a of this.#e.definitions)a.kind===ASTNodeKind.FRAGMENT_DEFINITION&&a.name?.value&&this.#t.set(a.name.value,a)}return this.#t.get(n)}getFragmentSpreads(n){this.#r||(this.#r=new Map);let a=this.#r.get(n);if(a===void 0){a=[];const i=[n];let o;for(;o=i.pop();)for(const s of o.selections)s.kind===ASTNodeKind.FRAGMENT_SPREAD?a.push(s):s.selectionSet&&i.push(s.selectionSet);this.#r.set(n,a)}return a}}const MAX_NESTED_LIST_DEPTH=2,LIST_FIELDS=[IntrospectionField.TYPE_FIELDS_FIELD,IntrospectionField.TYPE_INTERFACES_FIELD,IntrospectionField.TYPE_POSSIBLE_TYPES_FIELD,IntrospectionField.TYPE_INPUT_FIELDS_FIELD];function IntrospectionDepthRule(r,n){const a=n?.maxNestedListDepth||MAX_NESTED_LIST_DEPTH;return{Field(o){if(o.name&&(o.name.value===IntrospectionField.SCHEMA_FIELD||o.name.value===IntrospectionField.TYPE_FIELD)&&i(o))return r.error="Maximum introspection depth exceeded",BREAK}};function i(o,s=Object.create(null),l=0){let f=l;if(o.kind===ASTNodeKind.FRAGMENT_SPREAD){const d=o.name?.value??"";if(s[d]===!0)return!1;const u=r.getFragment(d);if(!u)return!1;try{return s[d]=!0,i(u,s,f)}finally{s[d]=void 0}}if(o.kind===ASTNodeKind.FIELD&&o.name&&LIST_FIELDS.includes(o.name.value)&&++f>a)return!0;if("selectionSet"in o&&o.selectionSet?.selections){for(const d of o.selectionSet.selections)if(i(d,s,f))return!0}return!1}}function NoFragmentCyclesRule(r){const n=new Set,a=[],i=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return o(s)?BREAK:!1}};function o(s){const l=s.name?.value;if(!l||!s.selectionSet||n.has(l))return!1;n.add(l);const f=r.getFragmentSpreads(s.selectionSet);if(!f?.length)return!1;i[l]=a.length;for(const d of f){const u=d.name?.value;if(!u)continue;const c=i[u];if(a.push(d),c===void 0){const v=r.getFragment(u);if(v&&o(v))return!0}else{const h=a.slice(c).slice(0,-1).map(m=>`"${m.name?.value??""}"`).join(", ");return r.error=`Cannot spread fragment "${u}" within itself`+(h!==""?` via ${h}.`:"."),!0}a.pop()}return i[l]=void 0,!1}}function validateDocument(r){const n=[NoFragmentCyclesRule,IntrospectionDepthRule],a=new DocumentValidatorContext(r);for(const i of n)if(visit(r,i(a)),a.error)return{success:!1,errorMessage:a.error};return{success:!0}}var LogLevel=(r=>(r[r.error=0]="error",r[r.warning=1]="warning",r[r.info=2]="info",r))(LogLevel||{}),RequestKind=(r=>(r.GRAPHQL_OPERATION="graphql-operation",r.GRAPHQL_INTROSPECTION="graphql-introspection",r.GRAPHQL_SDL_FETCH="graphql-sdl-fetch",r.GRAPHQL_SDL_PROBE="graphql-sdl-probe",r))(RequestKind||{});const HTTP_REQUEST_LOG_ENTRY_KIND="http-request",HTTP_RESPONSE_LOG_ENTRY_KIND="http-response",HTTP_RESPONSE_BODY_CHUNK_LOG_ENTRY_KIND="http-response-body-chunk",HTTP_RESPONSE_CANCELLED_LOG_ENTRY_KIND="http-response-cancelled",HTTP_RESPONSE_FAILED_LOG_ENTRY_KIND="http-response-failed",HTTP_RESPONSE_FINISHED_LOG_ENTRY_KIND="http-response-finished",SCOPE_BEGIN_LOG_ENTRY_KIND="scope-begin",SCOPE_END_LOG_ENTRY_KIND="scope-end",SUBSCRIPTION_REQUEST_STARTED_LOG_ENTRY_KIND="subscription-request-started",SUBSCRIPTION_REQUEST_PROTOCOL_LOG_ENTRY_KIND="subscription-request-protocol",SUBSCRIPTION_REQUEST_MESSAGE_LOG_ENTRY_KIND="subscription-request-message",SUBSCRIPTION_REQUEST_STOPPED_LOG_ENTRY_KIND="subscription-request-stopped";class MessageObserver{#e=[];#t=new Map;handleMessage(n,a){const i=this.#t.get(a.id);if(i){i(a,n);return}this.#e.filter(o=>o.type===a.type).forEach(({handle:o})=>o(a,n))}registerReceiveMessageHandler(n,a){const i={type:n,handle:a};return this.#e.push(i),()=>{const o=this.#e.indexOf(i);this.#e.splice(o,1)}}sendAndReceiveMessage(n,a=!1,i){let o,s;return createAbortScope(()=>s?.(),()=>new Promise((l,f)=>{s=()=>{self.clearTimeout(o),f(ABORT_ERROR),cancelTask$1(this.getContext(),n.id),this.#t.delete(n.id)},o=a?void 0:self.setTimeout(()=>{f("Timeout exceeded 60 sec."),this.#t.delete(n.id)},ONE_MINUTE),this.#t.set(n.id,d=>{if(!i?.aborted){if(isTaskFailedMessage(d)){const{errorMessage:u,kind:c,details:v}=d.payload;f(new TaskFailedError(u,c,v))}else l(d.payload);self.clearTimeout(o),this.#t.delete(d.id)}}),this.getContext().sendMessage(n)}),i)}sendMessage(n){this.getContext().sendMessage(n)}}class Message{constructor(n,a,i){this.type=n,this.payload=a,this.id=i||createId(),this.createdAt=now()}id;createdAt}const OPERATION_REQUEST_CANCELLED_KIND="cancelled",OPERATION_REQUEST_FAILED_KIND="failed",OPERATION_REQUEST_STARTED_KIND="started",OPERATION_REQUEST_SUCCEEDED_KIND="succeeded",OPERATION_REQUEST_STATUS_MESSAGE_TYPE="operation-request-status";function sendOperationRequestCancelled(r,n,a,i){r.sendMessage(new Message(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,{documentId:n,requestId:a,kind:OPERATION_REQUEST_CANCELLED_KIND,operationType:i}))}function sendOperationRequestFailed(r,n,a,i){r.sendMessage(new Message(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,{documentId:n,requestId:a,kind:OPERATION_REQUEST_FAILED_KIND,operationType:i}))}function sendOperationRequestStarted(r,n,a,i){r.sendMessage(new Message(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,{documentId:n,requestId:a,kind:OPERATION_REQUEST_STARTED_KIND,operationType:i}))}function sendOperationRequestSucceeded(r,n,a,i){r.sendMessage(new Message(OPERATION_REQUEST_STATUS_MESSAGE_TYPE,{documentId:n,requestId:a,kind:OPERATION_REQUEST_SUCCEEDED_KIND,operationType:i}))}const OPERATION_RESULT_MESSAGE_TYPE="operation-result";function sendOperationResult(r,n,a){r.sendMessage(new Message(OPERATION_RESULT_MESSAGE_TYPE,{documentId:n,result:a}))}const OPERATION_RESULT_EVENT_MESSAGE_TYPE="operation-result-event";function sendOperationResultEvent(r,n,a,i){r.sendMessage(new Message(OPERATION_RESULT_EVENT_MESSAGE_TYPE,{documentId:n,resultId:a,event:i}))}const OPERATION_RESULT_PATCH_MESSAGE_TYPE="operation-result-patch";function sendOperationResultPatch(r,n,a,i){r.sendMessage(new Message(OPERATION_RESULT_PATCH_MESSAGE_TYPE,{documentId:n,resultId:a,patch:i}))}const OPERATION_VARIABLE_BATCHING_RESULT_MESSAGE_TYPE="operation-variable-batching-result";function sendOperationVariableBatchingResult(r,n,a,i){r.sendMessage(new Message(OPERATION_VARIABLE_BATCHING_RESULT_MESSAGE_TYPE,{documentId:n,resultId:a,result:i}))}const HISTORY_ENTRY_MESSAGE_TYPE="history-entry";function sendHistoryEntry(r,n,a,i,o,s,l,f){r.sendMessage(new Message(HISTORY_ENTRY_MESSAGE_TYPE,{documentId:n,historyId:a,workspaceId:i,operationStatus:o,operationType:s,operationName:l,operationIndex:f}))}const LOG_ENTRY_MESSAGE_TYPE="log-entry";function sendWarning(r,n,a,i){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:"basic",itemId:a,level:LogLevel.warning,message:n,details:i}))}function sendHttpRequest(r,n,a,i,o,s,l,f,d,u,c,v,h){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_REQUEST_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,scopeId:o,level:LogLevel.info,started:s,requestUri:l,method:f,headers:d,body:u,cache:"no-cache",credentials:c,referrerPolicy:v,name:h}))}function sendHttpResponse(r,n,a,i,o,s,l,f,d){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_RESPONSE_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,scopeId:o,level:LogLevel.info,received:s,headers:d,statusCode:l,statusText:f}))}function sendHttpResponseBodyChunk(r,n,a,i,o,s,l){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_RESPONSE_BODY_CHUNK_LOG_ENTRY_KIND,itemId:n,requestId:a,scopeId:i,level:LogLevel.info,received:o,chunk:s,chunkIndex:l}))}function sendHttpResponseCancelled(r,n,a,i,o,s,l,f){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_RESPONSE_CANCELLED_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,scopeId:o,level:LogLevel.info,stopped:s,contentLength:f,error:l.serialize()}))}function sendHttpResponseFailed(r,n,a,i,o,s,l,f){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_RESPONSE_FAILED_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,scopeId:o,level:LogLevel.info,stopped:s,contentLength:f,error:l}))}function sendHttpResponseFinished(r,n,a,i,o,s,l){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:HTTP_RESPONSE_FINISHED_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,scopeId:o,level:LogLevel.info,stopped:s,contentLength:l}))}function sendInvalidEndpointWarning(r,n,a,i){const o="An invalid Schema Endpoint is not allowed. Please make sure that the Schema Endpoint is configured properly.";r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:"basic",itemId:n,requestId:i,level:LogLevel.warning,message:`${a} failed due to an invalid endpoint.`,details:o}))}function sendInvalidHttpHeaderError(r,n,a,i,o){const s=a.kind==="empty-name"?"An empty Header Name is not allowed. One reason for that could be an Environment Variable that interpolates to an empty string. Please make sure that the HTTP Headers and Environment Variables are configured properly. Also make sure that you've switched to the correct Environment.":`Invalid characters in Header Name detected: "${a.name}". One reason for that could be an Environment Variable that isn't configured yet. Please make sure that the HTTP Headers and Environment Variables are configured properly. Also make sure that you've switched to the correct Environment.`;r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:"basic",itemId:n,requestId:o,level:LogLevel.error,message:`${i} failed due to an invalid HTTP header name.`,details:s}))}function sendScopeBegin(r,n,a,i,o,s){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SCOPE_BEGIN_LOG_ENTRY_KIND,itemId:n,scopeId:a,level:LogLevel.info,started:i,name:o,details:s}))}function sendScopeEnd(r,n,a,i){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SCOPE_END_LOG_ENTRY_KIND,itemId:n,scopeId:a,level:LogLevel.info,stopped:i}))}function sendSubscriptionRequestStarted(r,n,a,i,o,s,l,f){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SUBSCRIPTION_REQUEST_STARTED_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,level:LogLevel.info,started:o,requestUri:s,protocol:l,connectionParams:f}))}function sendSubscriptionRequestProtocol(r,n,a,i,o){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SUBSCRIPTION_REQUEST_PROTOCOL_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,level:LogLevel.info,protocol:o}))}function sendSubscriptionRequestMessage(r,n,a,i,o){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SUBSCRIPTION_REQUEST_MESSAGE_LOG_ENTRY_KIND,itemId:n,requestId:a,level:LogLevel.info,received:i,data:o}))}function sendSubscriptionRequestStopped(r,n,a,i,o,s,l){r.sendMessage(new Message(LOG_ENTRY_MESSAGE_TYPE,{kind:SUBSCRIPTION_REQUEST_STOPPED_LOG_ENTRY_KIND,itemId:n,requestId:a,requestKind:i,level:LogLevel.info,stopped:o,reason:s,error:l}))}const CANCEL_TASK_MESSAGE_TYPE="cancel-task";function cancelTask$1(r,n){r.sendMessage(new Message(CANCEL_TASK_MESSAGE_TYPE,{taskId:n}))}const TASK_FAILED_MESSAGE_TYPE="task-failed";function failTask(r,n,a,i,o){r.sendMessage(new Message(TASK_FAILED_MESSAGE_TYPE,{errorMessage:a,kind:i,details:o},n))}class TaskFailedError extends Error{constructor(n,a,i){super(n),this.kind=a,this.details=i}}function isTaskFailedMessage(r){return r.type===TASK_FAILED_MESSAGE_TYPE}const INITIALIZE_WORKER_MESSAGE_TYPE="initialize-worker";function isGraphQLVariableBatch(r){return Array.isArray(r)}function isGraphQLVariableMap(r){return!!r&&!Array.isArray(r)}function getGraphQLVariables(r,n,a,i,o,s){if(n)return tryParseGraphQLVariables(r,n.id,a,i,n.variables?interpolateValue(n.variables,o):n.variables,n.hash)?.variables}function tryParseGraphQLVariables(r,n,a,i,o,s,l){if(o?.length)try{return{id:n,environmentId:a,operationIndex:i,hash:s,variables:JSON.parse(o)}}catch{return}return{id:n,environmentId:a,operationIndex:i,hash:s}}function generateVariableJsonSchema(r,n,a,i){const o=getVariableDefinitions(r,n),s=[],l={},f={};for(const{name:d,type:u}of o)u.kind==="value-type"&&!u.isOptional&&s.push(d),l[d]=getDefinitionRef(f,u,a,i);return f.Variables={type:"object",required:s,properties:l,additionalProperties:!1},{$schema:"http://json-schema.org/draft-07/schema#",oneOf:[{$ref:"#/definitions/Variables"},{type:"array",items:{$ref:"#/definitions/Variables"}}],definitions:f}}function getVariableDefinitions(r,n){const a=[],i=r.definitions.filter(isOperationDefinitionTypeNode).filter(o=>!!o.variablesDefinition?.variableDefinitions.length).flatMap(o=>o.variablesDefinition.variableDefinitions);for(const o of i){let s=getSchemaTypeFromAST(o.type,n);s&&a.push({name:o.variable.name?.value??"",type:s})}return a}function getDefinitionRef(r,n,a,i){let o=n,s,l;if(o.kind==="value-type"){const d={};let u=d,c=!1,v=!0;for(;o.kind==="value-type";){v=o.isOptional,c=o.isList,o=o.type;const h=o.kind==="value-type";if(v){const m={};u.oneOf=[{type:"null"},c?{type:"array",items:h?m:{anyOf:[{type:"null"},m]}}:m],u=m}else if(c){const m={};u.type="array",u.items=h?m:{anyOf:[{type:"null"},m]},u=m}}s=u,l=d}else s={},l={oneOf:[{type:"null"},s]};const f=o;return resolveTypeDefinitions(r,f,a,i),s.$ref=`#/definitions/${f.name}`,l}function resolveTypeDefinitions(r,n,a,i){n.typeKind==="enum"?resolveEnum(r,n):n.typeKind==="input-object"?resolveInputObject(r,n,a,i):resolveScalar(r,n,i)}function resolveEnum(r,n){r[n.name]||(r[n.name]={enum:n.enumValues?.map(({name:a})=>a)})}function resolveInputObject(r,n,a,i){if(r[n.name])return;const o=[],s={};r[n.name]={type:"object",additionalProperties:!1};for(const l of a(n.name))l.valueType.isOptional||o.push(l.name),s[l.name]=getDefinitionRef(r,l.valueType,a,i);r[n.name]={...r[n.name],required:o,properties:s}}function resolveScalar(r,n,a){if(!r[n.name])switch(n.name){case"Boolean":r[n.name]={type:"boolean"};break;case"Decimal":case"Float":r[n.name]={type:"number"};break;case"Int":case"Short":r[n.name]={type:"integer"};break;case"ID":r[n.name]={oneOf:[{type:"integer"},{type:"string"}]};break;case"String":r[n.name]={type:"string"};break;case"Upload":r[n.name]={enum:a?.map(({name:i})=>i)??[]};break;default:r[n.name]={oneOf:[{type:"array"},{type:"boolean"},{type:"integer"},{type:"null"},{type:"number"},{type:"object"},{type:"string"}]};break}}let cachedDocument;function getGraphQLDocument(r,n,a){if(!n){cachedDocument=void 0;return}return(!cachedDocument||cachedDocument.id!==n.id||cachedDocument.hash!==n.hash)&&(cachedDocument=tryParseDocument(r,n.id,n.body,n.hash,a)),cachedDocument?.document}function tryParseDocument(r,n,a,i,o){if(a.trim().length>0)try{return{id:n,hash:i,document:parseExecutableDocument(a)}}catch(s){o&&sendWarning(r,"The Document couldn't be parsed. Please go to the Operations Editor and fix syntax issues.",n,{...s});return}}function getOperations(r){const n=[];return r&&r.definitions.forEach(a=>{isOperationDefinitionTypeNode(a)&&n.push({name:a.name?.value,type:a.operationType,location:getLocation(r.tokens,a.location)})}),n}function getOperation(r,n){const a=r.definitions.filter(isOperationDefinitionTypeNode)[n??0];return[a?.operationType??OperationType.QUERY,a?.name?.value]}function splitOperation(r,n,a,i=!1){const{tokens:o}=r,s=[],l=[],f=h=>{s.push(h),visit(h,{VariableDefinition(m){visit(m,{Variable(g){l.push(g.name?.value??"")}})},FragmentSpread(m){const g=m.name?.value??"";visit(r,{FragmentDefinition(_){if(_.name?.value===g)return f(_),BREAK}})}})};let d=0;visit(r,{OperationDefinition(h){if(d===a)return f(h),BREAK;d+=1}});function u(){let h=i?"":n.split(`
321
+ `).map(g=>" ".repeat(g.length)).join(`
322
+ `);const m=g=>{const{start:_,end:S}=getLocation(o,g.location);h=i?h.concat(h?`
323
+
324
+ `:"",n.substring(_,S)):h.substring(0,_).concat(n.substring(_,S),h.substring(S))};return visit({kind:ASTNodeKind.DOCUMENT,definitions:s,location:r.location,tokens:[]},{FragmentDefinition:{enter:m},OperationDefinition:{enter:m}}),h=h.replace(/[ \t]+$/gm,""),h}const c=h=>({...h,body:u()}),v=h=>{if(h&&l.length){let m=function(g){const _=Object.entries(g).filter(([S])=>l.includes(S));if(_.length)return Object.fromEntries(_)};if(isGraphQLVariableBatch(h)){const g=[];for(const _ of h){const S=m(_);S&&g.push(S)}return g.length?g:void 0}else return m(h)}};return(h,m)=>[c(h),v(m)]}async function*parseJSONLStream(r){const n=r.body?.getReader();if(!n)throw new Error("Response body is not readable");const a=new TextDecoder;let i="";function o(s){return s===" "||s===":"||s.startsWith(": ")||/^\s*$/.test(s)}try{for(;;){const{done:s,value:l}=await n.read();if(s){const f=i.trim();if(f&&!o(f))try{yield JSON.parse(f)}catch{yield createJSONLError(new Error("The JSONL line could not be converted into JSON."),f)}break}for(i+=a.decode(l,{stream:!0});i.includes(`
325
+ `);){const f=i.indexOf(`
326
+ `),d=i.slice(0,f).trim();if(i=i.slice(f+1),!(!d||o(d)))try{yield JSON.parse(d)}catch{yield createJSONLError(new Error("The JSONL line could not be converted into JSON."),d)}}}}finally{n.releaseLock()}}const JSONL_ERROR_NAME="JSONLError";function isJSONLError(r){return isPlainObject(r)&&"name"in r&&r.name===JSONL_ERROR_NAME}function createJSONLError(r,n){return{...r,name:JSONL_ERROR_NAME,body:n}}var GraphQLResponseKind=(r=>(r.SIMPLE="simple",r.VARIABLE_BATCHING="variable-batching",r.INCREMENTAL="incremental",r))(GraphQLResponseKind||{});const CLIENT_ABORT_ERROR_NAME="ClientAbortError";class ClientAbortError extends Error{name=CLIENT_ABORT_ERROR_NAME;constructor(){super("Request has been cancelled by the user.")}serialize(){return{name:this.name,message:this.message}}}const MULTIPART_ERROR_NAME="MultipartError",SERVER_ERROR_NAME="ServerError",SERVER_NETWORK_ERROR_NAME="ServerNetworkError",SERVER_PARSE_ERROR_NAME="ServerParseError",_gql_source$4=`query IntrospectionQuery {
327
+ __type(name: "__Directive") {
328
+ name
329
+ fields {
330
+ name
331
+ }
332
+ }
333
+ }
334
+ `,_gql_doc$4={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__Directive",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fields"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}],loc:{start:0,end:142,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source$4}}},_gql_source$3=`query IntrospectionQuery {
335
+ __type(name: "__InputValue") {
336
+ name
337
+ fields {
338
+ name
339
+ }
340
+ }
341
+ }
342
+ `,_gql_doc$3={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__InputValue",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fields"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}],loc:{start:0,end:143,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source$3}}},_gql_source$2=`query IntrospectionQuery {
343
+ __type(name: "__Schema") {
344
+ name
345
+ fields {
346
+ name
347
+ }
348
+ }
349
+ }
350
+ `,_gql_doc$2={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__Schema",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fields"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}],loc:{start:0,end:139,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source$2}}},_gql_source$1=`query IntrospectionQuery {
351
+ __type(name: "__SearchResult") {
352
+ name
353
+ }
354
+ }
355
+ `,_gql_doc$1={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__SearchResult",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}],loc:{start:0,end:115,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source$1}}},_gql_source=`query IntrospectionQuery {
356
+ __type(name: "__Type") {
357
+ name
358
+ fields {
359
+ name
360
+ }
361
+ }
362
+ }
363
+ `,_gql_doc={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IntrospectionQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__type"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"StringValue",value:"__Type",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"fields"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}],loc:{start:0,end:137,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:_gql_source}}},INTROSPECTION_QUERY_DIRECTIVE=print(_gql_doc$4),INTROSPECTION_QUERY_INPUT_VALUE=print(_gql_doc$3),INTROSPECTION_QUERY_SCHEMA=print(_gql_doc$2),INTROSPECTION_QUERY_SEARCH_RESULT=print(_gql_doc$1),INTROSPECTION_QUERY_TYPE=print(_gql_doc);function executeOperation(r,n,a,i,o,s){return fetchCore(r,n,a,i,o,s).then(async({response:l})=>{const{kind:f,responseOrError:d}=l;if(!(d instanceof Response))return{kind:f,error:d};switch(f){case GraphQLResponseKind.INCREMENTAL:return{kind:f,parsedBody:{}};case GraphQLResponseKind.VARIABLE_BATCHING:return{kind:f,parsedBody:n.variables?.map(()=>({}))??[]}}const{operationResult:u,error:c}=await parseAndCheckHttpResponse(d,!1);return c?{kind:f,error:c}:{kind:f,parsedBody:u}})}async function fetchSchemaBySdlEndpoint(r,n,a,i,o,s,l){const f=(c,v)=>createHttpLogger(r,n,c,s===GraphQLSchemaKind.SDL_FETCH?RequestKind.GRAPHQL_SDL_FETCH:RequestKind.GRAPHQL_SDL_PROBE,{name:v,scopeId:a}),[d,u]=await Promise.all([fetchSchemaBySdlEndpointCore$1(i,s,o,f,l),fetchGraphQLIntrospectionSearchResult(o,f,l)]);if(d instanceof Response){const c=await d.text();return{schema:buildSchema(c),sdlSchema:c,supportsSemanticIntrospection:"operationResult"in u&&!!u.operationResult.data.__type}}return d}function fetchSchemaBySdlEndpointCore$1(r,n,a,i,o){const s=createRequestId(),l=i(s,n===GraphQLSchemaKind.SDL_FETCH?"SDL Schema Fetch":"SDL Schema Probe"),f=a.includeCookies?"include":"same-origin",d=new Headers(a.headers),u="GET",c={cache:"no-cache",credentials:f,headers:d,method:u,referrerPolicy:IS_RUNNING_IN_ELECTRON?"no-referrer":"strict-origin-when-cross-origin",signal:o};return a.disableCors&&(c.mode="no-cors"),d.append("User-Agent",navigator.userAgent),l.requestInterceptor(r,u,d),fetch(r,c).then(v=>l.responseInterceptor(v)??v).catch(catchNetworkError).then(v=>l.responseErrorInterceptor(v)??v)}async function fetchSchemaByApiSdlEndpoint(r,n,a,i,o){const s=await getHttpOptions(i),l=(u,c)=>createHttpLogger(r,n,u,RequestKind.GRAPHQL_SDL_FETCH,{name:c,scopeId:a}),[f,d]=await Promise.all([fetchSchemaByApiSdlEndpointCore(i,s,o),fetchGraphQLIntrospectionSearchResult(s,l,o)]);if(f instanceof Response){const u=await f.text();return{schema:buildSchema(u),sdlSchema:u,supportsSemanticIntrospection:"operationResult"in d&&!!d.operationResult.data.__type}}return f}async function fetchSchemaByApiSdlEndpointCore(r,n,a){const i=n.includeCookies?"include":"same-origin",o=new Headers(n.headers),l={cache:"no-cache",credentials:i,headers:o,method:"GET",referrerPolicy:IS_RUNNING_IN_ELECTRON?"no-referrer":"strict-origin-when-cross-origin",signal:a};return n.disableCors&&(l.mode="no-cors"),o.append("User-Agent",navigator.userAgent),fetch(r,l).catch(catchNetworkError)}async function fetchGraphQLSchema(r,n,a){const[i,o,s,l,f]=await Promise.all([fetchGraphQLIntrospectionDirective(r,n,a),fetchGraphQLIntrospectionInputValue(r,n,a),fetchGraphQLIntrospectionSchema(r,n,a),fetchGraphQLIntrospectionSearchResult(r,n,a),fetchGraphQLIntrospectionType(r,n,a)]);if("name"in i)return i;if(i.error)return i.error;if("name"in o)return o;if(o.error)return o.error;if("name"in s)return s;if(s.error)return s.error;if("name"in l)return l;if(l.error)return l.error;if("name"in f)return f;if(f.error)return f.error;const d=determineIntrospectionFeatures({schema:s.operationResult.data.__type,directive:i.operationResult.data.__type,inputValue:o.operationResult.data.__type,type:f.operationResult.data.__type}),u=await fetchGraphQLSchemaByFeatures(r,d,n,a);return isIntrospectionQuery(u)?{schema:buildClientSchema(u),supportsSemanticIntrospection:!!l.operationResult.data.__type}:u}function isIntrospectionQuery(r){return"__schema"in r}function isInvalidHttpHeader(r){return"kind"in r}function getHttpHeaders(r,n){const a=r.authentication?.headerValue,i=new Headers;if(i.append(HEADER_USER_AGENT,navigator.userAgent),a&&i.set(HEADER_AUTHORIZATION,a),!r.headers)return i;for(const o of r.headers){if(!o.enabled||n&&!n(o)||o.name===HEADER_USER_AGENT)continue;const{name:s,value:l}=o;if(!s.length)return{kind:"empty-name",name:s};if(!isHttpHeaderKeyValid(s))return{kind:"invalid-name",name:s};(s!==HEADER_AUTHORIZATION||!a)&&i.append(s,l)}return i}async function fetchGraphQLIntrospectionDirective(r,n,a){const{response:{responseOrError:i}}=await fetchCore(r,{query:INTROSPECTION_QUERY_DIRECTIVE,operationName:"IntrospectionQuery"},void 0,void 0,n(createRequestId(),"Detect Directive Capabilities"),a);return i instanceof Response?parseAndCheckHttpResponse(i,!0):i}async function fetchGraphQLIntrospectionInputValue(r,n,a){const{response:{responseOrError:i}}=await fetchCore(r,{query:INTROSPECTION_QUERY_INPUT_VALUE,operationName:"IntrospectionQuery"},void 0,void 0,n(createRequestId(),"Detect InputValue Capabilities"),a);return i instanceof Response?parseAndCheckHttpResponse(i,!0):i}async function fetchGraphQLIntrospectionSchema(r,n,a){const{response:{responseOrError:i}}=await fetchCore(r,{query:INTROSPECTION_QUERY_SCHEMA,operationName:"IntrospectionQuery"},void 0,void 0,n(createRequestId(),"Detect Schema Capabilities"),a);return i instanceof Response?parseAndCheckHttpResponse(i,!0):i}async function fetchGraphQLIntrospectionSearchResult(r,n,a){const{response:{responseOrError:i}}=await fetchCore(r,{query:INTROSPECTION_QUERY_SEARCH_RESULT,operationName:"IntrospectionQuery"},void 0,void 0,n(createRequestId(),"Detect Semantic Introspection Capabilities"),a);return i instanceof Response?parseAndCheckHttpResponse(i,!0):i}async function fetchGraphQLIntrospectionType(r,n,a){const{response:{responseOrError:i}}=await fetchCore(r,{query:INTROSPECTION_QUERY_TYPE,operationName:"IntrospectionQuery"},void 0,void 0,n(createRequestId(),"Detect Type Capabilities"),a);return i instanceof Response?parseAndCheckHttpResponse(i,!0):i}async function fetchGraphQLSchemaByFeatures(r,n,a,i){const o=getIntrospectionQuery(n),s=await fetchCore(r,{query:o,operationName:"IntrospectionQuery"},void 0,void 0,a(createRequestId(),"Introspection"),i),{responseOrError:l}=s.response;if(!(l instanceof Response))return l;const f=await parseAndCheckHttpResponse(l,!0);return f.error?f.error:f.operationResult.data}async function fetchCore(r,n,a,i,o,s){const l=r.includeCookies?"include":"same-origin",{extensions:f,operationName:d,query:u,variables:c,files:v}=n,h={cache:"no-cache",credentials:l,referrerPolicy:IS_RUNNING_IN_ELECTRON?"no-referrer":"strict-origin-when-cross-origin"},m=new Headers(r.headers);let g,_,S;if(r.disableCors&&(h.mode="no-cors"),r.useGET)_={...h,method:"GET",headers:m},S=rewriteURIForGET(r.uri,n),o?.requestInterceptor(S,"GET",m),g=async O=>createFetchResult(S,"GET",O,mapHeadersToDictionary(m),_.credentials,_.referrerPolicy);else{const N={extensions:f,operationName:d,query:u,variables:c};let O;if(isGraphQLVariableMap(c)&&v?.length){const F=structuredClone(c),L=new FormData,k=v.flatMap(({variableName:B,fieldPath:j,fileOrFiles:$})=>Array.isArray($)?$.map((A,R)=>({variableName:B,fieldPath:j,file:A,index:R})):[{variableName:B,fieldPath:j,file:$}]);k.forEach(({variableName:B,fieldPath:j,index:$})=>{if(j?.length){let A=F[B];const R=j.length-1;for(let y=0;y<j.length;y++)y===R?$===void 0?A[j[y]]=null:A[j[y]][$]=null:A=A[j[y]]}else $===void 0?F[B]=null:F[B][$]=null}),N.variables=F,L.append("operations",JSON.stringify(N));const P=k.reduce((B,{variableName:j,fieldPath:$,index:A},R)=>({...B,[R]:[`variables.${j}${$?.length?"."+$?.join("."):""}${A===void 0?"":"."+A}`]}),{});L.append("map",JSON.stringify(P));const U=(await getFileContents(distinct(k.map(({file:{id:B}})=>B)))).reduce((B,j)=>({...B,[j.itemId]:j.content}),{});k.forEach(({file:{id:B}},j)=>{L.append(`${j}`,U[B])}),O=L}else m.append(HEADER_CONTENT_TYPE,"application/json"),O=JSON.stringify(N);const M="POST";_={...h,method:M,headers:m,body:O},S=r.uri,o?.requestInterceptor(S,M,m,O),g=async F=>createFetchResult(S,M,F,mapHeadersToDictionary(m),_.credentials,_.referrerPolicy,N)}return await fetch(S,{..._,signal:s}).then(N=>o?.responseInterceptor(N)??N).catch(catchNetworkError).then(N=>o?.responseErrorInterceptor(N)??N).then(N=>isGraphQLVariableBatch(c)?handleVariableBatchingResponse(N,i):handleIncrementalResponse(N,a)).then(N=>g(N))}function createFetchResult(r,n,a,i,o,s,l){return{request:{uri:r,cache:"no-cache",credentials:o,headers:i,method:n,referrerPolicy:s,body:l},response:a}}const SERVER_NOT_REACHABLE="Server Not Reachable";function catchNetworkError(r){return isAbortError(r)?new ClientAbortError:r instanceof TypeError?createServerNetworkError(SERVER_NOT_REACHABLE,r.message):createServerNetworkError(SERVER_NOT_REACHABLE)}async function handleVariableBatchingResponse(r,n){let a=GraphQLResponseKind.SIMPLE;if(r instanceof Response&&r.ok&&!r.bodyUsed&&r.headers&&n){const i=r.headers.get("content-type")?.startsWith("application/jsonl")?await parseJSONLStream(r):await e(r);if(isAsyncIterable$1(i)){const o=async()=>{let s=0;try{for await(const l of i)isJSONLError(l)?n.onError(l,s++):"json"in l?l.json?n.onNext(l.body,s++):n.onError(createMultipartBodyParsingError(l.body),s++):n.onNext(l,s++)}catch(l){isAbortError(l)?n.onError(new ClientAbortError,s):n.onError(createServerParseError(r,l,""),s)}n.onComplete(s)};a=GraphQLResponseKind.VARIABLE_BATCHING,setTimeout(o,0)}}return{kind:a,responseOrError:r}}async function handleIncrementalResponse(r,n){let a=GraphQLResponseKind.SIMPLE;if(r instanceof Response&&r.ok&&!r.bodyUsed&&r.headers&&n){const i=r.headers.get("content-type")?.startsWith("application/jsonl")?await parseJSONLStream(r):await e(r);if(isAsyncIterable$1(i)){const o=async()=>{let s=0;try{for await(const l of i)isJSONLError(l)?n.onError(l,s++):"json"in l?l.json?n.onNext(l.body,s++):n.onError(createMultipartBodyParsingError(l.body),s++):n.onNext(l,s++)}catch(l){isAbortError(l)?n.onError(new ClientAbortError,s):n.onError(createServerParseError(r,l,""),s)}n.onComplete(s)};a=GraphQLResponseKind.INCREMENTAL,setTimeout(o,0)}}return{kind:a,responseOrError:r}}function createMultipartBodyParsingError(r){return createMultipartError(new Error("The multipart body could not be converted into JSON."),r)}function parseAndCheckHttpResponse(r,n){return r.text().then(a=>{try{const i=JSON.parse(a);return typeof i=="object"&&(n&&i.data||!n&&(i.data||i.errors))?{operationResult:i,contentLength:a.length}:{error:createServerError(r,a,`Response not successful: Received status code ${r.status}`),contentLength:a.length}}catch(i){return{error:createServerParseError(r,i,a),contentLength:a.length}}})}function rewriteURIForGET(r,{query:n,operationName:a,variables:i,extensions:o}){const s=[],l=(h,m)=>{s.push(`${h}=${encodeURIComponent(m)}`)};n&&l("query",n),a&&l("operationName",a),i&&l("variables",JSON.stringify(i)),o&&l("extensions",JSON.stringify(o));let f="",d=r;const u=r.indexOf("#");u!==-1&&(f=r.substr(u),d=r.substr(0,u));const c=d.indexOf("?")===-1?"?":"&";return d+c+s.join("&")+f}function createMultipartError(r,n){return{...r,name:MULTIPART_ERROR_NAME,body:n}}function createServerError({status:r,statusText:n},a,i){return{message:i,name:SERVER_ERROR_NAME,statusCode:r,statusText:n,bodyText:a}}function createServerNetworkError(r,n){return{message:r,name:SERVER_NETWORK_ERROR_NAME,statusText:n}}function createServerParseError({status:r,statusText:n},a,i){return{...a,name:SERVER_PARSE_ERROR_NAME,statusCode:r,statusText:n,bodyText:i}}function determineIntrospectionFeatures({schema:r,directive:n,inputValue:a,type:i}){return{directiveIsRepeatable:!!n?.fields.some(o=>o.name==="isRepeatable"),directiveLocations:!n||n.fields.some(o=>o.name==="locations"),directiveDeprecation:!!n?.fields.some(o=>o.name==="isDeprecated"),inputValueDeprecation:!!a?.fields.some(o=>o.name==="isDeprecated"),oneOf:!!i?.fields.some(o=>o.name==="oneOf"),specifiedByUrl:!!i?.fields.some(o=>o.name==="specifiedByURL"),subscription:!!r?.fields.some(o=>o.name==="subscriptionType")}}function createHttpLogger(r,n,a,i,o){return{requestInterceptor:createHttpRequestInterceptor(r,n,a,i,o),responseInterceptor:createHttpResponseInterceptor(r,n,a,i,o),responseErrorInterceptor:createHttpResponseErrorInterceptor(r,n,a,i,o)}}function createHttpRequestInterceptor(r,n,a,i,o){return(s,l,f,d,u,c)=>{const v=now(),h=mapHeadersToDictionary(f),m=mapFormDataToString(d);sendHttpRequest(r,n,a,i,o?.scopeId,v,s,l,h,m,u,c,o?.name)}}function createHttpResponseInterceptor(r,n,a,i,o){return s=>{const l=now(),{status:f,statusText:d}=s,u=mapHeadersToDictionary(s.headers),c=o?.scopeId;sendHttpResponse(r,n,a,i,c,l,f,d,u);const v=s.clone();return new Promise(async h=>{let m=0;try{const g=v.body?.getReader();if(g)try{const _=new TextDecoder;let S,N=0;for(;!(S=await g.read()).done;){const O=now(),M=_.decode(S.value);m+=M.length,sendHttpResponseBodyChunk(r,n,a,c,O,M,N++)}s.status>299?sendHttpResponseFailed(r,n,a,i,c,now(),createServerError(s,"",""),m):sendHttpResponseFinished(r,n,a,i,c,now(),m)}finally{await g.cancel()}}catch(g){g instanceof ClientAbortError?sendHttpResponseCancelled(r,n,a,i,c,now(),g,m):sendHttpResponseFailed(r,n,a,i,c,now(),createServerError(s,"",""),m)}finally{h()}}),s}}function createHttpResponseErrorInterceptor(r,n,a,i,o){return s=>{if(s instanceof Response)return s;const l=now(),f=o?.scopeId;return s instanceof ClientAbortError?(sendHttpResponseCancelled(r,n,a,i,f,l,s,0),s):(sendHttpResponseFailed(r,n,a,i,f,l,s,0),s)}}function mapFormDataToString(r){if(!r||typeof r=="string")return r;const n={};for(const[a,i]of r.entries()){const o=i.valueOf();typeof o=="string"?n[a]=o:n[a]="File Data omitted"}return JSON.stringify(n,void 0,2)}function mapHeadersToDictionary(r){let n={};return r.forEach((a,i)=>{n[i]?Array.isArray(n[i])?n={...n,[i]:[...n[i],a]}:n={...n,[i]:[n[i],a]}:n={...n,[i]:a}}),n}class SchemaCache{#e=new LRUMap;get(n){return this.#e.get(n)??null}set(n,a){const i=new SchemaCacheItem(a);return this.#e.get(n)?.dispose(),this.#e.set(n,i),i}remove(n){this.#e.get(n)?.dispose(),this.#e.delete(n)}}class SchemaCacheItem{#e;#t;#r;#n;constructor(n){this.#e=new Map(n.directives),this.#t=new Map(n.fields),this.#r=new Map(n.types),this.#n=new Map(n.fields)}getDirective(n){return this.#e.get(n)??null}getDirectives(n){const a=[];if(n?.length){const i=n.toLocaleLowerCase();this.#e.forEach(o=>{!INTROSPECTION_PREFIX.test(o.name)&&o.name.toLocaleLowerCase().includes(i)&&a.push(o)})}else this.#e.forEach(i=>{INTROSPECTION_PREFIX.test(i.name)||a.push(i)});return a.sort(objectNameComparer)}getField(n){return this.#t.get(n)??null}getFields(n,a){const i=n+".",o=[];if(a?.includeIntrospectionFields&&this.addIntrospectionFields(n,o),a?.filter?.length){const s=a.filter.toLocaleLowerCase();this.#t.forEach(l=>{l.coordinate.startsWith(i)&&l.name.toLocaleLowerCase().includes(s)&&o.push(l)})}else this.#t.forEach(s=>{s.coordinate.startsWith(i)&&o.push(s)});return o.sort(objectNameComparer)}getType(n){return this.#r.get(n)??null}getTypes(n){const a=[];if(n?.length){const i=n.toLocaleLowerCase();this.#r.forEach(o=>{!INTROSPECTION_PREFIX.test(o.name)&&o.name.toLocaleLowerCase().includes(i)&&a.push(o)})}else this.#r.forEach(i=>{INTROSPECTION_PREFIX.test(i.name)||a.push(i)});return a.sort(objectNameComparer)}getInterfaces(n,a){const i=this.#r.get(n);if(!i?.interfaces?.length)return[];if(a?.length){const o=a.toLocaleLowerCase();return i.interfaces.filter(({name:s})=>s.toLocaleLowerCase().includes(o)).sort(objectNameComparer)}return i.interfaces.sort(objectNameComparer)}getPossibleTypes(n,a){const i=this.#r.get(n);if(!i?.types?.length)return[];if(a?.length){const o=a.toLocaleLowerCase();return i.types.map(getInnerType).filter(({name:s})=>s.toLocaleLowerCase().includes(o)).sort(objectNameComparer)}return i.types.map(getInnerType).sort(objectNameComparer)}getTypesByTypeKind(n,a){const i=[];if(a?.length){const o=a.toLocaleLowerCase();this.#r.forEach(s=>{s.typeKind===n&&!INTROSPECTION_PREFIX.test(s.name)&&s.name.toLocaleLowerCase().includes(o)&&i.push(s)})}else this.#r.forEach(o=>{o.typeKind===n&&!INTROSPECTION_PREFIX.test(o.name)&&i.push(o)});return i.sort(objectNameComparer)}dispose(){this.#e.clear(),this.#t.clear(),this.#r.clear()}addIntrospectionFields(n,a){const i=this.#r.get(n),o=i?.kind==="query-type",s=i?.kind==="subscription-type";if(o){const l=this.getIntrospectionSchemaField(i.name);l&&a.push(l);const f=this.getIntrospectionTypeField(i.name);f&&a.push(f)}if(!s&&i){const l=this.getIntrospectionTypenameField(i.name);l&&a.push(l)}}getIntrospectionSchemaField(n){const a=IntrospectionField.SCHEMA_FIELD;let i=this.#n.get(a);if(!i){const o=this.#r.get("__Schema");o&&(i={kind:"field",name:a,coordinate:createSchemaMemberCoordinate(n,a),valueType:{kind:"value-type",isList:!1,isOptional:!1,type:o}},this.#n.set(a,i))}return i}getIntrospectionTypeField(n){const a=IntrospectionField.TYPE_FIELD;let i=this.#n.get(a);if(!i){const o=this.#r.get("__Type"),s=this.#r.get("String");o&&s&&(i={kind:"field",name:a,coordinate:createSchemaMemberCoordinate(n,a),valueType:{kind:"value-type",isList:!1,isOptional:!0,type:o},arguments:[{kind:"argument",name:"name",coordinate:createSchemaMemberCoordinate(n,a,"name"),type:{kind:"value-type",isList:!1,isOptional:!1,type:s}}]},this.#n.set(a,i))}return i}getIntrospectionTypenameField(n){const a=IntrospectionField.TYPENAME_FIELD;let i=this.#n.get(a);if(i)i={...i,coordinate:createSchemaMemberCoordinate(n,IntrospectionField.TYPE_FIELD)};else{const o=this.#r.get("String");o&&(i={kind:"field",name:a,coordinate:createSchemaMemberCoordinate(n,a),valueType:{kind:"value-type",isList:!1,isOptional:!1,type:o}},this.#n.set(a,i))}return i}}const schemaCache=new SchemaCache;async function getSchemaCacheItem(r){const n=harmonizeSchemaUrl(r),a=schemaCache.get(n);if(a)return a;const i=await getGraphQLSchemaItems(n);return i?schemaCache.set(n,i):null}function removeSchemaCacheItem(r){schemaCache.remove(harmonizeSchemaUrl(r))}function getResolvedFiles(r,n,a,i,o){return isGraphQLVariableBatch(o)?Promise.resolve(void 0):getSchemaCacheItem(a.sdlEndpoint||a.endpoint).then(s=>!a.useGet&&n&&s&&r?resolveFiles(n,i,o,s,(...l)=>getFileItemInfosByNames(r,...l)):Promise.resolve(void 0))}async function resolveFiles(r,n,a,i,o){let s=[];try{for(const l of r.definitions)if(l.kind===ASTNodeKind.OPERATION_DEFINITION&&l.name?.value===n){if(!l.variablesDefinition?.variableDefinitions.length)return s;for(const f of l.variablesDefinition.variableDefinitions){const d=getTypeNodeName(f.type),u=i.getType(d),c=f.variable.name?.value??"",v=await resolveFieldPathsOfUploadTypes(c,a?.[c],u,o,i);v.length&&(s=[...s,...v])}}}catch(l){console.error(l)}return s}async function resolveFieldPathsOfUploadTypes(r,n,a,i,o){if(!n)return[];if(typeof n=="object"){const s=[],l=[[[],n]];let f;for(;(f=l.shift())!==void 0;){const[d,u]=f;if(u){if(isObjectArray(u))for(let c=0;c<u.length;c++)l.push([[...d,c],u[c]]);else if(typeof u=="object"&&!Array.isArray(u))for(const c of Object.keys(u))l.push([[...d,c],u[c]]);else if((typeof u=="string"||isStringArray(u))&&isUploadScalarType(a,o,d)){const c=await resolveFileInfos(u,d,i);c&&s.push({variableName:r,fieldPath:d,fileOrFiles:c})}}}return s}else if((typeof n=="string"||isStringArray(n))&&isUploadScalarType(a,o)){const s=await resolveFileInfos(n,void 0,i);if(s)return[{variableName:r,fileOrFiles:s}]}return[]}function resolveFileInfos(r,n,a){if(!r)return Promise.resolve(void 0);if(n?.length&&typeof r=="object"&&!Array.isArray(r)){let i=0,o=r;for(;i<n.length&&o!==void 0&&typeof o=="object"&&!Array.isArray(o);){const s=n[i++];o=o[s]}if(typeof o=="string")return a(o).then(s=>s?.[0]);if(isStringArray(o))return a(...o)}else{if(typeof r=="string")return a(r).then(i=>i?.[0]);if(isStringArray(r))return a(...r)}return Promise.resolve(void 0)}function isUploadScalarType(r,n,a){if(!r)return!1;if(a?.length&&r.typeKind==="input-object"){const i=a.filter(l=>typeof l=="string");let o=getInnerType(r),s;for(const l of i){const f=createSchemaMemberCoordinate(o.name,l);if(s=n.getField(f))o=getInnerType(s.valueType);else return!1}return o.typeKind==="scalar"&&o.name==="Upload"}return r.typeKind==="scalar"&&r.name==="Upload"}function getTypeNodeName(r){if(!r)return"UnknownType";let n=r;for(;n.kind!==ASTNodeKind.NAMED_TYPE;){if(!n.type)return"UnknownType";n=n.type}return n.name.value}function getSchema(r){return getGraphQLSchemaEntity(r.sdlEndpoint||r.endpoint)}async function setSchema(r,n,a,i,o){const s=await getGraphQLSchemaEntity(r),l=harmonizeSchemaUrl(r),f=calculateGraphQLSchemaEntityHash(l,a);if(!s||s.hash!==f){const d=await setGraphQLSchemaEntity(l,n,a,i,o);return removeSchemaCacheItem(l),d}return s}async function fetchItemsByCategory(r,n,a){const i=await getSchemaCacheItem(r);return i?n==="root"?await getSchemaRootTypesCore(r,a):n==="directive"?i.getDirectives(a):i.getTypesByTypeKind(n,a):[]}async function fetchRootTypes(r,n){const a=await getSchemaRootTypesCore(r,n);return a.length?a:void 0}async function getSchemaReference(r,n,a){const i=await getGraphQLSchemaStatistics(r);if(!i)return;const o=await fetchItemsByCategory(r,n,a),s=await getSchemaRootTypesCore(r);return{items:o,rootTypes:s,statistics:i}}async function getSchemaRootTypesCore(r,n){const[a,i]=await Promise.all([getSchemaCacheItem(r),getGraphQLSchemaEntity(r)]);if(!a||!i)return[];const o=[i.queryTypeName?a.getType(i.queryTypeName):void 0,i.mutationTypeName?a.getType(i.mutationTypeName):void 0,i.subscriptionTypeName?a.getType(i.subscriptionTypeName):void 0].filter(isSchemaType);if(n?.length){const s=n.toLocaleLowerCase();return o.filter(({name:l})=>l.toLocaleLowerCase().includes(s))}return o}const runningTasks=new Map;function cancelTask(r){runningTasks.get(r)?.cancel()}function enqueueTask(r){runningTasks.has(r.id)||(runningTasks.set(r.id,r),SCHEDULER_CONTEXT.sendMessage(new Message("scheduler-status-updated",{idling:!1,lastUpdated:now()})),deferWork(()=>{r.execute().catch(n=>{n instanceof TaskFailedError?failTask(SCHEDULER_CONTEXT,r.id,n.message,n.kind,n.details):n instanceof Error?failTask(SCHEDULER_CONTEXT,r.id,n.message,"UNEXPECTED_ERROR"):failTask(SCHEDULER_CONTEXT,r.id,"There was a unexpected error in the task","UNEXPECTED_ERROR")}).finally(()=>{runningTasks.delete(r.id),SCHEDULER_CONTEXT.sendMessage(new Message("scheduler-status-updated",{idling:runningTasks.size===0,lastUpdated:now()}))})}))}function deferWork(r){self.setTimeout(r,0)}const SCHEDULER_CONTEXT={sendMessage:r=>self.postMessage(r)};class SchedulerBase extends MessageObserver{#e={sendMessage:n=>self.postMessage(n)};constructor(){super(),this.initialize()}getContext(){return this.#e}initialize(){self.onmessage=({data:n})=>{this.handleMessage(this.#e,n)},this.registerReceiveMessageHandler(CANCEL_TASK_MESSAGE_TYPE,n=>{cancelTask(n.payload.taskId)}),this.registerReceiveMessageHandler(INITIALIZE_WORKER_MESSAGE_TYPE,n=>{self.appNamespace=n.payload.appNamespace}),this.registerMessageReceiveHandlers()}}const DOCUMENT_ANALYSIS_MESSAGE_TYPE="analyze-document";function analyzeDocument({id:r,payload:{documentId:n},type:a},i){const o=new AbortController;enqueueTask({id:r,cancel:()=>o.abort(),execute:async()=>{const s=await getDocumentItemAndContent(n,o.signal);let l={documentId:n,operations:[]};if(!s){i.sendMessage(new Message(a,l,r));return}const f=await getInterpolatedHttpConnectionForActiveEnvironment(n,o.signal);if(!f){i.sendMessage(new Message(a,l,r));return}const d=getGraphQLDocument(i,s);if(!d){i.sendMessage(new Message(a,{documentId:n,operations:[]},r));return}const u=getOperations(d),c=await getSchemaCacheItem(f.sdlEndpoint||f.endpoint);let v;if(c){const h=s.workspaceId?await getAllFileItemInfos(s.workspaceId):void 0,m=generateVariableJsonSchema(d,g=>c.getType(g),g=>c.getFields(g),h);v=(await setVariableJsonSchema(n,m))?.hash}i.sendMessage(new Message(a,{documentId:n,operations:u,variableJsonSchemaHash:v},r))}})}const DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE="analyze-document-operations";function analyzeDocumentOperations({id:r,payload:{documentId:n},type:a},i){const o=new AbortController;enqueueTask({id:r,cancel:()=>o.abort(),execute:async()=>{const s=await getDocumentItemAndContent(n,o.signal),l=getGraphQLDocument(i,s);if(!l){i.sendMessage(new Message(a,{documentId:n,operations:[]},r));return}const f=getOperations(l);i.sendMessage(new Message(a,{documentId:n,operations:f},r))}})}function noop(){}const FILES_UPDATED_MESSAGE_TYPE="files-updated",VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE="variable-json-schema-updated";function updatedFiles({id:r,payload:{documentId:n}},a){enqueueTask({id:r,cancel:noop,execute:async()=>{const i=await getDocumentItemAndContent(n);let o={documentId:n};if(i&&i.workspaceId){const s=await getInterpolatedHttpConnectionForActiveEnvironment(n);if(s){const l=getGraphQLDocument(a,i),f=await getSchemaCacheItem(s.sdlEndpoint||s.endpoint);if(l&&f){const d=await getAllFileItemInfos(i.workspaceId),u=generateVariableJsonSchema(l,v=>f.getType(v),v=>f.getFields(v),d),c=await setVariableJsonSchema(n,u);o={documentId:n,variableJsonSchemaHash:c?.hash}}}}a.sendMessage(new Message(VARIABLE_JSON_SCHEMA_UPDATED_MESSAGE_TYPE,o,r))}})}const global$1=globalThis||void 0||self;function extendedTypeof(r){return r===null?"null":Array.isArray(r)?"array":typeof r}function isObject$2(r){return extendedTypeof(r)==="object"}function areGraphQLErrors(r){return Array.isArray(r)&&r.length>0&&r.every(n=>"message"in n)}function limitCloseReason(r,n){return r.length<124?r:n}const GRAPHQL_TRANSPORT_WS_PROTOCOL="graphql-transport-ws";var CloseCode;(function(r){r[r.InternalServerError=4500]="InternalServerError",r[r.InternalClientError=4005]="InternalClientError",r[r.BadRequest=4400]="BadRequest",r[r.BadResponse=4004]="BadResponse",r[r.Unauthorized=4401]="Unauthorized",r[r.Forbidden=4403]="Forbidden",r[r.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",r[r.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",r[r.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",r[r.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",r[r.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(CloseCode||(CloseCode={}));var MessageType;(function(r){r.ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete"})(MessageType||(MessageType={}));function validateMessage(r){if(!isObject$2(r))throw new Error(`Message is expected to be an object, but got ${extendedTypeof(r)}`);if(!r.type)throw new Error("Message is missing the 'type' property");if(typeof r.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${extendedTypeof(r.type)}`);switch(r.type){case MessageType.ConnectionInit:case MessageType.ConnectionAck:case MessageType.Ping:case MessageType.Pong:{if(r.payload!=null&&!isObject$2(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${r.payload}"`);break}case MessageType.Subscribe:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!isObject$2(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${extendedTypeof(r.payload)}`);if(typeof r.payload.query!="string")throw new Error(`"${r.type}" message payload expects the 'query' property to be a string, but got ${extendedTypeof(r.payload.query)}`);if(r.payload.variables!=null&&!isObject$2(r.payload.variables))throw new Error(`"${r.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${extendedTypeof(r.payload.variables)}`);if(r.payload.operationName!=null&&extendedTypeof(r.payload.operationName)!=="string")throw new Error(`"${r.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${extendedTypeof(r.payload.operationName)}`);if(r.payload.extensions!=null&&!isObject$2(r.payload.extensions))throw new Error(`"${r.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${extendedTypeof(r.payload.extensions)}`);break}case MessageType.Next:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!isObject$2(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${extendedTypeof(r.payload)}`);break}case MessageType.Error:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!areGraphQLErrors(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(r.payload)}`);break}case MessageType.Complete:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${extendedTypeof(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${r.type}"`)}return r}function parseMessage(r,n){return validateMessage(typeof r=="string"?JSON.parse(r,n):r)}function stringifyMessage(r,n){return validateMessage(r),JSON.stringify(r,n)}var __await=function(r){return this instanceof __await?(this.v=r,this):new __await(r)},__asyncGenerator=function(r,n,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=a.apply(r,n||[]),o,s=[];return o={},l("next"),l("throw"),l("return"),o[Symbol.asyncIterator]=function(){return this},o;function l(h){i[h]&&(o[h]=function(m){return new Promise(function(g,_){s.push([h,m,g,_])>1||f(h,m)})})}function f(h,m){try{d(i[h](m))}catch(g){v(s[0][3],g)}}function d(h){h.value instanceof __await?Promise.resolve(h.value.v).then(u,c):v(s[0][2],h)}function u(h){f("next",h)}function c(h){f("throw",h)}function v(h,m){h(m),s.shift(),s.length&&f(s[0][0],s[0][1])}};function createClient(r){const{url:n,connectionParams:a,lazy:i=!0,onNonLazyError:o=console.error,lazyCloseTimeout:s=0,keepAlive:l=0,disablePong:f,connectionAckWaitTimeout:d=0,retryAttempts:u=5,retryWait:c=async function(D){let I=1e3;for(let T=0;T<D;T++)I*=2;await new Promise(T=>setTimeout(T,I+Math.floor(Math.random()*2700+300)))},shouldRetry:v=isLikeCloseEvent,isFatalConnectionProblem:h,on:m,webSocketImpl:g,generateID:_=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,D=>{const I=Math.random()*16|0;return(D=="x"?I:I&3|8).toString(16)})},jsonMessageReplacer:S,jsonMessageReviver:N}=r;let O;if(g){if(!isWebSocket(g))throw new Error("Invalid WebSocket implementation provided");O=g}else typeof WebSocket<"u"?O=WebSocket:typeof global$1<"u"?O=global$1.WebSocket||global$1.MozWebSocket:typeof window<"u"&&(O=window.WebSocket||window.MozWebSocket);if(!O)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const M=O,F=(()=>{const b=(()=>{const I={};return{on(T,C){return I[T]=C,()=>{delete I[T]}},emit(T){var C;"id"in T&&((C=I[T.id])===null||C===void 0||C.call(I,T))}}})(),D={connecting:m?.connecting?[m.connecting]:[],opened:m?.opened?[m.opened]:[],connected:m?.connected?[m.connected]:[],ping:m?.ping?[m.ping]:[],pong:m?.pong?[m.pong]:[],message:m?.message?[b.emit,m.message]:[b.emit],closed:m?.closed?[m.closed]:[],error:m?.error?[m.error]:[]};return{onMessage:b.on,on(I,T){const C=D[I];return C.push(T),()=>{C.splice(C.indexOf(T),1)}},emit(I,...T){for(const C of[...D[I]])C(...T)}}})();function L(b){const D=[F.on("error",I=>{D.forEach(T=>T()),b(I)}),F.on("closed",I=>{D.forEach(T=>T()),b(I)})]}let k,P=0,U,B=!1,j=0,$=!1;async function A(){clearTimeout(U);const[b,D]=await(k??(k=new Promise((C,x)=>(async()=>{if(B){if(await c(j),!P)return k=void 0,x({code:1e3,reason:"All Subscriptions Gone"});j++}F.emit("connecting",B);const w=new M(typeof n=="function"?await n():n,GRAPHQL_TRANSPORT_WS_PROTOCOL);let E,q;function G(){isFinite(l)&&l>0&&(clearTimeout(q),q=setTimeout(()=>{w.readyState===M.OPEN&&(w.send(stringifyMessage({type:MessageType.Ping})),F.emit("ping",!1,void 0))},l))}L(H=>{k=void 0,clearTimeout(E),clearTimeout(q),x(H),H instanceof TerminatedCloseEvent&&(w.close(4499,"Terminated"),w.onerror=null,w.onclose=null)}),w.onerror=H=>F.emit("error",H),w.onclose=H=>F.emit("closed",H),w.onopen=async()=>{try{F.emit("opened",w);const H=typeof a=="function"?await a():a;if(w.readyState!==M.OPEN)return;w.send(stringifyMessage(H?{type:MessageType.ConnectionInit,payload:H}:{type:MessageType.ConnectionInit},S)),isFinite(d)&&d>0&&(E=setTimeout(()=>{w.close(CloseCode.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},d)),G()}catch(H){F.emit("error",H),w.close(CloseCode.InternalClientError,limitCloseReason(H instanceof Error?H.message:new Error(H).message,"Internal client error"))}};let z=!1;w.onmessage=({data:H})=>{try{const V=parseMessage(H,N);if(F.emit("message",V),V.type==="ping"||V.type==="pong"){F.emit(V.type,!0,V.payload),V.type==="pong"?G():f||(w.send(stringifyMessage(V.payload?{type:MessageType.Pong,payload:V.payload}:{type:MessageType.Pong})),F.emit("pong",!1,V.payload));return}if(z)return;if(V.type!==MessageType.ConnectionAck)throw new Error(`First message cannot be of type ${V.type}`);clearTimeout(E),z=!0,F.emit("connected",w,V.payload,B),B=!1,j=0,C([w,new Promise((K,Z)=>L(Z))])}catch(V){w.onmessage=null,F.emit("error",V),w.close(CloseCode.BadResponse,limitCloseReason(V instanceof Error?V.message:new Error(V).message,"Bad response"))}}})())));b.readyState===M.CLOSING&&await D;let I=()=>{};const T=new Promise(C=>I=C);return[b,I,Promise.race([T.then(()=>{if(!P){const C=()=>b.close(1e3,"Normal Closure");isFinite(s)&&s>0?U=setTimeout(()=>{b.readyState===M.OPEN&&C()},s):C()}}),D])]}function R(b){if(isLikeCloseEvent(b)&&(isFatalInternalCloseCode(b.code)||[CloseCode.InternalServerError,CloseCode.InternalClientError,CloseCode.BadRequest,CloseCode.BadResponse,CloseCode.Unauthorized,CloseCode.SubprotocolNotAcceptable,CloseCode.SubscriberAlreadyExists,CloseCode.TooManyInitialisationRequests].includes(b.code)))throw b;if($)return!1;if(isLikeCloseEvent(b)&&b.code===1e3)return P>0;if(!u||j>=u||!v(b)||h?.(b))throw b;return B=!0}i||(async()=>{for(P++;;)try{const[,,b]=await A();await b}catch(b){try{if(!R(b))return}catch(D){return o?.(D)}}})();function y(b,D){const I=_(b);let T=!1,C=!1,x=()=>{P--,T=!0};return(async()=>{for(P++;;)try{const[w,E,q]=await A();if(T)return E();const G=F.onMessage(I,z=>{switch(z.type){case MessageType.Next:{D.next(z.payload);return}case MessageType.Error:{C=!0,T=!0,D.error(z.payload),x();return}case MessageType.Complete:{T=!0,x();return}}});w.send(stringifyMessage({id:I,type:MessageType.Subscribe,payload:b},S)),x=()=>{!T&&w.readyState===M.OPEN&&w.send(stringifyMessage({id:I,type:MessageType.Complete},S)),P--,T=!0,E()},await q.finally(G);return}catch(w){if(!R(w))return}})().then(()=>{C||D.complete()}).catch(w=>{D.error(w)}),()=>{T||x()}}return{on:F.on,subscribe:y,iterate(b){const D=[],I={done:!1,error:null,resolve:()=>{}},T=y(b,{next(x){D.push(x),I.resolve()},error(x){I.done=!0,I.error=x,I.resolve()},complete(){I.done=!0,I.resolve()}}),C=function(){return __asyncGenerator(this,arguments,function*(){for(;;){for(D.length||(yield __await(new Promise(E=>I.resolve=E)));D.length;)yield yield __await(D.shift());if(I.error)throw I.error;if(I.done)return yield __await(void 0)}})}();return C.throw=async x=>(I.done||(I.done=!0,I.error=x,I.resolve()),{done:!0,value:void 0}),C.return=async()=>(T(),{done:!0,value:void 0}),C},async dispose(){if($=!0,k){const[b]=await k;b.close(1e3,"Normal Closure")}},terminate(){k&&F.emit("closed",new TerminatedCloseEvent)}}}class TerminatedCloseEvent extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function isLikeCloseEvent(r){return isObject$2(r)&&"code"in r&&"reason"in r}function isFatalInternalCloseCode(r){return[1e3,1001,1006,1005,1012,1013,1014].includes(r)?!1:r>=1e3&&r<=1999}function isWebSocket(r){return typeof r=="function"&&"constructor"in r&&"CLOSED"in r&&"CLOSING"in r&&"CONNECTING"in r&&"OPEN"in r}var backo2,hasRequiredBacko2;function requireBacko2(){if(hasRequiredBacko2)return backo2;hasRequiredBacko2=1,backo2=r;function r(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}return r.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(n){this.ms=n},r.prototype.setMax=function(n){this.max=n},r.prototype.setJitter=function(n){this.jitter=n},backo2}var backo2Exports=requireBacko2(),Backoff=getDefaultExportFromCjs(backo2Exports),eventemitter3={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,function(r){var n=Object.prototype.hasOwnProperty,a="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(a=!1));function o(d,u,c){this.fn=d,this.context=u,this.once=c||!1}function s(d,u,c,v,h){if(typeof c!="function")throw new TypeError("The listener must be a function");var m=new o(c,v||d,h),g=a?a+u:u;return d._events[g]?d._events[g].fn?d._events[g]=[d._events[g],m]:d._events[g].push(m):(d._events[g]=m,d._eventsCount++),d}function l(d,u){--d._eventsCount===0?d._events=new i:delete d._events[u]}function f(){this._events=new i,this._eventsCount=0}f.prototype.eventNames=function(){var u=[],c,v;if(this._eventsCount===0)return u;for(v in c=this._events)n.call(c,v)&&u.push(a?v.slice(1):v);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},f.prototype.listeners=function(u){var c=a?a+u:u,v=this._events[c];if(!v)return[];if(v.fn)return[v.fn];for(var h=0,m=v.length,g=new Array(m);h<m;h++)g[h]=v[h].fn;return g},f.prototype.listenerCount=function(u){var c=a?a+u:u,v=this._events[c];return v?v.fn?1:v.length:0},f.prototype.emit=function(u,c,v,h,m,g){var _=a?a+u:u;if(!this._events[_])return!1;var S=this._events[_],N=arguments.length,O,M;if(S.fn){switch(S.once&&this.removeListener(u,S.fn,void 0,!0),N){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,c),!0;case 3:return S.fn.call(S.context,c,v),!0;case 4:return S.fn.call(S.context,c,v,h),!0;case 5:return S.fn.call(S.context,c,v,h,m),!0;case 6:return S.fn.call(S.context,c,v,h,m,g),!0}for(M=1,O=new Array(N-1);M<N;M++)O[M-1]=arguments[M];S.fn.apply(S.context,O)}else{var F=S.length,L;for(M=0;M<F;M++)switch(S[M].once&&this.removeListener(u,S[M].fn,void 0,!0),N){case 1:S[M].fn.call(S[M].context);break;case 2:S[M].fn.call(S[M].context,c);break;case 3:S[M].fn.call(S[M].context,c,v);break;case 4:S[M].fn.call(S[M].context,c,v,h);break;default:if(!O)for(L=1,O=new Array(N-1);L<N;L++)O[L-1]=arguments[L];S[M].fn.apply(S[M].context,O)}}return!0},f.prototype.on=function(u,c,v){return s(this,u,c,v,!1)},f.prototype.once=function(u,c,v){return s(this,u,c,v,!0)},f.prototype.removeListener=function(u,c,v,h){var m=a?a+u:u;if(!this._events[m])return this;if(!c)return l(this,m),this;var g=this._events[m];if(g.fn)g.fn===c&&(!h||g.once)&&(!v||g.context===v)&&l(this,m);else{for(var _=0,S=[],N=g.length;_<N;_++)(g[_].fn!==c||h&&!g[_].once||v&&g[_].context!==v)&&S.push(g[_]);S.length?this._events[m]=S.length===1?S[0]:S:l(this,m)}return this},f.prototype.removeAllListeners=function(u){var c;return u?(c=a?a+u:u,this._events[c]&&l(this,c)):(this._events=new i,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=a,f.EventEmitter=f,r.exports=f}(eventemitter3)),eventemitter3.exports}var eventemitter3Exports=requireEventemitter3(),defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}),defaults.WS_TIMEOUT=defaults.MIN_WS_TIMEOUT=void 0;var r=1e3;defaults.MIN_WS_TIMEOUT=r;var n=3e4;return defaults.WS_TIMEOUT=n,defaults}var defaultsExports=requireDefaults(),messageTypes={},hasRequiredMessageTypes;function requireMessageTypes(){if(hasRequiredMessageTypes)return messageTypes;hasRequiredMessageTypes=1,Object.defineProperty(messageTypes,"__esModule",{value:!0});var r=function(){function n(){throw new Error("Static Class")}return n.GQL_CONNECTION_INIT="connection_init",n.GQL_CONNECTION_ACK="connection_ack",n.GQL_CONNECTION_ERROR="connection_error",n.GQL_CONNECTION_KEEP_ALIVE="ka",n.GQL_CONNECTION_TERMINATE="connection_terminate",n.GQL_START="start",n.GQL_DATA="data",n.GQL_ERROR="error",n.GQL_COMPLETE="complete",n.GQL_STOP="stop",n.SUBSCRIPTION_START="subscription_start",n.SUBSCRIPTION_DATA="subscription_data",n.SUBSCRIPTION_SUCCESS="subscription_success",n.SUBSCRIPTION_FAIL="subscription_fail",n.SUBSCRIPTION_END="subscription_end",n.INIT="init",n.INIT_SUCCESS="init_success",n.INIT_FAIL="init_fail",n.KEEP_ALIVE="keepalive",n}();return messageTypes.default=r,messageTypes}var messageTypesExports=requireMessageTypes(),MessageTypes=getDefaultExportFromCjs(messageTypesExports),protocol={},hasRequiredProtocol;function requireProtocol(){if(hasRequiredProtocol)return protocol;hasRequiredProtocol=1,Object.defineProperty(protocol,"__esModule",{value:!0}),protocol.GRAPHQL_SUBSCRIPTIONS=protocol.GRAPHQL_WS=void 0;var r="graphql-ws";protocol.GRAPHQL_WS=r;var n="graphql-subscriptions";return protocol.GRAPHQL_SUBSCRIPTIONS=n,protocol}var protocolExports=requireProtocol(),isObject$1={},hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject$1;hasRequiredIsObject=1,Object.defineProperty(isObject$1,"__esModule",{value:!0});function r(n){return n!==null&&typeof n=="object"}return isObject$1.default=r,isObject$1}var isObjectExports=requireIsObject(),isObject=getDefaultExportFromCjs(isObjectExports),isString$1={},hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString$1;hasRequiredIsString=1,Object.defineProperty(isString$1,"__esModule",{value:!0});function r(n){return typeof n=="string"}return isString$1.default=r,isString$1}var isStringExports=requireIsString(),isString=getDefaultExportFromCjs(isStringExports);function symbolObservablePonyfill(r){var n,a=r.Symbol;return typeof a=="function"?a.observable?n=a.observable:(n=a("observable"),a.observable=n):n="@@observable",n}var root;typeof self<"u"?root=self:typeof window<"u"?root=window:typeof global$1<"u"?root=global$1:typeof module<"u"?root=module:root=Function("return this")();var result=symbolObservablePonyfill(root);const _global=typeof global$1<"u"?global$1:typeof window<"u"?window:{},NativeWebSocket=_global.WebSocket||_global.MozWebSocket;class SubscriptionClient{client;operations;url;nextOperationId;connectionParams;minWsTimeout;wsTimeout;unsentMessagesQueue;reconnect;reconnecting;reconnectionAttempts;backoff;connectionCallback;eventEmitter;lazy;inactivityTimeout;inactivityTimeoutId;closedByUser;wsImpl;wsProtocols;wasKeepAliveReceived;tryReconnectTimeoutId;checkConnectionIntervalId;maxConnectTimeoutId;middlewares;maxConnectTimeGenerator;wsOptionArguments;wsOnMessage;constructor(n,a,i,o){const{connectionCallback:s=void 0,connectionParams:l={},minTimeout:f=defaultsExports.MIN_WS_TIMEOUT,timeout:d=defaultsExports.WS_TIMEOUT,reconnect:u=!1,reconnectionAttempts:c=1/0,lazy:v=!1,inactivityTimeout:h=0,wsOptionArguments:m=[],onMessage:g}=a||{};if(this.wsOnMessage=g,this.wsImpl=i||NativeWebSocket,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=o||protocolExports.GRAPHQL_WS,this.connectionCallback=s,this.url=n,this.operations={},this.nextOperationId=0,this.minWsTimeout=f,this.wsTimeout=d,this.unsentMessagesQueue=[],this.reconnect=u,this.reconnecting=!1,this.reconnectionAttempts=c,this.lazy=!!v,this.inactivityTimeout=h,this.closedByUser=!1,this.backoff=new Backoff({jitter:.5}),this.eventEmitter=new eventemitter3Exports.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(l),this.wsOptionArguments=m,this.lazy||this.connect()}get status(){return this.client===null?this.wsImpl.CLOSED:this.client.readyState}close(n=!0,a=!0){this.clearInactivityTimeout(),this.client!==null&&(this.closedByUser=a,n&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,MessageTypes.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),n||this.tryReconnect())}request(n){const a=this.getObserver.bind(this),i=this.executeOperation.bind(this),o=this.unsubscribe.bind(this);let s=null;return this.clearInactivityTimeout(),{[result](){return this},subscribe(l,f,d){const u=a(l,f,d);return s=i(n,(c,v)=>{c===null&&v===null?u.complete&&u.complete():c?u.error&&u.error(c[0]):u.next&&u.next(v)}),{unsubscribe:()=>{s&&(o(s),s=null)}}}}}on(n,a,i){const o=this.eventEmitter.on(n,a,i);return()=>{o.off(n,a,i)}}onConnected(n,a){return this.on("connected",n,a)}onConnecting(n,a){return this.on("connecting",n,a)}onDisconnected(n,a){return this.on("disconnected",n,a)}onReconnected(n,a){return this.on("reconnected",n,a)}onReconnecting(n,a){return this.on("reconnecting",n,a)}onError(n,a){return this.on("error",n,a)}unsubscribeAll(){Object.keys(this.operations).forEach(n=>{this.unsubscribe(n)})}applyMiddlewares(n){return new Promise((a,i)=>{((s,l)=>{const f=d=>{if(d)i(d);else if(s.length>0){const u=s.shift();u&&u.applyMiddleware.apply(l,[n,f])}else a(n)};f()})([...this.middlewares],this)})}use(n){return n.forEach(a=>{if(isFunction(a.applyMiddleware))this.middlewares.push(a);else throw new Error("Middleware must implement the applyMiddleware function.")}),this}getConnectionParams(n){return()=>new Promise((a,i)=>{if(isFunction(n))try{return a(n.call(null))}catch(o){return i(o)}a(n)})}executeOperation(n,a){this.client===null&&this.connect();const i=this.generateOperationId();return this.operations[i]={options:n,handler:a},this.applyMiddlewares(n).then(o=>{this.checkOperationOptions(o,a),this.operations[i]&&(this.operations[i]={options:o,handler:a},this.sendMessage(i,MessageTypes.GQL_START,o))}).catch(o=>{this.unsubscribe(i),a(this.formatErrors(o))}),i}getObserver(n,a,i){return isFunction(n)?{next:o=>n(o),error:o=>a&&a(o),complete:()=>i&&i()}:n}createMaxConnectTimeGenerator(){const n=this.minWsTimeout,a=this.wsTimeout;return new Backoff({min:n,max:a,factor:1.2})}clearCheckConnectionInterval(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)}clearMaxConnectTimeout(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)}clearTryReconnectTimeout(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)}clearInactivityTimeout(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)}setInactivityTimeout(){this.inactivityTimeout>0&&Object.keys(this.operations).length===0&&(this.inactivityTimeoutId=setTimeout(()=>{Object.keys(this.operations).length===0&&this.close()},this.inactivityTimeout))}checkOperationOptions(n,a){const{query:i,variables:o,operationName:s}=n;if(!i)throw new Error("Must provide a query.");if(!a)throw new Error("Must provide an handler.");if(!isString(i)&&!getOperationAST(i,s)||s&&!isString(s)||o&&!isObject(o))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")}buildMessage(n,a,i){const o=i&&i.query?{...i,query:typeof i.query=="string"?i.query:print(i.query)}:i;return{id:n,type:a,payload:o}}formatErrors(n){return Array.isArray(n)?n:n&&n.errors?this.formatErrors(n.errors):n&&n.message?[n]:[{name:"FormattedError",message:"Unknown error",originalError:n}]}sendMessage(n,a,i){this.sendMessageRaw(this.buildMessage(n,a,i))}sendMessageRaw(n){switch(this.status){case this.wsImpl.OPEN:let a=JSON.stringify(n);try{JSON.parse(a)}catch{this.eventEmitter.emit("error",new Error(`Message must be JSON-serializable. Got: ${n}`))}this.client.send(a);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(n);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(n)))}}generateOperationId(){return String(++this.nextOperationId)}tryReconnect(){if(!this.reconnect||this.backoff.attempts>=this.reconnectionAttempts)return;this.reconnecting||(Object.keys(this.operations).forEach(a=>{this.unsentMessagesQueue.push(this.buildMessage(a,MessageTypes.GQL_START,this.operations[a].options))}),this.reconnecting=!0),this.clearTryReconnectTimeout();const n=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout(()=>{this.connect()},n)}flushUnsentMessagesQueue(){this.unsentMessagesQueue.forEach(n=>{this.sendMessageRaw(n)}),this.unsentMessagesQueue=[]}checkConnection(){if(this.wasKeepAliveReceived){this.wasKeepAliveReceived=!1;return}this.reconnecting||this.close(!1,!0)}checkMaxConnectTimeout(){this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout(()=>{this.status!==this.wsImpl.OPEN&&(this.reconnecting=!0,this.close(!1,!0))},this.maxConnectTimeGenerator.duration())}connect(){this.client=new this.wsImpl(this.url,this.wsProtocols,...this.wsOptionArguments),this.checkMaxConnectTimeout(),this.client.onopen=async()=>{if(this.status===this.wsImpl.OPEN){this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting");try{const n=await this.connectionParams();this.sendMessage(void 0,MessageTypes.GQL_CONNECTION_INIT,n),this.flushUnsentMessagesQueue()}catch(n){this.sendMessage(void 0,MessageTypes.GQL_CONNECTION_ERROR,n),this.flushUnsentMessagesQueue()}}},this.client.onclose=()=>{this.closedByUser||this.close(!1,!1)},this.client.onerror=n=>{this.eventEmitter.emit("error",n)},this.client.onmessage=({data:n})=>{this.wsOnMessage?.(n),this.processReceivedData(n)}}processReceivedData(n){let a,i;try{a=JSON.parse(n),i=a.id}catch{throw new Error(`Message must be JSON-parseable. Got: ${n}`)}if([MessageTypes.GQL_DATA,MessageTypes.GQL_COMPLETE,MessageTypes.GQL_ERROR].indexOf(a.type)!==-1&&!this.operations[i]){this.unsubscribe(i);return}switch(a.type){case MessageTypes.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(a.payload);break;case MessageTypes.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",a.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case MessageTypes.GQL_COMPLETE:const o=this.operations[i].handler;delete this.operations[i],o.call(this,null,null);break;case MessageTypes.GQL_ERROR:this.operations[i].handler(this.formatErrors(a.payload),null),delete this.operations[i];break;case MessageTypes.GQL_DATA:const s=a.payload.errors?{...a.payload,errors:this.formatErrors(a.payload.errors)}:a.payload;this.operations[i].handler(null,s);break;case MessageTypes.GQL_CONNECTION_KEEP_ALIVE:const l=typeof this.wasKeepAliveReceived>"u";this.wasKeepAliveReceived=!0,l&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}}unsubscribe(n){this.operations[n]&&(delete this.operations[n],this.setInactivityTimeout(),this.sendMessage(n,MessageTypes.GQL_STOP,void 0))}}const INVALID_ENDPOINT_ERROR_MESSAGE="Invalid Schema Endpoint for more info double click on the failed Result.",INVALID_HTTP_HEADER_ERROR_MESSAGE="Invalid HTTP Header for more info double click on the failed Result.",EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE="execute-operation";function runOperation({payload:{documentId:r,workspaceId:n,environmentId:a,operationIndex:i=0}},o){const s=new AbortController;enqueueTask({id:r,cancel:()=>s.abort(),execute:async()=>{const l=await getDocumentItemAndContent(r,s.signal);if(!l)return;const[f,d]=await Promise.all([getConnectionSettings(r,s.signal),getResolvedVariables(a)]),u=interpolateHttpConnectionSettings(f,d);if(!u)return;let c;function v(){c?.cancel(),s.signal.removeEventListener("abort",v)}s.signal.addEventListener("abort",v);const h=createId(),m=getGraphQLDocument(o,l,!0),g=getHttpHeaders(u),_=getGraphQLVariables(o,l,a,i,d);if(m&&(_||!l.variables?.length)){const[S,N]=getOperation(m,i),O=validateDocument(m);if(O.success||(console.warn(O.errorMessage),sendWarning(o,O.errorMessage,r)),isInvalidHttpHeader(g)){const k=S===OperationType.SUBSCRIPTION?{id:h,operationName:N,operationType:S,operationStatus:"failed",started:now(),payload:{errors:[{message:INVALID_HTTP_HEADER_ERROR_MESSAGE}]}}:{id:h,operationName:N,operationType:S,operationStatus:"failed",started:now(),data:{kind:GraphQLResponseKind.SIMPLE,parsedBody:{errors:[{message:INVALID_HTTP_HEADER_ERROR_MESSAGE}]}}};sendOperationResult(o,r,k),sendOperationRequestFailed(o,r,h,S),sendInvalidHttpHeaderError(o,r,g,createLogMessagePrefix(S,N),h);return}const M=!0,[F,L]=O.success&&M?splitOperation(m,l.body,i)(l,_):[l,_];if(S===OperationType.SUBSCRIPTION)c=createSubscriptionExecutor(o,n,h,F,S,N,i,L,u,g);else{const k=O.success&&(u.endpoint.length||u.sdlEndpoint?.length)?await getResolvedFiles(n,m,u,N,L):void 0;c=createDefaultExecutor(o,n,h,F,S,N,i,L,u,g,k,M)}}else{if(isInvalidHttpHeader(g)){const S=OperationType.QUERY;sendOperationResult(o,r,{id:h,operationType:S,operationStatus:"failed",started:now(),data:{kind:GraphQLResponseKind.SIMPLE,parsedBody:{errors:[{message:INVALID_HTTP_HEADER_ERROR_MESSAGE}]}}}),sendOperationRequestFailed(o,r,h,S),sendInvalidHttpHeaderError(o,r,g,createLogMessagePrefix(S),h);return}c=createDefaultExecutor(o,n,h,l,OperationType.QUERY,void 0,i,_,u,g)}s.signal.aborted||await c.execute()}})}function createLogMessagePrefix(r,n){const a=n?`"${n}" `:"";return`${createHumanReadableOperationType(r)} operation ${a}`}function createHumanReadableOperationType(r){switch(r){case OperationType.MUTATION:return"Mutation";case OperationType.SUBSCRIPTION:return"Subscription";default:return"Query"}}const createDefaultExecutor=(r,n,a,i,o,s,l,f,d,u,c,v=!1)=>{if(o===OperationType.SUBSCRIPTION)throw new Error("Subscription type is not allowed!");const h=new AbortController,{id:m,body:g}=i,_=()=>{sendOperationRequestSucceeded(r,m,a,o)};return{cancel:async()=>h.abort(),execute:()=>new Promise(async S=>{if(d?.endpoint.length){const N=now();sendOperationRequestStarted(r,m,a,o);const M={headers:u??new Headers,uri:d.endpoint,useGET:d.useGet,includeCookies:d.includeCookies};let F=!1;const L=await executeOperation(M,{operationName:v?void 0:s,query:g,variables:f,files:c},{onComplete:()=>{F||_(),S()},onError:(P,U)=>{F=!0,P instanceof ClientAbortError?sendOperationRequestCancelled(r,m,a,o):(sendOperationResultPatch(r,m,a,{payload:P,success:!1,received:now(),index:U}),sendOperationRequestFailed(r,m,a,o))},onNext:(P,U)=>{sendOperationResultPatch(r,m,a,{payload:P,success:!0,received:now(),index:U})}},{onComplete:()=>{F||_(),S()},onError:(P,U)=>{F=!0,P instanceof ClientAbortError?sendOperationRequestCancelled(r,m,a,o):(sendOperationVariableBatchingResult(r,m,a,{payload:P,success:!1,received:now(),index:U}),sendOperationRequestFailed(r,m,a,o))},onNext:(P,U)=>{sendOperationVariableBatchingResult(r,m,a,{payload:P,success:!0,received:now(),index:U})}},createHttpLogger(r,m,a,RequestKind.GRAPHQL_OPERATION,{name:s}),h.signal),k=L.error?.name==="ClientAbortError"?"cancelled":L.error||L.kind!==GraphQLResponseKind.VARIABLE_BATCHING&&L.parsedBody?.errors?.length?"failed":"succeeded";switch(n&&sendHistoryEntry(r,m,createDocumentId(),n,k,o,s,l),sendOperationResult(r,m,{id:a,operationName:s,operationStatus:k,operationType:o,started:N,data:L}),k){case"cancelled":sendOperationRequestCancelled(r,m,a,o),S();break;case"failed":sendOperationRequestFailed(r,m,a,o),S();break;default:L.kind===GraphQLResponseKind.SIMPLE&&(_(),S());break}}else sendOperationResult(r,m,{id:a,operationName:s,operationType:o,operationStatus:"failed",started:now(),data:{kind:GraphQLResponseKind.SIMPLE,parsedBody:{errors:[{message:INVALID_ENDPOINT_ERROR_MESSAGE}]}}}),sendOperationRequestFailed(r,m,a,o),sendInvalidEndpointWarning(r,m,createLogMessagePrefix(o,s),a),S()})}},createSubscriptionExecutor=(r,n,a,i,o,s,l,f,d,u)=>{if(o!==OperationType.SUBSCRIPTION)throw new Error("Only the Subscription type is allowed here!");const c=new AbortController,{id:v,body:h}=i;return{cancel:async()=>c.abort(),execute:async()=>{let m=!1;const g=getSSESubscriptionEndpoint(d),_=getWSSubscriptionEndpoint(d);if(g.length||_.length)return new Promise(async S=>{const N=createDocumentId(),O=u?Object.fromEntries(u.entries()):{},M=d.subscriptionProtocol??DEFAULT_SUBSCRIPTION_PROTOCOL,F=P=>P===GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL?g:_;sendOperationRequestStarted(r,v,a,o),sendSubscriptionRequestStarted(r,v,a,RequestKind.GRAPHQL_OPERATION,now(),F(M),M,O);const L=P=>{if(m)return;m=!0;const U=mapToGraphQLErrors(P);sendSubscriptionRequestStopped(r,v,a,RequestKind.GRAPHQL_OPERATION,now(),"failed",U),sendOperationResult(r,v,{id:a,operationName:s,operationType:o,operationStatus:"failed",started:now(),payload:{errors:U}}),n&&sendHistoryEntry(r,v,N,n,"failed",o,s,l),sendOperationRequestFailed(r,v,a,o),S()},k=SUBSCRIPTION_PROVIDERS[M](F,O,{includeCookies:d.includeCookies,onConnected:P=>{if(P){L(P);return}sendOperationResult(r,v,{id:a,operationName:s,operationType:o,operationStatus:"succeeded",started:now()}),n&&sendHistoryEntry(r,v,N,n,"succeeded",o,s,l)}});try{let P=function(){k.close(),sendOperationRequestCancelled(r,v,a,o),sendSubscriptionRequestStopped(r,v,a,RequestKind.GRAPHQL_OPERATION,now(),"closed"),c.signal.removeEventListener("abort",P),S()};const U=await k.execute({query:h,operationName:s,variables:f},j=>sendSubscriptionRequestMessage(r,v,a,now(),typeof j=="string"?j:JSON.stringify(j)));k instanceof AutoSubscriptionProvider&&k.protocol&&sendSubscriptionRequestProtocol(r,v,a,RequestKind.GRAPHQL_OPERATION,k.protocol);let B=0;U.subscribe({next:j=>{sendOperationResultEvent(r,v,a,{payload:j,received:now(),success:!j?.errors?.length,index:B++})},error:L,complete:()=>{sendOperationRequestSucceeded(r,v,a,o),sendSubscriptionRequestStopped(r,v,a,RequestKind.GRAPHQL_OPERATION,now(),"completed"),S()}}),c.signal.aborted?P():c.signal.addEventListener("abort",P)}catch(P){L(P)}});sendOperationResult(r,v,{id:a,operationName:s,operationType:o,operationStatus:"failed",started:now(),payload:{errors:[{message:INVALID_ENDPOINT_ERROR_MESSAGE}]}}),sendOperationRequestFailed(r,v,a,o),sendInvalidEndpointWarning(r,v,createLogMessagePrefix(o,s),a)}}};function getSSESubscriptionEndpoint(r){return r?r.sseSubscriptionEndpoint||r.endpoint:""}function getWSSubscriptionEndpoint(r){return r?r.subscriptionEndpoint||r.endpoint.replace(/^http/i,"ws"):""}function mapToGraphQLErrors(r){return"type"in r?[r.type==="closed"&&"code"in r?{message:"Subscription closed",extensions:{code:r.code,reason:r.reason,wasClean:r.wasClean}}:{message:"Unknown subscription error"}]:isObjectArray(r)?r.every(n=>"message"in n)?r.map(({message:n})=>({message:n})):r.length<=1?[{message:"Unknown subscription error"}]:[{message:`${r.length} unknown subscription errors`}]:["message"in r?{message:r.message}:r]}const SUBSCRIPTION_PROVIDERS={[AUTO_SUBSCRIPTION_PROTOCOL]:(r,n,a)=>new AutoSubscriptionProvider(r,n,a),[GRAPHQL_WS_SUBSCRIPTION_PROTOCOL]:(r,n,a)=>new GraphQLWSSubscriptionProvider(r,n,a),[APOLLO_SUBSCRIPTION_PROTOCOL]:(r,n,a)=>new ApolloSubscriptionProvider(r,n,a),[GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL]:(r,n,a)=>new GraphQLSSESubscriptionProvider(r,n,a)};class SubscriptionProvider{constructor(n,a,i){this.resolveSubscriptionUrl=n,this.connectionParams=a,this.extraOptions=i}}class AutoSubscriptionProvider extends SubscriptionProvider{provider;subscriptionProtocol;async execute(n,a){const i=this;if(!this.provider){const[o,s]=await new Promise(l=>{const f=i.resolveSubscriptionUrl(AUTO_SUBSCRIPTION_PROTOCOL);if(!f.length){l([new GraphQLSSESubscriptionProvider(i.resolveSubscriptionUrl,i.connectionParams,i.extraOptions),GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL]);return}const d=new WebSocket(f,[GRAPHQL_WS_SUBSCRIPTION_PROTOCOL,APOLLO_SUBSCRIPTION_PROTOCOL]);d.onopen=function(){switch(d.protocol){case APOLLO_SUBSCRIPTION_PROTOCOL:l([new ApolloSubscriptionProvider(i.resolveSubscriptionUrl,i.connectionParams,i.extraOptions),APOLLO_SUBSCRIPTION_PROTOCOL]);break;default:l([new GraphQLWSSubscriptionProvider(i.resolveSubscriptionUrl,i.connectionParams,i.extraOptions),GRAPHQL_WS_SUBSCRIPTION_PROTOCOL]);break}d.close()},d.onerror=function(){l([new GraphQLSSESubscriptionProvider(i.resolveSubscriptionUrl,i.connectionParams,i.extraOptions),GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL]),d.close()}});this.provider=o,this.subscriptionProtocol=s}return this.provider.execute(n,a)}get protocol(){return this.subscriptionProtocol}close(){this.provider?.close()}}class ApolloSubscriptionProvider extends SubscriptionProvider{closeFunc;observable;createClient(n){const a=new SubscriptionClient(this.resolveSubscriptionUrl(APOLLO_SUBSCRIPTION_PROTOCOL),{lazy:!1,reconnect:!1,connectionParams:this.connectionParams,connectionCallback:this.extraOptions?.onConnected,onMessage:n});return this.closeFunc=()=>{a.close(!0)},a}execute(n,a){return this.observable||(this.observable=createObservable(i=>{const o=this.createClient(a);return o.onError(s=>i.error(s)),o.request(n).subscribe(i).unsubscribe})),Promise.resolve(this.observable)}close(){this.closeFunc?.()}}class GraphQLWSSubscriptionProvider extends SubscriptionProvider{closeFunc;observable;createClient(n){let a,i;const o=createClient({url:this.resolveSubscriptionUrl(GRAPHQL_WS_SUBSCRIPTION_PROTOCOL),lazy:!0,retryAttempts:0,keepAlive:ONE_MINUTE,connectionParams:this.connectionParams,on:{connected:s=>{if(!(s instanceof WebSocket)){this.extraOptions?.onConnected?.({message:"Unknown socket"});return}a=s,this.extraOptions?.onConnected?.()},error:s=>{this.extraOptions?.onConnected?.(s)},ping:s=>{s||(i=self.setTimeout(()=>{a?.readyState===WebSocket.OPEN&&a.close(4408,"Request Timeout")},FIVE_SECONDS))},pong:s=>{s&&self.clearTimeout(i)},message:n}});return this.close=()=>{o.dispose()},o}execute(n,a){return this.observable||(this.observable=createObservable(i=>this.createClient(a).subscribe(n,{next:(...o)=>i.next(...o),error:o=>i.error(o),complete:()=>i.complete()}))),Promise.resolve(this.observable)}close(){this.closeFunc?.()}}class GraphQLSSESubscriptionProvider extends SubscriptionProvider{closeFunc;observable;createClient(n){const a=createClient$1({url:this.resolveSubscriptionUrl(GRAPHQL_SSE_SUBSCRIPTION_PROTOCOL),retryAttempts:0,credentials:this.extraOptions?.includeCookies?"include":"same-origin",referrerPolicy:IS_RUNNING_IN_ELECTRON?"no-referrer":"strict-origin-when-cross-origin",headers:{...this.connectionParams,"content-type":"application/json"},onMessage:n});return this.extraOptions?.onConnected?.(),this.close=()=>{a.dispose()},a}execute(n,a){return this.observable||(this.observable=createObservable(i=>this.createClient(a).subscribe(n,{next:(...o)=>i.next(...o),error:o=>i.error(o),complete:()=>i.complete()}))),Promise.resolve(this.observable)}close(){this.closeFunc?.()}}function createObservable(r){return{subscribe:r}}const node=function(){var r=[{defaultValue:null,kind:"LocalArgument",name:"stageId"}],n=[{kind:"Variable",name:"id",variableName:"stageId"}],a={alias:null,args:null,kind:"ScalarField",name:"downloadUrl",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"tag",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:r,kind:"Fragment",metadata:null,name:"schemaApiFetcherTaskQuery",selections:[{alias:null,args:n,concreteType:"Stage",kind:"LinkedField",name:"stageById",plural:!1,selections:[{alias:null,args:null,concreteType:"PublishedSchemaVersion",kind:"LinkedField",name:"publishedSchema",plural:!1,selections:[{alias:null,args:null,concreteType:"SchemaVersion",kind:"LinkedField",name:"version",plural:!1,selections:[a,i],storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:r,kind:"Operation",name:"schemaApiFetcherTaskQuery",selections:[{alias:null,args:n,concreteType:"Stage",kind:"LinkedField",name:"stageById",plural:!1,selections:[{alias:null,args:null,concreteType:"PublishedSchemaVersion",kind:"LinkedField",name:"publishedSchema",plural:!1,selections:[{alias:null,args:null,concreteType:"SchemaVersion",kind:"LinkedField",name:"version",plural:!1,selections:[a,i,o],storageKey:null}],storageKey:null},o],storageKey:null}]},params:{id:"8cddc0556879bf1f147b06775d33b192",metadata:{},name:"schemaApiFetcherTaskQuery",operationKind:"query",text:null}}}();node.hash="1359c500cfecb2578c682124e7dad7ec";const DEFAULT_SCHEMA_INFO={endpoint:"",exists:!1,hash:"",indexed:!1,hasMutationType:!1,hasSubscriptionType:!1,hasUploadType:!1,supportsSemanticIntrospection:!1},CANCEL_OPERATION_REQUEST_MESSAGE_TYPE="cancel-request",SCHEMA_API_FETCHER_MESSAGE_TYPE="fetch-api-schema",apiIdOfRunningFetches=new Set;function fetchApiSchema({id:r,type:n,payload:{apiId:a,stageId:i}},o){const s=new AbortController;enqueueTask({id:r,cancel:()=>s.abort(),execute:async()=>{if(apiIdOfRunningFetches.has(a))throw new TaskFailedError("The schema fetch task cannot be executed concurrently on the same API","MULTIPLE_SCHEMA_FETCHES_DETECTED");try{apiIdOfRunningFetches.add(a);const f=(await fetchRelayQuery(node,{stageId:i},s.signal))?.stageById?.publishedSchema?.version;if(f){const d=await fetchSchemaCore$1(o,a,f.downloadUrl,createSchemaInfoApiUrl(i),s.signal);o.sendMessage(new Message(n,d,r));return}o.sendMessage(new Message(n,DEFAULT_SCHEMA_INFO,r))}finally{apiIdOfRunningFetches.delete(a)}}})}async function fetchSchemaCore$1(r,n,a,i,o){const s=createScopeId();sendScopeBegin(r,n,s,now(),"SDL Schema Fetch",{uri:a,kind:"introspection"});try{const l=await fetchSchemaByApiSdlEndpoint(r,n,s,a,o);if("schema"in l){const f=await setSchema(i,l.schema,l.sdlSchema,GraphQLSchemaKind.SDL_FETCH,l.supportsSemanticIntrospection);return{endpoint:f.endpoint,exists:!0,hash:f.hash,indexed:f.indexed,updatedAt:f.updatedAt,hasMutationType:!!f.mutationTypeName,hasSubscriptionType:!!f.subscriptionTypeName,hasUploadType:f.hasUploadType,supportsSemanticIntrospection:f.supportsSemanticIntrospection}}}finally{sendScopeEnd(r,n,s,now())}throw new TaskFailedError("Loading schema failed.","SCHEMA_FETCHING_FAILED")}const FETCH_SCHEMA_DIRECTIVE="fetch-directive";function fetchSchemaDirective({id:r,payload:{schemaEndpoint:n,coordinate:a},type:i},o){enqueueTask({id:r,cancel:noop,execute:async()=>{const s=(await getSchemaCacheItem(n))?.getDirective(a)??void 0;o.sendMessage(new Message(i,s,r))}})}const FETCH_SCHEMA_DIRECTIVES="fetch-directives";function fetchSchemaDirectives({id:r,payload:{schemaEndpoint:n},type:a},i){enqueueTask({id:r,cancel:noop,execute:async()=>{const o=(await getSchemaCacheItem(n))?.getDirectives()??void 0;i.sendMessage(new Message(a,o,r))}})}const SCHEMA_FETCHER_CACHED_MESSAGE_TYPE="get-cached-schema";function getCachedSchema({id:r,type:n,payload:{documentId:a,environmentId:i}},o){const s=new AbortController;enqueueTask({id:r,cancel:()=>s.abort(),execute:async()=>{const l=await getInterpolatedHttpConnection(a,i,s.signal);if(!l?.endpoint.length&&!l?.sdlEndpoint?.length){o.sendMessage(new Message(n,DEFAULT_SCHEMA_INFO,r));return}const f=getHttpHeaders(l,({name:u})=>!FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN.test(u));if(isInvalidHttpHeader(f)){o.sendMessage(new Message(n,DEFAULT_SCHEMA_INFO,r)),sendInvalidHttpHeaderError(o,a,f,"Introspection Query");return}const d=await getSchemaFromCache(l);o.sendMessage(new Message(n,d??DEFAULT_SCHEMA_INFO,r))}})}async function getSchemaFromCache(r){const n=await getSchema(r);if(n)return{endpoint:n.endpoint,exists:!0,hash:n.hash,indexed:n.indexed,updatedAt:n.updatedAt,hasMutationType:!!n.mutationTypeName,hasSubscriptionType:!!n.subscriptionTypeName,hasUploadType:n.hasUploadType,supportsSemanticIntrospection:n.supportsSemanticIntrospection}}const SCHEMA_FETCHER_MESSAGE_TYPE="fetch-schema",documentIdOfRunningFetches=new Set;function fetchSchema({id:r,type:n,payload:{documentId:a,environmentId:i}},o){const s=new AbortController;enqueueTask({id:r,cancel:()=>s.abort(),execute:async()=>{if(documentIdOfRunningFetches.has(a))throw new TaskFailedError("The schema fetch task cannot be executed concurrently on the same document","MULTIPLE_SCHEMA_FETCHES_DETECTED");try{documentIdOfRunningFetches.add(a);const l=await getInterpolatedHttpConnection(a,i,s.signal);if(!l?.endpoint.length&&!l?.sdlEndpoint?.length){o.sendMessage(new Message(n,DEFAULT_SCHEMA_INFO,r));return}const f=getHttpHeaders(l,({name:c})=>!FUSION_OPERATION_PLAN_HEADER_NAME_PATTERN.test(c));if(isInvalidHttpHeader(f)){o.sendMessage(new Message(n,DEFAULT_SCHEMA_INFO,r)),sendInvalidHttpHeaderError(o,a,f,"Introspection Query");return}const d={headers:f,uri:l.endpoint,useGET:l.useGet,includeCookies:l.includeCookies};if(l.sdlEndpoint){const c=await fetchSchemaBySdlEndpointCore(o,a,{...d,uri:l.sdlEndpoint,useGET:!0},GraphQLSchemaKind.SDL_FETCH,l.sdlEndpoint,s.signal);o.sendMessage(new Message(n,c,r));return}try{const c=ensureEndsWithSlash(l.endpoint)+"schema.graphql",v=await fetchSchemaBySdlEndpointCore(o,a,{...d,uri:c,useGET:!0},GraphQLSchemaKind.SDL_PROBE,l.endpoint,s.signal);o.sendMessage(new Message(n,v,r));return}catch{}const u=await fetchSchemaCore(o,a,d,s.signal);o.sendMessage(new Message(n,u,r))}finally{documentIdOfRunningFetches.delete(a)}}})}function ensureEndsWithSlash(r){return r.endsWith("/")?r:r+"/"}async function fetchSchemaBySdlEndpointCore(r,n,a,i,o,s){const l=createScopeId(),f=a.useGET?"GET":"POST";sendScopeBegin(r,n,l,now(),i===GraphQLSchemaKind.SDL_FETCH?"SDL Schema Fetch":"SDL Schema Probe",{uri:a.uri,kind:"introspection",method:f});try{const d=await fetchSchemaBySdlEndpoint(r,n,l,a.uri,a,i,s);if("schema"in d){const u=await setSchema(o,d.schema,d.sdlSchema,i,d.supportsSemanticIntrospection);return{endpoint:u.endpoint,exists:!0,hash:u.hash,indexed:u.indexed,updatedAt:u.updatedAt,hasMutationType:!!u.mutationTypeName,hasSubscriptionType:!!u.subscriptionTypeName,hasUploadType:u.hasUploadType,supportsSemanticIntrospection:u.supportsSemanticIntrospection}}}finally{sendScopeEnd(r,n,l,now())}throw new TaskFailedError("Loading schema failed.","SCHEMA_FETCHING_FAILED")}async function fetchSchemaCore(r,n,a,i){const o=createScopeId(),s=a.useGET?"GET":"POST";sendScopeBegin(r,n,o,now(),"Introspection",{uri:a.uri,kind:"introspection",method:s});let l;try{const f=await fetchGraphQLSchema(a,(d,u)=>createHttpLogger(r,n,d,RequestKind.GRAPHQL_INTROSPECTION,{scopeId:o,name:u}),i);if("schema"in f){const d=await setSchema(a.uri,f.schema,printSchema(f.schema),GraphQLSchemaKind.INTROSPECTION,f.supportsSemanticIntrospection);return{endpoint:d.endpoint,exists:!0,hash:d.hash,indexed:d.indexed,updatedAt:d.updatedAt,hasMutationType:!!d.mutationTypeName,hasSubscriptionType:!!d.subscriptionTypeName,hasUploadType:d.hasUploadType,supportsSemanticIntrospection:d.supportsSemanticIntrospection}}l={itemId:n,scopeId:o}}finally{sendScopeEnd(r,n,o,now())}throw new TaskFailedError("Loading schema failed.","SCHEMA_FETCHING_FAILED",l)}const FETCH_SCHEMA_FIELD_TYPE="fetch-field";function fetchSchemaFieldType({id:r,payload:{schemaEndpoint:n,coordinate:a},type:i},o){enqueueTask({id:r,cancel:noop,execute:async()=>{const s=await getSchemaCacheItem(n);if(!s){o.sendMessage(new Message(i,void 0,r));return}const l=s.getField(a);o.sendMessage(new Message(i,l,r))}})}const FETCH_SCHEMA_FIELD_TYPES="fetch-fields";function fetchSchemaFieldTypes({id:r,payload:{schemaEndpoint:n,typeName:a,options:i},type:o},s){enqueueTask({id:r,cancel:noop,execute:async()=>{const l=(await getSchemaCacheItem(n))?.getFields(a,i);s.sendMessage(new Message(o,l,r))}})}const FETCH_SCHEMA_FIELDS_AND_TYPES="fetch-fields-and-types";function fetchSchemaFieldsAndTypes({id:r,payload:{schemaEndpoint:n,coordinate:a,options:i},type:o},s){enqueueTask({id:r,cancel:noop,execute:async()=>{const l=await getSchemaCacheItem(n);if(!l){s.sendMessage(new Message(o,void 0,r));return}const f={fields:l.getFields(a,i),interfaces:l.getInterfaces(a,i?.filter),possibleTypes:l.getPossibleTypes(a,i?.filter)};s.sendMessage(new Message(o,f,r))}})}const FETCH_SCHEMA_REFERENCE="fetch-schema-reference";function fetchSchemaReference({id:r,payload:{schemaEndpoint:n,typeCategory:a,filter:i},type:o},s){enqueueTask({id:r,cancel:noop,execute:async()=>{const l=await getSchemaReference(n,a,i);s.sendMessage(new Message(o,l,r))}})}const FETCH_SCHEMA_ROOT_TYPES="fetch-schema-root-types";function fetchSchemaRootTypes({id:r,payload:{schemaEndpoint:n,filter:a},type:i},o){enqueueTask({id:r,cancel:noop,execute:async()=>{const s=await fetchRootTypes(n,a);o.sendMessage(new Message(i,s,r))}})}const FETCH_SCHEMA_TYPE="fetch-type";function fetchSchemaType({id:r,payload:{schemaEndpoint:n,typeName:a},type:i},o){enqueueTask({id:r,cancel:noop,execute:async()=>{const s=(await getSchemaCacheItem(n))?.getType(a)??void 0;o.sendMessage(new Message(i,s,r))}})}const FETCH_SCHEMA_TYPES="fetch-types";function fetchSchemaTypes({id:r,payload:{schemaEndpoint:n,filter:a},type:i},o){enqueueTask({id:r,cancel:noop,execute:async()=>{const s=(await getSchemaCacheItem(n))?.getTypes(a);o.sendMessage(new Message(i,s,r))}})}class GraphQLEngineScheduler extends SchedulerBase{registerMessageReceiveHandlers(){this.registerReceiveMessageHandler(SCHEMA_FETCHER_MESSAGE_TYPE,fetchSchema),this.registerReceiveMessageHandler(SCHEMA_API_FETCHER_MESSAGE_TYPE,fetchApiSchema),this.registerReceiveMessageHandler(SCHEMA_FETCHER_CACHED_MESSAGE_TYPE,getCachedSchema),this.registerReceiveMessageHandler(FETCH_SCHEMA_DIRECTIVE,fetchSchemaDirective),this.registerReceiveMessageHandler(FETCH_SCHEMA_DIRECTIVES,fetchSchemaDirectives),this.registerReceiveMessageHandler(FETCH_SCHEMA_FIELD_TYPE,fetchSchemaFieldType),this.registerReceiveMessageHandler(FETCH_SCHEMA_FIELD_TYPES,fetchSchemaFieldTypes),this.registerReceiveMessageHandler(FETCH_SCHEMA_REFERENCE,fetchSchemaReference),this.registerReceiveMessageHandler(FETCH_SCHEMA_ROOT_TYPES,fetchSchemaRootTypes),this.registerReceiveMessageHandler(FETCH_SCHEMA_TYPE,fetchSchemaType),this.registerReceiveMessageHandler(FETCH_SCHEMA_TYPES,fetchSchemaTypes),this.registerReceiveMessageHandler(FETCH_SCHEMA_FIELDS_AND_TYPES,fetchSchemaFieldsAndTypes),this.registerReceiveMessageHandler(DOCUMENT_ANALYSIS_MESSAGE_TYPE,analyzeDocument),this.registerReceiveMessageHandler(DOCUMENT_OPERATIONS_ANALYSIS_MESSAGE_TYPE,analyzeDocumentOperations),this.registerReceiveMessageHandler(CANCEL_OPERATION_REQUEST_MESSAGE_TYPE,n=>cancelTask(n.payload.documentId)),this.registerReceiveMessageHandler(FILES_UPDATED_MESSAGE_TYPE,updatedFiles),this.registerReceiveMessageHandler(EXECUTE_OPERATION_REQUEST_MESSAGE_TYPE,runOperation)}}new GraphQLEngineScheduler});export default vr();