openpond 0.2.46 → 0.2.48
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/dist/app-server.d.ts +157 -1
- package/dist/app-server.js +1 -1
- package/dist/chunks/{actions-command-I3NI75P2.js → actions-command-DSO6YOEE.js} +1 -1
- package/dist/chunks/{app-layer-B3SMVO4B.js → app-layer-RRFI27N4.js} +1 -1
- package/dist/chunks/app-server-runtime-RWO4KGPU.js +2 -0
- package/dist/chunks/{apps-OA2VX34V.js → apps-NELJL377.js} +1 -1
- package/dist/chunks/{chunk-4UTIEH5H.js → chunk-2SPZYBDN.js} +1 -1
- package/dist/chunks/{chunk-LL4QP2IM.js → chunk-2ZJJFBIA.js} +1 -1
- package/dist/chunks/{chunk-HP2D3W2B.js → chunk-42GOV5ZU.js} +3 -3
- package/dist/chunks/{chunk-PGKEDR3S.js → chunk-5CMKGD43.js} +1 -1
- package/dist/chunks/{chunk-D6MQTNJ3.js → chunk-7K72KS5C.js} +6 -6
- package/dist/chunks/{chunk-JBHAU7PH.js → chunk-7MXZJQS7.js} +137 -137
- package/dist/chunks/{chunk-YSYXIJ46.js → chunk-7QEE4PBI.js} +1 -1
- package/dist/chunks/{chunk-F2AG46CV.js → chunk-7YR6CBNU.js} +1 -1
- package/dist/chunks/{chunk-UWO34HP6.js → chunk-DALJMSJG.js} +2 -2
- package/dist/chunks/chunk-DFM5JTS2.js +2 -0
- package/dist/chunks/{chunk-33AO3P6X.js → chunk-DLZP22WV.js} +1 -1
- package/dist/chunks/{chunk-BKMGBIBT.js → chunk-EMKZVP7Z.js} +1 -1
- package/dist/chunks/chunk-EPY7M5XS.js +2 -0
- package/dist/chunks/{chunk-ZJY2L43W.js → chunk-HA7EFTPF.js} +1 -1
- package/dist/chunks/{chunk-HK3WGUKK.js → chunk-IKWDL3RB.js} +1 -1
- package/dist/chunks/chunk-IOQUF34U.js +2 -0
- package/dist/chunks/chunk-JCCU3VFK.js +2 -0
- package/dist/chunks/{chunk-ZC57DX6D.js → chunk-JDLAHVAJ.js} +1 -1
- package/dist/chunks/{chunk-WWABOVRW.js → chunk-LVL4TIAO.js} +2 -2
- package/dist/chunks/{chunk-IV7F74JJ.js → chunk-MASJQWA2.js} +1 -1
- package/dist/chunks/{chunk-XLDW5NN3.js → chunk-N3DEA6PG.js} +1 -1
- package/dist/chunks/{chunk-F5DUN73H.js → chunk-N5QNXMIS.js} +1 -1
- package/dist/chunks/{chunk-MCRA6ZGJ.js → chunk-NAZ26IZL.js} +1 -1
- package/dist/chunks/chunk-NHJ26KXF.js +518 -0
- package/dist/chunks/chunk-NNF6KCHD.js +3 -0
- package/dist/chunks/{chunk-5OGRWWEH.js → chunk-O7VGFMDO.js} +1 -1
- package/dist/chunks/{chunk-USWZ3KUC.js → chunk-PA7XP42P.js} +1 -1
- package/dist/chunks/{chunk-BQNK2NMB.js → chunk-PJM2G7SG.js} +1 -1
- package/dist/chunks/chunk-PNE3IETM.js +190 -0
- package/dist/chunks/chunk-PYABBF53.js +53 -0
- package/dist/chunks/{chunk-TYWBEJOA.js → chunk-Q4H3NUVW.js} +2 -2
- package/dist/chunks/{chunk-HO5L2FUU.js → chunk-QJRXTIOC.js} +1 -1
- package/dist/chunks/chunk-QRWPEW3Z.js +24 -0
- package/dist/chunks/{chunk-LZSY5IM3.js → chunk-QXVIIM4T.js} +1 -1
- package/dist/chunks/{chunk-6SJZXZNA.js → chunk-R3XFY7VL.js} +1 -1
- package/dist/chunks/{chunk-EWS7MXTM.js → chunk-RLZPX4YP.js} +1 -1
- package/dist/chunks/{chunk-VW7D3DRM.js → chunk-SDEDAHV6.js} +72 -67
- package/dist/chunks/{chunk-BUFQKDAW.js → chunk-T5LE6R5S.js} +1 -1
- package/dist/chunks/{chunk-L4BYPZ4U.js → chunk-TGIB24K4.js} +1 -1
- package/dist/chunks/{chunk-D6E7JBBQ.js → chunk-TIUSKRBP.js} +4 -4
- package/dist/chunks/{chunk-6WLJWRMF.js → chunk-UJ5EFSEC.js} +1 -1
- package/dist/chunks/chunk-VOIH2BQA.js +2162 -0
- package/dist/chunks/{chunk-KE5RH6JA.js → chunk-WITSXYEW.js} +1 -1
- package/dist/chunks/chunk-WV2APYWG.js +2 -0
- package/dist/chunks/chunk-XBCIBAXD.js +4 -0
- package/dist/chunks/chunk-XDMUD4FW.js +5 -0
- package/dist/chunks/{chunk-DNXKIIV7.js → chunk-XM26DGML.js} +1 -1
- package/dist/chunks/{chunk-OGXSE57Z.js → chunk-YIB3J4RC.js} +1 -1
- package/dist/chunks/{chunk-H6W55CQG.js → chunk-YL6VFJ4P.js} +1 -1
- package/dist/chunks/cli-ZLDLOKPL.js +2 -0
- package/dist/chunks/{configuration-command-MVZS625X.js → configuration-command-SA56RV5B.js} +1 -1
- package/dist/chunks/{connected-evidence-7LHUZ2UI.js → connected-evidence-IVSQZYIB.js} +1 -1
- package/dist/chunks/{continual-K5JNHNQH.js → continual-PKK2BOTB.js} +1 -1
- package/dist/chunks/core-commands-W5IGIITV.js +2 -0
- package/dist/chunks/{datasets-KDN2EXHE.js → datasets-KSO2UG6R.js} +1 -1
- package/dist/chunks/{desktop-test-WIOEKMPR.js → desktop-test-6HXFM7PO.js} +1 -1
- package/dist/chunks/{dist-JBE7DPFZ.js → dist-4HV2W6V4.js} +1 -1
- package/dist/chunks/{dist-3MTJ7VM6.js → dist-BLBZENVB.js} +1 -1
- package/dist/chunks/{evaluation-coordination-NGYHL7HG.js → evaluation-coordination-MOFBXRXN.js} +1 -1
- package/dist/chunks/{experiment-improvements-2M7GRGWS.js → experiment-improvements-TDHM6NEA.js} +1 -1
- package/dist/chunks/{experiments-B6CRZ3GI.js → experiments-HFPDFD4I.js} +1 -1
- package/dist/chunks/{extension-RZTMK3ON.js → extension-R373LYIB.js} +1 -1
- package/dist/chunks/{help-EISFHH2F.js → help-PEFQDDTA.js} +1 -1
- package/dist/chunks/{hosted-experiment-improvement-6CHH65DX.js → hosted-experiment-improvement-MGMZWTZY.js} +1 -1
- package/dist/chunks/hosted-harness-runtime-FZZLWLBR.js +2 -0
- package/dist/chunks/{hosted-profile-candidate-HYEISIAC.js → hosted-profile-candidate-LVNKOTKJ.js} +1 -1
- package/dist/chunks/hosted-profile-compiler-PQFIWO5B.js +2 -0
- package/dist/chunks/{hosted-profile-evaluation-control-LV6YXOG7.js → hosted-profile-evaluation-control-7B3RAZU2.js} +1 -1
- package/dist/chunks/{hosted-profile-evaluation-inspection-A62UYFEP.js → hosted-profile-evaluation-inspection-FPCV42DD.js} +1 -1
- package/dist/chunks/hosted-profile-evaluation-preparation-JROREZH3.js +3 -0
- package/dist/chunks/{human-review-J6JGNRBR.js → human-review-HRGGACEM.js} +1 -1
- package/dist/chunks/import-RSAQ44GG.js +4 -0
- package/dist/chunks/{learning-REL6GGNA.js → learning-FNBEIAY6.js} +1 -1
- package/dist/chunks/{opchat-CUZUU2WM.js → opchat-I7ZWJ5XK.js} +1 -1
- package/dist/chunks/{organizations-VT27V4B2.js → organizations-LFCZIH7E.js} +1 -1
- package/dist/chunks/{profile-N2E5ASHQ.js → profile-EPIX5QVK.js} +1 -1
- package/dist/chunks/{project-agent-XMXOBJSC.js → project-agent-DGOPMECP.js} +1 -1
- package/dist/chunks/{sandbox-command-NC665ZZ5.js → sandbox-command-Q5F6VUOS.js} +1 -1
- package/dist/chunks/{sandbox-template-OTP6S3RU.js → sandbox-template-7GICPIKJ.js} +1 -1
- package/dist/chunks/{src-WM35IF4W.js → src-DH5AQ4Z7.js} +1 -1
- package/dist/chunks/src-GKWEQK2T.js +329 -0
- package/dist/chunks/{taskset-COAPMTT3.js → taskset-LUG3ZU6J.js} +1 -1
- package/dist/chunks/{teams-bot-ACWJ7PJP.js → teams-bot-Z6RJGHME.js} +1 -1
- package/dist/chunks/{training-4JUK7YQV.js → training-XHE6FVII.js} +1 -1
- package/dist/chunks/{workspaces-WTPFRJMS.js → workspaces-XIQNPAP7.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/web/agent-sources/SOURCES.md +11 -0
- package/dist/web/agent-sources/claude-code.svg +1 -0
- package/dist/web/agent-sources/codex.svg +1 -0
- package/dist/web/agent-sources/grok-build.svg +3 -0
- package/dist/web/agent-sources/hermes.png +0 -0
- package/dist/web/agent-sources/oh-my-pi.svg +11 -0
- package/dist/web/agent-sources/openclaw.svg +54 -0
- package/dist/web/agent-sources/opencode.svg +4 -0
- package/dist/web/agent-sources/pi.svg +6 -0
- package/dist/web/assets/App-BI-uOpnP.js +234 -0
- package/dist/web/assets/App-DkH8CeoI.css +1 -0
- package/dist/web/assets/{AppDialog-CaxeNfsu.js → AppDialog-1iGodoot.js} +1 -1
- package/dist/web/assets/{AppTerminalPanel-dtK0ZPer.js → AppTerminalPanel-udtBdWFn.js} +2 -2
- package/dist/web/assets/AppsView-BonAGiS8.css +1 -0
- package/dist/web/assets/AppsView-DhKsU4yi.js +1 -0
- package/dist/web/assets/BrowserSidebar-BnOyqIQT.js +1 -0
- package/dist/web/assets/{CartesianChart-Drfk6jTn.js → CartesianChart-C24DAywn.js} +1 -1
- package/dist/web/assets/{CollaborationTabs-Czh2noeb.js → CollaborationTabs-DgmOF5Fe.js} +1 -1
- package/dist/web/assets/{CommandMenu-D-M-xomh.js → CommandMenu-CUNGtHwS.js} +1 -1
- package/dist/web/assets/{CommunityView-BrdxUI5Z.js → CommunityView-CE7qeJnr.js} +1 -1
- package/dist/web/assets/{ComposerCreateImproveStrip-CJ8nkYJf.js → ComposerCreateImproveStrip-BixNsg2a.js} +1 -1
- package/dist/web/assets/{GetStartedView-u7Jw7YA1.js → GetStartedView-B8gCwmBX.js} +1 -1
- package/dist/web/assets/{HostedModelLearningReview-D0a2nwse.js → HostedModelLearningReview-CitgUNfC.js} +1 -1
- package/dist/web/assets/{HostedModelLearningSettings-CQQGyjxi.js → HostedModelLearningSettings-WUaqzNsa.js} +1 -1
- package/dist/web/assets/{LabModelVersionDetailPage-Cxlc4sSC.js → LabModelVersionDetailPage-Cx0kL69J.js} +1 -1
- package/dist/web/assets/{LabSkillSidebar-BnJkDb0c.js → LabSkillSidebar-DRggqZ1j.js} +1 -1
- package/dist/web/assets/LabsRoute-BujTZhqC.js +99 -0
- package/dist/web/assets/{MainChatThread-r_TYiTnW.js → MainChatThread-CyA_644R.js} +2 -2
- package/dist/web/assets/MainPane-LaEtxydD.js +19 -0
- package/dist/web/assets/{MarkdownText-BxPHz4je.js → MarkdownText-DJI5LwT0.js} +19 -19
- package/dist/web/assets/{NativeSkillSidebar-CCHK6kMG.js → NativeSkillSidebar-CkFpWxjd.js} +1 -1
- package/dist/web/assets/{NewExperienceSwitcher-CuKWTDZj.js → NewExperienceSwitcher-DXcRHHsu.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CS6sw2oD.js → NewProjectDialog-gDzX_ZIJ.js} +1 -1
- package/dist/web/assets/{OutputsPage-JDM5bfLJ.js → OutputsPage-J_k-_N82.js} +1 -1
- package/dist/web/assets/{ProjectsPage-B3zTBHOA.js → ProjectsPage-BsyZmvlg.js} +1 -1
- package/dist/web/assets/{RightChatPanelStack-L8S3yj1u.js → RightChatPanelStack-Bz8puMUB.js} +1 -1
- package/dist/web/assets/{RightSidebarHomePanel-BWJQKFUp.js → RightSidebarHomePanel-DmorYb6p.js} +1 -1
- package/dist/web/assets/ScheduledWorkPage-BFDzQUyL.js +1 -0
- package/dist/web/assets/SettingsView-BB7wCdbr.js +5 -0
- package/dist/web/assets/SettingsView-BnANbPLS.css +1 -0
- package/dist/web/assets/{TeamChatView-DakXCNQE.js → TeamChatView-CZ3b7rq2.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-DaonK5C0.js → TerminalOverlay-Ck43Qri3.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-CUvSsSwp.js → TrainingCreationPanel-ejqPZm3g.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-DNivtVwd.js → TrainingDraftPanel-Cy2AQxxL.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-rbmuoPoE.js → UsageSettingsSection-B7nyMItm.js} +1 -1
- package/dist/web/assets/{WorkSidebarPanel-DrYt9xzv.js → WorkSidebarPanel-BfjAc097.js} +1 -1
- package/dist/web/assets/{WorkspaceDiffPanel-CThoTqe4.js → WorkspaceDiffPanel-D9hAV8l7.js} +5 -5
- package/dist/web/assets/{WorkspaceEnvironmentMenu-DeODKxvW.js → WorkspaceEnvironmentMenu-B-K9XgFB.js} +3 -3
- package/dist/web/assets/{WorkspaceGitDialogs-CBarJYF-.js → WorkspaceGitDialogs-BJVFx_L3.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-Hmu5m_sO.js → WorkspaceMonacoEditor-p-FWMXoZ.js} +3 -3
- package/dist/web/assets/{arrow-up-right-BV2IHfb9.js → arrow-up-right-CFGI2YSt.js} +1 -1
- package/dist/web/assets/{chunk-YTGRET2L-PKzEfYnf.js → chunk-UHVJOMWN-BAlur2vw.js} +1 -1
- package/dist/web/assets/{clipboard-DDIvAWKp.js → clipboard-DIIxBort.js} +1 -1
- package/dist/web/assets/{cloud-upload-Dv6kFnfC.js → cloud-upload-BaQFNCTp.js} +1 -1
- package/dist/web/assets/{cssMode-BK0jFqWW.js → cssMode-6LOkSggB.js} +1 -1
- package/dist/web/assets/{folder-open-B9ixJQJX.js → folder-open-DZSxfPtr.js} +1 -1
- package/dist/web/assets/{folder-plus-DqSKvtNB.js → folder-plus-21v4D_Vx.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-C1lQvfxe.js → git-commit-horizontal-CgGixL64.js} +1 -1
- package/dist/web/assets/{htmlMode-CCV301b6.js → htmlMode-B5uRraNd.js} +1 -1
- package/dist/web/assets/index-DJcUXSsN.css +1 -0
- package/dist/web/assets/{index-DIaKfM8a.js → index-DOMrqhcz.js} +2 -2
- package/dist/web/assets/{info-BEvaynAD.js → info-BGTcmow7.js} +1 -1
- package/dist/web/assets/{jsonMode-Co4pyN4F.js → jsonMode-D3m8N4Gi.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-CSU0G5da.js → lspLanguageFeatures-DoyipLsB.js} +1 -1
- package/dist/web/assets/{minimize-2-DT8t8wwP.js → minimize-2-B01qSko4.js} +1 -1
- package/dist/web/assets/{monaco.contribution-Cr0AaHCD.js → monaco.contribution--U8v3jpa.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DSBAb_PC.js → monaco.contribution-BJyfaGX2.js} +2 -2
- package/dist/web/assets/{monaco.contribution-CBwGIQY1.js → monaco.contribution-Bc22foTx.js} +2 -2
- package/dist/web/assets/{monaco.contribution-DUZrs1D-.js → monaco.contribution-DuRhJ6zU.js} +2 -2
- package/dist/web/assets/{monitor-DGqnfsK9.js → monitor-eZP8ZTHe.js} +1 -1
- package/dist/web/assets/{play-C1XWyKh6.js → play-CGsWFR_B.js} +1 -1
- package/dist/web/assets/{python-Z1foxLdf.js → python-BNrLZWud.js} +1 -1
- package/dist/web/assets/{save-CX2kF74j.js → save-BLgjrccP.js} +1 -1
- package/dist/web/assets/{square-DMkXeYeV.js → square-CI1qNtvE.js} +1 -1
- package/dist/web/assets/{toggleHighContrast-CRMVp779.js → toggleHighContrast-B_GcTCnw.js} +1 -1
- package/dist/web/assets/{tsMode-Czu8YAqh.js → tsMode-CmruH_ys.js} +1 -1
- package/dist/web/assets/{upload-giKOPnl1.js → upload-DnlgGS2x.js} +1 -1
- package/dist/web/assets/useLocalAgentSchedules-BBhGUfK-.js +1 -0
- package/dist/web/assets/useProviderSettings-Bw-csWbH.css +1 -0
- package/dist/web/assets/useProviderSettings-DfhdkKdC.js +5 -0
- package/dist/web/assets/{useSessionTurnCache-CUYFsu_W.js → useSessionTurnCache-BwscKl5i.js} +1 -1
- package/dist/web/assets/{wifi-off-DbDXaV1N.js → wifi-off-Dz-4EDCc.js} +1 -1
- package/dist/web/assets/{workers-Cno4XklJ.js → workers-Bi9u46cp.js} +1 -1
- package/dist/web/assets/{yaml-C28t_C6h.js → yaml-DVTkiRnh.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunks/app-server-runtime-FL2CHQU2.js +0 -2
- package/dist/chunks/chunk-4VKNBADF.js +0 -2
- package/dist/chunks/chunk-5ZZM3TUN.js +0 -24
- package/dist/chunks/chunk-6JBWHR6T.js +0 -5
- package/dist/chunks/chunk-FKCWOASO.js +0 -49
- package/dist/chunks/chunk-FOEUDMME.js +0 -2678
- package/dist/chunks/chunk-ICZEOMPO.js +0 -2
- package/dist/chunks/chunk-JO7GRBOG.js +0 -2
- package/dist/chunks/chunk-KUKOZJIR.js +0 -2
- package/dist/chunks/chunk-M7PBDRKC.js +0 -2
- package/dist/chunks/chunk-P653BXMY.js +0 -3
- package/dist/chunks/chunk-PMZH2TKS.js +0 -4
- package/dist/chunks/chunk-W4IL6TWB.js +0 -186
- package/dist/chunks/chunk-WVNN3RB2.js +0 -2
- package/dist/chunks/cli-5QR7QNQJ.js +0 -2
- package/dist/chunks/core-commands-J2SJM5I5.js +0 -2
- package/dist/chunks/hosted-harness-runtime-PAYMAXH7.js +0 -2
- package/dist/chunks/hosted-profile-compiler-KQREWJA5.js +0 -2
- package/dist/chunks/hosted-profile-evaluation-preparation-OR4OLYEX.js +0 -3
- package/dist/chunks/import-YHSX6SBZ.js +0 -4
- package/dist/chunks/src-TNWF3IC5.js +0 -329
- package/dist/web/assets/App-CdDQ-lXE.css +0 -1
- package/dist/web/assets/App-D2f8_mGk.js +0 -235
- package/dist/web/assets/AppsView-CzbB5pXp.css +0 -1
- package/dist/web/assets/AppsView-DwK1UBJP.js +0 -1
- package/dist/web/assets/BrowserSidebar-Cj9VnkgU.js +0 -1
- package/dist/web/assets/LabsRoute-hHwZNbqN.js +0 -99
- package/dist/web/assets/MainPane-DJcd4tPk.js +0 -19
- package/dist/web/assets/ScheduledWorkPage-qX12p4B0.js +0 -1
- package/dist/web/assets/SettingsView-0KMs-r2I.js +0 -9
- package/dist/web/assets/SettingsView-CVsuQeCZ.css +0 -1
- package/dist/web/assets/index-1cMIFBxZ.css +0 -1
- package/dist/web/assets/useLocalAgentSchedules-BHxWmOeC.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
+
import{b as i}from"./chunk-ES2ISFJC.js";import{a as o}from"./chunk-FTQLQJQV.js";var E=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),j=new Uint32Array([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]),A=class r{static{o(this,"Sha256State")}state=new Uint32Array(E);pending=new Uint8Array(64);pendingLength=0;byteLength=0;words=new Uint32Array(64);update(t){let n=typeof t=="string"?new TextEncoder().encode(t):t;if(!Number.isSafeInteger(this.byteLength+n.length))throw new RangeError("SHA-256 input is too large");this.byteLength+=n.length;let e=0;if(this.pendingLength){let a=Math.min(64-this.pendingLength,n.length);this.pending.set(n.subarray(0,a),this.pendingLength),this.pendingLength+=a,e+=a,this.pendingLength===64&&(this.compress(this.pending),this.pendingLength=0)}for(;e+64<=n.length;)this.compress(n.subarray(e,e+64)),e+=64;return e<n.length&&(this.pending.set(n.subarray(e)),this.pendingLength=n.length-e),this}clone(){let t=new r;return t.state.set(this.state),t.pending.set(this.pending),t.pendingLength=this.pendingLength,t.byteLength=this.byteLength,t}digestHex(){let t=this.clone(),n=new Uint8Array(t.pendingLength<56?64:128);n.set(t.pending.subarray(0,t.pendingLength)),n[t.pendingLength]=128;let e=t.byteLength*8,a=new DataView(n.buffer);return a.setUint32(n.length-8,Math.floor(e/4294967296),!1),a.setUint32(n.length-4,e>>>0,!1),t.compress(n.subarray(0,64)),n.length===128&&t.compress(n.subarray(64)),Array.from(t.state,c=>c.toString(16).padStart(8,"0")).join("")}compress(t){let n=new DataView(t.buffer,t.byteOffset,64),e=this.state,a=this.words;for(let s=0;s<16;s+=1)a[s]=n.getUint32(s*4,!1);for(let s=16;s<64;s+=1){let p=a[s-15],g=a[s-2],S=x(p,7)^x(p,18)^p>>>3,L=x(g,17)^x(g,19)^g>>>10;a[s]=a[s-16]+S+a[s-7]+L>>>0}let c=e[0],h=e[1],m=e[2],y=e[3],f=e[4],b=e[5],u=e[6],w=e[7];for(let s=0;s<64;s+=1){let p=f&b^~f&u,g=c&h^c&m^h&m,S=x(c,2)^x(c,13)^x(c,22),L=x(f,6)^x(f,11)^x(f,25),H=w+L+p+j[s]+a[s]>>>0,I=S+g>>>0;w=u,u=b,b=f,f=y+H>>>0,y=m,m=h,h=c,c=H+I>>>0}e[0]=e[0]+c>>>0,e[1]=e[1]+h>>>0,e[2]=e[2]+m>>>0,e[3]=e[3]+y>>>0,e[4]=e[4]+f>>>0,e[5]=e[5]+b>>>0,e[6]=e[6]+u>>>0,e[7]=e[7]+w>>>0}};function _(r){return new A().update(r).digestHex()}o(_,"sha256Hex");function x(r,t){return r>>>t|r<<32-t}o(x,"rotateRight");var U=2e3,T=25e7,l=i.string().trim().min(1).max(240),d=i.string().regex(/^[a-f0-9]{64}$/),k=i.string().datetime({offset:!0}),J=i.record(i.string(),i.unknown()).default({}),O=i.object({id:l,contentHash:d}).strict(),X=O.extend({revision:i.number().int().positive()}).strict(),Y=i.object({id:l,path:i.string().trim().min(1).max(U).refine(B),contentHash:d,sizeBytes:i.number().int().nonnegative().max(T),mediaType:i.string().trim().min(1).max(200),visibility:i.enum(["policy","verifier","host_private"])}).strict(),q=i.object({id:l,contentHash:d,mediaType:i.string().trim().min(1).max(200).nullable().default(null),sizeBytes:i.number().int().nonnegative().max(T).nullable().default(null)}).strict(),F=i.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]);function v(r){return`${JSON.stringify(R(r),null,2)}
|
|
3
|
+
`}o(v,"canonicalJson");function z(r){return _(r)}o(z,"sha256");function M(r){return z(v(r))}o(M,"contentHash");function W(r,t){let{contentHash:n,...e}=r,a=M(e);if(n!==a)throw new Error(`${t} contentHash is ${n}; expected ${a}.`)}o(W,"assertContentHash");function B(r){let t=r.replaceAll("\\","/");return!t||t.startsWith("/")||t.includes("\0")?!1:!t.split("/").some(n=>!n||n==="."||n==="..")}o(B,"safeRelativePath");function R(r){return Array.isArray(r)?r.map(R):!r||typeof r!="object"?r:Object.fromEntries(Object.entries(r).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>[t,R(n)]))}o(R,"sortValue");var ee=i.object({provider:l,model:l,revision:i.string().trim().min(1).max(500).nullable().default(null),artifactHash:d.nullable().default(null),tokenizerRevision:i.string().trim().min(1).max(500).nullable().default(null),chatTemplateHash:d.nullable().default(null)}).strict(),C=["openpond","codex","claude-code","grok-build","opencode","anthropic","openai","xai","google","openrouter","deepseek","zai","moonshot","together","groq","custom-openai-compatible"],N=i.enum(C),te=i.object({providerId:N,modelId:i.string().trim().min(1).max(300)});export{A as a,l as b,d as c,k as d,J as e,O as f,X as g,Y as h,q as i,F as j,v as k,z as l,M as m,W as n,ee as o,C as p,N as q,te as r};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{h as S}from"./chunk-QJRXTIOC.js";import{F as h}from"./chunk-7K72KS5C.js";import{ha as A}from"./chunk-7MXZJQS7.js";import{Ga as O,Ha as k,j as I,m as P,p as b,r as H,s as w,w as f}from"./chunk-SDEDAHV6.js";import{m as g}from"./chunk-NNF6KCHD.js";import{b as c}from"./chunk-ES2ISFJC.js";import{a as u}from"./chunk-FTQLQJQV.js";import{randomUUID as T}from"node:crypto";import{readFile as v}from"node:fs/promises";import p from"node:path";import{randomUUID as $}from"node:crypto";var y=c.object({revision:c.number().int().nonnegative(),overlay:H}).strict(),z=y.extend({proposal:w}).strict(),m=class{constructor(e){this.client=e}client;static{u(this,"HostedHarnessOverlayStorage")}async getHarnessRunOverlay(e){let s=await this.client.request({contractVersion:h,requestId:$(),operation:"harness/overlay/get",params:{runId:e}});return s===null?null:y.parse(s).overlay}async putHarnessRunOverlay(e){let s=H.parse(e.overlay);if(!e.requestId.trim()||s.revision!==(e.expectedRevision===null?0:e.expectedRevision+1))throw new Error("Hosted Harness overlay mutation requires a stable request and next revision.");let r=y.parse(await this.client.request({contractVersion:h,requestId:e.requestId,operation:"harness/overlay/put",params:{runId:s.runId,expectedRevision:e.expectedRevision,overlay:s}}));if(r.revision!==s.revision||r.overlay.contentHash!==s.contentHash)throw new Error("Host Harness overlay response changed committed identity.");return r.overlay}async createHarnessRunOverlay(e){if(e.revision!==0||e.status!=="active")throw new Error("A new Harness run overlay must be active at revision 0.");return this.putHarnessRunOverlay({overlay:e,expectedRevision:null,requestId:`harness-overlay:${e.runId}:${e.contentHash}`})}async ensureHarnessRunOverlay(e){let s=await this.getHarnessRunOverlay(e.runId);if(s){if(s.workspace.workspaceId!==e.workspace.id||s.baseHarnessRelease.id!==e.harnessRelease.id||s.baseHarnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("The durable Agent run is already bound to another Harness release.");return s}let r=f({schemaVersion:"openpond.harnessRunOverlay.v1",id:`overlay-${g({runId:e.runId,harnessRelease:e.harnessRelease}).slice(0,24)}`,runId:e.runId,baseHarnessRelease:e.harnessRelease,workspace:{workspaceId:e.workspace.id,revision:e.workspace.revision,sourceRevision:e.workspace.sourceRevision,channelRevision:e.workspace.currentChannel.revision},revision:0,status:"active",edits:[],createdAt:e.admittedAt,updatedAt:e.admittedAt,metadata:{}});return this.createHarnessRunOverlay(r)}async appendHarnessRunOverlayEditsAtomically(e){return this.transition(e,"append")}async freezeHarnessRunOverlayAtomically(e){return this.transition({...e,edits:[]},"freeze")}async abandonHarnessRunOverlayAtomically(e){return this.transition({...e,edits:[]},"abandon")}async freezeHarnessRunOverlayWithProposalAtomically(e){let s=await this.getHarnessRunOverlay(e.runId);if(!s||s.revision!==e.expectedRevision||s.status!=="active")throw new Error("Hosted Harness overlay revision or status changed.");let r=new Set(s.edits.map(i=>i.id));for(let i of e.edits){if(r.has(i.id))throw new Error(`Harness overlay edit id already exists: ${i.id}.`);r.add(i.id)}let{contentHash:l,...n}=s,t=f({...n,revision:s.revision+1,status:"frozen",edits:[...s.edits,...e.edits],updatedAt:e.updatedAt}),d=w.parse(e.buildProposal(t)),a=z.parse(await this.client.request({contractVersion:h,requestId:`harness-proposal:${t.runId}:${d.contentHash}`,operation:"harness/overlay/freezeProposal",params:{runId:t.runId,expectedRevision:s.revision,overlay:t,proposal:d}}));if(a.overlay.contentHash!==t.contentHash||a.proposal.contentHash!==d.contentHash)throw new Error("Host Harness proposal response changed committed identity.");return{overlay:a.overlay,proposal:a.proposal}}async transition(e,s){let r=await this.getHarnessRunOverlay(e.runId);if(!r||r.revision!==e.expectedRevision||r.status==="abandoned"||s!=="abandon"&&r.status!=="active")throw new Error("Hosted Harness overlay revision or status changed.");if(s==="append"&&e.edits.length===0)throw new Error("Harness overlay append requires edits.");let l=new Set(r.edits.map(a=>a.id));for(let a of e.edits){if(l.has(a.id))throw new Error(`Harness overlay edit id already exists: ${a.id}.`);l.add(a.id)}let{contentHash:n,...t}=r,d=f({...t,revision:r.revision+1,status:s==="append"?"active":s==="freeze"?"frozen":"abandoned",edits:[...r.edits,...e.edits],updatedAt:e.updatedAt});return this.putHarnessRunOverlay({overlay:d,expectedRevision:r.revision,requestId:`harness-overlay:${d.runId}:${d.contentHash}`})}};var N=c.object({workspace:b,release:c.object({id:c.string().min(1),contentHash:c.string().regex(/^[a-f0-9]{64}$/),sourceRevision:c.string().min(1),assetsPath:c.string().min(1)}).strict()}).strict();async function C(o,e=null){let s=await o.request({contractVersion:h,requestId:T(),operation:"harness/get",params:{reference:e}});if(s===null)return null;let r=N.parse(s);if(!p.isAbsolute(r.release.assetsPath))throw new Error("Hosted Harness assets path must be absolute.");let[l,n]=await Promise.all([v(p.join(r.release.assetsPath,"agent-snapshot.json"),"utf8"),v(p.join(r.release.assetsPath,"harness-release.json"),"utf8")]),t=A.parse({schemaVersion:"openpond.localHarnessReleaseRecord.v1",workspaceId:r.workspace.id,sourceRevision:r.release.sourceRevision,agentSnapshot:I.parse(JSON.parse(l)),harnessRelease:P.parse(JSON.parse(n)),bundlePath:r.release.assetsPath,createdAt:new Date().toISOString()});if(t.harnessRelease.id!==r.release.id||t.harnessRelease.contentHash!==r.release.contentHash||(e!==null?e.id!==r.release.id||e.contentHash!==r.release.contentHash:r.workspace.currentChannel.release?.contentHash!==r.release.contentHash))throw new Error("Hosted Harness release differs from its bound workspace.");return S({workspace:r.workspace,release:t})}u(C,"loadHostedHarnessRuntime");async function se(o,e){let s=e.profileComponentBinding,r=e.profileWorkflowBinding;if(s){if(r||e.currentProfile?.profileId!==s.profileId)throw new Error("Profile component binding differs from the session Profile reference.");let n=await x(o,s.harnessRelease);if(E(n,s.profileId,s.sourceRevision,e.currentProfile?.repositoryId),s.target.kind==="profile")return n;if(s.target.kind==="skill"){let i=s.target.skillPath;if(!n.release.agentSnapshot.skills.some(j=>j.path===i))throw new Error("Bound Profile Skill is unavailable in its released source.");let R=await v(p.join(n.release.bundlePath,"source",i),"utf8");return{...n,instructionContext:[n.instructionContext,`Released Profile Skill (${i}):
|
|
3
3
|
${R}`].join(`
|
|
4
4
|
|
|
5
5
|
`)}}let t=await q(n),d=s.target.actionId,a=t.actions.find(i=>i.id===d);if(!a)throw new Error("Bound Profile Agent action is unavailable in its released source.");return{...n,workflowAction:a}}if(r){if(e.currentProfile?.profileId!==r.profileId)throw new Error("Profile workflow binding differs from the session Profile reference.");let n=await x(o,r.harnessRelease);E(n,r.profileId,r.sourceRevision,e.currentProfile?.repositoryId);let t=await q(n),d=k({binding:r,harnessRelease:n.release.harnessRelease,catalog:t.catalog,catalogHash:t.catalogHash}),a=d.invocation.kind==="agent_action"?d.invocation.actionId:null,i=a?t.actions.find(R=>R.id===a):void 0;if(a&&!i)throw new Error(`Bound Profile action ${a} is missing from its release.`);return{...n,workflow:d,...i?{workflowAction:i}:{}}}let l=await new m(o).getHarnessRunOverlay(e.id);return C(o,l?.baseHarnessRelease??null)}u(se,"loadHostedHarnessRuntimeForSession");async function x(o,e){let s=await C(o,e);if(!s)throw new Error("The bound Profile Harness release is unavailable.");return s}u(x,"requireRelease");function E(o,e,s,r){let l=o.release.harnessRelease.metadata.profile;if(!l||typeof l!="object"||l.id!==e||l.sourceRevision!==s||l.repositoryId!==void 0&&l.repositoryId!==r)throw new Error("Bound Profile source differs from its released Harness source.")}u(E,"assertProfileProvenance");async function q(o){let e=p.join(o.release.bundlePath,"source"),[s,r]=await Promise.all([v(p.join(e,"workflows","catalog.json")),v(p.join(e,"workflows","actions.json"))]);return O({agentSnapshot:o.release.agentSnapshot,harnessRelease:o.release.harnessRelease,catalogBytes:s,actionBytes:r})}u(q,"loadHostedProfileCatalog");export{m as a,C as b,se as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{i}from"./chunk-
|
|
2
|
+
import{i}from"./chunk-R3XFY7VL.js";import{a as s}from"./chunk-GLUWATL5.js";import{a as n}from"./chunk-FTQLQJQV.js";import{stdin as a,stdout as c}from"node:process";import{createInterface as l}from"node:readline/promises";var p=`${s}/console/services/identity-access/api-keys`;function u(e){let t=process.env.OPENPOND_API_KEY?.trim();if(t)return t;let r=e.apiKey?.trim();if(r)return r;let o=e.token?.trim();return o&&o.startsWith("opk_")?o:null}n(u,"resolveApiKey");async function P(){if(!a.isTTY||!c.isTTY)throw new Error("OpenPond API key is required in non-interactive mode. Set OPENPOND_API_KEY or run `openpond login` in a terminal.");console.log("Open the OpenPond UI to create an API key:"),console.log(p);let e=l({input:a,output:c});try{let t=(await e.question("Paste your OpenPond API key: ")).trim();if(!t)throw new Error("API key is required");return t.startsWith("opk_")||console.log("warning: API keys usually start with opk_."),t}finally{e.close()}}n(P,"promptForApiKey");async function A(e,t){let r=u(e);if(r)return r;let o=await P();return await i({apiKey:o,baseUrl:t,activeProfile:e.activeProfile}),console.log("Saved account credentials to the encrypted OpenPond credential store."),o}n(A,"ensureApiKey");export{u as a,P as b,A as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
|
|
2
|
-
import{Fa as kc,g as bi,h as yi}from"./chunk-VW7D3DRM.js";import{a as x,b as I,c as O,d as hi,e as q,g as Se,h as gi,i as vi,k as Gt,l as y,m as ye}from"./chunk-P653BXMY.js";import{b as a}from"./chunk-ES2ISFJC.js";import{a as d,c as P,e as gp}from"./chunk-FTQLQJQV.js";var sn=P(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.regexpCode=Z.getEsmExportName=Z.getProperty=Z.safeStringify=Z.stringify=Z.strConcat=Z.addCodeArg=Z.str=Z._=Z.nil=Z._Code=Z.Name=Z.IDENTIFIER=Z._CodeOrName=void 0;var nn=class{static{d(this,"_CodeOrName")}};Z._CodeOrName=nn;Z.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Qt=class extends nn{static{d(this,"Name")}constructor(t){if(super(),!Z.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Z.Name=Qt;var Ne=class extends nn{static{d(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Qt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Z._Code=Ne;Z.nil=new Ne("");function Hc(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Ii(r,t[n]),r.push(e[++n]);return new Ne(r)}d(Hc,"_");Z._=Hc;var Ri=new Ne("+");function Dc(e,...t){let r=[an(e[0])],n=0;for(;n<t.length;)r.push(Ri),Ii(r,t[n]),r.push(Ri,an(e[++n]));return jp(r),new Ne(r)}d(Dc,"str");Z.str=Dc;function Ii(e,t){t instanceof Ne?e.push(...t._items):t instanceof Qt?e.push(t):e.push(Op(t))}d(Ii,"addCodeArg");Z.addCodeArg=Ii;function jp(e){let t=1;for(;t<e.length-1;){if(e[t]===Ri){let r=qp(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}d(jp,"optimize");function qp(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Qt||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Qt))return`"${e}${t.slice(1)}`}d(qp,"mergeExprItems");function Tp(e,t){return t.emptyStr()?e:e.emptyStr()?t:Dc`${e}${t}`}d(Tp,"strConcat");Z.strConcat=Tp;function Op(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:an(Array.isArray(e)?e.join(","):e)}d(Op,"interpolate");function Cp(e){return new Ne(an(e))}d(Cp,"stringify");Z.stringify=Cp;function an(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}d(an,"safeStringify");Z.safeStringify=an;function Hp(e){return typeof e=="string"&&Z.IDENTIFIER.test(e)?new Ne(`.${e}`):Hc`[${e}]`}d(Hp,"getProperty");Z.getProperty=Hp;function Dp(e){if(typeof e=="string"&&Z.IDENTIFIER.test(e))return new Ne(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}d(Dp,"getEsmExportName");Z.getEsmExportName=Dp;function Np(e){return new Ne(e.toString())}d(Np,"regexpCode");Z.regexpCode=Np});var Pi=P(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.ValueScope=Ie.ValueScopeName=Ie.Scope=Ie.varKinds=Ie.UsedValueState=void 0;var Re=sn(),$i=class extends Error{static{d(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ca;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ca||(Ie.UsedValueState=ca={}));Ie.varKinds={const:new Re.Name("const"),let:new Re.Name("let"),var:new Re.Name("var")};var da=class{static{d(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Re.Name?t:this.name(t)}name(t){return new Re.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ie.Scope=da;var la=class extends Re.Name{static{d(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Re._)`.${new Re.Name(r)}[${n}]`}};Ie.ValueScopeName=la;var Lp=(0,Re._)`\n`,Ei=class extends da{static{d(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Lp:Re.nil}}get(){return this._scope}name(t){return new la(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,c=this._values[s];if(c){let p=c.get(o);if(p)return p}else c=this._values[s]=new Map;c.set(o,i);let u=this._scope[s]||(this._scope[s]=[]),l=u.length;return u[l]=r.ref,i.setValue(r,{property:s,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Re._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=Re.nil;for(let o in t){let c=t[o];if(!c)continue;let u=n[o]=n[o]||new Map;c.forEach(l=>{if(u.has(l))return;u.set(l,ca.Started);let p=r(l);if(p){let m=this.opts.es5?Ie.varKinds.var:Ie.varKinds.const;s=(0,Re._)`${s}${m} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))s=(0,Re._)`${s}${p}${this.opts._n}`;else throw new $i(l);u.set(l,ca.Completed)})}return s}};Ie.ValueScope=Ei});var V=P(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.or=F.and=F.not=F.CodeGen=F.operators=F.varKinds=F.ValueScopeName=F.ValueScope=F.Scope=F.Name=F.regexpCode=F.stringify=F.getProperty=F.nil=F.strConcat=F.str=F._=void 0;var W=sn(),Ge=Pi(),xt=sn();Object.defineProperty(F,"_",{enumerable:!0,get:d(function(){return xt._},"get")});Object.defineProperty(F,"str",{enumerable:!0,get:d(function(){return xt.str},"get")});Object.defineProperty(F,"strConcat",{enumerable:!0,get:d(function(){return xt.strConcat},"get")});Object.defineProperty(F,"nil",{enumerable:!0,get:d(function(){return xt.nil},"get")});Object.defineProperty(F,"getProperty",{enumerable:!0,get:d(function(){return xt.getProperty},"get")});Object.defineProperty(F,"stringify",{enumerable:!0,get:d(function(){return xt.stringify},"get")});Object.defineProperty(F,"regexpCode",{enumerable:!0,get:d(function(){return xt.regexpCode},"get")});Object.defineProperty(F,"Name",{enumerable:!0,get:d(function(){return xt.Name},"get")});var fa=Pi();Object.defineProperty(F,"Scope",{enumerable:!0,get:d(function(){return fa.Scope},"get")});Object.defineProperty(F,"ValueScope",{enumerable:!0,get:d(function(){return fa.ValueScope},"get")});Object.defineProperty(F,"ValueScopeName",{enumerable:!0,get:d(function(){return fa.ValueScopeName},"get")});Object.defineProperty(F,"varKinds",{enumerable:!0,get:d(function(){return fa.varKinds},"get")});F.operators={GT:new W._Code(">"),GTE:new W._Code(">="),LT:new W._Code("<"),LTE:new W._Code("<="),EQ:new W._Code("==="),NEQ:new W._Code("!=="),NOT:new W._Code("!"),OR:new W._Code("||"),AND:new W._Code("&&"),ADD:new W._Code("+")};var mt=class{static{d(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},Ai=class extends mt{static{d(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Ge.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=yr(this.rhs,t,r)),this}get names(){return this.rhs instanceof W._CodeOrName?this.rhs.names:{}}},ua=class extends mt{static{d(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof W.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=yr(this.rhs,t,r),this}get names(){let t=this.lhs instanceof W.Name?{}:{...this.lhs.names};return pa(t,this.rhs)}},ji=class extends ua{static{d(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},qi=class extends mt{static{d(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Ti=class extends mt{static{d(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Oi=class extends mt{static{d(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Ci=class extends mt{static{d(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=yr(this.code,t,r),this}get names(){return this.code instanceof W._CodeOrName?this.code.names:{}}},on=class extends mt{static{d(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(Mp(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Yt(t,r.names),{})}},pt=class extends on{static{d(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Hi=class extends on{static{d(this,"Root")}},br=class extends pt{static{d(this,"Else")}};br.kind="else";var Xt=class e extends pt{static{d(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new br(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Nc(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=yr(this.condition,t,r),this}get names(){let t=super.names;return pa(t,this.condition),this.else&&Yt(t,this.else.names),t}};Xt.kind="if";var Zt=class extends pt{static{d(this,"For")}};Zt.kind="for";var Di=class extends Zt{static{d(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=yr(this.iteration,t,r),this}get names(){return Yt(super.names,this.iteration.names)}},Ni=class extends Zt{static{d(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Ge.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=pa(super.names,this.from);return pa(t,this.to)}},ma=class extends Zt{static{d(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=yr(this.iterable,t,r),this}get names(){return Yt(super.names,this.iterable.names)}},cn=class extends pt{static{d(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};cn.kind="func";var dn=class extends on{static{d(this,"Return")}render(t){return"return "+super.render(t)}};dn.kind="return";var Li=class extends pt{static{d(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Yt(t,this.catch.names),this.finally&&Yt(t,this.finally.names),t}},ln=class extends pt{static{d(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ln.kind="catch";var un=class extends pt{static{d(this,"Finally")}render(t){return"finally"+super.render(t)}};un.kind="finally";var Mi=class{static{d(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
|
+
import{Ga as kc,h as bi,i as yi}from"./chunk-SDEDAHV6.js";import{b as x,c as I,d as O,e as hi,f as q,h as Se,i as gi,j as vi,l as Gt,m as y,n as ye}from"./chunk-NNF6KCHD.js";import{b as a}from"./chunk-ES2ISFJC.js";import{a as d,c as P,e as gp}from"./chunk-FTQLQJQV.js";var sn=P(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.regexpCode=Z.getEsmExportName=Z.getProperty=Z.safeStringify=Z.stringify=Z.strConcat=Z.addCodeArg=Z.str=Z._=Z.nil=Z._Code=Z.Name=Z.IDENTIFIER=Z._CodeOrName=void 0;var nn=class{static{d(this,"_CodeOrName")}};Z._CodeOrName=nn;Z.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Qt=class extends nn{static{d(this,"Name")}constructor(t){if(super(),!Z.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Z.Name=Qt;var Ne=class extends nn{static{d(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Qt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Z._Code=Ne;Z.nil=new Ne("");function Hc(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Ii(r,t[n]),r.push(e[++n]);return new Ne(r)}d(Hc,"_");Z._=Hc;var Ri=new Ne("+");function Dc(e,...t){let r=[an(e[0])],n=0;for(;n<t.length;)r.push(Ri),Ii(r,t[n]),r.push(Ri,an(e[++n]));return jp(r),new Ne(r)}d(Dc,"str");Z.str=Dc;function Ii(e,t){t instanceof Ne?e.push(...t._items):t instanceof Qt?e.push(t):e.push(Op(t))}d(Ii,"addCodeArg");Z.addCodeArg=Ii;function jp(e){let t=1;for(;t<e.length-1;){if(e[t]===Ri){let r=qp(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}d(jp,"optimize");function qp(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Qt||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Qt))return`"${e}${t.slice(1)}`}d(qp,"mergeExprItems");function Tp(e,t){return t.emptyStr()?e:e.emptyStr()?t:Dc`${e}${t}`}d(Tp,"strConcat");Z.strConcat=Tp;function Op(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:an(Array.isArray(e)?e.join(","):e)}d(Op,"interpolate");function Cp(e){return new Ne(an(e))}d(Cp,"stringify");Z.stringify=Cp;function an(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}d(an,"safeStringify");Z.safeStringify=an;function Hp(e){return typeof e=="string"&&Z.IDENTIFIER.test(e)?new Ne(`.${e}`):Hc`[${e}]`}d(Hp,"getProperty");Z.getProperty=Hp;function Dp(e){if(typeof e=="string"&&Z.IDENTIFIER.test(e))return new Ne(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}d(Dp,"getEsmExportName");Z.getEsmExportName=Dp;function Np(e){return new Ne(e.toString())}d(Np,"regexpCode");Z.regexpCode=Np});var Pi=P(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.ValueScope=Ie.ValueScopeName=Ie.Scope=Ie.varKinds=Ie.UsedValueState=void 0;var Re=sn(),$i=class extends Error{static{d(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ca;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(ca||(Ie.UsedValueState=ca={}));Ie.varKinds={const:new Re.Name("const"),let:new Re.Name("let"),var:new Re.Name("var")};var da=class{static{d(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Re.Name?t:this.name(t)}name(t){return new Re.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ie.Scope=da;var la=class extends Re.Name{static{d(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Re._)`.${new Re.Name(r)}[${n}]`}};Ie.ValueScopeName=la;var Lp=(0,Re._)`\n`,Ei=class extends da{static{d(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Lp:Re.nil}}get(){return this._scope}name(t){return new la(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:s}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,c=this._values[s];if(c){let p=c.get(o);if(p)return p}else c=this._values[s]=new Map;c.set(o,i);let u=this._scope[s]||(this._scope[s]=[]),l=u.length;return u[l]=r.ref,i.setValue(r,{property:s,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Re._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let s=Re.nil;for(let o in t){let c=t[o];if(!c)continue;let u=n[o]=n[o]||new Map;c.forEach(l=>{if(u.has(l))return;u.set(l,ca.Started);let p=r(l);if(p){let m=this.opts.es5?Ie.varKinds.var:Ie.varKinds.const;s=(0,Re._)`${s}${m} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))s=(0,Re._)`${s}${p}${this.opts._n}`;else throw new $i(l);u.set(l,ca.Completed)})}return s}};Ie.ValueScope=Ei});var V=P(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.or=F.and=F.not=F.CodeGen=F.operators=F.varKinds=F.ValueScopeName=F.ValueScope=F.Scope=F.Name=F.regexpCode=F.stringify=F.getProperty=F.nil=F.strConcat=F.str=F._=void 0;var W=sn(),Ge=Pi(),xt=sn();Object.defineProperty(F,"_",{enumerable:!0,get:d(function(){return xt._},"get")});Object.defineProperty(F,"str",{enumerable:!0,get:d(function(){return xt.str},"get")});Object.defineProperty(F,"strConcat",{enumerable:!0,get:d(function(){return xt.strConcat},"get")});Object.defineProperty(F,"nil",{enumerable:!0,get:d(function(){return xt.nil},"get")});Object.defineProperty(F,"getProperty",{enumerable:!0,get:d(function(){return xt.getProperty},"get")});Object.defineProperty(F,"stringify",{enumerable:!0,get:d(function(){return xt.stringify},"get")});Object.defineProperty(F,"regexpCode",{enumerable:!0,get:d(function(){return xt.regexpCode},"get")});Object.defineProperty(F,"Name",{enumerable:!0,get:d(function(){return xt.Name},"get")});var fa=Pi();Object.defineProperty(F,"Scope",{enumerable:!0,get:d(function(){return fa.Scope},"get")});Object.defineProperty(F,"ValueScope",{enumerable:!0,get:d(function(){return fa.ValueScope},"get")});Object.defineProperty(F,"ValueScopeName",{enumerable:!0,get:d(function(){return fa.ValueScopeName},"get")});Object.defineProperty(F,"varKinds",{enumerable:!0,get:d(function(){return fa.varKinds},"get")});F.operators={GT:new W._Code(">"),GTE:new W._Code(">="),LT:new W._Code("<"),LTE:new W._Code("<="),EQ:new W._Code("==="),NEQ:new W._Code("!=="),NOT:new W._Code("!"),OR:new W._Code("||"),AND:new W._Code("&&"),ADD:new W._Code("+")};var mt=class{static{d(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},Ai=class extends mt{static{d(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Ge.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=yr(this.rhs,t,r)),this}get names(){return this.rhs instanceof W._CodeOrName?this.rhs.names:{}}},ua=class extends mt{static{d(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof W.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=yr(this.rhs,t,r),this}get names(){let t=this.lhs instanceof W.Name?{}:{...this.lhs.names};return pa(t,this.rhs)}},ji=class extends ua{static{d(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},qi=class extends mt{static{d(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Ti=class extends mt{static{d(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Oi=class extends mt{static{d(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Ci=class extends mt{static{d(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=yr(this.code,t,r),this}get names(){return this.code instanceof W._CodeOrName?this.code.names:{}}},on=class extends mt{static{d(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(t,r)||(Mp(t,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Yt(t,r.names),{})}},pt=class extends on{static{d(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Hi=class extends on{static{d(this,"Root")}},br=class extends pt{static{d(this,"Else")}};br.kind="else";var Xt=class e extends pt{static{d(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new br(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Nc(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=yr(this.condition,t,r),this}get names(){let t=super.names;return pa(t,this.condition),this.else&&Yt(t,this.else.names),t}};Xt.kind="if";var Zt=class extends pt{static{d(this,"For")}};Zt.kind="for";var Di=class extends Zt{static{d(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=yr(this.iteration,t,r),this}get names(){return Yt(super.names,this.iteration.names)}},Ni=class extends Zt{static{d(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?Ge.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=pa(super.names,this.from);return pa(t,this.to)}},ma=class extends Zt{static{d(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=yr(this.iterable,t,r),this}get names(){return Yt(super.names,this.iterable.names)}},cn=class extends pt{static{d(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};cn.kind="func";var dn=class extends on{static{d(this,"Return")}render(t){return"return "+super.render(t)}};dn.kind="return";var Li=class extends pt{static{d(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Yt(t,this.catch.names),this.finally&&Yt(t,this.finally.names),t}},ln=class extends pt{static{d(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ln.kind="catch";var un=class extends pt{static{d(this,"Finally")}render(t){return"finally"+super.render(t)}};un.kind="finally";var Mi=class{static{d(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
3
3
|
`:""},this._extScope=t,this._scope=new Ge.Scope({parent:t}),this._nodes=[new Hi]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new Ai(t,s,n)),s}const(t,r,n){return this._def(Ge.varKinds.const,t,r,n)}let(t,r,n){return this._def(Ge.varKinds.let,t,r,n)}var(t,r,n){return this._def(Ge.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new ua(t,r,n))}add(t,r){return this._leafNode(new ji(t,F.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==W.nil&&this._leafNode(new Ci(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,W.addCodeArg)(r,i));return r.push("}"),new W._Code(r)}if(t,r,n){if(this._blockNode(new Xt(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Xt(t))}else(){return this._elseNode(new br)}endIf(){return this._endBlockNode(Xt,br)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Di(t),r)}forRange(t,r,n,i,s=this.opts.es5?Ge.varKinds.var:Ge.varKinds.let){let o=this._scope.toName(t);return this._for(new Ni(s,o,r,n),()=>i(o))}forOf(t,r,n,i=Ge.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let o=r instanceof W.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,W._)`${o}.length`,c=>{this.var(s,(0,W._)`${o}[${c}]`),n(s)})}return this._for(new ma("of",i,s,r),()=>n(s))}forIn(t,r,n,i=this.opts.es5?Ge.varKinds.var:Ge.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,W._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new ma("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(Zt)}label(t){return this._leafNode(new qi(t))}break(t){return this._leafNode(new Ti(t))}return(t){let r=new dn;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(dn)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Li;if(this._blockNode(i),this.code(t),r){let s=this.name("e");this._currNode=i.catch=new ln(s),r(s)}return n&&(this._currNode=i.finally=new un,this.code(n)),this._endBlockNode(ln,un)}throw(t){return this._leafNode(new Oi(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=W.nil,n,i){return this._blockNode(new cn(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(cn)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Xt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};F.CodeGen=Mi;function Yt(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}d(Yt,"addNames");function pa(e,t){return t instanceof W._CodeOrName?Yt(e,t.names):e}d(pa,"addExprNames");function yr(e,t,r){if(e instanceof W.Name)return n(e);if(!i(e))return e;return new W._Code(e._items.reduce((s,o)=>(o instanceof W.Name&&(o=n(o)),o instanceof W._Code?s.push(...o._items):s.push(o),s),[]));function n(s){let o=r[s.str];return o===void 0||t[s.str]!==1?s:(delete t[s.str],o)}function i(s){return s instanceof W._Code&&s._items.some(o=>o instanceof W.Name&&t[o.str]===1&&r[o.str]!==void 0)}}d(yr,"optimizeExpr");function Mp(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}d(Mp,"subtractNames");function Nc(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,W._)`!${Vi(e)}`}d(Nc,"not");F.not=Nc;var Vp=Lc(F.operators.AND);function zp(...e){return e.reduce(Vp)}d(zp,"and");F.and=zp;var Fp=Lc(F.operators.OR);function Up(...e){return e.reduce(Fp)}d(Up,"or");F.or=Up;function Lc(e){return(t,r)=>t===W.nil?r:r===W.nil?t:(0,W._)`${Vi(t)} ${e} ${Vi(r)}`}d(Lc,"mappend");function Vi(e){return e instanceof W.Name?e:(0,W._)`(${e})`}d(Vi,"par")});var K=P(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.checkStrictMode=U.getErrorPath=U.Type=U.useFunc=U.setEvaluated=U.evaluatedPropsToName=U.mergeEvaluated=U.eachItem=U.unescapeJsonPointer=U.escapeJsonPointer=U.escapeFragment=U.unescapeFragment=U.schemaRefOrVal=U.schemaHasRulesButRef=U.schemaHasRules=U.checkUnknownRules=U.alwaysValidSchema=U.toHash=void 0;var re=V(),Kp=sn();function Bp(e){let t={};for(let r of e)t[r]=!0;return t}d(Bp,"toHash");U.toHash=Bp;function Jp(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(zc(e,t),!Fc(t,e.self.RULES.all))}d(Jp,"alwaysValidSchema");U.alwaysValidSchema=Jp;function zc(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let s in t)i[s]||Bc(e,`unknown keyword: "${s}"`)}d(zc,"checkUnknownRules");U.checkUnknownRules=zc;function Fc(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}d(Fc,"schemaHasRules");U.schemaHasRules=Fc;function Gp(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}d(Gp,"schemaHasRulesButRef");U.schemaHasRulesButRef=Gp;function Wp({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,re._)`${r}`}return(0,re._)`${e}${t}${(0,re.getProperty)(n)}`}d(Wp,"schemaRefOrVal");U.schemaRefOrVal=Wp;function Qp(e){return Uc(decodeURIComponent(e))}d(Qp,"unescapeFragment");U.unescapeFragment=Qp;function Xp(e){return encodeURIComponent(Fi(e))}d(Xp,"escapeFragment");U.escapeFragment=Xp;function Fi(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}d(Fi,"escapeJsonPointer");U.escapeJsonPointer=Fi;function Uc(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}d(Uc,"unescapeJsonPointer");U.unescapeJsonPointer=Uc;function Zp(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}d(Zp,"eachItem");U.eachItem=Zp;function Mc({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,c)=>{let u=o===void 0?s:o instanceof re.Name?(s instanceof re.Name?e(i,s,o):t(i,s,o),o):s instanceof re.Name?(t(i,o,s),s):r(s,o);return c===re.Name&&!(u instanceof re.Name)?n(i,u):u}}d(Mc,"makeMergeEvaluated");U.mergeEvaluated={props:Mc({mergeNames:d((e,t,r)=>e.if((0,re._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,re._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,re._)`${r} || {}`).code((0,re._)`Object.assign(${r}, ${t})`))}),"mergeNames"),mergeToName:d((e,t,r)=>e.if((0,re._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,re._)`${r} || {}`),Ui(e,r,t))}),"mergeToName"),mergeValues:d((e,t)=>e===!0?!0:{...e,...t},"mergeValues"),resultToName:Kc}),items:Mc({mergeNames:d((e,t,r)=>e.if((0,re._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,re._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),"mergeNames"),mergeToName:d((e,t,r)=>e.if((0,re._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,re._)`${r} > ${t} ? ${r} : ${t}`)),"mergeToName"),mergeValues:d((e,t)=>e===!0?!0:Math.max(e,t),"mergeValues"),resultToName:d((e,t)=>e.var("items",t),"resultToName")})};function Kc(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,re._)`{}`);return t!==void 0&&Ui(e,r,t),r}d(Kc,"evaluatedPropsToName");U.evaluatedPropsToName=Kc;function Ui(e,t,r){Object.keys(r).forEach(n=>e.assign((0,re._)`${t}${(0,re.getProperty)(n)}`,!0))}d(Ui,"setEvaluated");U.setEvaluated=Ui;var Vc={};function Yp(e,t){return e.scopeValue("func",{ref:t,code:Vc[t.code]||(Vc[t.code]=new Kp._Code(t.code))})}d(Yp,"useFunc");U.useFunc=Yp;var zi;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(zi||(U.Type=zi={}));function ef(e,t,r){if(e instanceof re.Name){let n=t===zi.Num;return r?n?(0,re._)`"[" + ${e} + "]"`:(0,re._)`"['" + ${e} + "']"`:n?(0,re._)`"/" + ${e}`:(0,re._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,re.getProperty)(e).toString():"/"+Fi(e)}d(ef,"getErrorPath");U.getErrorPath=ef;function Bc(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}d(Bc,"checkStrictMode");U.checkStrictMode=Bc});var Le=P(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});var ge=V(),tf={data:new ge.Name("data"),valCxt:new ge.Name("valCxt"),instancePath:new ge.Name("instancePath"),parentData:new ge.Name("parentData"),parentDataProperty:new ge.Name("parentDataProperty"),rootData:new ge.Name("rootData"),dynamicAnchors:new ge.Name("dynamicAnchors"),vErrors:new ge.Name("vErrors"),errors:new ge.Name("errors"),this:new ge.Name("this"),self:new ge.Name("self"),scope:new ge.Name("scope"),json:new ge.Name("json"),jsonPos:new ge.Name("jsonPos"),jsonLen:new ge.Name("jsonLen"),jsonPart:new ge.Name("jsonPart")};Ki.default=tf});var mn=P(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.extendErrors=ve.resetErrorsCount=ve.reportExtraError=ve.reportError=ve.keyword$DataError=ve.keywordError=void 0;var X=V(),ha=K(),we=Le();ve.keywordError={message:d(({keyword:e})=>(0,X.str)`must pass "${e}" keyword validation`,"message")};ve.keyword$DataError={message:d(({keyword:e,schemaType:t})=>t?(0,X.str)`"${e}" keyword must be ${t} ($data)`:(0,X.str)`"${e}" keyword is invalid ($data)`,"message")};function rf(e,t=ve.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:c}=i,u=Wc(e,t,r);n??(o||c)?Jc(s,u):Gc(i,(0,X._)`[${u}]`)}d(rf,"reportError");ve.reportError=rf;function nf(e,t=ve.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,c=Wc(e,t,r);Jc(i,c),s||o||Gc(n,we.default.vErrors)}d(nf,"reportExtraError");ve.reportExtraError=nf;function af(e,t){e.assign(we.default.errors,t),e.if((0,X._)`${we.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,X._)`${we.default.vErrors}.length`,t),()=>e.assign(we.default.vErrors,null)))}d(af,"resetErrorsCount");ve.resetErrorsCount=af;function sf({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,we.default.errors,c=>{e.const(o,(0,X._)`${we.default.vErrors}[${c}]`),e.if((0,X._)`${o}.instancePath === undefined`,()=>e.assign((0,X._)`${o}.instancePath`,(0,X.strConcat)(we.default.instancePath,s.errorPath))),e.assign((0,X._)`${o}.schemaPath`,(0,X.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,X._)`${o}.schema`,r),e.assign((0,X._)`${o}.data`,n))})}d(sf,"extendErrors");ve.extendErrors=sf;function Jc(e,t){let r=e.const("err",t);e.if((0,X._)`${we.default.vErrors} === null`,()=>e.assign(we.default.vErrors,(0,X._)`[${r}]`),(0,X._)`${we.default.vErrors}.push(${r})`),e.code((0,X._)`${we.default.errors}++`)}d(Jc,"addError");function Gc(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,X._)`new ${e.ValidationError}(${t})`):(r.assign((0,X._)`${n}.errors`,t),r.return(!1))}d(Gc,"returnErrors");var er={keyword:new X.Name("keyword"),schemaPath:new X.Name("schemaPath"),params:new X.Name("params"),propertyName:new X.Name("propertyName"),message:new X.Name("message"),schema:new X.Name("schema"),parentSchema:new X.Name("parentSchema")};function Wc(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,X._)`{}`:of(e,t,r)}d(Wc,"errorObjectCode");function of(e,t,r={}){let{gen:n,it:i}=e,s=[cf(i,r),df(e,r)];return lf(e,t,s),n.object(...s)}d(of,"errorObject");function cf({errorPath:e},{instancePath:t}){let r=t?(0,X.str)`${e}${(0,ha.getErrorPath)(t,ha.Type.Str)}`:e;return[we.default.instancePath,(0,X.strConcat)(we.default.instancePath,r)]}d(cf,"errorInstancePath");function df({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,X.str)`${t}/${e}`;return r&&(i=(0,X.str)`${i}${(0,ha.getErrorPath)(r,ha.Type.Str)}`),[er.schemaPath,i]}d(df,"errorSchemaPath");function lf(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:c}=e,{opts:u,propertyName:l,topSchemaRef:p,schemaPath:m}=c;n.push([er.keyword,i],[er.params,typeof t=="function"?t(e):t||(0,X._)`{}`]),u.messages&&n.push([er.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([er.schema,o],[er.parentSchema,(0,X._)`${p}${m}`],[we.default.data,s]),l&&n.push([er.propertyName,l])}d(lf,"extraErrorProps")});var Xc=P(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.boolOrEmptySchema=wr.topBoolOrEmptySchema=void 0;var uf=mn(),mf=V(),pf=Le(),ff={message:"boolean schema is false"};function hf(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Qc(e,!1):typeof r=="object"&&r.$async===!0?t.return(pf.default.data):(t.assign((0,mf._)`${n}.errors`,null),t.return(!0))}d(hf,"topBoolOrEmptySchema");wr.topBoolOrEmptySchema=hf;function gf(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Qc(e)):r.var(t,!0)}d(gf,"boolOrEmptySchema");wr.boolOrEmptySchema=gf;function Qc(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,uf.reportError)(i,ff,void 0,t)}d(Qc,"falseSchemaError")});var Bi=P(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.getRules=_r.isJSONType=void 0;var vf=["string","number","integer","boolean","null","object","array"],bf=new Set(vf);function yf(e){return typeof e=="string"&&bf.has(e)}d(yf,"isJSONType");_r.isJSONType=yf;function wf(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}d(wf,"getRules");_r.getRules=wf});var Ji=P(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function _f({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Zc(e,n)}d(_f,"schemaHasRulesForType");kt.schemaHasRulesForType=_f;function Zc(e,t){return t.rules.some(r=>Yc(e,r))}d(Zc,"shouldUseGroup");kt.shouldUseGroup=Zc;function Yc(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}d(Yc,"shouldUseRule");kt.shouldUseRule=Yc});var pn=P(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.reportTypeError=be.checkDataTypes=be.checkDataType=be.coerceAndCheckDataType=be.getJSONTypes=be.getSchemaTypes=be.DataType=void 0;var xf=Bi(),kf=Ji(),Sf=mn(),z=V(),ed=K(),xr;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(xr||(be.DataType=xr={}));function Rf(e){let t=td(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}d(Rf,"getSchemaTypes");be.getSchemaTypes=Rf;function td(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(xf.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}d(td,"getJSONTypes");be.getJSONTypes=td;function If(e,t){let{gen:r,data:n,opts:i}=e,s=$f(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,kf.schemaHasRulesForType)(e,t[0]));if(o){let c=Wi(t,n,i.strictNumbers,xr.Wrong);r.if(c,()=>{s.length?Ef(e,t,s):Qi(e)})}return o}d(If,"coerceAndCheckDataType");be.coerceAndCheckDataType=If;var rd=new Set(["string","number","integer","boolean","null"]);function $f(e,t){return t?e.filter(r=>rd.has(r)||t==="array"&&r==="array"):[]}d($f,"coerceToTypes");function Ef(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",(0,z._)`typeof ${i}`),c=n.let("coerced",(0,z._)`undefined`);s.coerceTypes==="array"&&n.if((0,z._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,z._)`${i}[0]`).assign(o,(0,z._)`typeof ${i}`).if(Wi(t,i,s.strictNumbers),()=>n.assign(c,i))),n.if((0,z._)`${c} !== undefined`);for(let l of r)(rd.has(l)||l==="array"&&s.coerceTypes==="array")&&u(l);n.else(),Qi(e),n.endIf(),n.if((0,z._)`${c} !== undefined`,()=>{n.assign(i,c),Pf(e,c)});function u(l){switch(l){case"string":n.elseIf((0,z._)`${o} == "number" || ${o} == "boolean"`).assign(c,(0,z._)`"" + ${i}`).elseIf((0,z._)`${i} === null`).assign(c,(0,z._)`""`);return;case"number":n.elseIf((0,z._)`${o} == "boolean" || ${i} === null
|
|
4
4
|
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(c,(0,z._)`+${i}`);return;case"integer":n.elseIf((0,z._)`${o} === "boolean" || ${i} === null
|
|
5
5
|
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(c,(0,z._)`+${i}`);return;case"boolean":n.elseIf((0,z._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(c,!1).elseIf((0,z._)`${i} === "true" || ${i} === 1`).assign(c,!0);return;case"null":n.elseIf((0,z._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(c,null);return;case"array":n.elseIf((0,z._)`${o} === "string" || ${o} === "number"
|