@highstate/designer 0.20.0 → 0.21.1
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.
- package/.output/nitro.json +4 -4
- package/.output/public/_nuxt/{f3TOpYbw.js → -OnKOwAh.js} +1 -1
- package/.output/public/_nuxt/32ctXXKs.js +1 -0
- package/.output/public/_nuxt/{DCR009rv.js → 5gjbd9sK.js} +1 -1
- package/.output/public/_nuxt/{DQHHT9y-.js → 9OHRRPkh.js} +1 -1
- package/.output/public/_nuxt/{Dbwml2gB.js → B-dJABhs.js} +1 -1
- package/.output/public/_nuxt/{rcFevLEP.js → B2SoM2pd.js} +1 -1
- package/.output/public/_nuxt/{G13IRnB2.js → B4FDp1sn.js} +1 -1
- package/.output/public/_nuxt/{BxaP9l2T.js → B7RpoNQl.js} +1 -1
- package/.output/public/_nuxt/BA47KaF1.js +1 -0
- package/.output/public/_nuxt/{Cm-2nZ05.js → BArXRmKu.js} +1 -1
- package/.output/public/_nuxt/{ziXKbM2N.js → BCJKqJxW.js} +1 -1
- package/.output/public/_nuxt/{BDs6uo3D.js → BD_Kvn-W.js} +1 -1
- package/.output/public/_nuxt/{CV5MeYf9.js → BIPWeF69.js} +1 -1
- package/.output/public/_nuxt/{DxERyYWQ.js → BKIVPvZX.js} +1 -1
- package/.output/public/_nuxt/BN7gUcg9.js +1 -0
- package/.output/public/_nuxt/{CcOKGYBt.js → BTd2ZN65.js} +1 -1
- package/.output/public/_nuxt/{D6fh7rEe.js → BXphdu9w.js} +1 -1
- package/.output/public/_nuxt/{BuJgCY_C.js → BYmSxWA_.js} +1 -1
- package/.output/public/_nuxt/{BkNNRtnm.js → BdRuKvw2.js} +1 -1
- package/.output/public/_nuxt/{BA0jw7CM.js → Bdd5S2WL.js} +1 -1
- package/.output/public/_nuxt/BeH2EWoN.js +1 -0
- package/.output/public/_nuxt/{CPZSvMBB.js → BhozkjGO.js} +1 -1
- package/.output/public/_nuxt/{xp27HhqZ.js → Bl_Sz9PU.js} +1 -1
- package/.output/public/_nuxt/{ChaZkl1J.js → Bs8TB6Bu.js} +1 -1
- package/.output/public/_nuxt/{DsS90Fp6.js → BtrNScOx.js} +1 -1
- package/.output/public/_nuxt/{DyMmfYiE.js → Bu1xs0Fv.js} +1 -1
- package/.output/public/_nuxt/{o_m1mZtJ.js → BupMEc6X.js} +1 -1
- package/.output/public/_nuxt/{GDxZ_Nvm.js → Bv_vOb-Y.js} +1 -1
- package/.output/public/_nuxt/{rgN_MdZl.js → BwKAHWnp.js} +1 -1
- package/.output/public/_nuxt/{CaJ-zn_Z.js → ByE1aAlg.js} +1 -1
- package/.output/public/_nuxt/{BDAHnC4j.js → BzhaMbyl.js} +1 -1
- package/.output/public/_nuxt/{Aopv2gwH.js → C2zyO9uX.js} +1 -1
- package/.output/public/_nuxt/{DOMRsNpU.js → C4XpvUuq.js} +1 -1
- package/.output/public/_nuxt/C5BYcBs_.js +1 -0
- package/.output/public/_nuxt/{tsyQDnRt.js → C973_vs5.js} +1 -1
- package/.output/public/_nuxt/{BlfjmxyP.js → CBIEPWAA.js} +1 -1
- package/.output/public/_nuxt/{BUNf2Yb8.js → CBVcjGJL.js} +1 -1
- package/.output/public/_nuxt/CENFIVCM.js +1 -0
- package/.output/public/_nuxt/{DCinzvm1.js → CJN4g-3R.js} +1 -1
- package/.output/public/_nuxt/{DCBCRx0O.js → CPsHsqGU.js} +1 -1
- package/.output/public/_nuxt/{DWQRqdcR.js → CTRkBkra.js} +1 -1
- package/.output/public/_nuxt/{BLF3u89x.js → CYL3VlR9.js} +1 -1
- package/.output/public/_nuxt/CYpkKp66.js +1 -0
- package/.output/public/_nuxt/{D27ZAKIj.js → CaehGOgh.js} +1 -1
- package/.output/public/_nuxt/{CxEW7TG8.js → CemiMtCX.js} +1 -1
- package/.output/public/_nuxt/{CGscLIrv.js → CgK0fS9t.js} +1 -1
- package/.output/public/_nuxt/{n0RAZLbO.js → CmJE87KM.js} +1 -1
- package/.output/public/_nuxt/Cn-bp-IR.js +1 -0
- package/.output/public/_nuxt/{xdsXwj_J.js → CnhVSb6R.js} +1 -1
- package/.output/public/_nuxt/{9I37tBe7.js → CpGRan2R.js} +1 -1
- package/.output/public/_nuxt/{C1FLL1Qz.js → CqQg8Ldy.js} +1 -1
- package/.output/public/_nuxt/{BJK6uMxG.js → Cs-GjQ8R.js} +1 -1
- package/.output/public/_nuxt/{BPcwi1q2.js → CtbC3i8L.js} +1 -1
- package/.output/public/_nuxt/{xA6NntuA.js → CvSiusML.js} +1 -1
- package/.output/public/_nuxt/CxoCegAs.js +13 -0
- package/.output/public/_nuxt/{BpkvlDNi.js → Cz-197mS.js} +1 -1
- package/.output/public/_nuxt/Cz2AlsmD.js +1 -0
- package/.output/public/_nuxt/{CJWmG4YP.js → D-7HtdRe.js} +1 -1
- package/.output/public/_nuxt/{Dg5xB15N.js → D82vCrfD.js} +1 -1
- package/.output/public/_nuxt/D8l8udqQ.js +1 -0
- package/.output/public/_nuxt/{mUFnM-_q.js → DCK6hB22.js} +1 -1
- package/.output/public/_nuxt/{RNghxpo_.js → DDvzSYfr.js} +1 -1
- package/.output/public/_nuxt/{BEEt8Am7.js → DEtIJe2u.js} +1 -1
- package/.output/public/_nuxt/{BDa1f6PF.js → DHJ62FKo.js} +1 -1
- package/.output/public/_nuxt/{DiTMzCP2.js → DKWXhhCy.js} +1 -1
- package/.output/public/_nuxt/DPOp833l.js +1 -0
- package/.output/public/_nuxt/DRJZaHtK.js +1 -0
- package/.output/public/_nuxt/{RCBWmVHz.js → DSDbyhpJ.js} +1 -1
- package/.output/public/_nuxt/{TsXTqZ29.js → DSeZwD4N.js} +1 -1
- package/.output/public/_nuxt/{DNqd6Nek.js → DSpiceQe.js} +1 -1
- package/.output/public/_nuxt/{CzSiA7V6.js → DTPYfUid.js} +1 -1
- package/.output/public/_nuxt/{BCVaR2pQ.js → DUHba1vY.js} +1 -1
- package/.output/public/_nuxt/{D2obegTF.js → DXyfavJr.js} +1 -1
- package/.output/public/_nuxt/DYE7WIF3.js +1 -0
- package/.output/public/_nuxt/{ZbicA1ry.js → D_wY_uke.js} +1 -1
- package/.output/public/_nuxt/{DKhcu7kD.js → Dahes9VH.js} +1 -1
- package/.output/public/_nuxt/{D-wGZMZP.js → DdvHdmGh.js} +1 -1
- package/.output/public/_nuxt/DgsIRcX7.js +1 -0
- package/.output/public/_nuxt/{BtvRca6l.js → DjAJT7YJ.js} +1 -1
- package/.output/public/_nuxt/{DzWdbJvx.js → Djg8J2AC.js} +1 -1
- package/.output/public/_nuxt/{CudFwYib.js → DkkrdwgN.js} +1 -1
- package/.output/public/_nuxt/{pxXmJ8QX.js → DnpKvmH_.js} +1 -1
- package/.output/public/_nuxt/{B8nw2aST.js → DrWe3t51.js} +1 -1
- package/.output/public/_nuxt/{D2aToa54.js → DsG1SoRB.js} +1 -1
- package/.output/public/_nuxt/{8MSfy8uY.js → DtBrxin9.js} +1 -1
- package/.output/public/_nuxt/{B13uiJCv.js → EnN6XTXK.js} +1 -1
- package/.output/public/_nuxt/{DJN0y8jO.js → Fcs-0n6A.js} +1 -1
- package/.output/public/_nuxt/{DQwYQDb2.js → FtFNcQmh.js} +1 -1
- package/.output/public/_nuxt/{C8lm7lgC.js → GXzlut8R.js} +1 -1
- package/.output/public/_nuxt/{xrNU8mHG.js → Lks7C8cK.js} +1 -1
- package/.output/public/_nuxt/M0WOzN-S.js +269 -0
- package/.output/public/_nuxt/{d-NZQb9b.js → OuCcJFrZ.js} +1 -1
- package/.output/public/_nuxt/{GgtqCdye.js → UD_auLNX.js} +1 -1
- package/.output/public/_nuxt/Ve4PFQV2.js +1 -0
- package/.output/public/_nuxt/{57B6Rca8.js → ZpmLW6rw.js} +1 -1
- package/.output/public/_nuxt/_H4v1dQx.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/d356de5d-6230-4e66-aba2-c48f455ae207.json +1 -0
- package/.output/public/_nuxt/builds/meta/ed797280-2bf0-44e6-a601-2ff2462bfbbc.json +1 -0
- package/.output/public/_nuxt/{CPpO8vcZ.js → c6k-jVO-.js} +1 -1
- package/.output/public/_nuxt/eo99z4R2.js +1 -0
- package/.output/public/_nuxt/error-404.iOXvqd5J.css +1 -0
- package/.output/public/_nuxt/error-500.D0BgXBui.css +1 -0
- package/.output/public/_nuxt/graph-resolver-E9RSC1Ga.js +180 -0
- package/.output/public/_nuxt/{DWa2aw6r.js → hAFXcJ2_.js} +1 -1
- package/.output/public/_nuxt/monaco-editor.DOXZIHvr.css +1 -0
- package/.output/public/_nuxt/oH_c3LbQ.js +1 -0
- package/.output/public/_nuxt/rZm6bMo-.js +1 -0
- package/.output/public/_nuxt/{ByBNG4eo.js → rscZxuQ2.js} +1 -1
- package/.output/public/_nuxt/sB5TSp0H.js +18 -0
- package/.output/public/_nuxt/{DOPqH6_T.js → wCosSBIO.js} +1 -1
- package/.output/public/_nuxt/{DRfxs3PN.js → xnReCuE4.js} +1 -1
- package/.output/public/_nuxt/{D5z-4QVk.js → y0GN4iGv.js} +1 -1
- package/.output/public/_nuxt/{yaml.worker-C1Cl1y5J.js → yaml.worker-CYOhFCVP.js} +248 -252
- package/.output/server/index.mjs +3959 -9221
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +1 -1
- package/.output/server/node_modules/@babel/parser/package.json +1 -1
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.cjs +57 -0
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +2 -2
- package/.output/server/node_modules/@trpc/server/dist/codes-BfZsPdy-.cjs +222 -0
- package/.output/server/node_modules/@trpc/server/dist/{contentTypeParsers-SN4WL9ze.mjs → contentTypeParsers-iAFF_pJG.cjs} +7 -2
- package/.output/server/node_modules/@trpc/server/dist/getErrorShape-MR4DZeb7.cjs +341 -0
- package/.output/server/node_modules/@trpc/server/dist/http.cjs +14 -0
- package/.output/server/node_modules/@trpc/server/dist/index.cjs +22 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +2 -2
- package/.output/server/node_modules/@trpc/server/dist/{initTRPC-RoZMIBeA.mjs → initTRPC-B1ggxyJl.mjs} +2 -2
- package/.output/server/node_modules/@trpc/server/dist/initTRPC-BXPPV9Tx.cjs +416 -0
- package/.output/server/node_modules/@trpc/server/dist/observable/index.cjs +13 -0
- package/.output/server/node_modules/@trpc/server/dist/observable-B1Nk6r1H.cjs +181 -0
- package/.output/server/node_modules/@trpc/server/dist/{observable-CUiPknO-.mjs → observable-BVzLuBs6.cjs} +42 -8
- package/.output/server/node_modules/@trpc/server/dist/{parseTRPCMessage-CTow-umk.mjs → parseTRPCMessage-7Ltmq-Fb.cjs} +14 -4
- package/.output/server/node_modules/@trpc/server/dist/resolveResponse-B0CCg8nq.cjs +2365 -0
- package/.output/server/node_modules/@trpc/server/dist/{resolveResponse-BVDlNZwN.mjs → resolveResponse-C5I6V_wc.mjs} +67 -18
- package/.output/server/node_modules/@trpc/server/dist/rpc.cjs +6 -0
- package/.output/server/node_modules/@trpc/server/dist/{tracked-Bjtgv3wJ.mjs → tracked-DiE3uR1B.mjs} +12 -3
- package/.output/server/node_modules/@trpc/server/dist/tracked-Dj_dpOJE.cjs +486 -0
- package/.output/server/node_modules/@trpc/server/package.json +15 -5
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +2 -2
- package/.output/server/node_modules/@vue/compiler-core/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1 -1
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +31 -13
- package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +144 -81
- package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +70 -9
- package/.output/server/node_modules/@vue/runtime-dom/package.json +4 -4
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +6 -2
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/shared/package.json +1 -1
- package/.output/server/node_modules/devalue/package.json +5 -2
- package/.output/server/node_modules/devalue/src/base64.js +46 -96
- package/.output/server/node_modules/devalue/src/parse.js +32 -10
- package/.output/server/node_modules/devalue/src/stringify.js +13 -28
- package/.output/server/node_modules/devalue/src/uneval.js +117 -55
- package/.output/server/node_modules/devalue/src/utils.js +3 -7
- package/.output/server/node_modules/hookable/dist/index.mjs +5 -14
- package/.output/server/node_modules/hookable/package.json +24 -23
- package/.output/server/node_modules/trpc-bun-adapter/dist/index.js +406 -0
- package/.output/server/node_modules/trpc-bun-adapter/package.json +44 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +3 -3
- package/.output/server/node_modules/unhead/dist/server.mjs +2 -2
- package/.output/server/node_modules/unhead/dist/shared/{unhead.eK9_7LaY.mjs → unhead.B5FWS6X0.mjs} +22 -13
- package/.output/server/node_modules/unhead/dist/shared/{unhead.BFfcxOoW.mjs → unhead.Ct24BOby.mjs} +4 -2
- package/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
- package/.output/server/node_modules/unhead/dist/shared/{unhead.ckV6dpEQ.mjs → unhead.TxTMM7cM.mjs} +1 -1
- package/.output/server/node_modules/unhead/dist/utils.mjs +1 -1
- package/.output/server/node_modules/unhead/package.json +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
- package/.output/server/node_modules/vue/package.json +7 -7
- package/.output/server/package.json +16 -16
- package/package.json +20 -14
- package/.output/public/_nuxt/83L43bj1.js +0 -1
- package/.output/public/_nuxt/B93PlW-d.js +0 -1
- package/.output/public/_nuxt/BE_Meo09.js +0 -269
- package/.output/public/_nuxt/Ba13S78F.js +0 -1
- package/.output/public/_nuxt/BhRPY-oY.js +0 -1
- package/.output/public/_nuxt/Bhrxn6JZ.js +0 -1
- package/.output/public/_nuxt/Bo8jzlL1.js +0 -18
- package/.output/public/_nuxt/BrzmwbiE.js +0 -1
- package/.output/public/_nuxt/C-sUppwS.js +0 -1
- package/.output/public/_nuxt/C47S-Tmv.js +0 -1
- package/.output/public/_nuxt/CMjwMIkn.js +0 -1
- package/.output/public/_nuxt/CQ8jqdy-.js +0 -1
- package/.output/public/_nuxt/CjoLj4QM.js +0 -1
- package/.output/public/_nuxt/D91rOou-.js +0 -13
- package/.output/public/_nuxt/DMwsHuHA.js +0 -1
- package/.output/public/_nuxt/DYoxhk2S.js +0 -1
- package/.output/public/_nuxt/Dv7Oe6Be.js +0 -1
- package/.output/public/_nuxt/VCDPK7BO.js +0 -1
- package/.output/public/_nuxt/builds/meta/a1fec520-0c95-4ae0-af5e-964780fad341.json +0 -1
- package/.output/public/_nuxt/error-404.X7H_YhdC.css +0 -1
- package/.output/public/_nuxt/error-500.BOQe1fsk.css +0 -1
- package/.output/public/_nuxt/graph-resolver-DKNtntr2.js +0 -180
- package/.output/public/_nuxt/monaco-editor.D_J4ItrK.css +0 -1
- package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +0 -15
- package/.output/server/node_modules/@trpc/server/dist/node-http-DtA2iLK9.mjs +0 -224
- package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import-9NNw8uQM.mjs +0 -31
- package/.output/server/node_modules/@trpc/server/dist/ws-CJgZE7Hg.mjs +0 -460
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +0 -148
- package/.output/server/node_modules/ws/lib/buffer-util.js +0 -131
- package/.output/server/node_modules/ws/lib/constants.js +0 -19
- package/.output/server/node_modules/ws/lib/event-target.js +0 -292
- package/.output/server/node_modules/ws/lib/extension.js +0 -203
- package/.output/server/node_modules/ws/lib/limiter.js +0 -55
- package/.output/server/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/.output/server/node_modules/ws/lib/receiver.js +0 -706
- package/.output/server/node_modules/ws/lib/sender.js +0 -602
- package/.output/server/node_modules/ws/lib/stream.js +0 -161
- package/.output/server/node_modules/ws/lib/subprotocol.js +0 -62
- package/.output/server/node_modules/ws/lib/validation.js +0 -152
- package/.output/server/node_modules/ws/lib/websocket-server.js +0 -554
- package/.output/server/node_modules/ws/lib/websocket.js +0 -1393
- package/.output/server/node_modules/ws/package.json +0 -69
- package/.output/server/node_modules/ws/wrapper.mjs +0 -8
- package/LICENSE +0 -21
- /package/.output/public/_nuxt/{XEA9GSJd.js → B69Z0Xk1.js} +0 -0
- /package/.output/server/node_modules/@trpc/server/dist/{http-CWyjOa1l.mjs → http-DXy3XyhL.cjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{J,K as pt}from"#entry";import{E as on,aG as se,aV as cn,V as fn,Y as an,ak as ln,_ as oe,W as hn,Z as un,$ as dn,a0 as yn}from"./Bo8jzlL1.js";const dt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function at(e,...t){if(!Ae(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function _t(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gn(e,t){at(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ut(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ut(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const pn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function wn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function xn(e){for(let t=0;t<e.length;t++)e[t]=wn(e[t]);return e}const ie=pn?e=>e:xn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",bn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e){if(at(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=bn[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function _e(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const c=ce(e.charCodeAt(s)),i=ce(e.charCodeAt(s+1));if(c===void 0||i===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=c*16+i}return r}function ve(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Bt(e){return typeof e=="string"&&(e=ve(e)),at(e),e}function fe(e){return typeof e=="string"&&(e=ve(e)),at(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function mn(e){const t=r=>e().update(Bt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ft(e=32){if(dt&&typeof dt.getRandomValues=="function")return dt.getRandomValues(new Uint8Array(e));if(dt&&typeof dt.randomBytes=="function")return Uint8Array.from(dt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=Bt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=t.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),ut(s)}update(t){return _t(this),this.iHash.update(t),this}digestInto(t){_t(this),at(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:c,outputLen:i}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,Bt(n),Bt(t))}const Ht=Uint8Array.from([0]),ae=Uint8Array.of();function En(e,t,n,r=32){St(e),W(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ae);const c=new Uint8Array(s*o),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let h=0;h<s;h++)Ht[0]=h+1,f.update(h===0?ae:l).update(n).update(Ht).digestInto(l),c.set(l,o*h),i._cloneInto(f);return i.destroy(),f.destroy(),ut(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,o)=>En(e,ke(e,t,n),r,o);function Bn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function An(e,t,n){return e&t^~e&n}function In(e,t,n){return e&t^e&n^t&n}class Un extends Se{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Ut(this.buffer)}update(t){_t(this),t=Bt(t),at(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let c=0;c<s;){const i=Math.min(o-this.pos,s-c);if(i===o){const f=Ut(t);for(;o<=s-c;c+=o)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){_t(this),gn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:c}=this;n[c++]=128,ut(this.buffer.subarray(c)),this.padOffset>o-c&&(this.process(r,0),c=0);for(let u=c;u<o;u++)n[u]=0;Bn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const i=Ut(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)i.setUint32(4*u,h[u],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=s,t.length=o,t.pos=i,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ot=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_n=Uint32Array.from([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]),it=new Uint32Array(64);class vn extends Un{constructor(t=32){super(64,t,8,!1),this.A=ot[0]|0,this.B=ot[1]|0,this.C=ot[2]|0,this.D=ot[3]|0,this.E=ot[4]|0,this.F=ot[5]|0,this.G=ot[6]|0,this.H=ot[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[t,n,r,o,s,c,i,f]}set(t,n,r,o,s,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let u=0;u<16;u++,n+=4)it[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const a=it[u-15],d=it[u-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;it[u]=g+it[u-7]+w+it[u-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:l,H:h}=this;for(let u=0;u<64;u++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=h+a+An(i,f,l)+_n[u]+it[u]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+In(r,o,s)|0;h=l,l=f,f=i,i=c+d|0,c=s,s=o,o=r,r=d+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(r,o,s,c,i,f,l,h)}roundClean(){ut(it)}destroy(){this.set(0,0,0,0,0,0,0,0),ut(this.buffer)}}const Xt=mn(()=>new vn),st=Xt;function Ln(e,t,n,r){St(e);const o=Le({dkLen:32,asyncTick:10},r),{c:s,dkLen:c,asyncTick:i}=o;if(W(s),W(c),W(i),s<1)throw new Error("iterations (c) should be >= 1");const f=fe(t),l=fe(n),h=new Uint8Array(c),u=mt.create(e,f),a=u._cloneInto().update(l);return{c:s,dkLen:c,asyncTick:i,DK:h,PRF:u,PRFSalt:a}}function Sn(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ut(o),n}function Te(e,t,n,r){const{c:o,dkLen:s,DK:c,PRF:i,PRFSalt:f}=Ln(e,t,n,r);let l;const h=new Uint8Array(4),u=Ut(h),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<s;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);u.setInt32(0,d,!1),(l=f._cloneInto(l)).update(h).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<o;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return Sn(i,f,c,l,a)}function le(e,t,n,r,o,s){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],h=e[t++]^n[r++],u=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],q=e[t++]^n[r++],$=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],C=c,H=i,M=f,L=l,_=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=$,I=O,v=z;for(let N=0;N<8;N+=2)_^=T(C+A|0,7),b^=T(_+C|0,9),A^=T(b+_|0,13),C^=T(A+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),I^=T(U+k|0,7),M^=T(I+U|0,9),k^=T(M+I|0,13),U^=T(k+M|0,18),L^=T(v+B|0,7),x^=T(L+v|0,9),B^=T(x+L|0,13),v^=T(B+x|0,18),H^=T(C+L|0,7),M^=T(H+C|0,9),L^=T(M+H|0,13),C^=T(L+M|0,18),k^=T(S+_|0,7),x^=T(k+S|0,9),_^=T(x+k|0,13),S^=T(_+x|0,18),B^=T(U+m|0,7),b^=T(B+U|0,9),m^=T(b+B|0,13),U^=T(m+b|0,18),A^=T(v+I|0,7),y^=T(A+v|0,9),I^=T(y+A|0,13),v^=T(I+y|0,18);o[s++]=c+C|0,o[s++]=i+H|0,o[s++]=f+M|0,o[s++]=l+L|0,o[s++]=h+_|0,o[s++]=u+S|0,o[s++]=a+k|0,o[s++]=d+x|0,o[s++]=w+b|0,o[s++]=g+m|0,o[s++]=p+U|0,o[s++]=E+B|0,o[s++]=q+A|0,o[s++]=$+y|0,o[s++]=O+I|0,o[s++]=z+v|0}function Nt(e,t,n,r,o){let s=r+0,c=r+16*o;for(let i=0;i<16;i++)n[c+i]=e[t+(2*o-1)*16+i];for(let i=0;i<o;i++,s+=16,t+=16)le(n,c,e,t,n,s),i>0&&(c+=16),le(n,s,e,t+=16,n,c)}function Cn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:h}=r;if(W(o),W(s),W(c),W(i),W(f),W(l),h!==void 0&&typeof h!="function")throw new Error("progressCb should be function");const u=128*s,a=u/4,d=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/u)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(u*(o+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Xt,e,t,{c:1,dkLen:u*c}),p=Kt(g),E=Kt(new Uint8Array(u*o)),q=Kt(new Uint8Array(u));let $=()=>{};if(h){const O=2*o*c,z=Math.max(Math.floor(O/1e4),1);let C=0;$=()=>{C++,h&&(!(C%z)||C===O)&&h(C/O)}}return{N:o,r:s,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:q,blockMixCb:$,asyncTick:f}}function kn(e,t,n,r,o){const s=Te(Xt,e,n,{c:1,dkLen:t});return ut(n,r,o),s}function Ke(e,t,n){const{N:r,r:o,p:s,dkLen:c,blockSize32:i,V:f,B32:l,B:h,tmp:u,blockMixCb:a}=Cn(e,t,n);ie(l);for(let d=0;d<s;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,o),a();Nt(f,(r-1)*i,l,w,o),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)u[E]=l[w+E]^f[p*i+E];Nt(u,0,l,w,o),a()}}return ie(l),kn(e,c,h,f,u)}function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Mt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ct(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Kn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Hn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Nn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Nn(e);else if(He(e))e=$t(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function Mn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function qn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const On=(e,t)=>{function n(r,...o){if(j(r),!Hn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const h=o[0];if(!h)throw new Error("nonce / iv required");e.varSizeNonce?j(h):j(h,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&j(o[1]);const c=t(r,...o),i=(h,u)=>{if(u!==void 0){if(h!==2)throw new Error("cipher output not supported");j(u)}};let f=!1;return{encrypt(h,u){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(h),i(c.encrypt.length,u),c.encrypt(h,u)},decrypt(h,u){if(j(h),s&&h.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return i(c.decrypt.length,u),c.decrypt(h,u)}}}return Object.assign(n,e),n};function ue(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!$n(t))throw new Error("invalid output, must be aligned");return t}function de(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function Rn(e,t,n){Ot(n);const r=new Uint8Array(16),o=Kn(r);return de(o,0,BigInt(t),n),de(o,8,BigInt(e),n),r}function $n(e){return e.byteOffset%4===0}function $t(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),zn=Ne("expand 16-byte k"),jn=Ne("expand 32-byte k"),Vn=ct(zn),Pn=ct(jn);function K(e,t){return e<<t|e>>>32-t}function zt(e){return e.byteOffset%4===0}const At=64,Wn=16,Me=2**32-1,ye=new Uint32Array;function Gn(e,t,n,r,o,s,c,i){const f=o.length,l=new Uint8Array(At),h=ct(l),u=zt(o)&&zt(s),a=u?ct(o):ye,d=u?ct(s):ye;for(let w=0;w<f;c++){if(e(t,n,r,h,c,i),c>=Me)throw new Error("arx: counter overflow");const g=Math.min(At,f-w);if(u&&g===At){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,q;E<Wn;E++)q=p+E,d[q]=a[q]^h[E];w+=At;continue}for(let p=0,E;p<g;p++)E=w+p,s[E]=o[E]^l[p];w+=g}}function Xn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:c}=Mn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Mt(o),Mt(c),Ot(s),Ot(n),(i,f,l,h,u=0)=>{j(i),j(f),j(l);const a=l.length;if(h===void 0&&(h=new Uint8Array(a)),j(h),Mt(u),u<0||u>=Me)throw new Error("arx: counter overflow");if(h.length<a)throw new Error(`arx: output (${h.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=$t(i)),p=Pn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Vn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);zt(f)||d.push(f=$t(f));const E=ct(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ct(f.subarray(0,16)),E),f=f.subarray(16)}const q=16-o;if(q!==f.length)throw new Error(`arx: nonce must be ${q} or 16 bytes`);if(q!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,d.push(f)}const $=ct(f);return Gn(e,p,E,$,l,h,u,c),xt(...d),h}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Yn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),o=R(t,4),s=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let h=0;h<8;h++)this.pad[h]=R(t,16+2*h)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:c}=this,i=c[0],f=c[1],l=c[2],h=c[3],u=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),q=R(t,n+2),$=R(t,n+4),O=R(t,n+6),z=R(t,n+8),C=R(t,n+10),H=R(t,n+12),M=R(t,n+14);let L=s[0]+(E&8191),_=s[1]+((E>>>13|q<<3)&8191),S=s[2]+((q>>>10|$<<6)&8191),k=s[3]+(($>>>7|O<<9)&8191),x=s[4]+((O>>>4|z<<12)&8191),b=s[5]+(z>>>1&8191),m=s[6]+((z>>>14|C<<2)&8191),U=s[7]+((C>>>11|H<<5)&8191),B=s[8]+((H>>>8|M<<8)&8191),A=s[9]+(M>>>5|o),y=0,I=y+L*i+_*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=I>>>13,I&=8191,I+=b*(5*a)+m*(5*u)+U*(5*h)+B*(5*l)+A*(5*f),y+=I>>>13,I&=8191;let v=y+L*f+_*i+S*(5*p)+k*(5*g)+x*(5*w);y=v>>>13,v&=8191,v+=b*(5*d)+m*(5*a)+U*(5*u)+B*(5*h)+A*(5*l),y+=v>>>13,v&=8191;let N=y+L*l+_*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+U*(5*a)+B*(5*u)+A*(5*h),y+=N>>>13,N&=8191;let P=y+L*h+_*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+U*(5*d)+B*(5*a)+A*(5*u),y+=P>>>13,P&=8191;let tt=y+L*u+_*h+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+U*(5*w)+B*(5*d)+A*(5*a),y+=tt>>>13,tt&=8191;let D=y+L*a+_*u+S*h+k*l+x*f;y=D>>>13,D&=8191,D+=b*i+m*(5*p)+U*(5*g)+B*(5*w)+A*(5*d),y+=D>>>13,D&=8191;let Z=y+L*d+_*a+S*u+k*h+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+U*(5*p)+B*(5*g)+A*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+_*d+S*a+k*u+x*h;y=F>>>13,F&=8191,F+=b*l+m*f+U*i+B*(5*p)+A*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+_*w+S*d+k*a+x*u;y=et>>>13,et&=8191,et+=b*h+m*l+U*f+B*i+A*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+_*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*u+m*h+U*l+B*f+A*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+I|0,I=y&8191,y=y>>>13,v+=y,s[0]=I,s[1]=v,s[2]=N,s[3]=P,s[4]=tt,s[5]=D,s[6]=Z,s[7]=F,s[8]=et,s[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const c=Math.min(r-this.pos,o-s);if(c===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Tn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let c=0;c<8;c++)t[s++]=r[c]>>>0,t[s++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Dn(e){const t=(r,o)=>e(o).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Zn=Dn(e=>new Yn(e));function Fn(e,t,n,r,o,s=20){let c=e[0],i=e[1],f=e[2],l=e[3],h=t[0],u=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],q=o,$=n[0],O=n[1],z=n[2],C=c,H=i,M=f,L=l,_=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=$,I=O,v=z;for(let P=0;P<s;P+=2)C=C+_|0,A=K(A^C,16),b=b+A|0,_=K(_^b,12),C=C+_|0,A=K(A^C,8),b=b+A|0,_=K(_^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),M=M+k|0,I=K(I^M,16),U=U+I|0,k=K(k^U,12),M=M+k|0,I=K(I^M,8),U=U+I|0,k=K(k^U,7),L=L+x|0,v=K(v^L,16),B=B+v|0,x=K(x^B,12),L=L+x|0,v=K(v^L,8),B=B+v|0,x=K(x^B,7),C=C+S|0,v=K(v^C,16),U=U+v|0,S=K(S^U,12),C=C+S|0,v=K(v^C,8),U=U+v|0,S=K(S^U,7),H=H+k|0,A=K(A^H,16),B=B+A|0,k=K(k^B,12),H=H+k|0,A=K(A^H,8),B=B+A|0,k=K(k^B,7),M=M+x|0,y=K(y^M,16),b=b+y|0,x=K(x^b,12),M=M+x|0,y=K(y^M,8),b=b+y|0,x=K(x^b,7),L=L+_|0,I=K(I^L,16),m=m+I|0,_=K(_^m,12),L=L+_|0,I=K(I^L,8),m=m+I|0,_=K(_^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+M|0,r[N++]=l+L|0,r[N++]=h+_|0,r[N++]=u+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+U|0,r[N++]=E+B|0,r[N++]=q+A|0,r[N++]=$+y|0,r[N++]=O+I|0,r[N++]=z+v|0}const Qn=Xn(Fn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Jn=new Uint8Array(16),ge=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Jn.subarray(n))},tr=new Uint8Array(32);function pe(e,t,n,r,o){const s=e(t,n,tr),c=Zn.create(s);o&&ge(c,o),ge(c,r);const i=Rn(r.length,o?o.length:0,!0);c.update(i);const f=c.digest();return xt(s,i),f}const er=e=>(t,n,r)=>({encrypt(s,c){const i=s.length;c=ue(i+16,c,!1),c.set(s);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=pe(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(s,c){c=ue(s.length-16,c,!1);const i=s.subarray(0,-16),f=s.subarray(-16),l=pe(e,t,n,i,r);if(!qn(f,l))throw new Error("invalid tag");return c.set(s.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=On({blockSize:64,nonceLength:12,tagLength:16},er(Qn));const qe=BigInt(0),we=BigInt(1);function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?qe:BigInt("0x"+e)}function nr(e){return Oe(Ue(e))}function jt(e){return at(e),Oe(Ue(Uint8Array.from(e).reverse()))}function Re(e,t){return _e(e.toString(16).padStart(t*2,"0"))}function $e(e,t){return Re(e,t).reverse()}function xe(e,t,n){let r;if(typeof t=="string")try{r=_e(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Ae(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const qt=e=>typeof e=="bigint"&&qe<=e;function rr(e,t,n){return qt(e)&&qt(t)&&qt(n)&&t<=e&&e<n}function be(e,t,n,r){if(!rr(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const sr=e=>(we<<BigInt(e))-we;function or(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,c){const i=e[o];if(c&&i===void 0)return;const f=typeof i;if(f!==s||i===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}const V=BigInt(0),G=BigInt(1),ht=BigInt(2),ze=BigInt(3),je=BigInt(4),Ve=BigInt(5),ir=BigInt(7),Pe=BigInt(8),cr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function Y(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function me(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,o=V,s=G;for(;n!==V;){const i=r/n,f=r%n,l=o-s*i;r=n,n=f,o=s,s=l}if(r!==G)throw new Error("invert: does not exist");return X(o,t)}function Yt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Yt(e,r,t),r}function fr(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),o=e.pow(r,n),s=e.mul(t,o),c=e.mul(e.mul(s,ht),o),i=e.mul(s,e.sub(c,e.ONE));return Yt(e,i,t),i}function ar(e){const t=Dt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),c=(e+ir)/We;return(i,f)=>{let l=i.pow(f,c),h=i.mul(l,r);const u=i.mul(l,o),a=i.mul(l,s),d=i.eql(i.sqr(h),f),w=i.eql(i.sqr(u),f);l=i.cmov(l,h,d),h=i.cmov(a,u,w);const g=i.eql(i.sqr(h),f),p=i.cmov(l,h,g);return Yt(i,p,f),p}}function Xe(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const o=Dt(e);for(;Ee(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let s=o.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ee(f,l)!==1)throw new Error("Cannot find square root");let h=n,u=f.mul(f.ONE,s),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===h)throw new Error("Cannot find square root");const p=G<<BigInt(h-w-1),E=f.pow(u,p);h=w,u=f.sqr(E),a=f.mul(a,u),d=f.mul(d,E)}return d}}function lr(e){return e%je===ze?Ge:e%Pe===Ve?fr:e%We===cr?ar(e):Xe(e)}function hr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,o=t;for(;n>V;)n&G&&(r=e.mul(r,o)),o=e.sqr(o),n>>=G;return r}function ur(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),s=e.inv(o);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),s),r}function Ee(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!c)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function dr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Dt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(o=a.BITS),a.sqrt&&(s=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:f,nByteLength:l}=dr(e,o);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const u=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:sr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!u.is0(a)&&u.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>hr(u,a,d),div:(a,d)=>X(a*me(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>me(a,e),sqrt:s||(a=>(h||(h=lr(e)),h(u,a))),toBytes:a=>n?$e(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):nr(a);if(c&&(w=X(w,e)),!d&&!u.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>ur(u,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(u)}const Et=BigInt(0),yt=BigInt(1),It=BigInt(2);function yr(e){return or(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function gr(e){const t=yr(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||ft,l=i?255:448,h=i?32:56,u=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?It**BigInt(254):It**BigInt(447),w=i?BigInt(8)*It**BigInt(251)-yt:BigInt(4)*It**BigInt(445)-yt,g=d+w+yt,p=x=>X(x,n),E=q(u);function q(x){return $e(p(x),h)}function $(x){const b=xe("u coordinate",x,h);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(o(xe("scalar",x,h)))}function z(x,b){const m=M($(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return q(m)}function C(x){return z(x,E)}function H(x,b,m){const U=p(x*(b-m));return b=p(b-U),m=p(m+U),{x_2:b,x_3:m}}function M(x,b){be("u",x,Et,n),be("scalar",b,d,g);const m=b,U=x;let B=yt,A=Et,y=x,I=yt,v=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P&yt;v^=tt,{x_2:B,x_3:y}=H(v,B,y),{x_2:A,x_3:I}=H(v,A,I),v=tt;const D=B+A,Z=p(D*D),F=B-A,et=p(F*F),nt=Z-et,rn=y+I,sn=y-I,te=p(sn*D),ee=p(rn*F),ne=te+ee,re=te-ee;y=p(ne*ne),I=p(U*p(re*re)),B=p(Z*et),A=p(nt*(Z+p(a*nt)))}({x_2:B,x_3:y}=H(v,B,y)),{x_2:A,x_3:I}=H(v,A,I);const N=s(A);return p(B*N)}const L={secretKey:h,publicKey:h,seed:h},_=(x=f(h))=>(at(x,L.seed),x);function S(x){const b=_(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>z(x,b),getPublicKey:x=>C(x),scalarMult:z,scalarMultBase:C,utils:{randomSecretKey:_,randomPrivateKey:_},GuBytes:E.slice(),lengths:L}}const pr=BigInt(1),Be=BigInt(2),wr=BigInt(3),xr=BigInt(5),br=BigInt(8),Ye=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),mr={p:Ye,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:br,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Er(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Ye,i=e*e%s*e%s,f=Y(i,Be,s)*i%s,l=Y(f,pr,s)*e%s,h=Y(l,xr,s)*l%s,u=Y(h,t,s)*h%s,a=Y(u,n,s)*u%s,d=Y(a,r,s)*a%s,w=Y(d,o,s)*d%s,g=Y(w,o,s)*d%s,p=Y(g,t,s)*h%s;return{pow_p_5_8:Y(p,Be,s)*e%s,b2:i}}function Br(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ar=Dt(mr.p,{isLE:!0}),Vt=(()=>{const e=Ar.ORDER;return gr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Er(t);return X(Y(n,wr,e)*r,e)},adjustScalarBytes:Br})})(),De=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Zt(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Ur(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},De,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function vt(e){return await Ze(async()=>Zt(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const Ir=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Ur(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Ir,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},De,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class _r{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),vr(gt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=gt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:gt(this.transcript)}}}function vr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function gt(e){const t=e.reduce(((o,s)=>o+s.length),0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function Lr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Sr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),o+=l.length}n.releaseLock();const s=gt(r),c=s.subarray(0,t),i=Lt(e,s.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Cr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const c=J.decode(s);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const o=gt(r);return{s:new Ct(n,o)}}async function kr(e){const t=new _r(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await Cr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const c=J.decode(s.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{J,K as pt}from"#entry";import{E as on,aG as se,aV as cn,V as fn,Y as an,ak as ln,_ as oe,W as hn,Z as un,$ as dn,a0 as yn}from"./sB5TSp0H.js";const dt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ae(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function at(e,...t){if(!Ae(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function _t(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gn(e,t){at(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ut(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ut(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const pn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function wn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function xn(e){for(let t=0;t<e.length;t++)e[t]=wn(e[t]);return e}const ie=pn?e=>e:xn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",bn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ue(e){if(at(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=bn[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function _e(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const c=ce(e.charCodeAt(s)),i=ce(e.charCodeAt(s+1));if(c===void 0||i===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=c*16+i}return r}function ve(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Bt(e){return typeof e=="string"&&(e=ve(e)),at(e),e}function fe(e){return typeof e=="string"&&(e=ve(e)),at(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function mn(e){const t=r=>e().update(Bt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ft(e=32){if(dt&&typeof dt.getRandomValues=="function")return dt.getRandomValues(new Uint8Array(e));if(dt&&typeof dt.randomBytes=="function")return Uint8Array.from(dt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=Bt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let c=0;c<s.length;c++)s[c]^=54;this.iHash.update(s),this.oHash=t.create();for(let c=0;c<s.length;c++)s[c]^=106;this.oHash.update(s),ut(s)}update(t){return _t(this),this.iHash.update(t),this}digestInto(t){_t(this),at(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:c,outputLen:i}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,Bt(n),Bt(t))}const Ht=Uint8Array.from([0]),ae=Uint8Array.of();function En(e,t,n,r=32){St(e),W(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ae);const c=new Uint8Array(s*o),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let h=0;h<s;h++)Ht[0]=h+1,f.update(h===0?ae:l).update(n).update(Ht).digestInto(l),c.set(l,o*h),i._cloneInto(f);return i.destroy(),f.destroy(),ut(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,o)=>En(e,ke(e,t,n),r,o);function Bn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function An(e,t,n){return e&t^~e&n}function In(e,t,n){return e&t^e&n^t&n}class Un extends Se{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Ut(this.buffer)}update(t){_t(this),t=Bt(t),at(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let c=0;c<s;){const i=Math.min(o-this.pos,s-c);if(i===o){const f=Ut(t);for(;o<=s-c;c+=o)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){_t(this),gn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:c}=this;n[c++]=128,ut(this.buffer.subarray(c)),this.padOffset>o-c&&(this.process(r,0),c=0);for(let u=c;u<o;u++)n[u]=0;Bn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const i=Ut(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,h=this.get();if(l>h.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)i.setUint32(4*u,h[u],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=s,t.length=o,t.pos=i,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const ot=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_n=Uint32Array.from([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]),it=new Uint32Array(64);class vn extends Un{constructor(t=32){super(64,t,8,!1),this.A=ot[0]|0,this.B=ot[1]|0,this.C=ot[2]|0,this.D=ot[3]|0,this.E=ot[4]|0,this.F=ot[5]|0,this.G=ot[6]|0,this.H=ot[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:c,G:i,H:f}=this;return[t,n,r,o,s,c,i,f]}set(t,n,r,o,s,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let u=0;u<16;u++,n+=4)it[u]=t.getUint32(n,!1);for(let u=16;u<64;u++){const a=it[u-15],d=it[u-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;it[u]=g+it[u-7]+w+it[u-16]|0}let{A:r,B:o,C:s,D:c,E:i,F:f,G:l,H:h}=this;for(let u=0;u<64;u++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=h+a+An(i,f,l)+_n[u]+it[u]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+In(r,o,s)|0;h=l,l=f,f=i,i=c+d|0,c=s,s=o,o=r,r=d+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,h=h+this.H|0,this.set(r,o,s,c,i,f,l,h)}roundClean(){ut(it)}destroy(){this.set(0,0,0,0,0,0,0,0),ut(this.buffer)}}const Xt=mn(()=>new vn),st=Xt;function Ln(e,t,n,r){St(e);const o=Le({dkLen:32,asyncTick:10},r),{c:s,dkLen:c,asyncTick:i}=o;if(W(s),W(c),W(i),s<1)throw new Error("iterations (c) should be >= 1");const f=fe(t),l=fe(n),h=new Uint8Array(c),u=mt.create(e,f),a=u._cloneInto().update(l);return{c:s,dkLen:c,asyncTick:i,DK:h,PRF:u,PRFSalt:a}}function Sn(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ut(o),n}function Te(e,t,n,r){const{c:o,dkLen:s,DK:c,PRF:i,PRFSalt:f}=Ln(e,t,n,r);let l;const h=new Uint8Array(4),u=Ut(h),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<s;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);u.setInt32(0,d,!1),(l=f._cloneInto(l)).update(h).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<o;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return Sn(i,f,c,l,a)}function le(e,t,n,r,o,s){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],h=e[t++]^n[r++],u=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],q=e[t++]^n[r++],$=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],C=c,H=i,M=f,L=l,_=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=$,I=O,v=z;for(let N=0;N<8;N+=2)_^=T(C+A|0,7),b^=T(_+C|0,9),A^=T(b+_|0,13),C^=T(A+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),I^=T(U+k|0,7),M^=T(I+U|0,9),k^=T(M+I|0,13),U^=T(k+M|0,18),L^=T(v+B|0,7),x^=T(L+v|0,9),B^=T(x+L|0,13),v^=T(B+x|0,18),H^=T(C+L|0,7),M^=T(H+C|0,9),L^=T(M+H|0,13),C^=T(L+M|0,18),k^=T(S+_|0,7),x^=T(k+S|0,9),_^=T(x+k|0,13),S^=T(_+x|0,18),B^=T(U+m|0,7),b^=T(B+U|0,9),m^=T(b+B|0,13),U^=T(m+b|0,18),A^=T(v+I|0,7),y^=T(A+v|0,9),I^=T(y+A|0,13),v^=T(I+y|0,18);o[s++]=c+C|0,o[s++]=i+H|0,o[s++]=f+M|0,o[s++]=l+L|0,o[s++]=h+_|0,o[s++]=u+S|0,o[s++]=a+k|0,o[s++]=d+x|0,o[s++]=w+b|0,o[s++]=g+m|0,o[s++]=p+U|0,o[s++]=E+B|0,o[s++]=q+A|0,o[s++]=$+y|0,o[s++]=O+I|0,o[s++]=z+v|0}function Nt(e,t,n,r,o){let s=r+0,c=r+16*o;for(let i=0;i<16;i++)n[c+i]=e[t+(2*o-1)*16+i];for(let i=0;i<o;i++,s+=16,t+=16)le(n,c,e,t,n,s),i>0&&(c+=16),le(n,s,e,t+=16,n,c)}function Cn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:h}=r;if(W(o),W(s),W(c),W(i),W(f),W(l),h!==void 0&&typeof h!="function")throw new Error("progressCb should be function");const u=128*s,a=u/4,d=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/u)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(u*(o+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Xt,e,t,{c:1,dkLen:u*c}),p=Kt(g),E=Kt(new Uint8Array(u*o)),q=Kt(new Uint8Array(u));let $=()=>{};if(h){const O=2*o*c,z=Math.max(Math.floor(O/1e4),1);let C=0;$=()=>{C++,h&&(!(C%z)||C===O)&&h(C/O)}}return{N:o,r:s,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:q,blockMixCb:$,asyncTick:f}}function kn(e,t,n,r,o){const s=Te(Xt,e,n,{c:1,dkLen:t});return ut(n,r,o),s}function Ke(e,t,n){const{N:r,r:o,p:s,dkLen:c,blockSize32:i,V:f,B32:l,B:h,tmp:u,blockMixCb:a}=Cn(e,t,n);ie(l);for(let d=0;d<s;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,o),a();Nt(f,(r-1)*i,l,w,o),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)u[E]=l[w+E]^f[p*i+E];Nt(u,0,l,w,o),a()}}return ie(l),kn(e,c,h,f,u)}function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Mt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ct(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Kn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Hn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Nn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Nn(e);else if(He(e))e=$t(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function Mn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function qn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const On=(e,t)=>{function n(r,...o){if(j(r),!Hn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const h=o[0];if(!h)throw new Error("nonce / iv required");e.varSizeNonce?j(h):j(h,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&j(o[1]);const c=t(r,...o),i=(h,u)=>{if(u!==void 0){if(h!==2)throw new Error("cipher output not supported");j(u)}};let f=!1;return{encrypt(h,u){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(h),i(c.encrypt.length,u),c.encrypt(h,u)},decrypt(h,u){if(j(h),s&&h.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return i(c.decrypt.length,u),c.decrypt(h,u)}}}return Object.assign(n,e),n};function ue(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!$n(t))throw new Error("invalid output, must be aligned");return t}function de(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),c=Number(n>>o&s),i=Number(n&s),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function Rn(e,t,n){Ot(n);const r=new Uint8Array(16),o=Kn(r);return de(o,0,BigInt(t),n),de(o,8,BigInt(e),n),r}function $n(e){return e.byteOffset%4===0}function $t(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),zn=Ne("expand 16-byte k"),jn=Ne("expand 32-byte k"),Vn=ct(zn),Pn=ct(jn);function K(e,t){return e<<t|e>>>32-t}function zt(e){return e.byteOffset%4===0}const At=64,Wn=16,Me=2**32-1,ye=new Uint32Array;function Gn(e,t,n,r,o,s,c,i){const f=o.length,l=new Uint8Array(At),h=ct(l),u=zt(o)&&zt(s),a=u?ct(o):ye,d=u?ct(s):ye;for(let w=0;w<f;c++){if(e(t,n,r,h,c,i),c>=Me)throw new Error("arx: counter overflow");const g=Math.min(At,f-w);if(u&&g===At){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,q;E<Wn;E++)q=p+E,d[q]=a[q]^h[E];w+=At;continue}for(let p=0,E;p<g;p++)E=w+p,s[E]=o[E]^l[p];w+=g}}function Xn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:c}=Mn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Mt(o),Mt(c),Ot(s),Ot(n),(i,f,l,h,u=0)=>{j(i),j(f),j(l);const a=l.length;if(h===void 0&&(h=new Uint8Array(a)),j(h),Mt(u),u<0||u>=Me)throw new Error("arx: counter overflow");if(h.length<a)throw new Error(`arx: output (${h.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=$t(i)),p=Pn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Vn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);zt(f)||d.push(f=$t(f));const E=ct(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ct(f.subarray(0,16)),E),f=f.subarray(16)}const q=16-o;if(q!==f.length)throw new Error(`arx: nonce must be ${q} or 16 bytes`);if(q!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,d.push(f)}const $=ct(f);return Gn(e,p,E,$,l,h,u,c),xt(...d),h}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Yn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),o=R(t,4),s=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let h=0;h<8;h++)this.pad[h]=R(t,16+2*h)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:c}=this,i=c[0],f=c[1],l=c[2],h=c[3],u=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),q=R(t,n+2),$=R(t,n+4),O=R(t,n+6),z=R(t,n+8),C=R(t,n+10),H=R(t,n+12),M=R(t,n+14);let L=s[0]+(E&8191),_=s[1]+((E>>>13|q<<3)&8191),S=s[2]+((q>>>10|$<<6)&8191),k=s[3]+(($>>>7|O<<9)&8191),x=s[4]+((O>>>4|z<<12)&8191),b=s[5]+(z>>>1&8191),m=s[6]+((z>>>14|C<<2)&8191),U=s[7]+((C>>>11|H<<5)&8191),B=s[8]+((H>>>8|M<<8)&8191),A=s[9]+(M>>>5|o),y=0,I=y+L*i+_*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=I>>>13,I&=8191,I+=b*(5*a)+m*(5*u)+U*(5*h)+B*(5*l)+A*(5*f),y+=I>>>13,I&=8191;let v=y+L*f+_*i+S*(5*p)+k*(5*g)+x*(5*w);y=v>>>13,v&=8191,v+=b*(5*d)+m*(5*a)+U*(5*u)+B*(5*h)+A*(5*l),y+=v>>>13,v&=8191;let N=y+L*l+_*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+U*(5*a)+B*(5*u)+A*(5*h),y+=N>>>13,N&=8191;let P=y+L*h+_*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+U*(5*d)+B*(5*a)+A*(5*u),y+=P>>>13,P&=8191;let tt=y+L*u+_*h+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+U*(5*w)+B*(5*d)+A*(5*a),y+=tt>>>13,tt&=8191;let D=y+L*a+_*u+S*h+k*l+x*f;y=D>>>13,D&=8191,D+=b*i+m*(5*p)+U*(5*g)+B*(5*w)+A*(5*d),y+=D>>>13,D&=8191;let Z=y+L*d+_*a+S*u+k*h+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+U*(5*p)+B*(5*g)+A*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+_*d+S*a+k*u+x*h;y=F>>>13,F&=8191,F+=b*l+m*f+U*i+B*(5*p)+A*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+_*w+S*d+k*a+x*u;y=et>>>13,et&=8191,et+=b*h+m*l+U*f+B*i+A*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+_*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*u+m*h+U*l+B*f+A*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+I|0,I=y&8191,y=y>>>13,v+=y,s[0]=I,s[1]=v,s[2]=N,s[3]=P,s[4]=tt,s[5]=D,s[6]=Z,s[7]=F,s[8]=et,s[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=o,o=t[i]>>>13,t[i]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+o,o=r[i]>>>13,r[i]&=8191;r[9]-=8192;let s=(o^1)-1;for(let i=0;i<10;i++)r[i]&=s;s=~s;for(let i=0;i<10;i++)t[i]=t[i]&s|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const c=Math.min(r-this.pos,o-s);if(c===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+c),this.pos),this.pos+=c,s+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Tn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let c=0;c<8;c++)t[s++]=r[c]>>>0,t[s++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Dn(e){const t=(r,o)=>e(o).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Zn=Dn(e=>new Yn(e));function Fn(e,t,n,r,o,s=20){let c=e[0],i=e[1],f=e[2],l=e[3],h=t[0],u=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],q=o,$=n[0],O=n[1],z=n[2],C=c,H=i,M=f,L=l,_=h,S=u,k=a,x=d,b=w,m=g,U=p,B=E,A=q,y=$,I=O,v=z;for(let P=0;P<s;P+=2)C=C+_|0,A=K(A^C,16),b=b+A|0,_=K(_^b,12),C=C+_|0,A=K(A^C,8),b=b+A|0,_=K(_^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),M=M+k|0,I=K(I^M,16),U=U+I|0,k=K(k^U,12),M=M+k|0,I=K(I^M,8),U=U+I|0,k=K(k^U,7),L=L+x|0,v=K(v^L,16),B=B+v|0,x=K(x^B,12),L=L+x|0,v=K(v^L,8),B=B+v|0,x=K(x^B,7),C=C+S|0,v=K(v^C,16),U=U+v|0,S=K(S^U,12),C=C+S|0,v=K(v^C,8),U=U+v|0,S=K(S^U,7),H=H+k|0,A=K(A^H,16),B=B+A|0,k=K(k^B,12),H=H+k|0,A=K(A^H,8),B=B+A|0,k=K(k^B,7),M=M+x|0,y=K(y^M,16),b=b+y|0,x=K(x^b,12),M=M+x|0,y=K(y^M,8),b=b+y|0,x=K(x^b,7),L=L+_|0,I=K(I^L,16),m=m+I|0,_=K(_^m,12),L=L+_|0,I=K(I^L,8),m=m+I|0,_=K(_^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+M|0,r[N++]=l+L|0,r[N++]=h+_|0,r[N++]=u+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+U|0,r[N++]=E+B|0,r[N++]=q+A|0,r[N++]=$+y|0,r[N++]=O+I|0,r[N++]=z+v|0}const Qn=Xn(Fn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Jn=new Uint8Array(16),ge=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Jn.subarray(n))},tr=new Uint8Array(32);function pe(e,t,n,r,o){const s=e(t,n,tr),c=Zn.create(s);o&&ge(c,o),ge(c,r);const i=Rn(r.length,o?o.length:0,!0);c.update(i);const f=c.digest();return xt(s,i),f}const er=e=>(t,n,r)=>({encrypt(s,c){const i=s.length;c=ue(i+16,c,!1),c.set(s);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=pe(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(s,c){c=ue(s.length-16,c,!1);const i=s.subarray(0,-16),f=s.subarray(-16),l=pe(e,t,n,i,r);if(!qn(f,l))throw new Error("invalid tag");return c.set(s.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=On({blockSize:64,nonceLength:12,tagLength:16},er(Qn));const qe=BigInt(0),we=BigInt(1);function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?qe:BigInt("0x"+e)}function nr(e){return Oe(Ue(e))}function jt(e){return at(e),Oe(Ue(Uint8Array.from(e).reverse()))}function Re(e,t){return _e(e.toString(16).padStart(t*2,"0"))}function $e(e,t){return Re(e,t).reverse()}function xe(e,t,n){let r;if(typeof t=="string")try{r=_e(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(Ae(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const qt=e=>typeof e=="bigint"&&qe<=e;function rr(e,t,n){return qt(e)&&qt(t)&&qt(n)&&t<=e&&e<n}function be(e,t,n,r){if(!rr(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const sr=e=>(we<<BigInt(e))-we;function or(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,c){const i=e[o];if(c&&i===void 0)return;const f=typeof i;if(f!==s||i===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}const V=BigInt(0),G=BigInt(1),ht=BigInt(2),ze=BigInt(3),je=BigInt(4),Ve=BigInt(5),ir=BigInt(7),Pe=BigInt(8),cr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function Y(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function me(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,o=V,s=G;for(;n!==V;){const i=r/n,f=r%n,l=o-s*i;r=n,n=f,o=s,s=l}if(r!==G)throw new Error("invert: does not exist");return X(o,t)}function Yt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Yt(e,r,t),r}function fr(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),o=e.pow(r,n),s=e.mul(t,o),c=e.mul(e.mul(s,ht),o),i=e.mul(s,e.sub(c,e.ONE));return Yt(e,i,t),i}function ar(e){const t=Dt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),c=(e+ir)/We;return(i,f)=>{let l=i.pow(f,c),h=i.mul(l,r);const u=i.mul(l,o),a=i.mul(l,s),d=i.eql(i.sqr(h),f),w=i.eql(i.sqr(u),f);l=i.cmov(l,h,d),h=i.cmov(a,u,w);const g=i.eql(i.sqr(h),f),p=i.cmov(l,h,g);return Yt(i,p,f),p}}function Xe(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const o=Dt(e);for(;Ee(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let s=o.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ee(f,l)!==1)throw new Error("Cannot find square root");let h=n,u=f.mul(f.ONE,s),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===h)throw new Error("Cannot find square root");const p=G<<BigInt(h-w-1),E=f.pow(u,p);h=w,u=f.sqr(E),a=f.mul(a,u),d=f.mul(d,E)}return d}}function lr(e){return e%je===ze?Ge:e%Pe===Ve?fr:e%We===cr?ar(e):Xe(e)}function hr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,o=t;for(;n>V;)n&G&&(r=e.mul(r,o)),o=e.sqr(o),n>>=G;return r}function ur(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),s=e.inv(o);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),s),r}function Ee(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!c)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function dr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Dt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(o=a.BITS),a.sqrt&&(s=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:f,nByteLength:l}=dr(e,o);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let h;const u=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:sr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!u.is0(a)&&u.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>hr(u,a,d),div:(a,d)=>X(a*me(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>me(a,e),sqrt:s||(a=>(h||(h=lr(e)),h(u,a))),toBytes:a=>n?$e(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):nr(a);if(c&&(w=X(w,e)),!d&&!u.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>ur(u,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(u)}const Et=BigInt(0),yt=BigInt(1),It=BigInt(2);function yr(e){return or(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function gr(e){const t=yr(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||ft,l=i?255:448,h=i?32:56,u=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?It**BigInt(254):It**BigInt(447),w=i?BigInt(8)*It**BigInt(251)-yt:BigInt(4)*It**BigInt(445)-yt,g=d+w+yt,p=x=>X(x,n),E=q(u);function q(x){return $e(p(x),h)}function $(x){const b=xe("u coordinate",x,h);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(o(xe("scalar",x,h)))}function z(x,b){const m=M($(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return q(m)}function C(x){return z(x,E)}function H(x,b,m){const U=p(x*(b-m));return b=p(b-U),m=p(m+U),{x_2:b,x_3:m}}function M(x,b){be("u",x,Et,n),be("scalar",b,d,g);const m=b,U=x;let B=yt,A=Et,y=x,I=yt,v=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P&yt;v^=tt,{x_2:B,x_3:y}=H(v,B,y),{x_2:A,x_3:I}=H(v,A,I),v=tt;const D=B+A,Z=p(D*D),F=B-A,et=p(F*F),nt=Z-et,rn=y+I,sn=y-I,te=p(sn*D),ee=p(rn*F),ne=te+ee,re=te-ee;y=p(ne*ne),I=p(U*p(re*re)),B=p(Z*et),A=p(nt*(Z+p(a*nt)))}({x_2:B,x_3:y}=H(v,B,y)),{x_2:A,x_3:I}=H(v,A,I);const N=s(A);return p(B*N)}const L={secretKey:h,publicKey:h,seed:h},_=(x=f(h))=>(at(x,L.seed),x);function S(x){const b=_(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>z(x,b),getPublicKey:x=>C(x),scalarMult:z,scalarMultBase:C,utils:{randomSecretKey:_,randomPrivateKey:_},GuBytes:E.slice(),lengths:L}}const pr=BigInt(1),Be=BigInt(2),wr=BigInt(3),xr=BigInt(5),br=BigInt(8),Ye=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),mr={p:Ye,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:br,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Er(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Ye,i=e*e%s*e%s,f=Y(i,Be,s)*i%s,l=Y(f,pr,s)*e%s,h=Y(l,xr,s)*l%s,u=Y(h,t,s)*h%s,a=Y(u,n,s)*u%s,d=Y(a,r,s)*a%s,w=Y(d,o,s)*d%s,g=Y(w,o,s)*d%s,p=Y(g,t,s)*h%s;return{pow_p_5_8:Y(p,Be,s)*e%s,b2:i}}function Br(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ar=Dt(mr.p,{isLE:!0}),Vt=(()=>{const e=Ar.ORDER;return gr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Er(t);return X(Y(n,wr,e)*r,e)},adjustScalarBytes:Br})})(),De=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Zt(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Ur(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},De,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function vt(e){return await Ze(async()=>Zt(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const Ir=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Ur(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Ir,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},De,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class _r{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),vr(gt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=gt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:gt(this.transcript)}}}function vr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function gt(e){const t=e.reduce(((o,s)=>o+s.length),0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function Lr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Sr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),o+=l.length}n.releaseLock();const s=gt(r),c=s.subarray(0,t),i=Lt(e,s.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Cr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const c=J.decode(s);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const o=gt(r);return{s:new Ct(n,o)}}async function kr(e){const t=new _r(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await Cr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const c=J.decode(s.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
2
|
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
3
|
`);for(let r=0;r<n.body.length;r+=48){let o=r+48;o>n.body.length&&(o=n.body.length),t.push(J.encode(n.body.subarray(r,o))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as Yt,a0 as Oi,m as an,a2 as zt,a3 as Ri,a4 as Mn,a5 as Nt,_ as oe,a6 as En,a7 as gt,Z as Wt,a8 as Nn,a9 as On,aa as Ti,ab as zi,ac as ut,ad as He,ae as Bi,af as Pi,ag as Hi,ah as Fi,P as ji,ai as Rn,aj as Di,ak as De,k as Bt,al as sn,am as Li,an as Ui,ao as qi,I as Tn,ap as Xi,aq as zn,Q as Yi,ar as Wi,L as Bn,as as Gi}from"#entry";import{E as X,b4 as Ki,V as v,J as O,aa as D,ab as te,a1 as z,a6 as ke,j as A,Y as C,ai as Gt,D as h,_ as k,W as I,Z as ne,$ as U,a5 as Z,a7 as Ce,a2 as F,t as qe,F as Pn,a8 as Ji,af as Hn,l as Zi,a0 as J,r as ce,i as Qi,av as $e,ag as Oe,a4 as _i,G as eo,w as Xe,b5 as to,aw as Ae,aU as Fn,aG as Qe,ak as jn,b6 as no,b7 as io,aN as Dn,b8 as oo,aP as Ve,d as Ln,ah as Un,as as we,aj as St,aH as ao,a as Te,aQ as qn,aJ as $t,aK as Ye,at as ue,n as vt,ap as so,a$ as Xn,am as ro,ao as Me,al as lo,au as Yn,aV as Kt,H as uo,p as rn,b3 as co,aI as fo,b0 as ho,b2 as mo,b9 as go,b1 as vo,u as Wn,ba as yo}from"./Bo8jzlL1.js";import{t as ln,a as po,_ as wo}from"./D2obegTF.js";import{C as Ct}from"./ZbicA1ry.js";import{V as un}from"./tsyQDnRt.js";import{I as Gn}from"./DOMRsNpU.js";import{_ as bo}from"./BUNf2Yb8.js";import{_ as Kn}from"./xrNU8mHG.js";import{r as ko,g as xo}from"./BxAss8Tj.js";function Io(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return ln(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>ln(o,i),i)}throw Error("Wrong number of arguments")}function tt(...e){return Io(So,e)}function So(){let e=new Set;return t=>e.has(t)?po:(e.add(t),{done:!1,hasNext:!0,next:t})}function $o(e,t,n){const i=Array.from({length:n},()=>[]),o=t,s=-(o*(n-1))/2,r=Array.from({length:n},(l,d)=>s+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],m=f[0]-d[0],w=f[1]-d[1],x=Math.sqrt(m*m+w*w);let N=-w,V=m;x!==0&&(N/=x,V/=x),u.push({x:N,y:V})}function c(l,d,f,m){const w=l[0],x=l[1],N=d[0],V=d[1],M=f[0],R=f[1],T=m[0],q=m[1],Y=(w-N)*(R-q)-(x-V)*(M-T);if(Y===0)return null;const P=((w-M)*(R-q)-(x-R)*(M-T))/Y;return[w+P*(N-w),x+P*(V-x)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let m=0,w=0;if(d===0)m=u[0].x*r[l],w=u[0].y*r[l];else if(d===e.length-1)m=u[u.length-1].x*r[l],w=u[u.length-1].y*r[l];else{const x=u[d-1],N=u[d],V=e[d-1],M=e[d+1],R=[V[0]+x.x*r[l],V[1]+x.y*r[l]],T=[f[0]+x.x*r[l],f[1]+x.y*r[l]],q=[f[0]+N.x*r[l],f[1]+N.y*r[l]],Y=[M[0]+N.x*r[l],M[1]+N.y*r[l]],P=c(R,T,q,Y);P?(m=P[0]-f[0],w=P[1]-f[1]):(m=(x.x+N.x)/2*r[l],w=(x.y+N.y)/2*r[l])}i[l].push(`${f[0]+m},${f[1]+w}`)}return i}const Co=["points","stroke"],Vo=["points"],nt=3,Ao=X({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Ki(p=>({v04971dc8:nt}));const t=Yt(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r,inputNodeType:u}=Oi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=A(()=>{if(u==="outputs"){const y=e.components[n.type].outputs[r];return{all:y?[y.type]:[]}}if(i&&n){const y=e.components[n.type].inputs[r],S=zt(e.inputResolverOutputs,n.id),b=tt((S[r]??[]).map(E=>E.type));return b.length>0?{all:b,visible:b}:{all:y?[y.type]:[],visible:b}}if(a&&n&&r)return{all:(zt(e.inputResolverOutputs,n.id)[r]??[]).map(y=>y.type)};if(a&&n)return{all:Mn(e.inputResolverOutputs,n.id).map(p=>p.type),visible:Ri(e.inputResolverOutputs,n.id).map(p=>p.type)};if(i&&o){const p=Nt(e.inputResolverOutputs,o.id).filter(b=>b.input.instanceId===i.id&&b.input.output===s).map(b=>b.type);if(p.length>0)return{all:tt(p)};const S=e.components[i.type].outputs[s];return{all:S?[S.type]:[]}}if(a&&o)return{all:Nt(e.inputResolverOutputs,a.id).flat().map(p=>p.type)};throw an.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r}),new Error("Invalid connection")}),l=A(()=>tt(c.value.all).map(p=>e.entities[p])),d=A(()=>{if(!a)return[];const p=Nt(e.inputResolverOutputs,a.id).map(y=>y.type);return tt(p).sort()}),f=A(()=>!!a&&e.data.hubReservedGhostLane),m=A(()=>!!a&&e.data.isPendingHubTyped),w=A(()=>!!a&&!!n&&!!r),x=A(()=>w.value?e.components[n.type].inputs[r]?.type:void 0),N=A(()=>{if(!a||!w.value)return!1;const p=x.value;return p?!d.value.includes(p):!1}),V=A(()=>m.value||N.value),M=A(()=>a?V.value?!0:f.value:!1);e.data.isOutputProjection&&an.debug({source:e.source,target:e.target,sourceHandleId:e.sourceHandleId,targetHandleId:e.targetHandleId,isOutputProjection:e.data.isOutputProjection,isOutputProjectionUnresolved:e.data.isOutputProjectionUnresolved},"rendering projection edge in CustomEdge");const R=A(()=>M.value&&d.value.length>0),T=A(()=>c.value.visible?c.value.visible.length===0:a?c.value.all.length===0:!1),q=A(()=>{if(!a)return T.value?1:l.value.length;if(P.value)return 1;const y=d.value.length+(R.value?1:0);return Math.max(1,y)}),Y=p=>a?d.value.length===0?!0:R.value&&p===q.value-1:T.value,P=A(()=>!!a&&!!n&&!!r),B=()=>P.value?e.components[n.type].inputs[r]?.type:void 0,j=A(()=>{if(!P.value)return!1;const p=B();return p?!d.value.includes(p):!1}),L=p=>{if(e.data.isOutputProjection&&e.data.isOutputProjectionUnresolved)return"#9E9E9E";if(P.value){if(j.value)return"#9E9E9E";const y=B();return(y?e.entities[y]:void 0)?.meta.color??"#607D8B"}if(Y(p))return"#9E9E9E";if(a){const y=d.value[p];return e.entities[y]?.meta.color??"#607D8B"}return l.value[p%l.value.length].meta.color??"#607D8B"},Q=p=>a?P.value?p===0:T.value?Y(p):c.value.visible?Y(p)?!1:c.value.visible.includes(d.value[p]):!Y(p):T.value?!0:c.value.visible?c.value.visible.includes(l.value[p].type):!0,ee=(p,y)=>p[0]===y[0]&&p[1]===y[1],ae=A(()=>{if(!e.data.points)return[];const p=[e.sourceX,e.data.routedSourceY??e.sourceY],y=[e.targetX,e.data.routedTargetY??e.targetY],S=[...e.data.points];return(!S[0]||!ee(S[0],p))&&S.unshift(p),(!S[S.length-1]||!ee(S[S.length-1],y))&&S.push(y),$o(S,nt,q.value)}),g=p=>{const S=1/q.value;return`-${p*S}s`};return(p,y)=>(v(),O(D,null,[(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`static-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:L(b),fill:"none","stroke-width":nt,style:{opacity:"0.8"}},null,8,Co)):z("",!0)],64))),128)),(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`highlight-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:"white",fill:"none","stroke-width":nt,class:"highlight-polyline animated-highlight",style:ke({animationDelay:g(b)})},null,12,Vo)):z("",!0)],64))),128))],64))}}),Mo=oe(Ao,[["__scopeId","data-v-58cdfca4"]]);function Eo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const No=X({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(v(),C(Gt,{variant:"flat",style:ke(h(Eo)(e.selected,e.blueprintStatus)),color:"#2d2d2d"},{default:k(()=>[I(ne,{class:"ma-2",size:74},{default:k(()=>[...n[0]||(n[0]=[U("mdi-router",-1)])]),_:1}),Z(t.$slots,"default")]),_:3},8,["style"]))}}),Oo=X({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(v(),O(D,null,[I(h(En),{id:"",type:e.side==="left"?"target":"source",position:e.side==="left"?h(gt).Left:h(gt).Right,class:Ce(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["type","position","class","is-valid-connection"]),F("div",{class:Ce(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:e.handleColor})},null,6)],64))}}),cn=oe(Oo,[["__scopeId","data-v-1aff1180"]]),Ro={class:"handles"},To=X({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Wt(),a=Nn(),s=A(()=>On(a.node,i));return(r,u)=>(v(),C(No,{class:"hub-card",selected:h(o).isNodeSelected(h(a).node),"blueprint-status":h(s),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:k(()=>[Z(r.$slots,"default",{},void 0,!0),F("div",Ro,[I(cn,{"handle-color":"#3F51B5",side:"left","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"]),I(cn,{"handle-color":"#3F51B5",side:"right","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Hu=oe(To,[["__scopeId","data-v-79b30d7c"]]),zo=X({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=A(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>h(t)?(v(),O("div",{key:0,class:"selection-rectangle",style:ke(h(t))},null,4)):z("",!0)}}),Bo=oe(zo,[["__scopeId","data-v-6118cbbb"]]);var ye=(e=>(e.Lines="lines",e.Dots="dots",e))(ye||{});const Jn=function({dimensions:e,size:t,color:n}){return Pn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Zn=function({radius:e,color:t}){return Pn("circle",{cx:e,cy:e,r:e,fill:t})};ye.Lines+"",ye.Dots+"";const Po={[ye.Dots]:"#81818a",[ye.Lines]:"#eee"},Ho=["id","x","y","width","height","patternTransform"],Fo={key:2,height:"100",width:"100"},jo=["fill"],Do=["x","y","fill"],Lo={name:"Background",compatConfig:{MODE:3}},Uo=X({...Lo,props:{id:{},variant:{default:()=>ye.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Yt(),i=A(()=>{const s=n.value.zoom,[r,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[r*s||1,u*s||1],l=e.size*s,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],m=[d*s||1+c[0]/2,f*s||1+c[1]/2];return{scaledGap:c,offset:m,size:l}}),o=qe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=qe(()=>e.color||e.patternColor||Po[e.variant||ye.Dots]);return(s,r)=>(v(),O("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${s.height>100?100:s.height}%`,width:`${s.width>100?100:s.width}%`})},[Z(s.$slots,"pattern-container",{id:o.value},()=>[F("pattern",{id:o.value,x:h(n).x%i.value.scaledGap[0],y:h(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Z(s.$slots,"pattern",{},()=>[s.variant===h(ye).Lines?(v(),C(h(Jn),{key:0,size:s.lineWidth,color:a.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===h(ye).Dots?(v(),C(h(Zn),{key:1,color:a.value,radius:i.value.size/2},null,8,["color","radius"])):z("",!0),s.bgColor?(v(),O("svg",Fo,[F("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,jo)])):z("",!0)])],8,Ho)]),F("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Do),Z(s.$slots,"default",{id:o.value})],4))}});var qo={value:()=>{}};function Jt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ct(n)}function ct(e){this._=e}function Xo(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ct.prototype=Jt.prototype={constructor:ct,on:function(e,t){var n=this._,i=Xo(e+"",n),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Yo(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(o=(e=i[a]).type)n[o]=dn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=dn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ct(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,a;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(t,n)}};function Yo(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function dn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=qo,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pt="http://www.w3.org/1999/xhtml";const fn={svg:"http://www.w3.org/2000/svg",xhtml:Pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fn.hasOwnProperty(t)?{space:fn[t],local:e}:e}function Wo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pt&&t.documentElement.namespaceURI===Pt?t.createElement(e):t.createElementNS(n,e)}}function Go(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qn(e){var t=Vt(e);return(t.local?Go:Wo)(t)}function Ko(){}function Zt(e){return e==null?Ko:function(){return this.querySelector(e)}}function Jo(e){typeof e!="function"&&(e=Zt(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=new Array(s),u,c,l=0;l<s;++l)(u=a[l])&&(c=e.call(u,u.__data__,l,a))&&("__data__"in u&&(c.__data__=u.__data__),r[l]=c);return new le(i,this._parents)}function Zo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qo(){return[]}function _n(e){return e==null?Qo:function(){return this.querySelectorAll(e)}}function _o(e){return function(){return Zo(e.apply(this,arguments))}}function ea(e){typeof e=="function"?e=_o(e):e=_n(e);for(var t=this._groups,n=t.length,i=[],o=[],a=0;a<n;++a)for(var s=t[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&(i.push(e.call(u,u.__data__,c,s)),o.push(u));return new le(i,o)}function ei(e){return function(){return this.matches(e)}}function ti(e){return function(t){return t.matches(e)}}var ta=Array.prototype.find;function na(e){return function(){return ta.call(this.children,e)}}function ia(){return this.firstElementChild}function oa(e){return this.select(e==null?ia:na(typeof e=="function"?e:ti(e)))}var aa=Array.prototype.filter;function sa(){return Array.from(this.children)}function ra(e){return function(){return aa.call(this.children,e)}}function la(e){return this.selectAll(e==null?sa:ra(typeof e=="function"?e:ti(e)))}function ua(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new le(i,this._parents)}function ni(e){return new Array(e.length)}function ca(){return new le(this._enter||this._groups.map(ni),this._parents)}function yt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yt.prototype={constructor:yt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function da(e){return function(){return e}}function fa(e,t,n,i,o,a){for(var s=0,r,u=t.length,c=a.length;s<c;++s)(r=t[s])?(r.__data__=a[s],i[s]=r):n[s]=new yt(e,a[s]);for(;s<u;++s)(r=t[s])&&(o[s]=r)}function ha(e,t,n,i,o,a,s){var r,u,c=new Map,l=t.length,d=a.length,f=new Array(l),m;for(r=0;r<l;++r)(u=t[r])&&(f[r]=m=s.call(u,u.__data__,r,t)+"",c.has(m)?o[r]=u:c.set(m,u));for(r=0;r<d;++r)m=s.call(e,a[r],r,a)+"",(u=c.get(m))?(i[r]=u,u.__data__=a[r],c.delete(m)):n[r]=new yt(e,a[r]);for(r=0;r<l;++r)(u=t[r])&&c.get(f[r])===u&&(o[r]=u)}function ma(e){return e.__data__}function ga(e,t){if(!arguments.length)return Array.from(this,ma);var n=t?ha:fa,i=this._parents,o=this._groups;typeof e!="function"&&(e=da(e));for(var a=o.length,s=new Array(a),r=new Array(a),u=new Array(a),c=0;c<a;++c){var l=i[c],d=o[c],f=d.length,m=va(e.call(l,l&&l.__data__,c,i)),w=m.length,x=r[c]=new Array(w),N=s[c]=new Array(w),V=u[c]=new Array(f);n(l,d,x,N,V,m,t);for(var M=0,R=0,T,q;M<w;++M)if(T=x[M]){for(M>=R&&(R=M+1);!(q=N[R])&&++R<w;);T._next=q||null}}return s=new le(s,i),s._enter=r,s._exit=u,s}function va(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ya(){return new le(this._exit||this._groups.map(ni),this._parents)}function pa(e,t,n){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),i&&o?i.merge(o).order():o}function wa(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,a=i.length,s=Math.min(o,a),r=new Array(o),u=0;u<s;++u)for(var c=n[u],l=i[u],d=c.length,f=r[u]=new Array(d),m,w=0;w<d;++w)(m=c[w]||l[w])&&(f[w]=m);for(;u<o;++u)r[u]=n[u];return new le(r,this._parents)}function ba(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function ka(e){e||(e=xa);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a){for(var s=n[a],r=s.length,u=o[a]=new Array(r),c,l=0;l<r;++l)(c=s[l])&&(u[l]=c);u.sort(t)}return new le(o,this._parents).order()}function xa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ia(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Sa(){return Array.from(this)}function $a(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Ca(){let e=0;for(const t of this)++e;return e}function Va(){return!this.node()}function Aa(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],a=0,s=o.length,r;a<s;++a)(r=o[a])&&e.call(r,r.__data__,a,o);return this}function Ma(e){return function(){this.removeAttribute(e)}}function Ea(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Na(e,t){return function(){this.setAttribute(e,t)}}function Oa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ra(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ta(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function za(e,t){var n=Vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Ea:Ma:typeof t=="function"?n.local?Ta:Ra:n.local?Oa:Na)(n,t))}function ii(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ba(e){return function(){this.style.removeProperty(e)}}function Pa(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ha(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Fa(e,t,n){return arguments.length>1?this.each((t==null?Ba:typeof t=="function"?Ha:Pa)(e,t,n??"")):Be(this.node(),e)}function Be(e,t){return e.style.getPropertyValue(t)||ii(e).getComputedStyle(e,null).getPropertyValue(t)}function ja(e){return function(){delete this[e]}}function Da(e,t){return function(){this[e]=t}}function La(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ua(e,t){return arguments.length>1?this.each((t==null?ja:typeof t=="function"?La:Da)(e,t)):this.node()[e]}function oi(e){return e.trim().split(/^|\s+/)}function Qt(e){return e.classList||new ai(e)}function ai(e){this._node=e,this._names=oi(e.getAttribute("class")||"")}ai.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function si(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function ri(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function qa(e){return function(){si(this,e)}}function Xa(e){return function(){ri(this,e)}}function Ya(e,t){return function(){(t.apply(this,arguments)?si:ri)(this,e)}}function Wa(e,t){var n=oi(e+"");if(arguments.length<2){for(var i=Qt(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Ya:t?qa:Xa)(n,t))}function Ga(){this.textContent=""}function Ka(e){return function(){this.textContent=e}}function Ja(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Za(e){return arguments.length?this.each(e==null?Ga:(typeof e=="function"?Ja:Ka)(e)):this.node().textContent}function Qa(){this.innerHTML=""}function _a(e){return function(){this.innerHTML=e}}function es(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ts(e){return arguments.length?this.each(e==null?Qa:(typeof e=="function"?es:_a)(e)):this.node().innerHTML}function ns(){this.nextSibling&&this.parentNode.appendChild(this)}function is(){return this.each(ns)}function os(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function as(){return this.each(os)}function ss(e){var t=typeof e=="function"?e:Qn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rs(){return null}function ls(e,t){var n=typeof e=="function"?e:Qn(e),i=t==null?rs:typeof t=="function"?t:Zt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function us(){var e=this.parentNode;e&&e.removeChild(this)}function cs(){return this.each(us)}function ds(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fs(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hs(e){return this.select(e?fs:ds)}function ms(e){return arguments.length?this.property("__data__",e):this.node().__data__}function gs(e){return function(t){e.call(this,t,this.__data__)}}function vs(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function ys(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ps(e,t,n){return function(){var i=this.__on,o,a=gs(t);if(i){for(var s=0,r=i.length;s<r;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(o):this.__on=[o]}}function ws(e,t,n){var i=vs(e+""),o,a=i.length,s;if(arguments.length<2){var r=this.node().__on;if(r){for(var u=0,c=r.length,l;u<c;++u)for(o=0,l=r[u];o<a;++o)if((s=i[o]).type===l.type&&s.name===l.name)return l.value}return}for(r=t?ps:ys,o=0;o<a;++o)this.each(r(i[o],t,n));return this}function li(e,t,n){var i=ii(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function bs(e,t){return function(){return li(this,e,t)}}function ks(e,t){return function(){return li(this,e,t.apply(this,arguments))}}function xs(e,t){return this.each((typeof t=="function"?ks:bs)(e,t))}function*Is(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ui=[null];function le(e,t){this._groups=e,this._parents=t}function _e(){return new le([[document.documentElement]],ui)}function Ss(){return this}le.prototype=_e.prototype={constructor:le,select:Jo,selectAll:ea,selectChild:oa,selectChildren:la,filter:ua,data:ga,enter:ca,exit:ya,join:pa,merge:wa,selection:Ss,order:ba,sort:ka,call:Ia,nodes:Sa,node:$a,size:Ca,empty:Va,each:Aa,attr:za,style:Fa,property:Ua,classed:Wa,text:Za,html:ts,raise:is,lower:as,append:ss,insert:ls,remove:cs,clone:hs,datum:ms,on:ws,dispatch:xs,[Symbol.iterator]:Is};function Se(e){return typeof e=="string"?new le([[document.querySelector(e)]],[document.documentElement]):new le([[e]],ui)}function $s(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xe(e,t){if(e=$s(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Ht={capture:!0,passive:!1};function Ft(e){e.preventDefault(),e.stopImmediatePropagation()}function Cs(e){var t=e.document.documentElement,n=Se(e).on("dragstart.drag",Ft,Ht);"onselectstart"in t?n.on("selectstart.drag",Ft,Ht):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Vs(e,t){var n=e.document.documentElement,i=Se(e).on("dragstart.drag",null);t&&(i.on("click.drag",Ft,Ht),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function _t(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ci(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function et(){}var We=.7,pt=1/We,ze="\\s*([+-]?\\d+)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",As=/^#([0-9a-f]{3,8})$/,Ms=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),Es=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),Ns=new RegExp(`^rgba\\(${ze},${ze},${ze},${Ge}\\)$`),Os=new RegExp(`^rgba\\(${me},${me},${me},${Ge}\\)$`),Rs=new RegExp(`^hsl\\(${Ge},${me},${me}\\)$`),Ts=new RegExp(`^hsla\\(${Ge},${me},${me},${Ge}\\)$`),hn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_t(et,Ke,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:zs,formatHsl:Bs,formatRgb:gn,toString:gn});function mn(){return this.rgb().formatHex()}function zs(){return this.rgb().formatHex8()}function Bs(){return di(this).formatHsl()}function gn(){return this.rgb().formatRgb()}function Ke(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=As.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?it(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?it(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ms.exec(e))?new ie(t[1],t[2],t[3],1):(t=Es.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ns.exec(e))?it(t[1],t[2],t[3],t[4]):(t=Os.exec(e))?it(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rs.exec(e))?wn(t[1],t[2]/100,t[3]/100,1):(t=Ts.exec(e))?wn(t[1],t[2]/100,t[3]/100,t[4]):hn.hasOwnProperty(e)?vn(hn[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function vn(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function it(e,t,n,i){return i<=0&&(e=t=n=NaN),new ie(e,t,n,i)}function Ps(e){return e instanceof et||(e=Ke(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function jt(e,t,n,i){return arguments.length===1?Ps(e):new ie(e,t,n,i??1)}function ie(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}_t(ie,jt,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(Ne(this.r),Ne(this.g),Ne(this.b),wt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yn,formatHex:yn,formatHex8:Hs,formatRgb:pn,toString:pn}));function yn(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}`}function Hs(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}${Ee((isNaN(this.opacity)?1:this.opacity)*255)}`}function pn(){const e=wt(this.opacity);return`${e===1?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${e===1?")":`, ${e})`}`}function wt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ne(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ee(e){return e=Ne(e),(e<16?"0":"")+e.toString(16)}function wn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,i)}function di(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof et||(e=Ke(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,r=a-o,u=(a+o)/2;return r?(t===a?s=(n-i)/r+(n<i)*6:n===a?s=(i-t)/r+2:s=(t-n)/r+4,r/=u<.5?a+o:2-a-o,s*=60):r=u>0&&u<1?0:s,new fe(s,r,u,e.opacity)}function Fs(e,t,n,i){return arguments.length===1?di(e):new fe(e,t,n,i??1)}function fe(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}_t(fe,Fs,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new ie(Ot(e>=240?e-240:e+120,o,i),Ot(e,o,i),Ot(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new fe(bn(this.h),ot(this.s),ot(this.l),wt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wt(this.opacity);return`${e===1?"hsl(":"hsla("}${bn(this.h)}, ${ot(this.s)*100}%, ${ot(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bn(e){return e=(e||0)%360,e<0?e+360:e}function ot(e){return Math.max(0,Math.min(1,e||0))}function Ot(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const fi=e=>()=>e;function js(e,t){return function(n){return e+n*t}}function Ds(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Ls(e){return(e=+e)==1?hi:function(t,n){return n-t?Ds(t,n,e):fi(isNaN(t)?n:t)}}function hi(e,t){var n=t-e;return n?js(e,n):fi(isNaN(e)?t:e)}const kn=(function e(t){var n=Ls(t);function i(o,a){var s=n((o=jt(o)).r,(a=jt(a)).r),r=n(o.g,a.g),u=n(o.b,a.b),c=hi(o.opacity,a.opacity);return function(l){return o.r=s(l),o.g=r(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i})(1);function Ie(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Dt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rt=new RegExp(Dt.source,"g");function Us(e){return function(){return e}}function qs(e){return function(t){return e(t)+""}}function Xs(e,t){var n=Dt.lastIndex=Rt.lastIndex=0,i,o,a,s=-1,r=[],u=[];for(e=e+"",t=t+"";(i=Dt.exec(e))&&(o=Rt.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),r[s]?r[s]+=a:r[++s]=a),(i=i[0])===(o=o[0])?r[s]?r[s]+=o:r[++s]=o:(r[++s]=null,u.push({i:s,x:Ie(i,o)})),n=Rt.lastIndex;return n<t.length&&(a=t.slice(n),r[s]?r[s]+=a:r[++s]=a),r.length<2?u[0]?qs(u[0].x):Us(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)r[(d=u[l]).i]=d.x(c);return r.join("")})}var xn=180/Math.PI,Lt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mi(e,t,n,i,o,a){var s,r,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(r=Math.sqrt(n*n+i*i))&&(n/=r,i/=r,u/=r),e*i<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*xn,skewX:Math.atan(u)*xn,scaleX:s,scaleY:r}}var at;function Ys(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lt:mi(t.a,t.b,t.c,t.d,t.e,t.f)}function Ws(e){return e==null||(at||(at=document.createElementNS("http://www.w3.org/2000/svg","g")),at.setAttribute("transform",e),!(e=at.transform.baseVal.consolidate()))?Lt:(e=e.matrix,mi(e.a,e.b,e.c,e.d,e.e,e.f))}function gi(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function a(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push("translate(",null,t,null,n);w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function s(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:Ie(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function r(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:Ie(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push(o(m)+"scale(",null,",",null,")");w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d!==1||f!==1)&&m.push(o(m)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),a(c.translateX,c.translateY,l.translateX,l.translateY,d,f),s(c.rotate,l.rotate,d,f),r(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(m){for(var w=-1,x=f.length,N;++w<x;)d[(N=f[w]).i]=N.x(m);return d.join("")}}}var Gs=gi(Ys,"px, ","px)","deg)"),Ks=gi(Ws,", ",")",")"),Js=1e-12;function In(e){return((e=Math.exp(e))+1/e)/2}function Zs(e){return((e=Math.exp(e))-1/e)/2}function Qs(e){return((e=Math.exp(2*e))-1)/(e+1)}const _s=(function e(t,n,i){function o(a,s){var r=a[0],u=a[1],c=a[2],l=s[0],d=s[1],f=s[2],m=l-r,w=d-u,x=m*m+w*w,N,V;if(x<Js)V=Math.log(f/c)/t,N=function(P){return[r+P*m,u+P*w,c*Math.exp(t*P*V)]};else{var M=Math.sqrt(x),R=(f*f-c*c+i*x)/(2*c*n*M),T=(f*f-c*c-i*x)/(2*f*n*M),q=Math.log(Math.sqrt(R*R+1)-R),Y=Math.log(Math.sqrt(T*T+1)-T);V=(Y-q)/t,N=function(P){var B=P*V,j=In(q),L=c/(n*M)*(j*Qs(t*B+q)-Zs(q));return[r+L*m,u+L*w,c*j/In(t*B+q)]}}return N.duration=V*1e3*t/Math.SQRT2,N}return o.rho=function(a){var s=Math.max(.001,+a),r=s*s,u=r*r;return e(s,r,u)},o})(Math.SQRT2,2,4);var Pe=0,Le=0,Fe=0,vi=1e3,bt,Ue,kt=0,Re=0,At=0,Je=typeof performance=="object"&&performance.now?performance:Date,yi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function en(){return Re||(yi(er),Re=Je.now()+At)}function er(){Re=0}function xt(){this._call=this._time=this._next=null}xt.prototype=pi.prototype={constructor:xt,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?en():+n)+(t==null?0:+t),!this._next&&Ue!==this&&(Ue?Ue._next=this:bt=this,Ue=this),this._call=e,this._time=n,Ut()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ut())}};function pi(e,t,n){var i=new xt;return i.restart(e,t,n),i}function tr(){en(),++Pe;for(var e=bt,t;e;)(t=Re-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pe}function Sn(){Re=(kt=Je.now())+At,Pe=Le=0;try{tr()}finally{Pe=0,ir(),Re=0}}function nr(){var e=Je.now(),t=e-kt;t>vi&&(At-=t,kt=e)}function ir(){for(var e,t=bt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:bt=n);Ue=e,Ut(i)}function Ut(e){if(!Pe){Le&&(Le=clearTimeout(Le));var t=e-Re;t>24?(e<1/0&&(Le=setTimeout(Sn,e-Je.now()-At)),Fe&&(Fe=clearInterval(Fe))):(Fe||(kt=Je.now(),Fe=setInterval(nr,vi)),Pe=1,yi(Sn))}}function $n(e,t,n){var i=new xt;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var or=Jt("start","end","cancel","interrupt"),ar=[],wi=0,Cn=1,qt=2,dt=3,Vn=4,Xt=5,ft=6;function Mt(e,t,n,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;sr(e,n,{name:t,index:i,group:o,on:or,tween:ar,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:wi})}function tn(e,t){var n=he(e,t);if(n.state>wi)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=he(e,t);if(n.state>dt)throw new Error("too late; already running");return n}function he(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function sr(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=pi(a,0,n.time);function a(c){n.state=Cn,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var l,d,f,m;if(n.state!==Cn)return u();for(l in i)if(m=i[l],m.name===n.name){if(m.state===dt)return $n(s);m.state===Vn?(m.state=ft,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[l]):+l<t&&(m.state=ft,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[l])}if($n(function(){n.state===dt&&(n.state=Vn,n.timer.restart(r,n.delay,n.time),r(c))}),n.state=qt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===qt){for(n.state=dt,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(m=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=m);o.length=d+1}}function r(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Xt,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Xt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ft,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function ht(e,t){var n=e.__transition,i,o,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((i=n[s]).name!==t){a=!1;continue}o=i.state>qt&&i.state<Xt,i.state=ft,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[s]}a&&delete e.__transition}}function rr(e){return this.each(function(){ht(this,e)})}function lr(e,t){var n,i;return function(){var o=ge(this,e),a=o.tween;if(a!==n){i=n=a;for(var s=0,r=i.length;s<r;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function ur(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var a=ge(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var r={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=r;break}u===c&&o.push(r)}a.tween=o}}function cr(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=he(this.node(),n).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((t==null?lr:ur)(n,e,t))}function nn(e,t,n){var i=e._id;return e.each(function(){var o=ge(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return he(o,i).value[t]}}function bi(e,t){var n;return(typeof t=="number"?Ie:t instanceof Ke?kn:(n=Ke(t))?(t=n,kn):Xs)(e,t)}function dr(e){return function(){this.removeAttribute(e)}}function fr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=t(i=s,n)}}function mr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=t(i=s,n)}}function gr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function vr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function yr(e,t){var n=Vt(e),i=n==="transform"?Ks:bi;return this.attrTween(e,typeof t=="function"?(n.local?vr:gr)(n,i,nn(this,"attr."+e,t)):t==null?(n.local?fr:dr)(n):(n.local?mr:hr)(n,i,t))}function pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function br(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&wr(e,a)),n}return o._value=t,o}function kr(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&pr(e,a)),n}return o._value=t,o}function xr(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=Vt(e);return this.tween(n,(i.local?br:kr)(i,t))}function Ir(e,t){return function(){tn(this,e).delay=+t.apply(this,arguments)}}function Sr(e,t){return t=+t,function(){tn(this,e).delay=t}}function $r(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ir:Sr)(t,e)):he(this.node(),t).delay}function Cr(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Vr(e,t){return t=+t,function(){ge(this,e).duration=t}}function Ar(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cr:Vr)(t,e)):he(this.node(),t).duration}function Mr(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Er(e){var t=this._id;return arguments.length?this.each(Mr(t,e)):he(this.node(),t).ease}function Nr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function Or(e){if(typeof e!="function")throw new Error;return this.each(Nr(this._id,e))}function Rr(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new be(i,this._parents,this._name,this._id)}function Tr(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,a=Math.min(i,o),s=new Array(i),r=0;r<a;++r)for(var u=t[r],c=n[r],l=u.length,d=s[r]=new Array(l),f,m=0;m<l;++m)(f=u[m]||c[m])&&(d[m]=f);for(;r<i;++r)s[r]=t[r];return new be(s,this._parents,this._name,this._id)}function zr(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Br(e,t,n){var i,o,a=zr(t)?tn:ge;return function(){var s=a(this,e),r=s.on;r!==i&&(o=(i=r).copy()).on(t,n),s.on=o}}function Pr(e,t){var n=this._id;return arguments.length<2?he(this.node(),n).on.on(e):this.each(Br(n,e,t))}function Hr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fr(){return this.on("end.remove",Hr(this._id))}function jr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zt(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var r=i[s],u=r.length,c=a[s]=new Array(u),l,d,f=0;f<u;++f)(l=r[f])&&(d=e.call(l,l.__data__,f,r))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,Mt(c[f],t,n,f,c,he(l,n)));return new be(a,this._parents,t,n)}function Dr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_n(e));for(var i=this._groups,o=i.length,a=[],s=[],r=0;r<o;++r)for(var u=i[r],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),m,w=he(l,n),x=0,N=f.length;x<N;++x)(m=f[x])&&Mt(m,t,n,x,f,w);a.push(f),s.push(l)}return new be(a,s,t,n)}var Lr=_e.prototype.constructor;function Ur(){return new Lr(this._groups,this._parents)}function qr(e,t){var n,i,o;return function(){var a=Be(this,e),s=(this.style.removeProperty(e),Be(this,e));return a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function ki(e){return function(){this.style.removeProperty(e)}}function Xr(e,t,n){var i,o=n+"",a;return function(){var s=Be(this,e);return s===o?null:s===i?a:a=t(i=s,n)}}function Yr(e,t,n){var i,o,a;return function(){var s=Be(this,e),r=n(this),u=r+"";return r==null&&(u=r=(this.style.removeProperty(e),Be(this,e))),s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r))}}function Wr(e,t){var n,i,o,a="style."+t,s="end."+a,r;return function(){var u=ge(this,e),c=u.on,l=u.value[a]==null?r||(r=ki(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(s,o=l),u.on=i}}function Gr(e,t,n){var i=(e+="")=="transform"?Gs:bi;return t==null?this.styleTween(e,qr(e,i)).on("end.style."+e,ki(e)):typeof t=="function"?this.styleTween(e,Yr(e,i,nn(this,"style."+e,t))).each(Wr(this._id,e)):this.styleTween(e,Xr(e,i,t),n).on("end.style."+e,null)}function Kr(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Jr(e,t,n){var i,o;function a(){var s=t.apply(this,arguments);return s!==o&&(i=(o=s)&&Kr(e,s,n)),i}return a._value=t,a}function Zr(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Jr(e,t,n??""))}function Qr(e){return function(){this.textContent=e}}function _r(e){return function(){var t=e(this);this.textContent=t??""}}function el(e){return this.tween("text",typeof e=="function"?_r(nn(this,"text",e)):Qr(e==null?"":e+""))}function tl(e){return function(t){this.textContent=e.call(this,t)}}function nl(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&tl(o)),t}return i._value=e,i}function il(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,nl(e))}function ol(){for(var e=this._name,t=this._id,n=xi(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)if(u=s[c]){var l=he(u,t);Mt(u,e,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new be(i,this._parents,e,n)}function al(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(a,s){var r={value:s},u={value:function(){--o===0&&a()}};n.each(function(){var c=ge(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(u)),c.on=t}),o===0&&a()})}var sl=0;function be(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function xi(){return++sl}var ve=_e.prototype;be.prototype={constructor:be,select:jr,selectAll:Dr,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:Rr,merge:Tr,selection:Ur,transition:ol,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:Pr,attr:yr,attrTween:xr,style:Gr,styleTween:Zr,text:el,textTween:il,remove:Fr,tween:cr,delay:$r,duration:Ar,ease:Er,easeVarying:Or,end:al,[Symbol.iterator]:ve[Symbol.iterator]};function rl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ll={time:null,delay:0,duration:250,ease:rl};function ul(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function cl(e){var t,n;e instanceof be?(t=e._id,e=e._name):(t=xi(),(n=ll).time=en(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&Mt(u,e,t,c,s,n||ul(u,t));return new be(i,this._parents,e,t)}_e.prototype.interrupt=rr;_e.prototype.transition=cl;const st=e=>()=>e;function dl(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function pe(e,t,n){this.k=e,this.x=t,this.y=n}pe.prototype={constructor:pe,scale:function(e){return e===1?this:new pe(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new pe(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var on=new pe(1,0,0);pe.prototype;function Tt(e){e.stopImmediatePropagation()}function je(e){e.preventDefault(),e.stopImmediatePropagation()}function fl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hl(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function An(){return this.__zoom||on}function ml(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function gl(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function yl(){var e=fl,t=hl,n=vl,i=ml,o=gl,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],r=250,u=_s,c=Jt("start","zoom","end"),l,d,f,m=500,w=150,x=0,N=10;function V(g){g.property("__zoom",An).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",L).filter(o).on("touchstart.zoom",Q).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}V.transform=function(g,p,y,S){var b=g.selection?g.selection():g;b.property("__zoom",An),g!==b?q(g,p,y,S):b.interrupt().each(function(){Y(this,arguments).event(S).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()})},V.scaleBy=function(g,p,y,S){V.scaleTo(g,function(){var b=this.__zoom.k,E=typeof p=="function"?p.apply(this,arguments):p;return b*E},y,S)},V.scaleTo=function(g,p,y,S){V.transform(g,function(){var b=t.apply(this,arguments),E=this.__zoom,$=y==null?T(b):typeof y=="function"?y.apply(this,arguments):y,H=E.invert($),W=typeof p=="function"?p.apply(this,arguments):p;return n(R(M(E,W),$,H),b,s)},y,S)},V.translateBy=function(g,p,y,S){V.transform(g,function(){return n(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof y=="function"?y.apply(this,arguments):y),t.apply(this,arguments),s)},null,S)},V.translateTo=function(g,p,y,S,b){V.transform(g,function(){var E=t.apply(this,arguments),$=this.__zoom,H=S==null?T(E):typeof S=="function"?S.apply(this,arguments):S;return n(on.translate(H[0],H[1]).scale($.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof y=="function"?-y.apply(this,arguments):-y),E,s)},S,b)};function M(g,p){return p=Math.max(a[0],Math.min(a[1],p)),p===g.k?g:new pe(p,g.x,g.y)}function R(g,p,y){var S=p[0]-y[0]*g.k,b=p[1]-y[1]*g.k;return S===g.x&&b===g.y?g:new pe(g.k,S,b)}function T(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function q(g,p,y,S){g.on("start.zoom",function(){Y(this,arguments).event(S).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(S).end()}).tween("zoom",function(){var b=this,E=arguments,$=Y(b,E).event(S),H=t.apply(b,E),W=y==null?T(H):typeof y=="function"?y.apply(b,E):y,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),K=b.__zoom,_=typeof p=="function"?p.apply(b,E):p,se=u(K.invert(W).concat(G/K.k),_.invert(W).concat(G/_.k));return function(re){if(re===1)re=_;else{var de=se(re),Et=G/de[2];re=new pe(Et,W[0]-de[0]*Et,W[1]-de[1]*Et)}$.zoom(null,re)}})}function Y(g,p,y){return!y&&g.__zooming||new P(g,p)}function P(g,p){this.that=g,this.args=p,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,p),this.taps=0}P.prototype={event:function(g){return g&&(this.sourceEvent=g),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(g,p){return this.mouse&&g!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&g!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&g!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(g){var p=Se(this.that).datum();c.call(g,this.that,new dl(g,{sourceEvent:this.sourceEvent,target:V,transform:this.that.__zoom,dispatch:c}),p)}};function B(g,...p){if(!e.apply(this,arguments))return;var y=Y(this,p).event(g),S=this.__zoom,b=Math.max(a[0],Math.min(a[1],S.k*Math.pow(2,i.apply(this,arguments)))),E=xe(g);if(y.wheel)(y.mouse[0][0]!==E[0]||y.mouse[0][1]!==E[1])&&(y.mouse[1]=S.invert(y.mouse[0]=E)),clearTimeout(y.wheel);else{if(S.k===b)return;y.mouse=[E,S.invert(E)],ht(this),y.start()}je(g),y.wheel=setTimeout($,w),y.zoom("mouse",n(R(M(S,b),y.mouse[0],y.mouse[1]),y.extent,s));function $(){y.wheel=null,y.end()}}function j(g,...p){if(f||!e.apply(this,arguments))return;var y=g.currentTarget,S=Y(this,p,!0).event(g),b=Se(g.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",G,!0),E=xe(g,y),$=g.clientX,H=g.clientY;Cs(g.view),Tt(g),S.mouse=[E,this.__zoom.invert(E)],ht(this),S.start();function W(K){if(je(K),!S.moved){var _=K.clientX-$,se=K.clientY-H;S.moved=_*_+se*se>x}S.event(K).zoom("mouse",n(R(S.that.__zoom,S.mouse[0]=xe(K,y),S.mouse[1]),S.extent,s))}function G(K){b.on("mousemove.zoom mouseup.zoom",null),Vs(K.view,S.moved),je(K),S.event(K).end()}}function L(g,...p){if(e.apply(this,arguments)){var y=this.__zoom,S=xe(g.changedTouches?g.changedTouches[0]:g,this),b=y.invert(S),E=y.k*(g.shiftKey?.5:2),$=n(R(M(y,E),S,b),t.apply(this,p),s);je(g),r>0?Se(this).transition().duration(r).call(q,$,S,g):Se(this).call(V.transform,$,S,g)}}function Q(g,...p){if(e.apply(this,arguments)){var y=g.touches,S=y.length,b=Y(this,p,g.changedTouches.length===S).event(g),E,$,H,W;for(Tt(g),$=0;$<S;++$)H=y[$],W=xe(H,this),W=[W,this.__zoom.invert(W),H.identifier],b.touch0?!b.touch1&&b.touch0[2]!==W[2]&&(b.touch1=W,b.taps=0):(b.touch0=W,E=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(b.taps<2&&(d=W[0],l=setTimeout(function(){l=null},m)),ht(this),b.start())}}function ee(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$,H,W;for(je(g),E=0;E<b;++E)$=S[E],H=xe($,this),y.touch0&&y.touch0[2]===$.identifier?y.touch0[0]=H:y.touch1&&y.touch1[2]===$.identifier&&(y.touch1[0]=H);if($=y.that.__zoom,y.touch1){var G=y.touch0[0],K=y.touch0[1],_=y.touch1[0],se=y.touch1[1],re=(re=_[0]-G[0])*re+(re=_[1]-G[1])*re,de=(de=se[0]-K[0])*de+(de=se[1]-K[1])*de;$=M($,Math.sqrt(re/de)),H=[(G[0]+_[0])/2,(G[1]+_[1])/2],W=[(K[0]+se[0])/2,(K[1]+se[1])/2]}else if(y.touch0)H=y.touch0[0],W=y.touch0[1];else return;y.zoom("touch",n(R($,H,W),y.extent,s))}}function ae(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$;for(Tt(g),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),E=0;E<b;++E)$=S[E],y.touch0&&y.touch0[2]===$.identifier?delete y.touch0:y.touch1&&y.touch1[2]===$.identifier&&delete y.touch1;if(y.touch1&&!y.touch0&&(y.touch0=y.touch1,delete y.touch1),y.touch0)y.touch0[1]=this.__zoom.invert(y.touch0[0]);else if(y.end(),y.taps===2&&($=xe($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<N)){var H=Se(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return V.wheelDelta=function(g){return arguments.length?(i=typeof g=="function"?g:st(+g),V):i},V.filter=function(g){return arguments.length?(e=typeof g=="function"?g:st(!!g),V):e},V.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:st(!!g),V):o},V.extent=function(g){return arguments.length?(t=typeof g=="function"?g:st([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),V):t},V.scaleExtent=function(g){return arguments.length?(a[0]=+g[0],a[1]=+g[1],V):[a[0],a[1]]},V.translateExtent=function(g){return arguments.length?(s[0][0]=+g[0][0],s[1][0]=+g[1][0],s[0][1]=+g[0][1],s[1][1]=+g[1][1],V):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},V.constrain=function(g){return arguments.length?(n=g,V):n},V.duration=function(g){return arguments.length?(r=+g,V):r},V.interpolate=function(g){return arguments.length?(u=g,V):u},V.on=function(){var g=c.on.apply(c,arguments);return g===c?V:g},V.clickDistance=function(g){return arguments.length?(x=(g=+g)*g,V):Math.sqrt(x)},V.tapDistance=function(g){return arguments.length?(N=+g,V):N},V}const Ii=Symbol("MiniMapSlots"),pl=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],wl={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},bl=X({...wl,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Qi(Ii),o=Hn(),a=qe(()=>o.style??{});function s(d){t("click",d)}function r(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(v(),O(D,{key:0},[h(i)[`node-${n.type}`]?(v(),C(_i(h(i)[`node-${n.type}`]),$e(Oe({key:0},{...n,...d.$attrs})),null,16)):(v(),O("rect",Oe({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||a.value.background||a.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:s,onDblclick:r,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,pl))],64)):z("",!0)}}),kl=["width","height","viewBox","aria-labelledby"],xl=["id"],Il=["d","fill","stroke","stroke-width"],Sl={name:"MiniMap",compatConfig:{MODE:3}},$l=X({...Sl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Ji(),i=Hn(),o=200,a=150,{id:s,edges:r,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:m,getNodesInitialized:w}=Yt(),x=ce();eo(Ii,n);const N=qe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),V=qe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??a}),M=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",R=A(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=A(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),q=A(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),Y=A(()=>Pi(w.value.filter(b=>!b.hidden))),P=A(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),B=A(()=>w.value&&w.value.length?Bi(Y.value,P.value):P.value),j=A(()=>{const b=B.value.width/N.value,E=B.value.height/V.value;return Math.max(b,E)}),L=A(()=>{const b=j.value*N.value,E=j.value*V.value,$=e.offsetScale*j.value;return{offset:$,x:B.value.x-(b-B.value.width)/2-$,y:B.value.y-(E-B.value.height)/2-$,width:b+$*2,height:E+$*2}}),Q=A(()=>!L.value.x||!L.value.y?"":`
|
|
1
|
+
import{a1 as Yt,a0 as Oi,m as an,a2 as zt,a3 as Ri,a4 as Mn,a5 as Nt,_ as oe,a6 as En,a7 as gt,Z as Wt,a8 as Nn,a9 as On,aa as Ti,ab as zi,ac as ut,ad as He,ae as Bi,af as Pi,ag as Hi,ah as Fi,P as ji,ai as Rn,aj as Di,ak as De,k as Bt,al as sn,am as Li,an as Ui,ao as qi,I as Tn,ap as Xi,aq as zn,Q as Yi,ar as Wi,L as Bn,as as Gi}from"#entry";import{E as X,b4 as Ki,V as v,J as O,aa as D,ab as te,a1 as z,a6 as ke,j as A,Y as C,ai as Gt,D as h,_ as k,W as I,Z as ne,$ as U,a5 as Z,a7 as Ce,a2 as F,t as qe,F as Pn,a8 as Ji,af as Hn,l as Zi,a0 as J,r as ce,i as Qi,av as $e,ag as Oe,a4 as _i,G as eo,w as Xe,b5 as to,aw as Ae,aU as Fn,aG as Qe,ak as jn,b6 as no,b7 as io,aN as Dn,b8 as oo,aP as Ve,d as Ln,ah as Un,as as we,aj as St,aH as ao,a as Te,aQ as qn,aJ as $t,aK as Ye,at as ue,n as vt,ap as so,a$ as Xn,am as ro,ao as Me,al as lo,au as Yn,aV as Kt,H as uo,p as rn,b3 as co,aI as fo,b0 as ho,b2 as mo,b9 as go,b1 as vo,u as Wn,ba as yo}from"./sB5TSp0H.js";import{t as ln,a as po,_ as wo}from"./DXyfavJr.js";import{C as Ct}from"./D_wY_uke.js";import{V as un}from"./C973_vs5.js";import{I as Gn}from"./C4XpvUuq.js";import{_ as bo}from"./CBVcjGJL.js";import{_ as Kn}from"./Lks7C8cK.js";import{r as ko,g as xo}from"./BxAss8Tj.js";function Io(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return ln(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>ln(o,i),i)}throw Error("Wrong number of arguments")}function tt(...e){return Io(So,e)}function So(){let e=new Set;return t=>e.has(t)?po:(e.add(t),{done:!1,hasNext:!0,next:t})}function $o(e,t,n){const i=Array.from({length:n},()=>[]),o=t,s=-(o*(n-1))/2,r=Array.from({length:n},(l,d)=>s+d*o),u=[];for(let l=0;l<e.length-1;l++){const d=e[l],f=e[l+1],m=f[0]-d[0],w=f[1]-d[1],x=Math.sqrt(m*m+w*w);let N=-w,V=m;x!==0&&(N/=x,V/=x),u.push({x:N,y:V})}function c(l,d,f,m){const w=l[0],x=l[1],N=d[0],V=d[1],M=f[0],R=f[1],T=m[0],q=m[1],Y=(w-N)*(R-q)-(x-V)*(M-T);if(Y===0)return null;const P=((w-M)*(R-q)-(x-R)*(M-T))/Y;return[w+P*(N-w),x+P*(V-x)]}for(let l=0;l<n;l++)for(let d=0;d<e.length;d++){const f=e[d];let m=0,w=0;if(d===0)m=u[0].x*r[l],w=u[0].y*r[l];else if(d===e.length-1)m=u[u.length-1].x*r[l],w=u[u.length-1].y*r[l];else{const x=u[d-1],N=u[d],V=e[d-1],M=e[d+1],R=[V[0]+x.x*r[l],V[1]+x.y*r[l]],T=[f[0]+x.x*r[l],f[1]+x.y*r[l]],q=[f[0]+N.x*r[l],f[1]+N.y*r[l]],Y=[M[0]+N.x*r[l],M[1]+N.y*r[l]],P=c(R,T,q,Y);P?(m=P[0]-f[0],w=P[1]-f[1]):(m=(x.x+N.x)/2*r[l],w=(x.y+N.y)/2*r[l])}i[l].push(`${f[0]+m},${f[1]+w}`)}return i}const Co=["points","stroke"],Vo=["points"],nt=3,Ao=X({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){Ki(p=>({v04971dc8:nt}));const t=Yt(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r,inputNodeType:u}=Oi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),c=A(()=>{if(u==="outputs"){const y=e.components[n.type].outputs[r];return{all:y?[y.type]:[]}}if(i&&n){const y=e.components[n.type].inputs[r],S=zt(e.inputResolverOutputs,n.id),b=tt((S[r]??[]).map(E=>E.type));return b.length>0?{all:b,visible:b}:{all:y?[y.type]:[],visible:b}}if(a&&n&&r)return{all:(zt(e.inputResolverOutputs,n.id)[r]??[]).map(y=>y.type)};if(a&&n)return{all:Mn(e.inputResolverOutputs,n.id).map(p=>p.type),visible:Ri(e.inputResolverOutputs,n.id).map(p=>p.type)};if(i&&o){const p=Nt(e.inputResolverOutputs,o.id).filter(b=>b.input.instanceId===i.id&&b.input.output===s).map(b=>b.type);if(p.length>0)return{all:tt(p)};const S=e.components[i.type].outputs[s];return{all:S?[S.type]:[]}}if(a&&o)return{all:Nt(e.inputResolverOutputs,a.id).flat().map(p=>p.type)};throw an.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:a,outputKey:s,inputKey:r}),new Error("Invalid connection")}),l=A(()=>tt(c.value.all).map(p=>e.entities[p])),d=A(()=>{if(!a)return[];const p=Nt(e.inputResolverOutputs,a.id).map(y=>y.type);return tt(p).sort()}),f=A(()=>!!a&&e.data.hubReservedGhostLane),m=A(()=>!!a&&e.data.isPendingHubTyped),w=A(()=>!!a&&!!n&&!!r),x=A(()=>w.value?e.components[n.type].inputs[r]?.type:void 0),N=A(()=>{if(!a||!w.value)return!1;const p=x.value;return p?!d.value.includes(p):!1}),V=A(()=>m.value||N.value),M=A(()=>a?V.value?!0:f.value:!1);e.data.isOutputProjection&&an.debug({source:e.source,target:e.target,sourceHandleId:e.sourceHandleId,targetHandleId:e.targetHandleId,isOutputProjection:e.data.isOutputProjection,isOutputProjectionUnresolved:e.data.isOutputProjectionUnresolved},"rendering projection edge in CustomEdge");const R=A(()=>M.value&&d.value.length>0),T=A(()=>c.value.visible?c.value.visible.length===0:a?c.value.all.length===0:!1),q=A(()=>{if(!a)return T.value?1:l.value.length;if(P.value)return 1;const y=d.value.length+(R.value?1:0);return Math.max(1,y)}),Y=p=>a?d.value.length===0?!0:R.value&&p===q.value-1:T.value,P=A(()=>!!a&&!!n&&!!r),B=()=>P.value?e.components[n.type].inputs[r]?.type:void 0,j=A(()=>{if(!P.value)return!1;const p=B();return p?!d.value.includes(p):!1}),L=p=>{if(e.data.isOutputProjection&&e.data.isOutputProjectionUnresolved)return"#9E9E9E";if(P.value){if(j.value)return"#9E9E9E";const y=B();return(y?e.entities[y]:void 0)?.meta.color??"#607D8B"}if(Y(p))return"#9E9E9E";if(a){const y=d.value[p];return e.entities[y]?.meta.color??"#607D8B"}return l.value[p%l.value.length].meta.color??"#607D8B"},Q=p=>a?P.value?p===0:T.value?Y(p):c.value.visible?Y(p)?!1:c.value.visible.includes(d.value[p]):!Y(p):T.value?!0:c.value.visible?c.value.visible.includes(l.value[p].type):!0,ee=(p,y)=>p[0]===y[0]&&p[1]===y[1],ae=A(()=>{if(!e.data.points)return[];const p=[e.sourceX,e.data.routedSourceY??e.sourceY],y=[e.targetX,e.data.routedTargetY??e.targetY],S=[...e.data.points];return(!S[0]||!ee(S[0],p))&&S.unshift(p),(!S[S.length-1]||!ee(S[S.length-1],y))&&S.push(y),$o(S,nt,q.value)}),g=p=>{const S=1/q.value;return`-${p*S}s`};return(p,y)=>(v(),O(D,null,[(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`static-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:L(b),fill:"none","stroke-width":nt,style:{opacity:"0.8"}},null,8,Co)):z("",!0)],64))),128)),(v(!0),O(D,null,te(ae.value,(S,b)=>(v(),O(D,{key:`highlight-${b}`},[Q(b)?(v(),O("polyline",{key:0,points:S.join(" "),stroke:"white",fill:"none","stroke-width":nt,class:"highlight-polyline animated-highlight",style:ke({animationDelay:g(b)})},null,12,Vo)):z("",!0)],64))),128))],64))}}),Mo=oe(Ao,[["__scopeId","data-v-58cdfca4"]]);function Eo(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const No=X({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(v(),C(Gt,{variant:"flat",style:ke(h(Eo)(e.selected,e.blueprintStatus)),color:"#2d2d2d"},{default:k(()=>[I(ne,{class:"ma-2",size:74},{default:k(()=>[...n[0]||(n[0]=[U("mdi-router",-1)])]),_:1}),Z(t.$slots,"default")]),_:3},8,["style"]))}}),Oo=X({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(v(),O(D,null,[I(h(En),{id:"",type:e.side==="left"?"target":"source",position:e.side==="left"?h(gt).Left:h(gt).Right,class:Ce(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["type","position","class","is-valid-connection"]),F("div",{class:Ce(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:ke({backgroundColor:e.handleColor})},null,6)],64))}}),cn=oe(Oo,[["__scopeId","data-v-1aff1180"]]),Ro={class:"handles"},To=X({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Wt(),a=Nn(),s=A(()=>On(a.node,i));return(r,u)=>(v(),C(No,{class:"hub-card",selected:h(o).isNodeSelected(h(a).node),"blueprint-status":h(s),onContextmenu:u[0]||(u[0]=c=>n("contextmenu",c))},{default:k(()=>[Z(r.$slots,"default",{},void 0,!0),F("div",Ro,[I(cn,{"handle-color":"#3F51B5",side:"left","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"]),I(cn,{"handle-color":"#3F51B5",side:"right","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),Hu=oe(To,[["__scopeId","data-v-79b30d7c"]]),zo=X({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=A(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>h(t)?(v(),O("div",{key:0,class:"selection-rectangle",style:ke(h(t))},null,4)):z("",!0)}}),Bo=oe(zo,[["__scopeId","data-v-6118cbbb"]]);var ye=(e=>(e.Lines="lines",e.Dots="dots",e))(ye||{});const Jn=function({dimensions:e,size:t,color:n}){return Pn("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Zn=function({radius:e,color:t}){return Pn("circle",{cx:e,cy:e,r:e,fill:t})};ye.Lines+"",ye.Dots+"";const Po={[ye.Dots]:"#81818a",[ye.Lines]:"#eee"},Ho=["id","x","y","width","height","patternTransform"],Fo={key:2,height:"100",width:"100"},jo=["fill"],Do=["x","y","fill"],Lo={name:"Background",compatConfig:{MODE:3}},Uo=X({...Lo,props:{id:{},variant:{default:()=>ye.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Yt(),i=A(()=>{const s=n.value.zoom,[r,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[r*s||1,u*s||1],l=e.size*s,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],m=[d*s||1+c[0]/2,f*s||1+c[1]/2];return{scaledGap:c,offset:m,size:l}}),o=qe(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=qe(()=>e.color||e.patternColor||Po[e.variant||ye.Dots]);return(s,r)=>(v(),O("svg",{class:"vue-flow__background vue-flow__container",style:ke({height:`${s.height>100?100:s.height}%`,width:`${s.width>100?100:s.width}%`})},[Z(s.$slots,"pattern-container",{id:o.value},()=>[F("pattern",{id:o.value,x:h(n).x%i.value.scaledGap[0],y:h(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Z(s.$slots,"pattern",{},()=>[s.variant===h(ye).Lines?(v(),C(h(Jn),{key:0,size:s.lineWidth,color:a.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):s.variant===h(ye).Dots?(v(),C(h(Zn),{key:1,color:a.value,radius:i.value.size/2},null,8,["color","radius"])):z("",!0),s.bgColor?(v(),O("svg",Fo,[F("rect",{width:"100%",height:"100%",fill:s.bgColor},null,8,jo)])):z("",!0)])],8,Ho)]),F("rect",{x:s.x,y:s.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Do),Z(s.$slots,"default",{id:o.value})],4))}});var qo={value:()=>{}};function Jt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ct(n)}function ct(e){this._=e}function Xo(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ct.prototype=Jt.prototype={constructor:ct,on:function(e,t){var n=this._,i=Xo(e+"",n),o,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((o=(e=i[a]).type)&&(o=Yo(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(o=(e=i[a]).type)n[o]=dn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=dn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ct(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,a;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(t,n)}};function Yo(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function dn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=qo,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pt="http://www.w3.org/1999/xhtml";const fn={svg:"http://www.w3.org/2000/svg",xhtml:Pt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fn.hasOwnProperty(t)?{space:fn[t],local:e}:e}function Wo(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pt&&t.documentElement.namespaceURI===Pt?t.createElement(e):t.createElementNS(n,e)}}function Go(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qn(e){var t=Vt(e);return(t.local?Go:Wo)(t)}function Ko(){}function Zt(e){return e==null?Ko:function(){return this.querySelector(e)}}function Jo(e){typeof e!="function"&&(e=Zt(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=new Array(s),u,c,l=0;l<s;++l)(u=a[l])&&(c=e.call(u,u.__data__,l,a))&&("__data__"in u&&(c.__data__=u.__data__),r[l]=c);return new le(i,this._parents)}function Zo(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qo(){return[]}function _n(e){return e==null?Qo:function(){return this.querySelectorAll(e)}}function _o(e){return function(){return Zo(e.apply(this,arguments))}}function ea(e){typeof e=="function"?e=_o(e):e=_n(e);for(var t=this._groups,n=t.length,i=[],o=[],a=0;a<n;++a)for(var s=t[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&(i.push(e.call(u,u.__data__,c,s)),o.push(u));return new le(i,o)}function ei(e){return function(){return this.matches(e)}}function ti(e){return function(t){return t.matches(e)}}var ta=Array.prototype.find;function na(e){return function(){return ta.call(this.children,e)}}function ia(){return this.firstElementChild}function oa(e){return this.select(e==null?ia:na(typeof e=="function"?e:ti(e)))}var aa=Array.prototype.filter;function sa(){return Array.from(this.children)}function ra(e){return function(){return aa.call(this.children,e)}}function la(e){return this.selectAll(e==null?sa:ra(typeof e=="function"?e:ti(e)))}function ua(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new le(i,this._parents)}function ni(e){return new Array(e.length)}function ca(){return new le(this._enter||this._groups.map(ni),this._parents)}function yt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yt.prototype={constructor:yt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function da(e){return function(){return e}}function fa(e,t,n,i,o,a){for(var s=0,r,u=t.length,c=a.length;s<c;++s)(r=t[s])?(r.__data__=a[s],i[s]=r):n[s]=new yt(e,a[s]);for(;s<u;++s)(r=t[s])&&(o[s]=r)}function ha(e,t,n,i,o,a,s){var r,u,c=new Map,l=t.length,d=a.length,f=new Array(l),m;for(r=0;r<l;++r)(u=t[r])&&(f[r]=m=s.call(u,u.__data__,r,t)+"",c.has(m)?o[r]=u:c.set(m,u));for(r=0;r<d;++r)m=s.call(e,a[r],r,a)+"",(u=c.get(m))?(i[r]=u,u.__data__=a[r],c.delete(m)):n[r]=new yt(e,a[r]);for(r=0;r<l;++r)(u=t[r])&&c.get(f[r])===u&&(o[r]=u)}function ma(e){return e.__data__}function ga(e,t){if(!arguments.length)return Array.from(this,ma);var n=t?ha:fa,i=this._parents,o=this._groups;typeof e!="function"&&(e=da(e));for(var a=o.length,s=new Array(a),r=new Array(a),u=new Array(a),c=0;c<a;++c){var l=i[c],d=o[c],f=d.length,m=va(e.call(l,l&&l.__data__,c,i)),w=m.length,x=r[c]=new Array(w),N=s[c]=new Array(w),V=u[c]=new Array(f);n(l,d,x,N,V,m,t);for(var M=0,R=0,T,q;M<w;++M)if(T=x[M]){for(M>=R&&(R=M+1);!(q=N[R])&&++R<w;);T._next=q||null}}return s=new le(s,i),s._enter=r,s._exit=u,s}function va(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ya(){return new le(this._exit||this._groups.map(ni),this._parents)}function pa(e,t,n){var i=this.enter(),o=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),i&&o?i.merge(o).order():o}function wa(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,a=i.length,s=Math.min(o,a),r=new Array(o),u=0;u<s;++u)for(var c=n[u],l=i[u],d=c.length,f=r[u]=new Array(d),m,w=0;w<d;++w)(m=c[w]||l[w])&&(f[w]=m);for(;u<o;++u)r[u]=n[u];return new le(r,this._parents)}function ba(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,a=i[o],s;--o>=0;)(s=i[o])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function ka(e){e||(e=xa);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a){for(var s=n[a],r=s.length,u=o[a]=new Array(r),c,l=0;l<r;++l)(c=s[l])&&(u[l]=c);u.sort(t)}return new le(o,this._parents).order()}function xa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ia(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Sa(){return Array.from(this)}function $a(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null}function Ca(){let e=0;for(const t of this)++e;return e}function Va(){return!this.node()}function Aa(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],a=0,s=o.length,r;a<s;++a)(r=o[a])&&e.call(r,r.__data__,a,o);return this}function Ma(e){return function(){this.removeAttribute(e)}}function Ea(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Na(e,t){return function(){this.setAttribute(e,t)}}function Oa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ra(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ta(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function za(e,t){var n=Vt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Ea:Ma:typeof t=="function"?n.local?Ta:Ra:n.local?Oa:Na)(n,t))}function ii(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ba(e){return function(){this.style.removeProperty(e)}}function Pa(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ha(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Fa(e,t,n){return arguments.length>1?this.each((t==null?Ba:typeof t=="function"?Ha:Pa)(e,t,n??"")):Be(this.node(),e)}function Be(e,t){return e.style.getPropertyValue(t)||ii(e).getComputedStyle(e,null).getPropertyValue(t)}function ja(e){return function(){delete this[e]}}function Da(e,t){return function(){this[e]=t}}function La(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ua(e,t){return arguments.length>1?this.each((t==null?ja:typeof t=="function"?La:Da)(e,t)):this.node()[e]}function oi(e){return e.trim().split(/^|\s+/)}function Qt(e){return e.classList||new ai(e)}function ai(e){this._node=e,this._names=oi(e.getAttribute("class")||"")}ai.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function si(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function ri(e,t){for(var n=Qt(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function qa(e){return function(){si(this,e)}}function Xa(e){return function(){ri(this,e)}}function Ya(e,t){return function(){(t.apply(this,arguments)?si:ri)(this,e)}}function Wa(e,t){var n=oi(e+"");if(arguments.length<2){for(var i=Qt(this.node()),o=-1,a=n.length;++o<a;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Ya:t?qa:Xa)(n,t))}function Ga(){this.textContent=""}function Ka(e){return function(){this.textContent=e}}function Ja(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Za(e){return arguments.length?this.each(e==null?Ga:(typeof e=="function"?Ja:Ka)(e)):this.node().textContent}function Qa(){this.innerHTML=""}function _a(e){return function(){this.innerHTML=e}}function es(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ts(e){return arguments.length?this.each(e==null?Qa:(typeof e=="function"?es:_a)(e)):this.node().innerHTML}function ns(){this.nextSibling&&this.parentNode.appendChild(this)}function is(){return this.each(ns)}function os(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function as(){return this.each(os)}function ss(e){var t=typeof e=="function"?e:Qn(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rs(){return null}function ls(e,t){var n=typeof e=="function"?e:Qn(e),i=t==null?rs:typeof t=="function"?t:Zt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function us(){var e=this.parentNode;e&&e.removeChild(this)}function cs(){return this.each(us)}function ds(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fs(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hs(e){return this.select(e?fs:ds)}function ms(e){return arguments.length?this.property("__data__",e):this.node().__data__}function gs(e){return function(t){e.call(this,t,this.__data__)}}function vs(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function ys(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ps(e,t,n){return function(){var i=this.__on,o,a=gs(t);if(i){for(var s=0,r=i.length;s<r;++s)if((o=i[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(o):this.__on=[o]}}function ws(e,t,n){var i=vs(e+""),o,a=i.length,s;if(arguments.length<2){var r=this.node().__on;if(r){for(var u=0,c=r.length,l;u<c;++u)for(o=0,l=r[u];o<a;++o)if((s=i[o]).type===l.type&&s.name===l.name)return l.value}return}for(r=t?ps:ys,o=0;o<a;++o)this.each(r(i[o],t,n));return this}function li(e,t,n){var i=ii(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function bs(e,t){return function(){return li(this,e,t)}}function ks(e,t){return function(){return li(this,e,t.apply(this,arguments))}}function xs(e,t){return this.each((typeof t=="function"?ks:bs)(e,t))}function*Is(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,a=i.length,s;o<a;++o)(s=i[o])&&(yield s)}var ui=[null];function le(e,t){this._groups=e,this._parents=t}function _e(){return new le([[document.documentElement]],ui)}function Ss(){return this}le.prototype=_e.prototype={constructor:le,select:Jo,selectAll:ea,selectChild:oa,selectChildren:la,filter:ua,data:ga,enter:ca,exit:ya,join:pa,merge:wa,selection:Ss,order:ba,sort:ka,call:Ia,nodes:Sa,node:$a,size:Ca,empty:Va,each:Aa,attr:za,style:Fa,property:Ua,classed:Wa,text:Za,html:ts,raise:is,lower:as,append:ss,insert:ls,remove:cs,clone:hs,datum:ms,on:ws,dispatch:xs,[Symbol.iterator]:Is};function Se(e){return typeof e=="string"?new le([[document.querySelector(e)]],[document.documentElement]):new le([[e]],ui)}function $s(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xe(e,t){if(e=$s(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Ht={capture:!0,passive:!1};function Ft(e){e.preventDefault(),e.stopImmediatePropagation()}function Cs(e){var t=e.document.documentElement,n=Se(e).on("dragstart.drag",Ft,Ht);"onselectstart"in t?n.on("selectstart.drag",Ft,Ht):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Vs(e,t){var n=e.document.documentElement,i=Se(e).on("dragstart.drag",null);t&&(i.on("click.drag",Ft,Ht),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function _t(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ci(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function et(){}var We=.7,pt=1/We,ze="\\s*([+-]?\\d+)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",As=/^#([0-9a-f]{3,8})$/,Ms=new RegExp(`^rgb\\(${ze},${ze},${ze}\\)$`),Es=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),Ns=new RegExp(`^rgba\\(${ze},${ze},${ze},${Ge}\\)$`),Os=new RegExp(`^rgba\\(${me},${me},${me},${Ge}\\)$`),Rs=new RegExp(`^hsl\\(${Ge},${me},${me}\\)$`),Ts=new RegExp(`^hsla\\(${Ge},${me},${me},${Ge}\\)$`),hn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_t(et,Ke,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHex8:zs,formatHsl:Bs,formatRgb:gn,toString:gn});function mn(){return this.rgb().formatHex()}function zs(){return this.rgb().formatHex8()}function Bs(){return di(this).formatHsl()}function gn(){return this.rgb().formatRgb()}function Ke(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=As.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vn(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?it(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?it(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ms.exec(e))?new ie(t[1],t[2],t[3],1):(t=Es.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ns.exec(e))?it(t[1],t[2],t[3],t[4]):(t=Os.exec(e))?it(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Rs.exec(e))?wn(t[1],t[2]/100,t[3]/100,1):(t=Ts.exec(e))?wn(t[1],t[2]/100,t[3]/100,t[4]):hn.hasOwnProperty(e)?vn(hn[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function vn(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function it(e,t,n,i){return i<=0&&(e=t=n=NaN),new ie(e,t,n,i)}function Ps(e){return e instanceof et||(e=Ke(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function jt(e,t,n,i){return arguments.length===1?Ps(e):new ie(e,t,n,i??1)}function ie(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}_t(ie,jt,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(Ne(this.r),Ne(this.g),Ne(this.b),wt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yn,formatHex:yn,formatHex8:Hs,formatRgb:pn,toString:pn}));function yn(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}`}function Hs(){return`#${Ee(this.r)}${Ee(this.g)}${Ee(this.b)}${Ee((isNaN(this.opacity)?1:this.opacity)*255)}`}function pn(){const e=wt(this.opacity);return`${e===1?"rgb(":"rgba("}${Ne(this.r)}, ${Ne(this.g)}, ${Ne(this.b)}${e===1?")":`, ${e})`}`}function wt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ne(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ee(e){return e=Ne(e),(e<16?"0":"")+e.toString(16)}function wn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,i)}function di(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof et||(e=Ke(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),a=Math.max(t,n,i),s=NaN,r=a-o,u=(a+o)/2;return r?(t===a?s=(n-i)/r+(n<i)*6:n===a?s=(i-t)/r+2:s=(t-n)/r+4,r/=u<.5?a+o:2-a-o,s*=60):r=u>0&&u<1?0:s,new fe(s,r,u,e.opacity)}function Fs(e,t,n,i){return arguments.length===1?di(e):new fe(e,t,n,i??1)}function fe(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}_t(fe,Fs,ci(et,{brighter(e){return e=e==null?pt:Math.pow(pt,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?We:Math.pow(We,e),new fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new ie(Ot(e>=240?e-240:e+120,o,i),Ot(e,o,i),Ot(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new fe(bn(this.h),ot(this.s),ot(this.l),wt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wt(this.opacity);return`${e===1?"hsl(":"hsla("}${bn(this.h)}, ${ot(this.s)*100}%, ${ot(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bn(e){return e=(e||0)%360,e<0?e+360:e}function ot(e){return Math.max(0,Math.min(1,e||0))}function Ot(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const fi=e=>()=>e;function js(e,t){return function(n){return e+n*t}}function Ds(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function Ls(e){return(e=+e)==1?hi:function(t,n){return n-t?Ds(t,n,e):fi(isNaN(t)?n:t)}}function hi(e,t){var n=t-e;return n?js(e,n):fi(isNaN(e)?t:e)}const kn=(function e(t){var n=Ls(t);function i(o,a){var s=n((o=jt(o)).r,(a=jt(a)).r),r=n(o.g,a.g),u=n(o.b,a.b),c=hi(o.opacity,a.opacity);return function(l){return o.r=s(l),o.g=r(l),o.b=u(l),o.opacity=c(l),o+""}}return i.gamma=e,i})(1);function Ie(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Dt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rt=new RegExp(Dt.source,"g");function Us(e){return function(){return e}}function qs(e){return function(t){return e(t)+""}}function Xs(e,t){var n=Dt.lastIndex=Rt.lastIndex=0,i,o,a,s=-1,r=[],u=[];for(e=e+"",t=t+"";(i=Dt.exec(e))&&(o=Rt.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),r[s]?r[s]+=a:r[++s]=a),(i=i[0])===(o=o[0])?r[s]?r[s]+=o:r[++s]=o:(r[++s]=null,u.push({i:s,x:Ie(i,o)})),n=Rt.lastIndex;return n<t.length&&(a=t.slice(n),r[s]?r[s]+=a:r[++s]=a),r.length<2?u[0]?qs(u[0].x):Us(t):(t=u.length,function(c){for(var l=0,d;l<t;++l)r[(d=u[l]).i]=d.x(c);return r.join("")})}var xn=180/Math.PI,Lt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mi(e,t,n,i,o,a){var s,r,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(r=Math.sqrt(n*n+i*i))&&(n/=r,i/=r,u/=r),e*i<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*xn,skewX:Math.atan(u)*xn,scaleX:s,scaleY:r}}var at;function Ys(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lt:mi(t.a,t.b,t.c,t.d,t.e,t.f)}function Ws(e){return e==null||(at||(at=document.createElementNS("http://www.w3.org/2000/svg","g")),at.setAttribute("transform",e),!(e=at.transform.baseVal.consolidate()))?Lt:(e=e.matrix,mi(e.a,e.b,e.c,e.d,e.e,e.f))}function gi(e,t,n,i){function o(c){return c.length?c.pop()+" ":""}function a(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push("translate(",null,t,null,n);w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function s(c,l,d,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,i)-2,x:Ie(c,l)})):l&&d.push(o(d)+"rotate("+l+i)}function r(c,l,d,f){c!==l?f.push({i:d.push(o(d)+"skewX(",null,i)-2,x:Ie(c,l)}):l&&d.push(o(d)+"skewX("+l+i)}function u(c,l,d,f,m,w){if(c!==d||l!==f){var x=m.push(o(m)+"scale(",null,",",null,")");w.push({i:x-4,x:Ie(c,d)},{i:x-2,x:Ie(l,f)})}else(d!==1||f!==1)&&m.push(o(m)+"scale("+d+","+f+")")}return function(c,l){var d=[],f=[];return c=e(c),l=e(l),a(c.translateX,c.translateY,l.translateX,l.translateY,d,f),s(c.rotate,l.rotate,d,f),r(c.skewX,l.skewX,d,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,f),c=l=null,function(m){for(var w=-1,x=f.length,N;++w<x;)d[(N=f[w]).i]=N.x(m);return d.join("")}}}var Gs=gi(Ys,"px, ","px)","deg)"),Ks=gi(Ws,", ",")",")"),Js=1e-12;function In(e){return((e=Math.exp(e))+1/e)/2}function Zs(e){return((e=Math.exp(e))-1/e)/2}function Qs(e){return((e=Math.exp(2*e))-1)/(e+1)}const _s=(function e(t,n,i){function o(a,s){var r=a[0],u=a[1],c=a[2],l=s[0],d=s[1],f=s[2],m=l-r,w=d-u,x=m*m+w*w,N,V;if(x<Js)V=Math.log(f/c)/t,N=function(P){return[r+P*m,u+P*w,c*Math.exp(t*P*V)]};else{var M=Math.sqrt(x),R=(f*f-c*c+i*x)/(2*c*n*M),T=(f*f-c*c-i*x)/(2*f*n*M),q=Math.log(Math.sqrt(R*R+1)-R),Y=Math.log(Math.sqrt(T*T+1)-T);V=(Y-q)/t,N=function(P){var B=P*V,j=In(q),L=c/(n*M)*(j*Qs(t*B+q)-Zs(q));return[r+L*m,u+L*w,c*j/In(t*B+q)]}}return N.duration=V*1e3*t/Math.SQRT2,N}return o.rho=function(a){var s=Math.max(.001,+a),r=s*s,u=r*r;return e(s,r,u)},o})(Math.SQRT2,2,4);var Pe=0,Le=0,Fe=0,vi=1e3,bt,Ue,kt=0,Re=0,At=0,Je=typeof performance=="object"&&performance.now?performance:Date,yi=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function en(){return Re||(yi(er),Re=Je.now()+At)}function er(){Re=0}function xt(){this._call=this._time=this._next=null}xt.prototype=pi.prototype={constructor:xt,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?en():+n)+(t==null?0:+t),!this._next&&Ue!==this&&(Ue?Ue._next=this:bt=this,Ue=this),this._call=e,this._time=n,Ut()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ut())}};function pi(e,t,n){var i=new xt;return i.restart(e,t,n),i}function tr(){en(),++Pe;for(var e=bt,t;e;)(t=Re-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pe}function Sn(){Re=(kt=Je.now())+At,Pe=Le=0;try{tr()}finally{Pe=0,ir(),Re=0}}function nr(){var e=Je.now(),t=e-kt;t>vi&&(At-=t,kt=e)}function ir(){for(var e,t=bt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:bt=n);Ue=e,Ut(i)}function Ut(e){if(!Pe){Le&&(Le=clearTimeout(Le));var t=e-Re;t>24?(e<1/0&&(Le=setTimeout(Sn,e-Je.now()-At)),Fe&&(Fe=clearInterval(Fe))):(Fe||(kt=Je.now(),Fe=setInterval(nr,vi)),Pe=1,yi(Sn))}}function $n(e,t,n){var i=new xt;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var or=Jt("start","end","cancel","interrupt"),ar=[],wi=0,Cn=1,qt=2,dt=3,Vn=4,Xt=5,ft=6;function Mt(e,t,n,i,o,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;sr(e,n,{name:t,index:i,group:o,on:or,tween:ar,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:wi})}function tn(e,t){var n=he(e,t);if(n.state>wi)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=he(e,t);if(n.state>dt)throw new Error("too late; already running");return n}function he(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function sr(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=pi(a,0,n.time);function a(c){n.state=Cn,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var l,d,f,m;if(n.state!==Cn)return u();for(l in i)if(m=i[l],m.name===n.name){if(m.state===dt)return $n(s);m.state===Vn?(m.state=ft,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete i[l]):+l<t&&(m.state=ft,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete i[l])}if($n(function(){n.state===dt&&(n.state=Vn,n.timer.restart(r,n.delay,n.time),r(c))}),n.state=qt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===qt){for(n.state=dt,o=new Array(f=n.tween.length),l=0,d=-1;l<f;++l)(m=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=m);o.length=d+1}}function r(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Xt,1),d=-1,f=o.length;++d<f;)o[d].call(e,l);n.state===Xt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=ft,n.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function ht(e,t){var n=e.__transition,i,o,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((i=n[s]).name!==t){a=!1;continue}o=i.state>qt&&i.state<Xt,i.state=ft,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[s]}a&&delete e.__transition}}function rr(e){return this.each(function(){ht(this,e)})}function lr(e,t){var n,i;return function(){var o=ge(this,e),a=o.tween;if(a!==n){i=n=a;for(var s=0,r=i.length;s<r;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}o.tween=i}}function ur(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var a=ge(this,e),s=a.tween;if(s!==i){o=(i=s).slice();for(var r={name:t,value:n},u=0,c=o.length;u<c;++u)if(o[u].name===t){o[u]=r;break}u===c&&o.push(r)}a.tween=o}}function cr(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=he(this.node(),n).tween,o=0,a=i.length,s;o<a;++o)if((s=i[o]).name===e)return s.value;return null}return this.each((t==null?lr:ur)(n,e,t))}function nn(e,t,n){var i=e._id;return e.each(function(){var o=ge(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return he(o,i).value[t]}}function bi(e,t){var n;return(typeof t=="number"?Ie:t instanceof Ke?kn:(n=Ke(t))?(t=n,kn):Xs)(e,t)}function dr(e){return function(){this.removeAttribute(e)}}function fr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttribute(e);return s===o?null:s===i?a:a=t(i=s,n)}}function mr(e,t,n){var i,o=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===i?a:a=t(i=s,n)}}function gr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function vr(e,t,n){var i,o,a;return function(){var s,r=n(this),u;return r==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=r+"",s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r)))}}function yr(e,t){var n=Vt(e),i=n==="transform"?Ks:bi;return this.attrTween(e,typeof t=="function"?(n.local?vr:gr)(n,i,nn(this,"attr."+e,t)):t==null?(n.local?fr:dr)(n):(n.local?mr:hr)(n,i,t))}function pr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wr(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function br(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&wr(e,a)),n}return o._value=t,o}function kr(e,t){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&pr(e,a)),n}return o._value=t,o}function xr(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=Vt(e);return this.tween(n,(i.local?br:kr)(i,t))}function Ir(e,t){return function(){tn(this,e).delay=+t.apply(this,arguments)}}function Sr(e,t){return t=+t,function(){tn(this,e).delay=t}}function $r(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ir:Sr)(t,e)):he(this.node(),t).delay}function Cr(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Vr(e,t){return t=+t,function(){ge(this,e).duration=t}}function Ar(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cr:Vr)(t,e)):he(this.node(),t).duration}function Mr(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Er(e){var t=this._id;return arguments.length?this.each(Mr(t,e)):he(this.node(),t).ease}function Nr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function Or(e){if(typeof e!="function")throw new Error;return this.each(Nr(this._id,e))}function Rr(e){typeof e!="function"&&(e=ei(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var a=t[o],s=a.length,r=i[o]=[],u,c=0;c<s;++c)(u=a[c])&&e.call(u,u.__data__,c,a)&&r.push(u);return new be(i,this._parents,this._name,this._id)}function Tr(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,a=Math.min(i,o),s=new Array(i),r=0;r<a;++r)for(var u=t[r],c=n[r],l=u.length,d=s[r]=new Array(l),f,m=0;m<l;++m)(f=u[m]||c[m])&&(d[m]=f);for(;r<i;++r)s[r]=t[r];return new be(s,this._parents,this._name,this._id)}function zr(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Br(e,t,n){var i,o,a=zr(t)?tn:ge;return function(){var s=a(this,e),r=s.on;r!==i&&(o=(i=r).copy()).on(t,n),s.on=o}}function Pr(e,t){var n=this._id;return arguments.length<2?he(this.node(),n).on.on(e):this.each(Br(n,e,t))}function Hr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fr(){return this.on("end.remove",Hr(this._id))}function jr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zt(e));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var r=i[s],u=r.length,c=a[s]=new Array(u),l,d,f=0;f<u;++f)(l=r[f])&&(d=e.call(l,l.__data__,f,r))&&("__data__"in l&&(d.__data__=l.__data__),c[f]=d,Mt(c[f],t,n,f,c,he(l,n)));return new be(a,this._parents,t,n)}function Dr(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_n(e));for(var i=this._groups,o=i.length,a=[],s=[],r=0;r<o;++r)for(var u=i[r],c=u.length,l,d=0;d<c;++d)if(l=u[d]){for(var f=e.call(l,l.__data__,d,u),m,w=he(l,n),x=0,N=f.length;x<N;++x)(m=f[x])&&Mt(m,t,n,x,f,w);a.push(f),s.push(l)}return new be(a,s,t,n)}var Lr=_e.prototype.constructor;function Ur(){return new Lr(this._groups,this._parents)}function qr(e,t){var n,i,o;return function(){var a=Be(this,e),s=(this.style.removeProperty(e),Be(this,e));return a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function ki(e){return function(){this.style.removeProperty(e)}}function Xr(e,t,n){var i,o=n+"",a;return function(){var s=Be(this,e);return s===o?null:s===i?a:a=t(i=s,n)}}function Yr(e,t,n){var i,o,a;return function(){var s=Be(this,e),r=n(this),u=r+"";return r==null&&(u=r=(this.style.removeProperty(e),Be(this,e))),s===u?null:s===i&&u===o?a:(o=u,a=t(i=s,r))}}function Wr(e,t){var n,i,o,a="style."+t,s="end."+a,r;return function(){var u=ge(this,e),c=u.on,l=u.value[a]==null?r||(r=ki(t)):void 0;(c!==n||o!==l)&&(i=(n=c).copy()).on(s,o=l),u.on=i}}function Gr(e,t,n){var i=(e+="")=="transform"?Gs:bi;return t==null?this.styleTween(e,qr(e,i)).on("end.style."+e,ki(e)):typeof t=="function"?this.styleTween(e,Yr(e,i,nn(this,"style."+e,t))).each(Wr(this._id,e)):this.styleTween(e,Xr(e,i,t),n).on("end.style."+e,null)}function Kr(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function Jr(e,t,n){var i,o;function a(){var s=t.apply(this,arguments);return s!==o&&(i=(o=s)&&Kr(e,s,n)),i}return a._value=t,a}function Zr(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Jr(e,t,n??""))}function Qr(e){return function(){this.textContent=e}}function _r(e){return function(){var t=e(this);this.textContent=t??""}}function el(e){return this.tween("text",typeof e=="function"?_r(nn(this,"text",e)):Qr(e==null?"":e+""))}function tl(e){return function(t){this.textContent=e.call(this,t)}}function nl(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&tl(o)),t}return i._value=e,i}function il(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,nl(e))}function ol(){for(var e=this._name,t=this._id,n=xi(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)if(u=s[c]){var l=he(u,t);Mt(u,e,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new be(i,this._parents,e,n)}function al(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(a,s){var r={value:s},u={value:function(){--o===0&&a()}};n.each(function(){var c=ge(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(u)),c.on=t}),o===0&&a()})}var sl=0;function be(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function xi(){return++sl}var ve=_e.prototype;be.prototype={constructor:be,select:jr,selectAll:Dr,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:Rr,merge:Tr,selection:Ur,transition:ol,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:Pr,attr:yr,attrTween:xr,style:Gr,styleTween:Zr,text:el,textTween:il,remove:Fr,tween:cr,delay:$r,duration:Ar,ease:Er,easeVarying:Or,end:al,[Symbol.iterator]:ve[Symbol.iterator]};function rl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ll={time:null,delay:0,duration:250,ease:rl};function ul(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function cl(e){var t,n;e instanceof be?(t=e._id,e=e._name):(t=xi(),(n=ll).time=en(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s=i[a],r=s.length,u,c=0;c<r;++c)(u=s[c])&&Mt(u,e,t,c,s,n||ul(u,t));return new be(i,this._parents,e,t)}_e.prototype.interrupt=rr;_e.prototype.transition=cl;const st=e=>()=>e;function dl(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function pe(e,t,n){this.k=e,this.x=t,this.y=n}pe.prototype={constructor:pe,scale:function(e){return e===1?this:new pe(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new pe(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var on=new pe(1,0,0);pe.prototype;function Tt(e){e.stopImmediatePropagation()}function je(e){e.preventDefault(),e.stopImmediatePropagation()}function fl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hl(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function An(){return this.__zoom||on}function ml(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function gl(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function yl(){var e=fl,t=hl,n=vl,i=ml,o=gl,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],r=250,u=_s,c=Jt("start","zoom","end"),l,d,f,m=500,w=150,x=0,N=10;function V(g){g.property("__zoom",An).on("wheel.zoom",B,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",L).filter(o).on("touchstart.zoom",Q).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}V.transform=function(g,p,y,S){var b=g.selection?g.selection():g;b.property("__zoom",An),g!==b?q(g,p,y,S):b.interrupt().each(function(){Y(this,arguments).event(S).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()})},V.scaleBy=function(g,p,y,S){V.scaleTo(g,function(){var b=this.__zoom.k,E=typeof p=="function"?p.apply(this,arguments):p;return b*E},y,S)},V.scaleTo=function(g,p,y,S){V.transform(g,function(){var b=t.apply(this,arguments),E=this.__zoom,$=y==null?T(b):typeof y=="function"?y.apply(this,arguments):y,H=E.invert($),W=typeof p=="function"?p.apply(this,arguments):p;return n(R(M(E,W),$,H),b,s)},y,S)},V.translateBy=function(g,p,y,S){V.transform(g,function(){return n(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof y=="function"?y.apply(this,arguments):y),t.apply(this,arguments),s)},null,S)},V.translateTo=function(g,p,y,S,b){V.transform(g,function(){var E=t.apply(this,arguments),$=this.__zoom,H=S==null?T(E):typeof S=="function"?S.apply(this,arguments):S;return n(on.translate(H[0],H[1]).scale($.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof y=="function"?-y.apply(this,arguments):-y),E,s)},S,b)};function M(g,p){return p=Math.max(a[0],Math.min(a[1],p)),p===g.k?g:new pe(p,g.x,g.y)}function R(g,p,y){var S=p[0]-y[0]*g.k,b=p[1]-y[1]*g.k;return S===g.x&&b===g.y?g:new pe(g.k,S,b)}function T(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function q(g,p,y,S){g.on("start.zoom",function(){Y(this,arguments).event(S).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(S).end()}).tween("zoom",function(){var b=this,E=arguments,$=Y(b,E).event(S),H=t.apply(b,E),W=y==null?T(H):typeof y=="function"?y.apply(b,E):y,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),K=b.__zoom,_=typeof p=="function"?p.apply(b,E):p,se=u(K.invert(W).concat(G/K.k),_.invert(W).concat(G/_.k));return function(re){if(re===1)re=_;else{var de=se(re),Et=G/de[2];re=new pe(Et,W[0]-de[0]*Et,W[1]-de[1]*Et)}$.zoom(null,re)}})}function Y(g,p,y){return!y&&g.__zooming||new P(g,p)}function P(g,p){this.that=g,this.args=p,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,p),this.taps=0}P.prototype={event:function(g){return g&&(this.sourceEvent=g),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(g,p){return this.mouse&&g!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&g!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&g!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(g){var p=Se(this.that).datum();c.call(g,this.that,new dl(g,{sourceEvent:this.sourceEvent,target:V,transform:this.that.__zoom,dispatch:c}),p)}};function B(g,...p){if(!e.apply(this,arguments))return;var y=Y(this,p).event(g),S=this.__zoom,b=Math.max(a[0],Math.min(a[1],S.k*Math.pow(2,i.apply(this,arguments)))),E=xe(g);if(y.wheel)(y.mouse[0][0]!==E[0]||y.mouse[0][1]!==E[1])&&(y.mouse[1]=S.invert(y.mouse[0]=E)),clearTimeout(y.wheel);else{if(S.k===b)return;y.mouse=[E,S.invert(E)],ht(this),y.start()}je(g),y.wheel=setTimeout($,w),y.zoom("mouse",n(R(M(S,b),y.mouse[0],y.mouse[1]),y.extent,s));function $(){y.wheel=null,y.end()}}function j(g,...p){if(f||!e.apply(this,arguments))return;var y=g.currentTarget,S=Y(this,p,!0).event(g),b=Se(g.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",G,!0),E=xe(g,y),$=g.clientX,H=g.clientY;Cs(g.view),Tt(g),S.mouse=[E,this.__zoom.invert(E)],ht(this),S.start();function W(K){if(je(K),!S.moved){var _=K.clientX-$,se=K.clientY-H;S.moved=_*_+se*se>x}S.event(K).zoom("mouse",n(R(S.that.__zoom,S.mouse[0]=xe(K,y),S.mouse[1]),S.extent,s))}function G(K){b.on("mousemove.zoom mouseup.zoom",null),Vs(K.view,S.moved),je(K),S.event(K).end()}}function L(g,...p){if(e.apply(this,arguments)){var y=this.__zoom,S=xe(g.changedTouches?g.changedTouches[0]:g,this),b=y.invert(S),E=y.k*(g.shiftKey?.5:2),$=n(R(M(y,E),S,b),t.apply(this,p),s);je(g),r>0?Se(this).transition().duration(r).call(q,$,S,g):Se(this).call(V.transform,$,S,g)}}function Q(g,...p){if(e.apply(this,arguments)){var y=g.touches,S=y.length,b=Y(this,p,g.changedTouches.length===S).event(g),E,$,H,W;for(Tt(g),$=0;$<S;++$)H=y[$],W=xe(H,this),W=[W,this.__zoom.invert(W),H.identifier],b.touch0?!b.touch1&&b.touch0[2]!==W[2]&&(b.touch1=W,b.taps=0):(b.touch0=W,E=!0,b.taps=1+!!l);l&&(l=clearTimeout(l)),E&&(b.taps<2&&(d=W[0],l=setTimeout(function(){l=null},m)),ht(this),b.start())}}function ee(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$,H,W;for(je(g),E=0;E<b;++E)$=S[E],H=xe($,this),y.touch0&&y.touch0[2]===$.identifier?y.touch0[0]=H:y.touch1&&y.touch1[2]===$.identifier&&(y.touch1[0]=H);if($=y.that.__zoom,y.touch1){var G=y.touch0[0],K=y.touch0[1],_=y.touch1[0],se=y.touch1[1],re=(re=_[0]-G[0])*re+(re=_[1]-G[1])*re,de=(de=se[0]-K[0])*de+(de=se[1]-K[1])*de;$=M($,Math.sqrt(re/de)),H=[(G[0]+_[0])/2,(G[1]+_[1])/2],W=[(K[0]+se[0])/2,(K[1]+se[1])/2]}else if(y.touch0)H=y.touch0[0],W=y.touch0[1];else return;y.zoom("touch",n(R($,H,W),y.extent,s))}}function ae(g,...p){if(this.__zooming){var y=Y(this,p).event(g),S=g.changedTouches,b=S.length,E,$;for(Tt(g),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),E=0;E<b;++E)$=S[E],y.touch0&&y.touch0[2]===$.identifier?delete y.touch0:y.touch1&&y.touch1[2]===$.identifier&&delete y.touch1;if(y.touch1&&!y.touch0&&(y.touch0=y.touch1,delete y.touch1),y.touch0)y.touch0[1]=this.__zoom.invert(y.touch0[0]);else if(y.end(),y.taps===2&&($=xe($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<N)){var H=Se(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return V.wheelDelta=function(g){return arguments.length?(i=typeof g=="function"?g:st(+g),V):i},V.filter=function(g){return arguments.length?(e=typeof g=="function"?g:st(!!g),V):e},V.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:st(!!g),V):o},V.extent=function(g){return arguments.length?(t=typeof g=="function"?g:st([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),V):t},V.scaleExtent=function(g){return arguments.length?(a[0]=+g[0],a[1]=+g[1],V):[a[0],a[1]]},V.translateExtent=function(g){return arguments.length?(s[0][0]=+g[0][0],s[1][0]=+g[1][0],s[0][1]=+g[0][1],s[1][1]=+g[1][1],V):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},V.constrain=function(g){return arguments.length?(n=g,V):n},V.duration=function(g){return arguments.length?(r=+g,V):r},V.interpolate=function(g){return arguments.length?(u=g,V):u},V.on=function(){var g=c.on.apply(c,arguments);return g===c?V:g},V.clickDistance=function(g){return arguments.length?(x=(g=+g)*g,V):Math.sqrt(x)},V.tapDistance=function(g){return arguments.length?(N=+g,V):N},V}const Ii=Symbol("MiniMapSlots"),pl=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],wl={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},bl=X({...wl,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=Qi(Ii),o=Hn(),a=qe(()=>o.style??{});function s(d){t("click",d)}function r(d){t("dblclick",d)}function u(d){t("mouseenter",d)}function c(d){t("mousemove",d)}function l(d){t("mouseleave",d)}return(d,f)=>!d.hidden&&d.dimensions.width!==0&&d.dimensions.height!==0?(v(),O(D,{key:0},[h(i)[`node-${n.type}`]?(v(),C(_i(h(i)[`node-${n.type}`]),$e(Oe({key:0},{...n,...d.$attrs})),null,16)):(v(),O("rect",Oe({key:1,id:d.id},d.$attrs,{class:["vue-flow__minimap-node",{selected:d.selected,dragging:d.dragging}],x:d.position.x,y:d.position.y,rx:d.borderRadius,ry:d.borderRadius,width:d.dimensions.width,height:d.dimensions.height,fill:d.color||a.value.background||a.value.backgroundColor,stroke:d.strokeColor,"stroke-width":d.strokeWidth,"shape-rendering":d.shapeRendering,onClick:s,onDblclick:r,onMouseenter:u,onMousemove:c,onMouseleave:l}),null,16,pl))],64)):z("",!0)}}),kl=["width","height","viewBox","aria-labelledby"],xl=["id"],Il=["d","fill","stroke","stroke-width"],Sl={name:"MiniMap",compatConfig:{MODE:3}},$l=X({...Sl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=Ji(),i=Hn(),o=200,a=150,{id:s,edges:r,viewport:u,translateExtent:c,dimensions:l,emits:d,d3Selection:f,d3Zoom:m,getNodesInitialized:w}=Yt(),x=ce();eo(Ii,n);const N=qe(()=>{var b;return e.width??((b=i.style)==null?void 0:b.width)??o}),V=qe(()=>{var b;return e.height??((b=i.style)==null?void 0:b.height)??a}),M=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",R=A(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),T=A(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),q=A(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),Y=A(()=>Pi(w.value.filter(b=>!b.hidden))),P=A(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),B=A(()=>w.value&&w.value.length?Bi(Y.value,P.value):P.value),j=A(()=>{const b=B.value.width/N.value,E=B.value.height/V.value;return Math.max(b,E)}),L=A(()=>{const b=j.value*N.value,E=j.value*V.value,$=e.offsetScale*j.value;return{offset:$,x:B.value.x-(b-B.value.width)/2-$,y:B.value.y-(E-B.value.height)/2-$,width:b+$*2,height:E+$*2}}),Q=A(()=>!L.value.x||!L.value.y?"":`
|
|
2
2
|
M${L.value.x-L.value.offset},${L.value.y-L.value.offset}
|
|
3
3
|
h${L.value.width+L.value.offset*2}
|
|
4
4
|
v${L.value.height+L.value.offset*2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as a,J as n,a2 as e,W as o,a0 as i,aa as l,V as r,as as m}from"./
|
|
1
|
+
import{E as a,J as n,a2 as e,W as o,a0 as i,aa as l,V as r,as as m}from"./sB5TSp0H.js";const u={class:"d-flex justify-space-between mb-2"},d={class:"font-weight-medium"},f=a({__name:"about",setup(c){return(t,s)=>(r(),n(l,null,[s[1]||(s[1]=e("div",{class:"d-flex align-center justify-space-between"},[e("div",null,[e("h2",{class:"text-h5 font-weight-medium mb-1"},"About Highstate Designer"),e("p",{class:"text-body-2 text-medium-emphasis ma-0"}," A powerful infrastructure-as-code management tool that helps you design, deploy, and manage cloud infrastructure with ease. ")])],-1)),o(m,{class:"mt-6 mb-6"}),e("div",u,[s[0]||(s[0]=e("span",null,"Version:",-1)),e("span",d,i(t.$config.public.version),1)])],64))}});export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as I,l as f}from"#entry";import{E as d,u as j,M as g,V as p,Y as m,D as s,_ as w,W as x}from"./
|
|
1
|
+
import{s as I,l as f}from"#entry";import{E as d,u as j,M as g,V as p,Y as m,D as s,_ as w,W as x}from"./sB5TSp0H.js";import{G as L}from"./BXphdu9w.js";import{P}from"./DnpKvmH_.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./BupMEc6X.js";const b=d({__name:"InstanceLogsPanel",props:{operationId:{},stateId:{}},setup(t){const{projectStore:c}=I(),{$client:n}=j();let a=null;const i=e=>{const o=e.split(`
|
|
2
2
|
`);for(const r of o)a.writeln(r)},{unsubscribe:l}=n.logs.watchInstanceLogs.subscribe({operationId:t.operationId,stateId:t.stateId},{onData:e=>{a&&i(e.content)}});g(l);const u=async e=>{a=e;const o=await n.logs.getInstanceLogs.query({projectId:c.projectId,stateId:t.stateId,operationId:t.operationId});for(const r of o)i(r.content)};return(e,o)=>(p(),m(s(L),{onLoad:u}))}}),E=d({__name:"[stateId]",props:{params:{}},setup(t){return f(t.params.projectId),(c,n)=>(p(),m(s(P),{"project-id":t.params.projectId,"can-unlock":""},{default:w(()=>[x(s(b),{"operation-id":t.params.operationId,"state-id":t.params.stateId},null,8,["operation-id","state-id"])]),_:1},8,["project-id"]))}});export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"#entry";import{_ as c}from"./
|
|
1
|
+
import"#entry";import{_ as c}from"./DSpiceQe.js";import{_ as d}from"./GXzlut8R.js";import{E as f,V as i,Y as a,D as m,ao as o,_ as s,$ as n,W as r,Z as l}from"./sB5TSp0H.js";const I=f({__name:"OwnerRefChip",props:{item:{}},setup(t){return(u,e)=>t.item.stateId?(i(),a(m(d),{key:0,item:{stateId:t.item.stateId}},null,8,["item"])):t.item.serviceAccountId?(i(),a(m(c),{key:1,item:{serviceAccountId:t.item.serviceAccountId,serviceAccountMeta:t.item.serviceAccountMeta}},null,8,["item"])):t.item.systemName?(i(),a(o,{key:2,color:"info",variant:"flat",size:"small",class:"font-weight-bold"},{prepend:s(()=>[r(l,{class:"mr-1"},{default:s(()=>[...e[0]||(e[0]=[n("mdi-crown",-1)])]),_:1})]),default:s(()=>[e[1]||(e[1]=n(" system ",-1))]),_:1})):(i(),a(o,{key:3,color:"secondary",variant:"flat",size:"small",class:"font-weight-bold"},{prepend:s(()=>[r(l,{class:"mr-1"},{default:s(()=>[...e[2]||(e[2]=[n("mdi-help-circle",-1)])]),_:1})]),default:s(()=>[e[3]||(e[3]=n(" unknown ",-1))]),_:1}))}});export{I as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as D,t as N}from"#entry";import"./
|
|
1
|
+
import{s as D,t as N}from"#entry";import"./BCJKqJxW.js";import{S as H}from"./hAFXcJ2_.js";import{S as E,b as w}from"./B2SoM2pd.js";import{u as J}from"./M3Z1JMP1.js";import{_ as R}from"./DkkrdwgN.js";import{_ as W}from"./Bu1xs0Fv.js";import{E as B,aG as M,w as G,V as b,Y as U,_ as l,W as o,ai as S,aj as F,D as t,aI as $,$ as v,a0 as T,a1 as I,aJ as A,aK as z,at as C,ah as L,aP as P,r as k,aL as K,Z as O,a2 as V,aO as x,J as Y,a as j,aa as Z}from"./sB5TSp0H.js";import{_ as q,c as Q}from"./DtBrxin9.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./CBVcjGJL.js";import"./CemiMtCX.js";import"./BupMEc6X.js";const X=B({__name:"CreateUnlockMethodDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:P(["created"],["update:visible"]),setup(r,{emit:g}){const n=M(r,"visible"),s=g,{settingsStore:c}=D(),p=k(!1),u=k(!1),m=k(null),h=k(),e=k({type:"password",title:"",description:"",password:"",confirmPassword:""}),i=()=>{n.value=!1,h.value?.resetForm(),m.value=null},y=async()=>{if(p.value){u.value=!0,m.value=null;try{const a=await Q(e.value);await c.addUnlockMethod(a),n.value=!1,h.value?.resetForm(),m.value=null,s("created")}catch(a){console.error("Failed to create unlock method:",a),m.value="Some error occurred"}finally{u.value=!1}}};return G(n,a=>{a||(h.value?.resetForm(),m.value=null)}),(a,d)=>(b(),U(L,{modelValue:n.value,"onUpdate:modelValue":d[2]||(d[2]=f=>n.value=f),"max-width":"600px"},{default:l(()=>[o(S,{title:"Create Unlock Method"},{default:l(()=>[o(F,null,{default:l(()=>[o(q,{ref_key:"unlockMethodForm",ref:h,"onUpdate:valid":d[0]||(d[0]=f=>p.value=f),"onUpdate:form":d[1]||(d[1]=f=>e.value=f)},null,512),t(m)?(b(),U($,{key:0,type:"error",density:"compact",class:"mb-4"},{default:l(()=>[v(T(t(m)),1)]),_:1})):I("",!0)]),_:1}),o(A,null,{default:l(()=>[o(z),o(C,{disabled:t(u),onClick:i},{default:l(()=>[...d[3]||(d[3]=[v("Cancel",-1)])]),_:1},8,["disabled"]),o(C,{color:"primary",disabled:!t(p),loading:t(u),onClick:y},{default:l(()=>[...d[4]||(d[4]=[v(" Create ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),_={class:"mb-3"},ee=B({__name:"DeleteUnlockMethodDialog",props:P({unlockMethod:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:P(["confirm"],["update:visible"]),setup(r,{emit:g}){const n=M(r,"visible"),s=r,c=g,p=k(!1),u=()=>{s.unlockMethod&&c("confirm",s.unlockMethod)},m=()=>{n.value=!1};return(h,e)=>(b(),U(L,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=i=>n.value=i),"max-width":"500px"},{default:l(()=>[r.unlockMethod?(b(),U(S,{key:0},{default:l(()=>[o(K,{class:"d-flex align-center"},{default:l(()=>[o(O,{class:"mr-2 text-error"},{default:l(()=>[...e[1]||(e[1]=[v("mdi-alert-circle-outline",-1)])]),_:1}),e[2]||(e[2]=v(" Delete Unlock Method ",-1))]),_:1}),o(F,null,{default:l(()=>[V("p",_,[e[3]||(e[3]=v(" Are you sure you want to delete the unlock method ",-1)),V("strong",null,'"'+T(r.unlockMethod.meta.title)+'"',1),e[4]||(e[4]=v(" ? ",-1))]),o($,{type:"warning",density:"compact"},{default:l(()=>[...e[5]||(e[5]=[V("strong",null,"Warning:",-1),v(" Deleting this unlock method will permanently remove your ability to unlock the project using this method. Make sure you have at least one other unlock method configured before proceeding. ",-1)])]),_:1})]),_:1}),o(A,null,{default:l(()=>[o(z),o(C,{disabled:t(p),onClick:m},{default:l(()=>[...e[6]||(e[6]=[v("Cancel",-1)])]),_:1},8,["disabled"]),o(C,{color:"error",loading:t(p),onClick:u},{default:l(()=>[...e[7]||(e[7]=[v("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})):I("",!0)]),_:1},8,["modelValue"]))}}),te={class:"d-flex align-center gap-1"},ae=B({__name:"UnlockMethodsTable",props:P({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:P(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(r,{emit:g}){const n=g,s=M(r,"search"),c=M(r,"sortBy"),p=M(r,"page"),u=M(r,"itemsPerPage"),m=[{key:"type",title:"Type"},w.name,w.id,w.createdAt,w.actions];return(h,e)=>(b(),U(t(E),{search:s.value,"onUpdate:search":e[0]||(e[0]=i=>s.value=i),"sort-by":c.value,"onUpdate:sortBy":e[1]||(e[1]=i=>c.value=i),page:p.value,"onUpdate:page":e[2]||(e[2]=i=>p.value=i),"items-per-page":u.value,"onUpdate:itemsPerPage":e[3]||(e[3]=i=>u.value=i),headers:m,data:r.data,loading:r.loading,"hide-header":r.hideHeader,height:r.height},{"item.type":l(({item:i})=>[o(t(R),{status:i.type,"status-map":t(J)},null,8,["status","status-map"])]),"item.actions":l(({item:i})=>[V("div",te,[o(t(W),{"page-name":"settings.unlock-method-details","page-params":{projectId:r.projectId,unlockMethodId:i.id}},null,8,["page-params"]),o(C,{variant:"text",icon:"mdi-delete",size:"small",color:"error",onClick:y=>n("delete",i)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),ke=B({__name:"index",async setup(r){let g,n;const{settingsStore:s}=D(),{projectStore:c}=D();c.initializing?([g,n]=x(()=>N(()=>c.initialized).toBe(!0)),await g,n(),c.addLibraryRoot()):([g,n]=x(()=>c.initialize1()),await g,n(),[g,n]=x(()=>c.initialize2()),await g,n()),s.unlockMethods.load();const p=k(!1),u=k(!1),m=k(null),h=k(!1),e=y=>{m.value=y,u.value=!0},i=async y=>{h.value=!0;try{await s.removeUnlockMethod(y.id),u.value=!1,m.value=null}catch(a){console.error("Failed to delete unlock method:",a)}finally{h.value=!1}};return(y,a)=>(b(),Y(Z,null,[o(t(H),{title:"Unlock Methods",icon:"mdi-lock-open-outline",description:"Manage the methods used to unlock and access this project's encrypted data."},{actions:l(()=>[o(C,{color:"primary","prepend-icon":"mdi-plus",onClick:a[0]||(a[0]=d=>p.value=!0)},{default:l(()=>[...a[7]||(a[7]=[v(" Add Unlock Method ",-1)])]),_:1})]),default:l(({height:d})=>[o(t(ae),{search:t(s).unlockMethods.search,"onUpdate:search":a[1]||(a[1]=f=>t(s).unlockMethods.search=f),"sort-by":t(s).unlockMethods.sortBy,"onUpdate:sortBy":a[2]||(a[2]=f=>t(s).unlockMethods.sortBy=f),page:t(s).unlockMethods.page,"onUpdate:page":a[3]||(a[3]=f=>t(s).unlockMethods.page=f),"items-per-page":t(s).unlockMethods.itemsPerPage,"onUpdate:itemsPerPage":a[4]||(a[4]=f=>t(s).unlockMethods.itemsPerPage=f),"project-id":t(c).projectId,data:t(s).unlockMethods.data,loading:t(s).unlockMethods.isLoading,height:d,onDelete:e},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}),o(t(X),{visible:t(p),"onUpdate:visible":a[5]||(a[5]=d=>j(p)?p.value=d:null)},null,8,["visible"]),o(t(ee),{visible:t(u),"onUpdate:visible":a[6]||(a[6]=d=>j(u)?u.value=d:null),"unlock-method":t(m),onConfirm:i},null,8,["visible","unlock-method"])],64))}});export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as p,_ as i}from"#entry";import{E as r,V as l,Y as d,at as m,D as e,_ as o,W as u,Z as _,$ as f,a0 as x,j as y}from"./
|
|
1
|
+
import{M as p,_ as i}from"#entry";import{E as r,V as l,Y as d,at as m,D as e,_ as o,W as u,Z as _,$ as f,a0 as x,j as y}from"./sB5TSp0H.js";const C=r({__name:"InlineCopyButton",props:{content:{}},setup(n){const{copy:a,copied:s}=p(),c=y(()=>s.value?"mdi-check":"mdi-content-copy");return(B,t)=>(l(),d(m,{size:"small",variant:"text",class:"copy-button d-flex ml-1",onClick:t[0]||(t[0]=I=>e(a)(n.content))},{default:o(()=>[u(_,{size:16},{default:o(()=>[f(x(e(c)),1)]),_:1})]),_:1}))}}),v=i(C,[["__scopeId","data-v-6bf4888a"]]);export{v as I};
|