unspaghettit 0.10.0 → 0.10.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/build/client/_app/immutable/chunks/{CuiDce17.js → 0BoelQQE.js} +1 -1
- package/build/client/_app/immutable/chunks/0BoelQQE.js.br +0 -0
- package/build/client/_app/immutable/chunks/0BoelQQE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BJCjebKX.js → 5C2J7u1r.js} +1 -1
- package/build/client/_app/immutable/chunks/5C2J7u1r.js.br +0 -0
- package/build/client/_app/immutable/chunks/5C2J7u1r.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C5OWnbs3.js → B1saFcJe.js} +1 -1
- package/build/client/_app/immutable/chunks/B1saFcJe.js.br +0 -0
- package/build/client/_app/immutable/chunks/B1saFcJe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CMKnglgu.js → BSBvNf2s.js} +1 -1
- package/build/client/_app/immutable/chunks/BSBvNf2s.js.br +0 -0
- package/build/client/_app/immutable/chunks/BSBvNf2s.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{C5oHnmmi.js → BTWShZdL.js} +1 -1
- package/build/client/_app/immutable/chunks/BTWShZdL.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTWShZdL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{ZXZvB_hk2.js → BTxpHhg32.js} +1 -1
- package/build/client/_app/immutable/chunks/BTxpHhg32.js.br +0 -0
- package/build/client/_app/immutable/chunks/BTxpHhg32.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DgWl1fLQ.js → Bgdg6DPR.js} +1 -1
- package/build/client/_app/immutable/chunks/Bgdg6DPR.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bgdg6DPR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BGtpkapy.js → BpehGmHG.js} +1 -1
- package/build/client/_app/immutable/chunks/BpehGmHG.js.br +0 -0
- package/build/client/_app/immutable/chunks/BpehGmHG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BOSEog2D2.js → BtDsIKg62.js} +1 -1
- package/build/client/_app/immutable/chunks/BtDsIKg62.js.br +0 -0
- package/build/client/_app/immutable/chunks/BtDsIKg62.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BcHaN2XP2.js → BvKSimg82.js} +1 -1
- package/build/client/_app/immutable/chunks/BvKSimg82.js.br +0 -0
- package/build/client/_app/immutable/chunks/BvKSimg82.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{oly95dF_2.js → C2b1gmw02.js} +1 -1
- package/build/client/_app/immutable/chunks/C2b1gmw02.js.br +0 -0
- package/build/client/_app/immutable/chunks/C2b1gmw02.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{OUabT_0s2.js → CAUVc7Yy2.js} +1 -1
- package/build/client/_app/immutable/chunks/CAUVc7Yy2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CAUVc7Yy2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DHgYHuvG.js → CA_12WhF.js} +1 -1
- package/build/client/_app/immutable/chunks/CA_12WhF.js.br +0 -0
- package/build/client/_app/immutable/chunks/CA_12WhF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{r_dyVatm.js → CFjNzo8V.js} +1 -1
- package/build/client/_app/immutable/chunks/CFjNzo8V.js.br +0 -0
- package/build/client/_app/immutable/chunks/CFjNzo8V.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BRkEj7XB.js → CPcVVbKy.js} +1 -1
- package/build/client/_app/immutable/chunks/CPcVVbKy.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPcVVbKy.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CTuWJrti.js +1 -0
- package/build/client/_app/immutable/chunks/CTuWJrti.js.br +2 -0
- package/build/client/_app/immutable/chunks/CTuWJrti.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{Z-Nt_Stv2.js → CV1tUagH2.js} +1 -1
- package/build/client/_app/immutable/chunks/CV1tUagH2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CV1tUagH2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DTvCLzCO2.js → CWpn-5tk2.js} +1 -1
- package/build/client/_app/immutable/chunks/CWpn-5tk2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CWpn-5tk2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CfYiL4Vb.js → CZBRpdhp.js} +1 -1
- package/build/client/_app/immutable/chunks/CZBRpdhp.js.br +0 -0
- package/build/client/_app/immutable/chunks/CZBRpdhp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CyQ1x7xK2.js → ClHX2B3_2.js} +1 -1
- package/build/client/_app/immutable/chunks/ClHX2B3_2.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClHX2B3_2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BquLtDTN2.js → CnSyFW3c2.js} +1 -1
- package/build/client/_app/immutable/chunks/CnSyFW3c2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CnSyFW3c2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DN5KlhS6.js → CycvRNPA.js} +1 -1
- package/build/client/_app/immutable/chunks/CycvRNPA.js.br +0 -0
- package/build/client/_app/immutable/chunks/CycvRNPA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CKwL_udH.js → DI3q_uvm.js} +1 -1
- package/build/client/_app/immutable/chunks/DI3q_uvm.js.br +0 -0
- package/build/client/_app/immutable/chunks/DI3q_uvm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DmeEDSB6.js +1 -0
- package/build/client/_app/immutable/chunks/DmeEDSB6.js.br +0 -0
- package/build/client/_app/immutable/chunks/DmeEDSB6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CPig5PyW2.js → VZmPhDkp2.js} +1 -1
- package/build/client/_app/immutable/chunks/VZmPhDkp2.js.br +0 -0
- package/build/client/_app/immutable/chunks/VZmPhDkp2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CFOrhKj0.js → y29y8M4A.js} +1 -1
- package/build/client/_app/immutable/chunks/y29y8M4A.js.br +0 -0
- package/build/client/_app/immutable/chunks/y29y8M4A.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BWyM-YKn2.js → zzxk9kDd2.js} +1 -1
- package/build/client/_app/immutable/chunks/zzxk9kDd2.js.br +0 -0
- package/build/client/_app/immutable/chunks/zzxk9kDd2.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DDhYPj6j.js → app.BZbj2BPD.js} +2 -2
- package/build/client/_app/immutable/entry/app.BZbj2BPD.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BZbj2BPD.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.D9cPReIh.js +1 -0
- package/build/client/_app/immutable/entry/start.D9cPReIh.js.br +0 -0
- package/build/client/_app/immutable/entry/start.D9cPReIh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.DtB3-CXO.js → 0.AHTJ7r-X.js} +1 -1
- package/build/client/_app/immutable/nodes/0.AHTJ7r-X.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.AHTJ7r-X.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.Db-k8OuM.js → 1.C6L-oMt0.js} +1 -1
- package/build/client/_app/immutable/nodes/1.C6L-oMt0.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.C6L-oMt0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{11.D76AS3hB.js → 11.DiSC9hat.js} +1 -1
- package/build/client/_app/immutable/nodes/11.DiSC9hat.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.DiSC9hat.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{12.skE59PP9.js → 12.CJrbtKMq.js} +1 -1
- package/build/client/_app/immutable/nodes/12.CJrbtKMq.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.CJrbtKMq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{13.BcznBQYK.js → 13.mOU-88F6.js} +1 -1
- package/build/client/_app/immutable/nodes/13.mOU-88F6.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.mOU-88F6.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{14.CwxinXQX.js → 14.DqwLYN0z.js} +1 -1
- package/build/client/_app/immutable/nodes/14.DqwLYN0z.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.DqwLYN0z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.Bjjh6v7q.js → 15.ByVIj_T9.js} +1 -1
- package/build/client/_app/immutable/nodes/15.ByVIj_T9.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.ByVIj_T9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{16.BPe4oI9b.js → 16.CLkfcAax.js} +1 -1
- package/build/client/_app/immutable/nodes/16.CLkfcAax.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.CLkfcAax.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.CB77496k.js → 2.2v4BaWqa.js} +1 -1
- package/build/client/_app/immutable/nodes/2.2v4BaWqa.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.2v4BaWqa.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.D5-D84Kj.js → 3.YOJaNQoq.js} +1 -1
- package/build/client/_app/immutable/nodes/3.YOJaNQoq.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.YOJaNQoq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.TARjGZi1.js → 4.ClVWSTyD.js} +1 -1
- package/build/client/_app/immutable/nodes/4.ClVWSTyD.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.ClVWSTyD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{5.BxXmtjjf.js → 5.De0JB_H4.js} +1 -1
- package/build/client/_app/immutable/nodes/5.De0JB_H4.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.De0JB_H4.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.Czkgnd6_.js → 6.B8loDmxX.js} +1 -1
- package/build/client/_app/immutable/nodes/6.B8loDmxX.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.B8loDmxX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CniICgZm.js → 7.CppSN6hf.js} +1 -1
- package/build/client/_app/immutable/nodes/7.CppSN6hf.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CppSN6hf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{8.B8uueTNo.js → 8.Df_UXJ2g.js} +1 -1
- package/build/client/_app/immutable/nodes/8.Df_UXJ2g.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.Df_UXJ2g.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.DWmk7Pd9.js → 9.CQ69TLwl.js} +1 -1
- package/build/client/_app/immutable/nodes/9.CQ69TLwl.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CQ69TLwl.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/0-C8fEGjyK.js +15 -0
- package/build/server/chunks/1-C3o8Ivew.js +9 -0
- package/build/server/chunks/11-D8_9wThY.js +9 -0
- package/build/server/chunks/12-ztrUILw-.js +9 -0
- package/build/server/chunks/13-Ci-fdtk_.js +9 -0
- package/build/server/chunks/14-DfzBqqoj.js +9 -0
- package/build/server/chunks/15-DafC9jL-.js +9 -0
- package/build/server/chunks/16-DCQisWnz.js +9 -0
- package/build/server/chunks/2-DeVni2AM.js +9 -0
- package/build/server/chunks/{3-0r0RSOA9.js → 3-DlRG8hYi.js} +3 -3
- package/build/server/chunks/4-2f-_luM0.js +16 -0
- package/build/server/chunks/5-AkgzSIbg.js +9 -0
- package/build/server/chunks/6-rKP3xRyj.js +9 -0
- package/build/server/chunks/7-DptpyScX.js +9 -0
- package/build/server/chunks/8-BRvqJk1w.js +9 -0
- package/build/server/chunks/9-AwRne9gE.js +9 -0
- package/build/server/chunks/{DeleteFeature-3Z9jICf3.js → DeleteFeature-B62bf3GK.js} +25 -3
- package/build/server/chunks/{DeleteProject-Cj-M5uVd.js → DeleteProject-BNAslHgC.js} +2 -2
- package/build/server/chunks/{DigestView-JSb1Scor.js → DigestView-BGtgrBL7.js} +18 -18
- package/build/server/chunks/{FeatureCard-BusFP824.js → FeatureCard-DL0LRc7z.js} +4 -4
- package/build/server/chunks/{FeatureJson-Cs1UOjGW.js → FeatureJson-DUV0zaey.js} +2 -2
- package/build/server/chunks/{FeatureTransforms-DtefZJbq.js → FeatureTransforms-D32UsHDB.js} +2 -2
- package/build/server/chunks/{ManageTagsDialog-DrTjebtT.js → ManageTagsDialog-uEVkXsRY.js} +5 -5
- package/build/server/chunks/{ProgressBar-DrNo5Lo9.js → ProgressBar-CeO2Ekl5.js} +2 -2
- package/build/server/chunks/{ProjectionViewer-CzwhMdwz.js → ProjectionViewer-DWjyodw_.js} +5 -5
- package/build/server/chunks/{ProjectsIndex-DK1e5hKG.js → ProjectsIndex-DB8nS_b4.js} +10 -10
- package/build/server/chunks/{RenameTag-D2lCrFRx.js → RenameTag-BsXV0rQu.js} +2 -2
- package/build/server/chunks/{ScenarioApplier-DHITq-3c.js → ScenarioApplier-BLR9Ka-r.js} +2 -2
- package/build/server/chunks/{SimulationClock-Ct2QIzx4.js → SimulationClock-DFHscPjS.js} +2 -2
- package/build/server/chunks/{SimulatorEngine-CLuFKcRr.js → SimulatorEngine-VZtFxJqF.js} +3 -3
- package/build/server/chunks/{TagDotStrip-CS-Wfj_k.js → TagDotStrip-BBm2zFBl.js} +4 -4
- package/build/server/chunks/{TagFilterSelect-Bdd_JucF.js → TagFilterSelect-buFv_eK3.js} +7 -7
- package/build/server/chunks/{TagPalette-BHcMcwnB.js → TagPalette-DvCSL7eP.js} +2 -1
- package/build/server/chunks/{_layout.svelte-Dnp5YlQh.js → _layout.svelte-CsShht_a.js} +18 -18
- package/build/server/chunks/{_page.svelte--Zk9G67D.js → _page.svelte--qKR7Hgw.js} +15 -15
- package/build/server/chunks/{_page.svelte-CeSKWDA9.js → _page.svelte-Baq8arOE.js} +13 -13
- package/build/server/chunks/_page.svelte-Bc6maq02.js +37 -0
- package/build/server/chunks/{_page.svelte-Ca-yzK5f.js → _page.svelte-BiDFcNg-.js} +15 -15
- package/build/server/chunks/{_page.svelte-DMmsHdHC.js → _page.svelte-BrMYLNwC.js} +13 -13
- package/build/server/chunks/{_page.svelte-D8zwFGI7.js → _page.svelte-CDPskdLp.js} +14 -14
- package/build/server/chunks/{_page.svelte-CRda0InI.js → _page.svelte-CEcn6LYT.js} +14 -14
- package/build/server/chunks/{_page.svelte-DZp4D5AF.js → _page.svelte-CXFExxq7.js} +10 -10
- package/build/server/chunks/{_page.svelte-BaUudRf8.js → _page.svelte-CcUdQuxW.js} +14 -14
- package/build/server/chunks/{_page.svelte-Dn9ZI02Q.js → _page.svelte-DB18QIBU.js} +17 -17
- package/build/server/chunks/{_page.svelte-Dqm9Wt2P.js → _page.svelte-Dd6EVBs9.js} +19 -19
- package/build/server/chunks/{_page.svelte-CDMEZbnN.js → _page.svelte-k879J5sw.js} +11 -11
- package/build/server/chunks/_page.svelte-pe8dHfff.js +37 -0
- package/build/server/chunks/{_page.svelte-T6OdMppW.js → _page.svelte-pvvT5BC2.js} +20 -20
- package/build/server/chunks/{_server.ts-7_ZHRtsW.js → _server.ts-50KliT1R.js} +4 -4
- package/build/server/chunks/{_server.ts-SK7KLsH_.js → _server.ts-7LGWJ4zZ.js} +4 -4
- package/build/server/chunks/{_server.ts-CakPJzhA.js → _server.ts-A7nz6mHm.js} +4 -4
- package/build/server/chunks/{_server.ts-BAWpzUjG.js → _server.ts-B5T4Izn4.js} +5 -5
- package/build/server/chunks/{_server.ts-B8Ar4gwq.js → _server.ts-B_fU3RHE.js} +2 -2
- package/build/server/chunks/{_server.ts-C2Vddbd9.js → _server.ts-BiudWP6I.js} +4 -4
- package/build/server/chunks/{_server.ts-DpaFWwb4.js → _server.ts-Bx1FOJV4.js} +4 -4
- package/build/server/chunks/{_server.ts-BcdfknA1.js → _server.ts-CEysO6Ay.js} +7 -7
- package/build/server/chunks/{_server.ts-cUat91Dq.js → _server.ts-CJ5KwUpp.js} +7 -7
- package/build/server/chunks/{_server.ts-DVcSGReg.js → _server.ts-Cb3e30UG.js} +8 -8
- package/build/server/chunks/{_server.ts-CWGYB1sh.js → _server.ts-CeB8D3Kv.js} +4 -4
- package/build/server/chunks/{_server.ts-Bdhr-X4W.js → _server.ts-Cgvqn2Y9.js} +4 -4
- package/build/server/chunks/{_server.ts-CzWTLxUT.js → _server.ts-D-AcEZeU.js} +4 -4
- package/build/server/chunks/{_server.ts-DN638aAs.js → _server.ts-D5RTYo-B.js} +4 -4
- package/build/server/chunks/{_server.ts-DJ2NDG3j.js → _server.ts-DaAkP2-s.js} +4 -4
- package/build/server/chunks/{_server.ts-A-c3m5oY.js → _server.ts-GNzm453o.js} +6 -6
- package/build/server/chunks/{_server.ts-C85xQ-Hl.js → _server.ts-LoU0MoJj.js} +5 -5
- package/build/server/chunks/{_server.ts-Bf1XUFNH.js → _server.ts-P9QMivyJ.js} +4 -4
- package/build/server/chunks/{_server.ts-Dl9uBpSg.js → _server.ts-_2YOOOhz.js} +7 -7
- package/build/server/chunks/{browserContainer-6TbJbwua.js → browserContainer-yBneSL4k.js} +7 -7
- package/build/server/chunks/{buildSearchDocs-BrmWPZWy.js → buildSearchDocs-Dc6YnYGl.js} +2 -2
- package/build/server/chunks/{builderModeStore.svelte--fWSA_3N.js → builderModeStore.svelte-BmKbXUNW.js} +7 -7
- package/build/server/chunks/{client-uZso485O.js → client-B8CUnk0f.js} +2 -2
- package/build/server/chunks/{error.svelte-r4E3ymf6.js → error.svelte-BeJ1UZBm.js} +4 -4
- package/build/server/chunks/{featureQueueContext-C1Ce0iiL.js → featureQueueContext-BiusH9dO.js} +2 -2
- package/build/server/chunks/{featureStore.svelte-CwrfMF7q.js → featureStore.svelte-iV2Z8bjs.js} +5 -5
- package/build/server/chunks/{internal-BhW0DAbW.js → internal-DyIsvMbc.js} +2 -2
- package/build/server/chunks/{projectBundleClient-CtwUt5G_.js → projectBundleClient-CwHMP-EX.js} +3 -3
- package/build/server/chunks/{projectContextStore.svelte-9emEyKKi.js → projectContextStore.svelte-C-iALqjP.js} +3 -3
- package/build/server/chunks/{projectFeaturesStore.svelte-VuFAZwFy.js → projectFeaturesStore.svelte-HMDk1vdf.js} +2 -2
- package/build/server/chunks/{projectStore.svelte-Dyr5JX4I.js → projectStore.svelte-DvzFfw0r.js} +4 -4
- package/build/server/chunks/{reconcile-Byh0GnqL.js → reconcile-DsF39JYg.js} +2 -2
- package/build/server/chunks/{snapshotRepository-DyccX9dO.js → snapshotRepository-C9ahSzwU.js} +6 -4
- package/build/server/chunks/{state-VwavR9uS.js → state-C1g_6UEr.js} +3 -3
- package/build/server/chunks/{stores-jRWW47mb.js → stores-rN8YMyeu.js} +3 -3
- package/build/server/chunks/{sync-CeeTnvzJ.js → sync-Q9F02i5c.js} +2 -2
- package/build/server/chunks/{syncAwareRepositories-AVvcGscu.js → syncAwareRepositories-BwOEmK2h.js} +2 -2
- package/build/server/chunks/{tagPaletteStore.svelte-9Wd8_rCw.js → tagPaletteStore.svelte-DDBTFIoK.js} +4 -4
- package/build/server/index.js +1 -1
- package/build/server/manifest.js +36 -36
- package/package.json +1 -1
- package/src/features/behavior-digest/domain/services/buildDigest.ts +28 -12
- package/src/features/behavior-model/domain/services/FeatureExpressionNormalizer.ts +9 -0
- package/src/features/behavior-model/domain/services/validation/featureShape.ts +16 -0
- package/src/features/behavior-model/domain/services/validation/shared.ts +23 -0
- package/src/features/behavior-model/infrastructure/persistence/JsonFolderFeatureRepository.ts +9 -3
- package/build/client/_app/immutable/chunks/BGtpkapy.js.br +0 -0
- package/build/client/_app/immutable/chunks/BGtpkapy.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJCjebKX.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJCjebKX.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOSEog2D2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOSEog2D2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BRkEj7XB.js.br +0 -0
- package/build/client/_app/immutable/chunks/BRkEj7XB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BWyM-YKn2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BWyM-YKn2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BcHaN2XP2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BcHaN2XP2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BquLtDTN2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BquLtDTN2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C2-NAsCA.js +0 -1
- package/build/client/_app/immutable/chunks/C2-NAsCA.js.br +0 -2
- package/build/client/_app/immutable/chunks/C2-NAsCA.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C5OWnbs3.js.br +0 -0
- package/build/client/_app/immutable/chunks/C5OWnbs3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C5oHnmmi.js.br +0 -0
- package/build/client/_app/immutable/chunks/C5oHnmmi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CFOrhKj0.js.br +0 -0
- package/build/client/_app/immutable/chunks/CFOrhKj0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CHEhPoA2.js +0 -1
- package/build/client/_app/immutable/chunks/CHEhPoA2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CHEhPoA2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CKwL_udH.js.br +0 -0
- package/build/client/_app/immutable/chunks/CKwL_udH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CMKnglgu.js.br +0 -0
- package/build/client/_app/immutable/chunks/CMKnglgu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CPig5PyW2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPig5PyW2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CfYiL4Vb.js.br +0 -0
- package/build/client/_app/immutable/chunks/CfYiL4Vb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CuiDce17.js.br +0 -2
- package/build/client/_app/immutable/chunks/CuiDce17.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CyQ1x7xK2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CyQ1x7xK2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DHgYHuvG.js.br +0 -0
- package/build/client/_app/immutable/chunks/DHgYHuvG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DN5KlhS6.js.br +0 -0
- package/build/client/_app/immutable/chunks/DN5KlhS6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DTvCLzCO2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DTvCLzCO2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DgWl1fLQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/DgWl1fLQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/OUabT_0s2.js.br +0 -0
- package/build/client/_app/immutable/chunks/OUabT_0s2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Z-Nt_Stv2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Z-Nt_Stv2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ZXZvB_hk2.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZXZvB_hk2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/oly95dF_2.js.br +0 -0
- package/build/client/_app/immutable/chunks/oly95dF_2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/r_dyVatm.js.br +0 -0
- package/build/client/_app/immutable/chunks/r_dyVatm.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DDhYPj6j.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DDhYPj6j.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.XTH1H-BV.js +0 -1
- package/build/client/_app/immutable/entry/start.XTH1H-BV.js.br +0 -0
- package/build/client/_app/immutable/entry/start.XTH1H-BV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.DtB3-CXO.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DtB3-CXO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.Db-k8OuM.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.Db-k8OuM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.D76AS3hB.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.D76AS3hB.js.gz +0 -0
- package/build/client/_app/immutable/nodes/12.skE59PP9.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.skE59PP9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/13.BcznBQYK.js.br +0 -0
- package/build/client/_app/immutable/nodes/13.BcznBQYK.js.gz +0 -0
- package/build/client/_app/immutable/nodes/14.CwxinXQX.js.br +0 -0
- package/build/client/_app/immutable/nodes/14.CwxinXQX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.Bjjh6v7q.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.Bjjh6v7q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/16.BPe4oI9b.js.br +0 -0
- package/build/client/_app/immutable/nodes/16.BPe4oI9b.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CB77496k.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CB77496k.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.D5-D84Kj.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.D5-D84Kj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.TARjGZi1.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.TARjGZi1.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.BxXmtjjf.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.BxXmtjjf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.Czkgnd6_.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.Czkgnd6_.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CniICgZm.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CniICgZm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.B8uueTNo.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.B8uueTNo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.DWmk7Pd9.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.DWmk7Pd9.js.gz +0 -0
- package/build/server/chunks/0-BssfTySQ.js +0 -15
- package/build/server/chunks/1-DAizMjCG.js +0 -9
- package/build/server/chunks/11-O3MGnfVf.js +0 -9
- package/build/server/chunks/12-Cp8R4i27.js +0 -9
- package/build/server/chunks/13-CydwAfRj.js +0 -9
- package/build/server/chunks/14-CScpHG0p.js +0 -9
- package/build/server/chunks/15-Dq0gC40P.js +0 -9
- package/build/server/chunks/16-I6t9ZQA9.js +0 -9
- package/build/server/chunks/2-DVqm7cgN.js +0 -9
- package/build/server/chunks/4-BeX1xjbu.js +0 -16
- package/build/server/chunks/5-BnIaZs0S.js +0 -9
- package/build/server/chunks/6-BlFb3TLL.js +0 -9
- package/build/server/chunks/7-bS6Z1ZJG.js +0 -9
- package/build/server/chunks/8-B3bpJkfc.js +0 -9
- package/build/server/chunks/9-pHPxcD8H.js +0 -9
- package/build/server/chunks/_page.svelte-CENWYQVb.js +0 -37
- package/build/server/chunks/_page.svelte-Dt6KOtY5.js +0 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wt as e}from"./
|
|
1
|
+
import{wt as e}from"./DmeEDSB6.js";var t=null,n=new Set,r=()=>{if(t)return;let r=e.token,i=r.length>0?`/api/sync/events?token=${encodeURIComponent(r)}`:`/api/sync/events`;t=new EventSource(i),t.addEventListener(`sync`,e=>{let t;try{t=JSON.parse(e.data)}catch{return}for(let e of n)try{e(t)}catch{}})},i=e=>(r(),n.add(e),()=>{n.delete(e)});export{i as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./
|
|
1
|
+
import{n as e}from"./Bgdg6DPR.js";import{Dt as t,Tt as n,ht as r}from"./DmeEDSB6.js";import"./CTuWJrti.js";import{t as i}from"./CRYP5_po.js";import{t as a}from"./CZBRpdhp.js";import{t as o}from"./BpehGmHG.js";import{t as s}from"./BQ9GodWX.js";var c=e=>t=>typeof t?.name==`string`&&i(t.name,e),l=()=>{let e=a.feature;if(!e)return null;for(let t=e.surfaces.length-1;t>=0;t--){let n=e.surfaces[t];if(n&&n.actions.length!==0)return n.actions[n.actions.length-1]??null}return null},u=()=>{let e=l();return e?e.parameters.some(e=>i(e.name,`politely`)&&e.type===`boolean`):!1},d=()=>{let e=l();return e?e.rules.filter(e=>!e.condition||`kind`in e.condition?!1:r(e.condition.left)&&e.effect.type===`show_message`).length:0},f={id:`first-feature`,name:`Build your first feature, end to end`,summary:`Walks you from an empty app to a Feature with one Action you run in the simulator. About 3 minutes. Uses fixed names so the experience is the same for everyone.`,steps:[{id:`welcome`,title:`Welcome`,body:`We'll build a tiny Feature together and run it in the simulator. We'll use fixed names so the rest of the tutorial reads the same way for you as for anyone else. Click Next when you're ready.`,advance:{kind:`manual`}},{id:`new-project`,title:`Create a project`,body:`Click 'New project'. A Project groups Features that belong to the same product or codebase.`,target:`[data-tour="new-project-button"]`,route:{pathname:`/projects`,label:`Go to Projects`},advance:{kind:`click`,selector:`[data-tour="new-project-button"]`}},{id:`fill-project`,title:`Name the project`,body:`Type exactly 'Hello World' in the Name field, then click 'New project'. The description is pre-filled - keep it as-is or tweak if you want.`,target:`[data-tour="new-project-form"]`,focusSelector:`[data-tour="new-project-form"] input[type="text"]`,prefill:[{selector:`[data-tour="new-project-description"]`,value:`A first project to learn Unspaghettit.`}],requireExact:{formId:`new-project`,value:`Hello World`},advance:{kind:`event`,event:`project.created`,match:c(`Hello World`)}},{id:`new-feature`,title:`Create a feature`,body:`Inside your project, click 'New feature'. A Feature is one coherent slice of behavior. Keep it small.`,target:`[data-tour="new-feature-button"]`,advance:{kind:`click`,selector:`[data-tour="new-feature-button"]`}},{id:`fill-feature`,title:`Name the feature`,body:`Type 'Greeting' in the Name field, then click 'Create feature'. The description is pre-filled.`,target:`[data-tour="new-feature-form"]`,focusSelector:`[data-tour="new-feature-form"] input[type="text"]`,prefill:[{selector:`[data-tour="new-feature-description"]`,value:`User opens the app and is welcomed.`}],requireExact:{formId:`new-feature`,value:`Greeting`},advance:{kind:`event`,event:`feature.created`,match:c(`Greeting`)}},{id:`add-surface`,title:`Add a surface`,body:`Click 'Add surface'. A Surface is one context where actions happen (a screen, a terminal, a workflow).`,target:`[data-tour="add-surface-button"]`,advance:{kind:`click`,selector:`[data-tour="add-surface-button"]`}},{id:`chooser-create-new`,title:`Pick "Create new"`,body:`We're starting from scratch, so click the 'Create new' card.`,target:`[data-tour="chooser-create-new"]`,advance:{kind:`click`,selector:`[data-tour="chooser-create-new"]`}},{id:`fill-surface`,title:`Name the surface`,body:`Surface name: type exactly 'Welcome Screen'. Keep the type on Screen. Click 'Create surface' to submit.`,target:`[data-tour="blank-surface-form"]`,focusSelector:`[data-tour="blank-surface-form"] input[type="text"]`,requireExact:{formId:`blank-surface`,value:`Welcome Screen`},advance:{kind:`event`,event:`editor.surface.added`,match:c(`Welcome Screen`)}},{id:`add-action`,title:`Add an action`,body:`Type exactly 'Say Hello' in the action form, then click 'Add action' (or press Enter). An Action is something the user or system can do on this surface.`,target:`[data-tour="add-action-form"]`,focusSelector:`[data-tour="add-action-form"] input[type="text"]`,requireExact:{formId:`add-action`,value:`Say Hello`},advance:{kind:`event`,event:`editor.action.added`,match:c(`Say Hello`)}},{id:`add-parameter`,title:`Give the action a parameter`,body:`The Say Hello editor just opened. In the Parameters section, click '+ Parameter'. The name field will focus automatically. Then:
|
|
2
2
|
1. type 'politely' for the Name
|
|
3
3
|
2. change Type to 'boolean'
|
|
4
4
|
Next unlocks once a 'politely' boolean parameter exists on Say Hello.`,target:`[data-tour="action-parameters-section"]`,advance:{kind:`manual`},canAdvance:u},{id:`add-rule-not-polite`,title:`Rule 1: the casual hello`,body:`We want the action to say 'Hi.' only when politely is NO. Add the first rule:
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,it as t,nt as n,rt as r}from"./D50Xf4Qj.js";import{i,t as a}from"./
|
|
1
|
+
import{V as e,it as t,nt as n,rt as r}from"./D50Xf4Qj.js";import{i,t as a}from"./DmeEDSB6.js";var o=new class{#e=t(!1);get loading(){return e(this.#e)}set loading(e){r(this.#e,e,!0)}#t=t(null);get project(){return e(this.#t)}set project(e){r(this.#t,e,!0)}#n=t(n([]));get siblings(){return e(this.#n)}set siblings(e){r(this.#n,e,!0)}#r=t(null);get error(){return e(this.#r)}set error(e){r(this.#r,e,!0)}currentFeatureId=null;async load(e){this.currentFeatureId=e,this.loading=!0,this.error=null;try{let t=await a(),n=await t.useCases.findProjectContainingFeature(e);if(this.currentFeatureId!==e)return;if(this.project=n,!n){this.siblings=[];return}let r=n.featureIds.filter(t=>t!==e),i=[];for(let n of r){let r=await t.useCases.getFeature(n);if(this.currentFeatureId!==e)return;r&&i.push(r)}this.siblings=i}catch(e){this.error=e.message}finally{this.currentFeatureId===e&&(this.loading=!1)}}reset(){this.currentFeatureId=null,this.project=null,this.siblings=[],this.error=null,this.loading=!1}get isInProject(){return this.project!==null}isActionQueued(e,t){let n=this.project?.implementationQueue??[],r=`action:${String(e)}:${String(t)}`;return n.some(e=>i(e)===r)}isSurfaceQueued(e,t){let n=this.project?.implementationQueue??[],r=`surface:${String(e)}:${String(t)}`;return n.some(e=>i(e)===r)}async enqueueAction(e,t){let n=this.project;if(!n)return!1;try{let r=await(await a()).useCases.enqueueQueueItem(n.id,{kind:`action`,featureId:e,actionId:t});return this.project=r.project,!0}catch(e){return this.error=e.message,!1}}async enqueueSurface(e,t){let n=this.project;if(!n)return!1;try{let r=await(await a()).useCases.enqueueQueueItem(n.id,{kind:`surface`,featureId:e,surfaceId:t});return this.project=r.project,!0}catch(e){return this.error=e.message,!1}}async dequeueByItemId(e){let t=this.project;if(t)try{let n=await(await a()).useCases.dequeueQueueItem(t.id,e);this.project=n}catch(e){this.error=e.message}}findQueueItemIdForAction(e,t){let n=this.project?.implementationQueue??[],r=`action:${String(e)}:${String(t)}`,a=n.find(e=>i(e)===r);return a?a.id:null}findQueueItemIdForSurface(e,t){let n=this.project?.implementationQueue??[],r=`surface:${String(e)}:${String(t)}`,a=n.find(e=>i(e)===r);return a?a.id:null}};export{o as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,E as t,F as n,J as r,N as i,R as a,V as o,_t as s,a as c,d as l,dt as u,ft as d,it as f,j as p,ot as m,q as h,rt as g,s as _,tt as v,y,z as b}from"./D50Xf4Qj.js";import"./xihTtKlq.js";import{R as x}from"./
|
|
1
|
+
import{$ as e,E as t,F as n,J as r,N as i,R as a,V as o,_t as s,a as c,d as l,dt as u,ft as d,it as f,j as p,ot as m,q as h,rt as g,s as _,tt as v,y,z as b}from"./D50Xf4Qj.js";import"./xihTtKlq.js";import{R as x}from"./DmeEDSB6.js";var S=n(`<div role="menu"><!></div>`),C=n(`<div class="relative inline-flex"><button type="button" aria-haspopup="menu"><svg viewBox="0 0 24 24" fill="currentColor" class="h-4 w-4" aria-hidden="true"><circle cx="12" cy="5" r="1.7"></circle><circle cx="12" cy="12" r="1.7"></circle><circle cx="12" cy="19" r="1.7"></circle></svg></button> <!></div>`);function w(n,a){d(a,!0);let x=c(a,`label`,3,`More actions`),w=c(a,`align`,3,`right`),T=c(a,`placement`,3,`down`),E=c(a,`triggerClass`,3,``),D=f(!1),O=f(null),k=()=>{g(D,!1)};r(()=>{if(!o(D))return;let e=e=>{o(O)&&!o(O).contains(e.target)&&g(D,!1)},t=e=>{e.key===`Escape`&&g(D,!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}});let A=m(()=>`${T()===`up`?`bottom-full mb-1`:`top-full mt-1`} ${w()===`right`?`right-0`:`left-0`}`);var j=C(),M=e(j),N=v(M,2),P=n=>{var r=S();t(e(r),()=>a.children,()=>k),s(r),h(()=>y(r,1,`absolute z-50 min-w-40 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-xl shadow-slate-950/10 ${o(A)??``}`)),i(n,r)};p(N,e=>{o(D)&&e(P)}),s(j),_(j,e=>g(O,e),()=>o(O)),h(()=>{l(M,`aria-expanded`,o(D)),l(M,`aria-label`,x()),l(M,`title`,x()),y(M,1,`grid h-8 w-8 place-items-center rounded-md text-slate-500 transition hover:bg-slate-100 hover:text-slate-800 ${E()??``}`)}),b(`click`,M,()=>g(D,!o(D))),i(n,j),u()}a([`click`]);var T=n(`<button type="button" role="menuitem"><!></button>`);function E(n,r){let a=c(r,`danger`,3,!1),o=c(r,`disabled`,3,!1);var l=T();t(e(l),()=>r.children),s(l),h(()=>{l.disabled=o(),y(l,1,`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-50 ${a()?`text-red-600 hover:bg-red-50`:`text-slate-700 hover:bg-slate-50`}`)}),b(`click`,l,function(...e){r.onclick?.apply(this,e)}),i(n,l)}a([`click`]);var D=6e5,O=16,k=12,A=()=>{if(typeof crypto>`u`||!crypto.subtle)throw Error(`WebCrypto not available. Use a modern browser served over https or localhost.`);return crypto.subtle},j=e=>{let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)},M=e=>{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)n[e]=t.charCodeAt(e);return n},N=async(e,t)=>{let n=new TextEncoder,r=await A().importKey(`raw`,n.encode(e),{name:`PBKDF2`},!1,[`deriveKey`]);return A().deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:D},r,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])},P=class extends Error{constructor(){super(`Passphrase must be at least 8 characters.`),this.name=`WeakPassphraseError`}},F=class extends Error{constructor(){super(`Wrong passphrase, or the .unspa file is corrupted.`),this.name=`WrongPassphraseError`}},I=class extends Error{constructor(e){super(`Not a valid Unspaghettit bundle: ${e}`),this.name=`MalformedEnvelopeError`}},L=async(e,t)=>{if(t.length<8)throw new P;let n=crypto.getRandomValues(new Uint8Array(O)),r=crypto.getRandomValues(new Uint8Array(k)),i=await N(t,n),a=await A().encrypt({name:`AES-GCM`,iv:r},i,new TextEncoder().encode(e));return{format:`unspaghettit-encrypted-bundle`,version:1,algorithm:`AES-GCM`,kdf:`PBKDF2-SHA256`,iterations:D,salt:j(n),iv:j(r),ciphertext:j(new Uint8Array(a))}},R=e=>{if(!e||typeof e!=`object`)throw new I(`not an object`);let t=e;if(t.format!==`unspaghettit-encrypted-bundle`)throw new I(`wrong format tag`);if(t.version!==1)throw new I(`unsupported version ${t.version}`);if(t.algorithm!==`AES-GCM`)throw new I(`unsupported algorithm ${t.algorithm}`);if(t.kdf!==`PBKDF2-SHA256`)throw new I(`unsupported kdf ${t.kdf}`);if(typeof t.iterations!=`number`||t.iterations<1e5)throw new I(`iterations missing or too low`);if(typeof t.salt!=`string`||typeof t.iv!=`string`||typeof t.ciphertext!=`string`)throw new I(`salt / iv / ciphertext must be base64 strings`);return t},z=async(e,t)=>{let n=R(e),r=M(n.salt),i=M(n.iv),a=M(n.ciphertext),o=await N(t,r);try{let e=await A().decrypt({name:`AES-GCM`,iv:i},o,a);return new TextDecoder().decode(e)}catch{throw new F}},B=e=>{let t=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,64);return t.length>0?t:`project`},V=async(e,t)=>{let n=await x(`/api/projects/${encodeURIComponent(String(e))}/bundle`);if(!n.ok)throw Error(`Bundle fetch failed (${n.status}): ${await n.text().catch(()=>``)}`);let r=await n.json();return{envelope:await L(JSON.stringify(r),t),projectName:r.project.name}},H=(e,t)=>{let n=new Date().toISOString().slice(0,10).replace(/-/g,``),r=`${B(t)}-${n}.unspa`,i=new Blob([JSON.stringify(e,null,2)],{type:`application/octet-stream`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=r,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(a),1e3)},U=async e=>{let t;try{t=await e.text()}catch{throw new I(`could not read ${e.name}`)}let n;try{n=JSON.parse(t)}catch{throw new I(`file is not valid JSON`)}if(!n||typeof n!=`object`)throw new I(`file is not a JSON object`);return n},W=async(e,t)=>{let n=await z(e,t),r;try{r=JSON.parse(n)}catch{throw new I(`decrypted payload is not valid JSON`)}let i=await x(`/api/projects/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)});if(!i.ok)throw Error(`Import failed (${i.status}): ${await i.text().catch(()=>``)}`);return await i.json()};export{I as a,E as c,U as i,w as l,V as n,P as o,W as r,F as s,H as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as e}from"./
|
|
1
|
+
import{G as e}from"./DmeEDSB6.js";var t=class extends Error{kind;id;constructor(e,t){super(`${e} ${t} not found in feature`),this.kind=e,this.id=t,this.name=`EntityNotFoundInFeatureError`}},n=(e,n,r,i)=>{let a=!1,o=e.map(e=>e.id===n?(a=!0,i(e)):e);if(!a)throw new t(r,n);return o},r=(e,t,r)=>({...e,surfaces:n(e.surfaces,String(t),`surface`,r)}),i=(e,t,r)=>({...e,actions:n(e.actions,String(t),`action`,r)}),a=(e,t,n)=>{if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=e.slice(),i=r[t];return r[t]=r[n],r[n]=i,r},o=(e,t)=>({...e,surfaces:[...e.surfaces,t]}),s=(e,t)=>({...e,surfaces:e.surfaces.filter(e=>e.id!==t)}),c=(e,t)=>{let n=h(e,e[t].id),r=t;for(let i=t+1;i<e.length&&!(h(e,e[i].id)<=n);i+=1)r=i;return{start:t,end:r}},l=(e,t,n)=>{let r=e.surfaces,i=r.findIndex(e=>e.id===t);if(i<0)return e;let a=h(r,t),o=c(r,i);if(n===1){let t=o.end+1;if(t>=r.length||h(r,r[t].id)!==a)return e;let n=c(r,t);return{...e,surfaces:[...r.slice(0,o.start),...r.slice(n.start,n.end+1),...r.slice(o.start,o.end+1),...r.slice(n.end+1)]}}if(o.start===0)return e;let s=o.start-1;if(h(r,r[s].id)<a)return e;let l=s;for(;l>0&&h(r,r[l].id)>a;)--l;return{...e,surfaces:[...r.slice(0,l),...r.slice(o.start,o.end+1),...r.slice(l,o.start),...r.slice(o.end+1)]}},u=(e,t)=>{let n=e.findIndex(e=>e.id===t);if(n<=0)return!1;let r=h(e,t);return h(e,e[n-1].id)>=r},d=(e,t)=>{let n=e.findIndex(e=>e.id===t);if(n<0)return!1;let r=h(e,t),i=c(e,n).end+1;return i>=e.length?!1:h(e,e[i].id)===r},f=(e,t,n)=>{if(n.targetId===t)return e;let r=e.surfaces,i=r.findIndex(e=>e.id===t),a=r.findIndex(e=>e.id===n.targetId);if(i<0||a<0)return e;let o=c(r,i);if(a>=o.start&&a<=o.end)return e;let s=r[a],l=n.kind===`inside`?s.id:s.parentSurfaceId??null;if(l===t||l!==null&&p(r,l,t))return e;let u=[{...r[i],parentSurfaceId:l??void 0},...r.slice(o.start+1,o.end+1)],d=[...r.slice(0,o.start),...r.slice(o.end+1)],f=d.findIndex(e=>e.id===n.targetId);if(f<0)return e;let m;return m=n.kind===`before`?f:c(d,f).end+1,{...e,surfaces:[...d.slice(0,m),...u,...d.slice(m)]}},p=(e,t,n)=>{let r=e.find(e=>e.id===t),i=0;for(;r?.parentSurfaceId&&i<32;){if(r.parentSurfaceId===n)return!0;r=e.find(e=>e.id===r.parentSurfaceId),i++}return!1},m=(e,t,n)=>n!==null&&(n===t||!e.surfaces.some(e=>e.id===n)||p(e.surfaces,n,t))?e:r(e,t,e=>({...e,parentSurfaceId:n??void 0})),h=(e,t)=>{let n=0,r=e.find(e=>e.id===t);for(;r?.parentSurfaceId&&n<32;){let t=e.find(e=>e.id===r.parentSurfaceId);if(!t)break;r=t,n++}return n},ee=(e,t,n)=>r(e,t,e=>({...e,...n})),g=(e,t,n)=>r(e,t,e=>({...e,stateDefinitions:[...e.stateDefinitions,n]})),_=(e,n,i,a)=>r(e,n,e=>{let n=e.stateDefinitions.find(e=>e.id===i);if(!n)throw new t(`stateDefinition`,String(i));let r={...n,...a},o=`enumValues`in a&&!v(n.enumValues,r.enumValues),s=`type`in a&&n.type!==r.type,c=e.stateDefinitions.map(e=>e.id===i?r:e);if(!o&&!s)return{...e,stateDefinitions:c};let l=r.path,u=r.type===`enum`?r.enumValues:void 0,d=r.type===`enum`;return{...e,stateDefinitions:c,actions:e.actions.map(e=>({...e,parameters:e.parameters.map(e=>{if(e.bindToStatePath!==l||e.type!==`enum`)return e;if(!d){let{enumValues:t,...n}=e;return n}return u===void 0?e:{...e,enumValues:u}})}))}}),v=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0},y=(e,t,n)=>r(e,t,e=>({...e,stateDefinitions:e.stateDefinitions.filter(e=>e.id!==n)})),b=(e,t,n,i)=>r(e,t,e=>{let t=e.stateDefinitions.findIndex(e=>e.id===n);return t<0?e:{...e,stateDefinitions:a(e.stateDefinitions,t,t+i)}}),x=(e,t,n)=>r(e,t,e=>({...e,actions:[...e.actions,n]})),S=(e,t,n)=>r(e,t,e=>({...e,actions:e.actions.filter(e=>e.id!==n)})),C=(e,t)=>({...e,surfaces:e.surfaces.map(e=>({...e,actions:e.actions.map(e=>{if(e.id!==t||e.evolution===void 0)return e;let{evolution:n,...r}=e;return r})}))}),w=(e,t)=>({...e,surfaces:e.surfaces.map(e=>({...e,actions:e.actions.map(e=>e.id===t&&e.evolution!==void 0&&e.evolution.dismissed!==!0?{...e,evolution:{...e.evolution,dismissed:!0}}:e)}))}),T=(e,t,n,i)=>r(e,t,e=>{let t=e.actions.findIndex(e=>e.id===n);return t<0?e:{...e,actions:a(e.actions,t,t+i)}}),E=(e,t,n,o,s)=>r(e,t,e=>i(e,n,e=>{let t=e.parameters.findIndex(e=>e.id===o);return t<0?e:{...e,parameters:a(e.parameters,t,t+s)}})),D=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,...a}))),O=(t,a,o,s,c)=>r(t,a,t=>{let r=i(t,o,e=>({...e,parameters:n(e.parameters,String(s),`parameter`,e=>({...e,...c}))})),a=r.actions.find(e=>e.id===o)?.parameters.find(e=>e.id===s);if(!a||!a.bindToStatePath)return r;let l=a.bindToStatePath,u=e(a.type);return{...r,stateDefinitions:r.stateDefinitions.map(e=>e.path===l?{...e,type:u,enumValues:a.type===`enum`?a.enumValues:void 0}:e)}}),k=(e,t,n)=>r(e,t,e=>({...e,rules:[...e.rules,n]})),A=(e,t,n)=>r(e,t,e=>({...e,rules:e.rules.filter(e=>e.id!==n)})),j=(e,t,i)=>r(e,t,e=>({...e,rules:n(e.rules,String(i.id),`rule`,()=>i)})),M=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,rules:[...e.rules,a]}))),N=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,rules:e.rules.filter(e=>e.id!==a)}))),P=(e,t,a,o)=>r(e,t,e=>i(e,a,e=>({...e,rules:n(e.rules,String(o.id),`rule`,()=>o)}))),F=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,effects:[...e.effects,a]}))),I=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,effects:e.effects.filter(e=>e.id!==a)}))),L=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,invariants:[...e.invariants,a]}))),R=(e,t,a,o,s)=>r(e,t,e=>i(e,a,e=>({...e,invariants:n(e.invariants,String(o),`invariant`,e=>({...e,...s}))}))),z=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,invariants:e.invariants.filter(e=>e.id!==a)}))),te=(e,t,n)=>r(e,t,e=>({...e,invariants:[...e.invariants,n]})),B=(e,t,i,a)=>r(e,t,e=>({...e,invariants:n(e.invariants,String(i),`invariant`,e=>({...e,...a}))})),V=(e,t,n)=>r(e,t,e=>({...e,invariants:e.invariants.filter(e=>e.id!==n)})),H=(e,t)=>({...e,featureInvariants:[...e.featureInvariants??[],t]}),U=(e,t,r)=>({...e,featureInvariants:n(e.featureInvariants??[],String(t),`featureInvariant`,e=>({...e,...r}))}),W=(e,t)=>({...e,featureInvariants:(e.featureInvariants??[]).filter(e=>e.id!==t)}),G=(e,t,n)=>r(e,t,e=>({...e,transitions:[...e.transitions,n]})),K=(e,t,i,a)=>r(e,t,e=>({...e,transitions:n(e.transitions,String(i),`transition`,e=>({...e,...a}))})),q=(e,t,n)=>r(e,t,e=>({...e,transitions:e.transitions.filter(e=>e.id!==n)})),J=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,scenarios:[...e.scenarios??[],a]}))),Y=(e,t,a,o,s)=>r(e,t,e=>i(e,a,e=>({...e,scenarios:n(e.scenarios??[],String(o),`scenario`,e=>({...e,...s}))}))),X=(e,t,n,a)=>r(e,t,e=>i(e,n,e=>({...e,scenarios:(e.scenarios??[]).filter(e=>e.id!==a)}))),Z=(e,t)=>({...e,reachabilityGoals:[...e.reachabilityGoals??[],t]}),Q=(e,t,r)=>({...e,reachabilityGoals:n(e.reachabilityGoals??[],String(t),`reachabilityGoal`,e=>({...e,...r}))}),ne=(e,t)=>({...e,reachabilityGoals:(e.reachabilityGoals??[]).filter(e=>e.id!==t)}),re=(e,t)=>({...e,acceptanceCriteria:[...e.acceptanceCriteria??[],t]}),ie=(e,t,r)=>({...e,acceptanceCriteria:n(e.acceptanceCriteria??[],String(t),`acceptanceCriterion`,e=>({...e,...r}))}),ae=(e,t)=>({...e,acceptanceCriteria:(e.acceptanceCriteria??[]).filter(e=>e.id!==t)}),oe=(e,t)=>({...e,resources:[...e.resources,t]}),$=(e,t)=>({...e,resources:n(e.resources,String(t.id),`resource`,()=>t)}),se=(e,t)=>({...e,resources:e.resources.filter(e=>e.id!==t)}),ce=(e,t)=>({...e,entities:[...e.entities,t]}),le=(e,t)=>({...e,entities:n(e.entities,String(t.id),`entity`,()=>t)}),ue=(e,t)=>({...e,entities:e.entities.filter(e=>e.id!==t)}),de=(e,t)=>({...e,events:[...e.events??[],t]}),fe=(e,t)=>({...e,events:n(e.events??[],String(t.id),`event`,()=>t)}),pe=(e,t)=>({...e,events:(e.events??[]).filter(e=>e.id!==t)});export{f as $,z as A,C as B,H as C,k as D,M as E,R as F,D as G,T as H,B as I,o as J,O as K,P as L,N as M,A as N,I as O,U as P,l as Q,j as R,F as S,te as T,E as U,w as V,S as W,u as X,d as Y,b as Z,G as _,oe as a,_ as at,Y as b,pe as c,ie as d,y as et,le as f,J as g,$ as h,Z as i,h as it,V as j,W as k,ne as l,Q as m,ce as n,ee as nt,ae as o,fe as p,g as q,de as r,m as rt,ue as s,re as t,s as tt,se as u,X as v,L as w,K as x,q as y,x as z};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BpBsb117.js","./kNaey6uv.js","./CEVfZihO.js","./kvTyu7mM.js","./D50Xf4Qj.js","./DsF7k-Jl.js","./D6Ojqcvl.js","./CXBo-tYc.js","./B0OyqRRq.js","./C3BhbZfF.js","./DCCK18Uo2.js","./BXBsImMQ.js","./BWPyau1x.js","./BifhSqXX.js","./CWiCMZki2.js","./B18t-Wuu2.js","./DAAR0bvG2.js","./ZG4RtGoN2.js","./CSKSodPl2.js","./DMTA6AXo2.js","./iaZXMvSz.js","./D8TtvFq5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,A as t,B as n,D as r,F as i,I as a,J as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,_ as h,_t as g,a as _,bt as v,d as y,dt as b,et as x,ft as S,g as C,gt as w,it as T,j as E,k as D,l as O,n as k,nt as A,ot as j,q as M,r as N,rt as P,s as F,tt as I,u as L,v as ee,y as R,yt as z,z as B}from"./D50Xf4Qj.js";import{n as V}from"./DgWl1fLQ.js";import{t as H}from"./kNaey6uv.js";import"./xihTtKlq.js";import{C as U,ht as te,pt as ne,w as re}from"./CHEhPoA2.js";import"./C2-NAsCA.js";var W=[`contains`,`reads`,`writes`,`emits`,`transitions`,`asserts`,`uses`,`handles`],ie=[`feature`,`surface`,`action`,`state`,`event`,`parameter`,`rule`,`effect`,`invariant`,`scenario`,`persona`,`resource`,`entity`,`valueSet`],ae=e=>{switch(e.type){case`set_state`:return`set ${e.path}`;case`show_message`:return e.tone?`${e.tone} message`:`message`;case`emit_event`:return`emit ${e.event}`;case`block_action`:return`block`;case`allow_action`:return`allow`;case`transition_surface`:return`transition`;case`append_to_list`:return`append ${e.path}`;case`remove_from_list`:return`remove ${e.path}`;case`update_list_item`:return`update ${e.path}`;case`advance_time`:return`advance time`;case`invoke_operation`:return`invoke ${e.operation}`}},G=e=>{let t=new Set;for(let n of ne(e))te(n.left)||t.add(String(n.left));return[...t]},oe=(e,t)=>{let n=new Map,r=new Map,i=e=>{n.has(e.id)||n.set(e.id,e)},a=e=>{if(!n.has(e.from)||!n.has(e.to))return;let t=`${e.from}->${e.to}:${e.kind}:${e.label??``}`;r.has(t)||r.set(t,{...e,id:t})},o=(e,t,n)=>{i({id:`feature:${e.id}:state:${t}`,type:`state`,label:t,detail:n,layer:3})},s=(e,t)=>`feature:${e.id}:surface:${t}`,c=(e,t)=>`feature:${e.id}:action:${t}`,l=(e,t)=>`feature:${e.id}:state:${t}`,u=(e,t)=>`feature:${e.id}:valueSet:${t}`,d=(e,t,n,r)=>{let c=`feature:${e.id}:effect:${n.id}`;i({id:c,type:`effect`,label:ae(n),detail:n.description??n.type,layer:5}),a({from:t,to:c,kind:r});for(let t of U(n))o(e,String(t)),a({from:c,to:l(e,t),kind:`writes`});if(n.type===`emit_event`){let e=`event:${n.event}`;i({id:e,type:`event`,label:String(n.event),layer:3}),a({from:c,to:e,kind:`emits`})}else n.type===`transition_surface`&&a({from:c,to:s(e,n.target),kind:`transitions`})},f=t?`project:${t.id}`:null;t&&f&&i({id:f,type:`feature`,label:t.name,detail:t.description??`Project`,layer:0});for(let n of e){let e=`feature:${n.id}`;i({id:e,type:`feature`,label:n.name,detail:n.description,layer:+!!t,href:`/features/${n.id}`}),f&&a({from:f,to:e,kind:`contains`});for(let r of n.personas){let o=`feature:${n.id}:persona:${r.id}`;i({id:o,type:`persona`,label:r.name,detail:r.description,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let r of n.resources){let n=`resource:${r.id}`;i({id:n,type:`resource`,label:r.name,detail:r.description??r.kind,layer:t?2:1}),a({from:e,to:n,kind:`contains`})}for(let r of n.entities){let n=`entity:${r.id}`;i({id:n,type:`entity`,label:r.namespace,detail:r.description,layer:t?2:1}),a({from:e,to:n,kind:`contains`}),r.resourceId&&a({from:n,to:`resource:${r.resourceId}`,kind:`uses`})}for(let r of n.valueSets??[]){let o=u(n,r.id);i({id:o,type:`valueSet`,label:r.name,detail:`${r.values.length} values`,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let t of n.events??[]){let n=`event:${t.name}`;i({id:n,type:`event`,label:String(t.name),detail:t.description,layer:3}),a({from:e,to:n,kind:`contains`})}for(let t of n.featureInvariants??[]){let r=`feature:${n.id}:invariant:${t.id}`;i({id:r,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let t of n.reachabilityGoals??[]){let r=`feature:${n.id}:goal:${t.id}`;i({id:r,type:`goal`,label:t.name,detail:t.description??t.message??t.kind,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let r of n.surfaces){let f=s(n,r.id);i({id:f,type:`surface`,label:r.name,detail:r.description??r.type,layer:t?2:1,href:`/features/${n.id}?surface=${r.id}`}),a({from:e,to:f,kind:`contains`}),r.parentSurfaceId&&a({from:s(n,r.parentSurfaceId),to:f,kind:`contains`});for(let e of r.stateDefinitions)o(n,String(e.path),e.description??e.type),a({from:f,to:l(n,e.path),kind:`contains`}),e.valueSetId&&a({from:l(n,e.path),to:u(n,e.valueSetId),kind:`uses`});for(let e of r.transitions){let t=`feature:${n.id}:transition:${e.id}`;i({id:t,type:`effect`,label:e.label??`transition`,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`}),a({from:t,to:s(n,e.target),kind:`transitions`})}for(let e of r.rules){let t=`feature:${n.id}:rule:${e.id}`;i({id:t,type:`rule`,label:e.category,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`});d(n,t,e.effect,`writes`)}for(let e of r.invariants){let t=`feature:${n.id}:invariant:${e.id}`;i({id:t,type:`invariant`,label:e.name,detail:e.description??e.message,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`})}for(let e of r.actions){let p=c(n,e.id);if(i({id:p,type:`action`,label:e.name,detail:e.intent,layer:t?3:2,href:`/features/${n.id}?surface=${r.id}&panel=actions`}),a({from:f,to:p,kind:`contains`}),e.triggeredByEvent){let t=`event:${e.triggeredByEvent}`;i({id:t,type:`event`,label:String(e.triggeredByEvent),layer:3}),a({from:t,to:p,kind:`handles`})}for(let t of e.requiredStates)o(n,String(t)),a({from:l(n,t),to:p,kind:`reads`});for(let r of e.parameters){let e=`feature:${n.id}:parameter:${r.id}`;i({id:e,type:`parameter`,label:r.name,detail:r.description??r.type,layer:t?5:4}),a({from:p,to:e,kind:`contains`}),r.bindToStatePath&&(o(n,String(r.bindToStatePath)),a({from:e,to:l(n,r.bindToStatePath),kind:`writes`})),r.resourceId&&a({from:e,to:`resource:${r.resourceId}`,kind:`uses`}),r.valueSetId&&a({from:e,to:u(n,r.valueSetId),kind:`uses`})}for(let t of e.rules){let e=`feature:${n.id}:rule:${t.id}`;i({id:e,type:`rule`,label:t.category,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`});d(n,e,t.effect,`writes`)}for(let t of e.invariants){let e=`feature:${n.id}:invariant:${t.id}`;i({id:e,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`})}for(let t of e.effects)d(n,p,t,`contains`);for(let t of e.onBlockedEffects??[])d(n,p,t,`contains`);for(let t of e.emittedEvents){let e=`event:${t}`;i({id:e,type:`event`,label:String(t),layer:3}),a({from:p,to:e,kind:`emits`})}for(let t of e.transitions){let e=`feature:${n.id}:transition:${t.id}`;i({id:e,type:`effect`,label:t.label??`transition`,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`}),a({from:e,to:s(n,t.target),kind:`transitions`})}for(let t of e.scenarios??[]){let e=`feature:${n.id}:scenario:${t.id}`;i({id:e,type:`scenario`,label:t.name,detail:t.description??t.expectedStatus,layer:6}),a({from:p,to:e,kind:`asserts`}),t.personaId&&a({from:e,to:`feature:${n.id}:persona:${t.personaId}`,kind:`uses`});for(let r of t.stateOverrides)o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`writes`});for(let r of t.expectedAssertions??[])o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`asserts`});t.expectedTransition&&a({from:e,to:s(n,t.expectedTransition),kind:`transitions`})}}}}return{nodes:[...n.values()],edges:[...r.values()]}},se=e=>{let t=new Map;for(let n of e.nodes)t.set(n.id,0);for(let n of e.edges)t.set(n.from,(t.get(n.from)??0)+1),t.set(n.to,(t.get(n.to)??0)+1);let n=e.nodes.map(e=>({...e,degree:t.get(e.id)??0}));return{nodes:n,edges:e.edges,nodeById:new Map(n.map(e=>[e.id,e]))}},ce=(e,t)=>{let n=t.search.trim().toLowerCase(),r=new Set;if(n){for(let t of e.nodes)`${t.label} ${t.type} ${t.detail??``}`.toLowerCase().includes(n)&&r.add(t.id);for(let t of e.edges)(r.has(t.from)||r.has(t.to))&&(r.add(t.from),r.add(t.to))}let i=e=>!n||r.has(e),a=e.edges.filter(e=>t.enabledKinds[e.kind]&&i(e.from)&&i(e.to)),o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=e.nodes.filter(e=>i(e.id)&&(!n||o.has(e.id)||r.has(e.id)));return{nodes:s,edges:a,nodeById:new Map(s.map(e=>[e.id,e]))}},le={feature:{label:`Feature`,fill:`#0f172a`,stroke:`#020617`},surface:{label:`Surface`,fill:`#0e7490`,stroke:`#155e75`},action:{label:`Action`,fill:`#2563eb`,stroke:`#1d4ed8`},state:{label:`State`,fill:`#7c3aed`,stroke:`#6d28d9`},event:{label:`Event`,fill:`#db2777`,stroke:`#be185d`},parameter:{label:`Parameter`,fill:`#0891b2`,stroke:`#0e7490`},rule:{label:`Rule`,fill:`#ea580c`,stroke:`#c2410c`},effect:{label:`Effect`,fill:`#16a34a`,stroke:`#15803d`},invariant:{label:`Invariant`,fill:`#ca8a04`,stroke:`#a16207`},goal:{label:`Liveness goal`,fill:`#65a30d`,stroke:`#4d7c0f`},scenario:{label:`Scenario`,fill:`#475569`,stroke:`#334155`},persona:{label:`Persona`,fill:`#0f766e`,stroke:`#115e59`},resource:{label:`Resource`,fill:`#4f46e5`,stroke:`#4338ca`},entity:{label:`Entity`,fill:`#9333ea`,stroke:`#7e22ce`},valueSet:{label:`Value set`,fill:`#64748b`,stroke:`#475569`}},K={contains:{label:`Contains`,color:`#94a3b8`},reads:{label:`Reads`,color:`#7c3aed`},writes:{label:`Writes`,color:`#16a34a`},emits:{label:`Emits`,color:`#db2777`},transitions:{label:`Transitions`,color:`#0891b2`},asserts:{label:`Asserts`,color:`#ca8a04`},uses:{label:`Uses`,color:`#475569`},handles:{label:`Handles`,color:`#2563eb`}},ue=new Set([`writes`,`emits`,`transitions`]),q=.14,de=.035,fe=e=>Math.max(13,Math.min(38,13+Math.sqrt(e)*6)),J=(e,t)=>{let n=e.replace(`#`,``);return n.length===6?`rgba(${Number.parseInt(n.slice(0,2),16)},${Number.parseInt(n.slice(2,4),16)},${Number.parseInt(n.slice(4,6),16)},${t})`:e},pe=e=>{let t=e.replace(`#`,``);if(t.length!==6)return`#000000`;let n=e=>{let t=Number.parseInt(e,16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(t.slice(0,2)),i=n(t.slice(2,4)),a=n(t.slice(4,6)),o=.2126*r+.7152*i+.0722*a;return(o+.05)/.05>=1.05/(o+.05)?`#000000`:`#ffffff`},Y=e=>e>700?220:e>300?280:180,X=e=>e>700?2600:e>300?3200:2400,me=class{runtime;container;callbacks;network=null;nodes=null;edges=null;signature=``;currentInput=null;highlightFrame=null;highlighted={nodes:new Set,edges:new Set};selectionEventsSuppressed=!1;stabilizeTimeout=null;settle=()=>this.freezePhysics();constructor(e,t,n={}){this.runtime=e,this.container=t,this.callbacks=n}render(e){this.currentInput=e;let t=this.signatureFor(e);if(!this.network){this.createNetwork(e,t);return}if(t===this.signature){this.select(e.selectedId,e.selectedEdgeId,!1);return}this.signature=t,this.clearHighlight(),this.nodes?.clear(),this.edges?.clear(),this.nodes?.add(this.toNodes(e)),this.edges?.add(this.toEdges(e)),this.startStabilization(e.graph.nodes.length),this.select(e.selectedId,e.selectedEdgeId,!1)}relayout(e){this.network&&(this.clearHighlight(),this.startStabilization(e))}fit(){this.network?.fit({animation:{duration:220,easingFunction:`easeInOutQuad`}})}zoomBy(e){if(!this.network)return;let t=Math.max(.04,Math.min(5,this.network.getScale()*e));this.network.moveTo({scale:t,animation:{duration:120,easingFunction:`easeInOutQuad`}})}focus(e){this.network?.focus(e,{scale:1.08,animation:{duration:260,easingFunction:`easeInOutQuad`}})}select(e,t=null,n=!0){if(this.network){this.selectionEventsSuppressed=!0;try{this.network.setSelection({nodes:e?[e]:[],edges:!e&&t?[t]:[]},{highlightEdges:!1})}finally{this.selectionEventsSuppressed=!1}if(e){this.highlightNodeNeighborhood(e,n);return}if(t){this.highlightEdgeNeighborhood(t,n);return}this.clearHighlight()}}destroy(){this.clearPendingWork(),this.network?.destroy(),this.network=null,this.nodes=null,this.edges=null}createNetwork(e,t){let n=new this.runtime.DataSet(this.toNodes(e)),r=new this.runtime.DataSet(this.toEdges(e));this.nodes=n,this.edges=r;let i=new this.runtime.Network(this.container,{nodes:n,edges:r},this.options(e.graph.nodes.length));this.network=i,this.signature=t,i.on(`stabilizationProgress`,e=>{if(!e?.total)return;let t=Math.min(100,Math.round(e.iterations/e.total*100));this.callbacks.onStabilizationProgress?.(t),t>=100&&setTimeout(()=>this.freezePhysics(),0)}),i.on(`selectNode`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.nodes?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(t),this.callbacks.onSelectedEdgeChange?.(null),t&&this.highlightNodeNeighborhood(t,!0)}),i.on(`selectEdge`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.edges?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(null),this.callbacks.onSelectedEdgeChange?.(t),t&&this.highlightEdgeNeighborhood(t,!0)}),i.on(`doubleClick`,e=>{let t=e?.nodes?.find(e=>typeof e==`string`)??null;t&&this.callbacks.onNodeActivate?.(t)}),i.on(`deselectNode`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().edges.length||(this.callbacks.onSelectedNodeChange?.(null),this.clearHighlight())}),i.on(`deselectEdge`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().nodes.length||(this.callbacks.onSelectedEdgeChange?.(null),this.clearHighlight())}),this.startStabilization(e.graph.nodes.length)}startStabilization(e){this.network&&(this.clearStabilizationTimeout(),this.callbacks.onSettledChange?.(!1),this.callbacks.onStabilizationProgress?.(0),this.network.off(`stabilized`,this.settle),this.network.once(`stabilized`,this.settle),this.network.setOptions(this.options(e)),this.network.stabilize(Y(e)),this.stabilizeTimeout=setTimeout(()=>this.freezePhysics(),X(e)))}freezePhysics(){this.network&&(this.clearStabilizationTimeout(),this.network.off(`stabilized`,this.settle),this.network.storePositions(),this.network.stopSimulation(),this.network.setOptions({physics:!1}),this.callbacks.onStabilizationProgress?.(100),this.callbacks.onSettledChange?.(!0))}options(e){return{autoResize:!0,interaction:{hover:!1,tooltipDelay:1e6,dragNodes:!0,dragView:!0,zoomView:!0,multiselect:!1,navigationButtons:!1,keyboard:!1,hideEdgesOnDrag:!0,hideEdgesOnZoom:!0},layout:{improvedLayout:e<350},physics:{enabled:!0,solver:`forceAtlas2Based`,stabilization:{enabled:!0,iterations:Y(e),updateInterval:40,fit:!0},forceAtlas2Based:{gravitationalConstant:e>500?-34:-48,centralGravity:.014,springLength:e>500?95:120,springConstant:.055,damping:.74,avoidOverlap:e>500?.25:.45},adaptiveTimestep:!0,minVelocity:2.2,maxVelocity:28},nodes:{chosen:!0,scaling:{min:13,max:42},shapeProperties:{borderRadius:4}},edges:{chosen:!1,selectionWidth:1}}}toNodes(e){return e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))}nodeFor(e,t,n){let r=t.labelsVisible||t.graph.nodes.length<90,i=t.nodeTheme[e.type],a=n===`dimmed`,o=n===`selected`,s=n===`highlighted`||o,c=!a&&(r||e.degree>5||e.type===`feature`||s),l=e.type!==`feature`&&c;return{id:e.id,label:c?e.label:``,title:`${i.label}: ${e.label}${e.detail?`\n${e.detail}`:``}`,value:Math.max(1,e.degree),size:fe(e.degree),shape:e.type===`feature`||!c?`dot`:`box`,color:{background:a?J(i.fill,q):i.fill,border:a?J(i.stroke,.2):o?`#020617`:i.stroke,highlight:{background:i.fill,border:`#020617`},hover:{background:i.fill,border:i.stroke}},borderWidth:o?5:s?3.5:1.5,font:{color:l?pe(i.fill):`#0f172a`,size:o?16:s?13:12,face:`Inter, ui-sans-serif, system-ui, sans-serif`,strokeWidth:l||a?0:4,strokeColor:`rgba(255,255,255,0.92)`},margin:l?{top:6,right:10,bottom:6,left:10}:void 0,widthConstraint:l?{maximum:220}:void 0,shadow:!a&&(s||e.type===`feature`||e.degree>8)}}toEdges(e){return e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))}edgeFor(e,t,n){let r=ue.has(e.kind),i=n===`selected`?.96:n===`highlighted`?.82:n===`dimmed`?de:r?.42:.18;return{id:e.id,from:e.from,to:e.to,title:e.label??t[e.kind].label,color:{color:t[e.kind].color,opacity:i},width:n===`selected`?3:n===`highlighted`?2.2:r?1.5:.7,dashes:e.kind===`contains`,arrows:{to:{enabled:e.kind!==`contains`,scaleFactor:.45}},smooth:!1}}highlightNodeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=new Set([e,...this.network.getConnectedNodes(e).filter(e=>typeof e==`string`||typeof e==`number`)]),i=new Set(this.network.getConnectedEdges(e));this.applyFocusMask({selectedNodeId:e,highlightedNodes:r,highlightedEdges:i}),t&&this.fitNeighborhood(r),this.highlighted={nodes:r,edges:i},this.highlightFrame=null}))}highlightEdgeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=n.graph.edges.find(t=>t.id===e);if(!r)return;let i=new Set([r.from,r.to]),a=new Set([e]);for(let e of[r.from,r.to]){for(let t of this.network.getConnectedNodes(e))(typeof t==`string`||typeof t==`number`)&&i.add(t);for(let t of this.network.getConnectedEdges(e))a.add(t)}this.applyFocusMask({selectedEdgeId:e,highlightedNodes:i,highlightedEdges:a}),t&&this.fitNeighborhood(i),this.highlighted={nodes:i,edges:a},this.highlightFrame=null}))}applyFocusMask({selectedNodeId:e,selectedEdgeId:t,highlightedNodes:n,highlightedEdges:r}){if(!this.nodes||!this.edges)return;let i=this.currentInput;i&&(this.nodes.update(i.graph.nodes.map(t=>{let r=t.id===e?`selected`:n.has(t.id)?`highlighted`:`dimmed`;return this.nodeFor(t,i,r)})),this.edges.update(i.graph.edges.map(e=>{let n=e.id===t?`selected`:r.has(e.id)?`highlighted`:`dimmed`;return this.edgeFor(e,i.edgeTheme,n)})))}fitNeighborhood(e){!this.network||e.size===0||this.network.fit({nodes:[...e],minZoomLevel:.24,maxZoomLevel:1.18,animation:{duration:320,easingFunction:`easeInOutQuad`}})}clearHighlight(){this.clearPendingHighlight(),this.restoreHighlightBase(),this.highlighted={nodes:new Set,edges:new Set}}restoreHighlightBase(){if(!this.nodes||!this.edges)return;let e=this.currentInput;e&&(this.nodes.update(e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))),this.edges.update(e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))))}clearPendingWork(){this.clearPendingHighlight(),this.clearStabilizationTimeout()}clearPendingHighlight(){this.highlightFrame!==null&&(cancelAnimationFrame(this.highlightFrame),this.highlightFrame=null)}clearStabilizationTimeout(){this.stabilizeTimeout&&=(clearTimeout(this.stabilizeTimeout),null)}signatureFor(e){return`${e.graph.nodes.map(e=>e.id).join(`|`)}::${e.graph.edges.map(e=>e.id).join(`|`)}::labels=${e.labelsVisible}`}},he=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ge=i(`<button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><span class="h-2.5 w-2.5 shrink-0 rounded-full"></span> <span> </span> <!></button>`),_e=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ve=i(`<div role="menu" class="absolute right-0 top-11 z-20 w-64 overflow-hidden rounded-xl border border-slate-200 bg-white p-2 shadow-xl shadow-slate-950/10"><div class="flex items-center justify-between px-2 pb-1 pt-1"><span class="text-[10px] font-semibold uppercase tracking-wide text-slate-400">Connections</span> <div class="flex gap-1"><button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-brand-700 hover:bg-brand-50">All</button> <button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100">None</button></div></div> <!> <div class="my-1 h-px bg-slate-100"></div> <button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-slate-400" aria-hidden="true"><path d="M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L3 13V4h9z"></path><path d="M7.5 7.5h.01"></path></svg> <span>Labels</span> <!></button> <div class="my-1 h-px bg-slate-100"></div> <div class="flex gap-1.5 px-1 pb-1 pt-0.5"><button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Re-layout</button> <button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Reset</button></div></div>`),ye=i(`<div class="pointer-events-none absolute left-3 top-3 z-10 w-56 rounded-md border border-slate-200 bg-white/90 p-3 text-xs text-slate-600 shadow-sm backdrop-blur"><div class="flex justify-between font-medium text-slate-800"><span>Stabilizing layout</span> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200"><div class="h-full rounded-full bg-brand-500 transition-all"></div></div></div>`),be=i(`<span class="inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700"><span class="h-2 w-2 rounded-full"></span> </span>`),xe=i(`<button type="button" class="w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-left hover:border-brand-300 hover:bg-brand-50"><span class="block truncate text-sm font-medium text-slate-900"> </span> <span class="text-xs text-slate-500"> </span></button>`),Se=i(`<p class="mt-2 text-sm leading-6 text-slate-600"> </p>`),Ce=i(`<a class="mt-3 inline-flex text-sm font-medium text-brand-700 hover:underline">Open in editor</a>`),we=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <!> <p class="mt-2 text-xs text-slate-500"> </p> <!>`,1),Te=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <p class="mt-2 text-sm leading-6 text-slate-600"> </p> <p class="mt-2 text-xs text-slate-500">Click another node or edge to move the highlighted neighborhood.</p>`,1),Ee=i(`<h3 class="text-sm font-semibold text-slate-950">Explore the Map</h3> <p class="mt-2 text-sm leading-6 text-slate-600">Click a node or edge to highlight its linked behavior. Double-click a node to jump
|
|
2
|
+
import{$ as e,A as t,B as n,D as r,F as i,I as a,J as o,L as s,M as c,N as l,O as u,P as d,Q as f,R as p,V as m,_ as h,_t as g,a as _,bt as v,d as y,dt as b,et as x,ft as S,g as C,gt as w,it as T,j as E,k as D,l as O,n as k,nt as A,ot as j,q as M,r as N,rt as P,s as F,tt as I,u as L,v as ee,y as R,yt as z,z as B}from"./D50Xf4Qj.js";import{n as V}from"./Bgdg6DPR.js";import{t as H}from"./kNaey6uv.js";import"./xihTtKlq.js";import{C as U,ht as te,pt as ne,w as re}from"./DmeEDSB6.js";import"./CTuWJrti.js";var W=[`contains`,`reads`,`writes`,`emits`,`transitions`,`asserts`,`uses`,`handles`],ie=[`feature`,`surface`,`action`,`state`,`event`,`parameter`,`rule`,`effect`,`invariant`,`scenario`,`persona`,`resource`,`entity`,`valueSet`],ae=e=>{switch(e.type){case`set_state`:return`set ${e.path}`;case`show_message`:return e.tone?`${e.tone} message`:`message`;case`emit_event`:return`emit ${e.event}`;case`block_action`:return`block`;case`allow_action`:return`allow`;case`transition_surface`:return`transition`;case`append_to_list`:return`append ${e.path}`;case`remove_from_list`:return`remove ${e.path}`;case`update_list_item`:return`update ${e.path}`;case`advance_time`:return`advance time`;case`invoke_operation`:return`invoke ${e.operation}`}},G=e=>{let t=new Set;for(let n of ne(e))te(n.left)||t.add(String(n.left));return[...t]},oe=(e,t)=>{let n=new Map,r=new Map,i=e=>{n.has(e.id)||n.set(e.id,e)},a=e=>{if(!n.has(e.from)||!n.has(e.to))return;let t=`${e.from}->${e.to}:${e.kind}:${e.label??``}`;r.has(t)||r.set(t,{...e,id:t})},o=(e,t,n)=>{i({id:`feature:${e.id}:state:${t}`,type:`state`,label:t,detail:n,layer:3})},s=(e,t)=>`feature:${e.id}:surface:${t}`,c=(e,t)=>`feature:${e.id}:action:${t}`,l=(e,t)=>`feature:${e.id}:state:${t}`,u=(e,t)=>`feature:${e.id}:valueSet:${t}`,d=(e,t,n,r)=>{let c=`feature:${e.id}:effect:${n.id}`;i({id:c,type:`effect`,label:ae(n),detail:n.description??n.type,layer:5}),a({from:t,to:c,kind:r});for(let t of U(n))o(e,String(t)),a({from:c,to:l(e,t),kind:`writes`});if(n.type===`emit_event`){let e=`event:${n.event}`;i({id:e,type:`event`,label:String(n.event),layer:3}),a({from:c,to:e,kind:`emits`})}else n.type===`transition_surface`&&a({from:c,to:s(e,n.target),kind:`transitions`})},f=t?`project:${t.id}`:null;t&&f&&i({id:f,type:`feature`,label:t.name,detail:t.description??`Project`,layer:0});for(let n of e){let e=`feature:${n.id}`;i({id:e,type:`feature`,label:n.name,detail:n.description,layer:+!!t,href:`/features/${n.id}`}),f&&a({from:f,to:e,kind:`contains`});for(let r of n.personas){let o=`feature:${n.id}:persona:${r.id}`;i({id:o,type:`persona`,label:r.name,detail:r.description,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let r of n.resources){let n=`resource:${r.id}`;i({id:n,type:`resource`,label:r.name,detail:r.description??r.kind,layer:t?2:1}),a({from:e,to:n,kind:`contains`})}for(let r of n.entities){let n=`entity:${r.id}`;i({id:n,type:`entity`,label:r.namespace,detail:r.description,layer:t?2:1}),a({from:e,to:n,kind:`contains`}),r.resourceId&&a({from:n,to:`resource:${r.resourceId}`,kind:`uses`})}for(let r of n.valueSets??[]){let o=u(n,r.id);i({id:o,type:`valueSet`,label:r.name,detail:`${r.values.length} values`,layer:t?2:1}),a({from:e,to:o,kind:`contains`})}for(let t of n.events??[]){let n=`event:${t.name}`;i({id:n,type:`event`,label:String(t.name),detail:t.description,layer:3}),a({from:e,to:n,kind:`contains`})}for(let t of n.featureInvariants??[]){let r=`feature:${n.id}:invariant:${t.id}`;i({id:r,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let t of n.reachabilityGoals??[]){let r=`feature:${n.id}:goal:${t.id}`;i({id:r,type:`goal`,label:t.name,detail:t.description??t.message??t.kind,layer:6}),a({from:e,to:r,kind:`contains`});for(let e of G(t.condition))o(n,e),a({from:r,to:l(n,e),kind:`reads`})}for(let r of n.surfaces){let f=s(n,r.id);i({id:f,type:`surface`,label:r.name,detail:r.description??r.type,layer:t?2:1,href:`/features/${n.id}?surface=${r.id}`}),a({from:e,to:f,kind:`contains`}),r.parentSurfaceId&&a({from:s(n,r.parentSurfaceId),to:f,kind:`contains`});for(let e of r.stateDefinitions)o(n,String(e.path),e.description??e.type),a({from:f,to:l(n,e.path),kind:`contains`}),e.valueSetId&&a({from:l(n,e.path),to:u(n,e.valueSetId),kind:`uses`});for(let e of r.transitions){let t=`feature:${n.id}:transition:${e.id}`;i({id:t,type:`effect`,label:e.label??`transition`,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`}),a({from:t,to:s(n,e.target),kind:`transitions`})}for(let e of r.rules){let t=`feature:${n.id}:rule:${e.id}`;i({id:t,type:`rule`,label:e.category,detail:e.description,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`});d(n,t,e.effect,`writes`)}for(let e of r.invariants){let t=`feature:${n.id}:invariant:${e.id}`;i({id:t,type:`invariant`,label:e.name,detail:e.description??e.message,layer:6}),a({from:f,to:t,kind:`contains`});for(let r of G(e.condition))o(n,r),a({from:t,to:l(n,r),kind:`reads`})}for(let e of r.actions){let p=c(n,e.id);if(i({id:p,type:`action`,label:e.name,detail:e.intent,layer:t?3:2,href:`/features/${n.id}?surface=${r.id}&panel=actions`}),a({from:f,to:p,kind:`contains`}),e.triggeredByEvent){let t=`event:${e.triggeredByEvent}`;i({id:t,type:`event`,label:String(e.triggeredByEvent),layer:3}),a({from:t,to:p,kind:`handles`})}for(let t of e.requiredStates)o(n,String(t)),a({from:l(n,t),to:p,kind:`reads`});for(let r of e.parameters){let e=`feature:${n.id}:parameter:${r.id}`;i({id:e,type:`parameter`,label:r.name,detail:r.description??r.type,layer:t?5:4}),a({from:p,to:e,kind:`contains`}),r.bindToStatePath&&(o(n,String(r.bindToStatePath)),a({from:e,to:l(n,r.bindToStatePath),kind:`writes`})),r.resourceId&&a({from:e,to:`resource:${r.resourceId}`,kind:`uses`}),r.valueSetId&&a({from:e,to:u(n,r.valueSetId),kind:`uses`})}for(let t of e.rules){let e=`feature:${n.id}:rule:${t.id}`;i({id:e,type:`rule`,label:t.category,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`});d(n,e,t.effect,`writes`)}for(let t of e.invariants){let e=`feature:${n.id}:invariant:${t.id}`;i({id:e,type:`invariant`,label:t.name,detail:t.description??t.message,layer:6}),a({from:p,to:e,kind:`contains`});for(let r of G(t.condition))o(n,r),a({from:e,to:l(n,r),kind:`reads`})}for(let t of e.effects)d(n,p,t,`contains`);for(let t of e.onBlockedEffects??[])d(n,p,t,`contains`);for(let t of e.emittedEvents){let e=`event:${t}`;i({id:e,type:`event`,label:String(t),layer:3}),a({from:p,to:e,kind:`emits`})}for(let t of e.transitions){let e=`feature:${n.id}:transition:${t.id}`;i({id:e,type:`effect`,label:t.label??`transition`,detail:t.description,layer:6}),a({from:p,to:e,kind:`contains`}),a({from:e,to:s(n,t.target),kind:`transitions`})}for(let t of e.scenarios??[]){let e=`feature:${n.id}:scenario:${t.id}`;i({id:e,type:`scenario`,label:t.name,detail:t.description??t.expectedStatus,layer:6}),a({from:p,to:e,kind:`asserts`}),t.personaId&&a({from:e,to:`feature:${n.id}:persona:${t.personaId}`,kind:`uses`});for(let r of t.stateOverrides)o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`writes`});for(let r of t.expectedAssertions??[])o(n,String(r.path)),a({from:e,to:l(n,r.path),kind:`asserts`});t.expectedTransition&&a({from:e,to:s(n,t.expectedTransition),kind:`transitions`})}}}}return{nodes:[...n.values()],edges:[...r.values()]}},se=e=>{let t=new Map;for(let n of e.nodes)t.set(n.id,0);for(let n of e.edges)t.set(n.from,(t.get(n.from)??0)+1),t.set(n.to,(t.get(n.to)??0)+1);let n=e.nodes.map(e=>({...e,degree:t.get(e.id)??0}));return{nodes:n,edges:e.edges,nodeById:new Map(n.map(e=>[e.id,e]))}},ce=(e,t)=>{let n=t.search.trim().toLowerCase(),r=new Set;if(n){for(let t of e.nodes)`${t.label} ${t.type} ${t.detail??``}`.toLowerCase().includes(n)&&r.add(t.id);for(let t of e.edges)(r.has(t.from)||r.has(t.to))&&(r.add(t.from),r.add(t.to))}let i=e=>!n||r.has(e),a=e.edges.filter(e=>t.enabledKinds[e.kind]&&i(e.from)&&i(e.to)),o=new Set;for(let e of a)o.add(e.from),o.add(e.to);let s=e.nodes.filter(e=>i(e.id)&&(!n||o.has(e.id)||r.has(e.id)));return{nodes:s,edges:a,nodeById:new Map(s.map(e=>[e.id,e]))}},le={feature:{label:`Feature`,fill:`#0f172a`,stroke:`#020617`},surface:{label:`Surface`,fill:`#0e7490`,stroke:`#155e75`},action:{label:`Action`,fill:`#2563eb`,stroke:`#1d4ed8`},state:{label:`State`,fill:`#7c3aed`,stroke:`#6d28d9`},event:{label:`Event`,fill:`#db2777`,stroke:`#be185d`},parameter:{label:`Parameter`,fill:`#0891b2`,stroke:`#0e7490`},rule:{label:`Rule`,fill:`#ea580c`,stroke:`#c2410c`},effect:{label:`Effect`,fill:`#16a34a`,stroke:`#15803d`},invariant:{label:`Invariant`,fill:`#ca8a04`,stroke:`#a16207`},goal:{label:`Liveness goal`,fill:`#65a30d`,stroke:`#4d7c0f`},scenario:{label:`Scenario`,fill:`#475569`,stroke:`#334155`},persona:{label:`Persona`,fill:`#0f766e`,stroke:`#115e59`},resource:{label:`Resource`,fill:`#4f46e5`,stroke:`#4338ca`},entity:{label:`Entity`,fill:`#9333ea`,stroke:`#7e22ce`},valueSet:{label:`Value set`,fill:`#64748b`,stroke:`#475569`}},K={contains:{label:`Contains`,color:`#94a3b8`},reads:{label:`Reads`,color:`#7c3aed`},writes:{label:`Writes`,color:`#16a34a`},emits:{label:`Emits`,color:`#db2777`},transitions:{label:`Transitions`,color:`#0891b2`},asserts:{label:`Asserts`,color:`#ca8a04`},uses:{label:`Uses`,color:`#475569`},handles:{label:`Handles`,color:`#2563eb`}},ue=new Set([`writes`,`emits`,`transitions`]),q=.14,de=.035,fe=e=>Math.max(13,Math.min(38,13+Math.sqrt(e)*6)),J=(e,t)=>{let n=e.replace(`#`,``);return n.length===6?`rgba(${Number.parseInt(n.slice(0,2),16)},${Number.parseInt(n.slice(2,4),16)},${Number.parseInt(n.slice(4,6),16)},${t})`:e},pe=e=>{let t=e.replace(`#`,``);if(t.length!==6)return`#000000`;let n=e=>{let t=Number.parseInt(e,16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4},r=n(t.slice(0,2)),i=n(t.slice(2,4)),a=n(t.slice(4,6)),o=.2126*r+.7152*i+.0722*a;return(o+.05)/.05>=1.05/(o+.05)?`#000000`:`#ffffff`},Y=e=>e>700?220:e>300?280:180,X=e=>e>700?2600:e>300?3200:2400,me=class{runtime;container;callbacks;network=null;nodes=null;edges=null;signature=``;currentInput=null;highlightFrame=null;highlighted={nodes:new Set,edges:new Set};selectionEventsSuppressed=!1;stabilizeTimeout=null;settle=()=>this.freezePhysics();constructor(e,t,n={}){this.runtime=e,this.container=t,this.callbacks=n}render(e){this.currentInput=e;let t=this.signatureFor(e);if(!this.network){this.createNetwork(e,t);return}if(t===this.signature){this.select(e.selectedId,e.selectedEdgeId,!1);return}this.signature=t,this.clearHighlight(),this.nodes?.clear(),this.edges?.clear(),this.nodes?.add(this.toNodes(e)),this.edges?.add(this.toEdges(e)),this.startStabilization(e.graph.nodes.length),this.select(e.selectedId,e.selectedEdgeId,!1)}relayout(e){this.network&&(this.clearHighlight(),this.startStabilization(e))}fit(){this.network?.fit({animation:{duration:220,easingFunction:`easeInOutQuad`}})}zoomBy(e){if(!this.network)return;let t=Math.max(.04,Math.min(5,this.network.getScale()*e));this.network.moveTo({scale:t,animation:{duration:120,easingFunction:`easeInOutQuad`}})}focus(e){this.network?.focus(e,{scale:1.08,animation:{duration:260,easingFunction:`easeInOutQuad`}})}select(e,t=null,n=!0){if(this.network){this.selectionEventsSuppressed=!0;try{this.network.setSelection({nodes:e?[e]:[],edges:!e&&t?[t]:[]},{highlightEdges:!1})}finally{this.selectionEventsSuppressed=!1}if(e){this.highlightNodeNeighborhood(e,n);return}if(t){this.highlightEdgeNeighborhood(t,n);return}this.clearHighlight()}}destroy(){this.clearPendingWork(),this.network?.destroy(),this.network=null,this.nodes=null,this.edges=null}createNetwork(e,t){let n=new this.runtime.DataSet(this.toNodes(e)),r=new this.runtime.DataSet(this.toEdges(e));this.nodes=n,this.edges=r;let i=new this.runtime.Network(this.container,{nodes:n,edges:r},this.options(e.graph.nodes.length));this.network=i,this.signature=t,i.on(`stabilizationProgress`,e=>{if(!e?.total)return;let t=Math.min(100,Math.round(e.iterations/e.total*100));this.callbacks.onStabilizationProgress?.(t),t>=100&&setTimeout(()=>this.freezePhysics(),0)}),i.on(`selectNode`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.nodes?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(t),this.callbacks.onSelectedEdgeChange?.(null),t&&this.highlightNodeNeighborhood(t,!0)}),i.on(`selectEdge`,e=>{if(this.selectionEventsSuppressed)return;let t=e?.edges?.find(e=>typeof e==`string`)??null;this.callbacks.onSelectedNodeChange?.(null),this.callbacks.onSelectedEdgeChange?.(t),t&&this.highlightEdgeNeighborhood(t,!0)}),i.on(`doubleClick`,e=>{let t=e?.nodes?.find(e=>typeof e==`string`)??null;t&&this.callbacks.onNodeActivate?.(t)}),i.on(`deselectNode`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().edges.length||(this.callbacks.onSelectedNodeChange?.(null),this.clearHighlight())}),i.on(`deselectEdge`,()=>{this.selectionEventsSuppressed||this.network?.getSelection().nodes.length||(this.callbacks.onSelectedEdgeChange?.(null),this.clearHighlight())}),this.startStabilization(e.graph.nodes.length)}startStabilization(e){this.network&&(this.clearStabilizationTimeout(),this.callbacks.onSettledChange?.(!1),this.callbacks.onStabilizationProgress?.(0),this.network.off(`stabilized`,this.settle),this.network.once(`stabilized`,this.settle),this.network.setOptions(this.options(e)),this.network.stabilize(Y(e)),this.stabilizeTimeout=setTimeout(()=>this.freezePhysics(),X(e)))}freezePhysics(){this.network&&(this.clearStabilizationTimeout(),this.network.off(`stabilized`,this.settle),this.network.storePositions(),this.network.stopSimulation(),this.network.setOptions({physics:!1}),this.callbacks.onStabilizationProgress?.(100),this.callbacks.onSettledChange?.(!0))}options(e){return{autoResize:!0,interaction:{hover:!1,tooltipDelay:1e6,dragNodes:!0,dragView:!0,zoomView:!0,multiselect:!1,navigationButtons:!1,keyboard:!1,hideEdgesOnDrag:!0,hideEdgesOnZoom:!0},layout:{improvedLayout:e<350},physics:{enabled:!0,solver:`forceAtlas2Based`,stabilization:{enabled:!0,iterations:Y(e),updateInterval:40,fit:!0},forceAtlas2Based:{gravitationalConstant:e>500?-34:-48,centralGravity:.014,springLength:e>500?95:120,springConstant:.055,damping:.74,avoidOverlap:e>500?.25:.45},adaptiveTimestep:!0,minVelocity:2.2,maxVelocity:28},nodes:{chosen:!0,scaling:{min:13,max:42},shapeProperties:{borderRadius:4}},edges:{chosen:!1,selectionWidth:1}}}toNodes(e){return e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))}nodeFor(e,t,n){let r=t.labelsVisible||t.graph.nodes.length<90,i=t.nodeTheme[e.type],a=n===`dimmed`,o=n===`selected`,s=n===`highlighted`||o,c=!a&&(r||e.degree>5||e.type===`feature`||s),l=e.type!==`feature`&&c;return{id:e.id,label:c?e.label:``,title:`${i.label}: ${e.label}${e.detail?`\n${e.detail}`:``}`,value:Math.max(1,e.degree),size:fe(e.degree),shape:e.type===`feature`||!c?`dot`:`box`,color:{background:a?J(i.fill,q):i.fill,border:a?J(i.stroke,.2):o?`#020617`:i.stroke,highlight:{background:i.fill,border:`#020617`},hover:{background:i.fill,border:i.stroke}},borderWidth:o?5:s?3.5:1.5,font:{color:l?pe(i.fill):`#0f172a`,size:o?16:s?13:12,face:`Inter, ui-sans-serif, system-ui, sans-serif`,strokeWidth:l||a?0:4,strokeColor:`rgba(255,255,255,0.92)`},margin:l?{top:6,right:10,bottom:6,left:10}:void 0,widthConstraint:l?{maximum:220}:void 0,shadow:!a&&(s||e.type===`feature`||e.degree>8)}}toEdges(e){return e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))}edgeFor(e,t,n){let r=ue.has(e.kind),i=n===`selected`?.96:n===`highlighted`?.82:n===`dimmed`?de:r?.42:.18;return{id:e.id,from:e.from,to:e.to,title:e.label??t[e.kind].label,color:{color:t[e.kind].color,opacity:i},width:n===`selected`?3:n===`highlighted`?2.2:r?1.5:.7,dashes:e.kind===`contains`,arrows:{to:{enabled:e.kind!==`contains`,scaleFactor:.45}},smooth:!1}}highlightNodeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=new Set([e,...this.network.getConnectedNodes(e).filter(e=>typeof e==`string`||typeof e==`number`)]),i=new Set(this.network.getConnectedEdges(e));this.applyFocusMask({selectedNodeId:e,highlightedNodes:r,highlightedEdges:i}),t&&this.fitNeighborhood(r),this.highlighted={nodes:r,edges:i},this.highlightFrame=null}))}highlightEdgeNeighborhood(e,t){!this.network||!this.nodes||!this.edges||(this.highlightFrame!==null&&cancelAnimationFrame(this.highlightFrame),this.highlightFrame=requestAnimationFrame(()=>{let n=this.currentInput;if(!this.network||!this.nodes||!this.edges||!n)return;let r=n.graph.edges.find(t=>t.id===e);if(!r)return;let i=new Set([r.from,r.to]),a=new Set([e]);for(let e of[r.from,r.to]){for(let t of this.network.getConnectedNodes(e))(typeof t==`string`||typeof t==`number`)&&i.add(t);for(let t of this.network.getConnectedEdges(e))a.add(t)}this.applyFocusMask({selectedEdgeId:e,highlightedNodes:i,highlightedEdges:a}),t&&this.fitNeighborhood(i),this.highlighted={nodes:i,edges:a},this.highlightFrame=null}))}applyFocusMask({selectedNodeId:e,selectedEdgeId:t,highlightedNodes:n,highlightedEdges:r}){if(!this.nodes||!this.edges)return;let i=this.currentInput;i&&(this.nodes.update(i.graph.nodes.map(t=>{let r=t.id===e?`selected`:n.has(t.id)?`highlighted`:`dimmed`;return this.nodeFor(t,i,r)})),this.edges.update(i.graph.edges.map(e=>{let n=e.id===t?`selected`:r.has(e.id)?`highlighted`:`dimmed`;return this.edgeFor(e,i.edgeTheme,n)})))}fitNeighborhood(e){!this.network||e.size===0||this.network.fit({nodes:[...e],minZoomLevel:.24,maxZoomLevel:1.18,animation:{duration:320,easingFunction:`easeInOutQuad`}})}clearHighlight(){this.clearPendingHighlight(),this.restoreHighlightBase(),this.highlighted={nodes:new Set,edges:new Set}}restoreHighlightBase(){if(!this.nodes||!this.edges)return;let e=this.currentInput;e&&(this.nodes.update(e.graph.nodes.map(t=>this.nodeFor(t,e,t.id===e.selectedId?`selected`:`base`))),this.edges.update(e.graph.edges.map(t=>this.edgeFor(t,e.edgeTheme,`base`))))}clearPendingWork(){this.clearPendingHighlight(),this.clearStabilizationTimeout()}clearPendingHighlight(){this.highlightFrame!==null&&(cancelAnimationFrame(this.highlightFrame),this.highlightFrame=null)}clearStabilizationTimeout(){this.stabilizeTimeout&&=(clearTimeout(this.stabilizeTimeout),null)}signatureFor(e){return`${e.graph.nodes.map(e=>e.id).join(`|`)}::${e.graph.edges.map(e=>e.id).join(`|`)}::labels=${e.labelsVisible}`}},he=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ge=i(`<button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><span class="h-2.5 w-2.5 shrink-0 rounded-full"></span> <span> </span> <!></button>`),_e=a(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-brand-600" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg>`),ve=i(`<div role="menu" class="absolute right-0 top-11 z-20 w-64 overflow-hidden rounded-xl border border-slate-200 bg-white p-2 shadow-xl shadow-slate-950/10"><div class="flex items-center justify-between px-2 pb-1 pt-1"><span class="text-[10px] font-semibold uppercase tracking-wide text-slate-400">Connections</span> <div class="flex gap-1"><button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-brand-700 hover:bg-brand-50">All</button> <button type="button" class="rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100">None</button></div></div> <!> <div class="my-1 h-px bg-slate-100"></div> <button type="button" role="menuitemcheckbox" class="flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition hover:bg-slate-50"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4 shrink-0 text-slate-400" aria-hidden="true"><path d="M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L3 13V4h9z"></path><path d="M7.5 7.5h.01"></path></svg> <span>Labels</span> <!></button> <div class="my-1 h-px bg-slate-100"></div> <div class="flex gap-1.5 px-1 pb-1 pt-0.5"><button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Re-layout</button> <button type="button" class="flex-1 rounded-md border border-slate-200 px-2 py-1.5 text-xs font-medium text-slate-700 transition hover:bg-slate-50">Reset</button></div></div>`),ye=i(`<div class="pointer-events-none absolute left-3 top-3 z-10 w-56 rounded-md border border-slate-200 bg-white/90 p-3 text-xs text-slate-600 shadow-sm backdrop-blur"><div class="flex justify-between font-medium text-slate-800"><span>Stabilizing layout</span> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200"><div class="h-full rounded-full bg-brand-500 transition-all"></div></div></div>`),be=i(`<span class="inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-1 text-xs text-slate-700"><span class="h-2 w-2 rounded-full"></span> </span>`),xe=i(`<button type="button" class="w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-left hover:border-brand-300 hover:bg-brand-50"><span class="block truncate text-sm font-medium text-slate-900"> </span> <span class="text-xs text-slate-500"> </span></button>`),Se=i(`<p class="mt-2 text-sm leading-6 text-slate-600"> </p>`),Ce=i(`<a class="mt-3 inline-flex text-sm font-medium text-brand-700 hover:underline">Open in editor</a>`),we=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <!> <p class="mt-2 text-xs text-slate-500"> </p> <!>`,1),Te=i(`<p class="text-xs font-semibold uppercase tracking-wide text-slate-500"> </p> <h3 class="mt-1 text-base font-semibold text-slate-950"> </h3> <p class="mt-2 text-sm leading-6 text-slate-600"> </p> <p class="mt-2 text-xs text-slate-500">Click another node or edge to move the highlighted neighborhood.</p>`,1),Ee=i(`<h3 class="text-sm font-semibold text-slate-950">Explore the Map</h3> <p class="mt-2 text-sm leading-6 text-slate-600">Click a node or edge to highlight its linked behavior. Double-click a node to jump
|
|
3
3
|
straight to it in the editor.</p>`,1),De=i(`<section class="w-full lg:flex lg:min-h-0 lg:flex-1 lg:flex-col"><div class="select-none overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm shadow-slate-950/5 lg:flex lg:min-h-0 lg:flex-1 lg:flex-col"><div class="shrink-0 border-b border-slate-200 bg-slate-950 px-4 py-4 text-white"><a class="inline-flex items-center gap-1.5 text-sm font-medium text-slate-400 transition hover:text-white"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M15 18l-6-6 6-6"></path></svg> </a> <div class="mt-3 min-w-0"><p class="text-xs font-semibold uppercase tracking-wide text-cyan-200">Behavior Graph</p> <h2 class="mt-1 truncate text-2xl font-semibold"> </h2> <p class="mt-1 max-w-3xl text-sm leading-6 text-slate-300"> </p></div></div> <div class="grid gap-0 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(0,1fr)_320px]"><div class="min-w-0 border-b border-slate-200 lg:min-h-0 lg:border-b-0 lg:border-r"><div class="graph-canvas relative lg:h-full svelte-1wx4hks"><div class="h-[76vh] min-h-[32rem] w-full lg:h-full lg:min-h-0"></div> <div class="absolute right-3 top-3 z-10 flex items-start gap-2"><div class="relative"><label for="graph-search" class="sr-only">Search nodes</label> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" class="pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <input id="graph-search" type="search" placeholder="Search nodes" class="h-9 w-44 select-text rounded-lg border border-slate-200 bg-white/95 pl-8 pr-3 text-sm shadow-sm outline-none backdrop-blur transition focus:border-brand-400 focus:ring-2 focus:ring-brand-500/15 sm:w-60"/></div> <div class="relative"><button type="button" aria-haspopup="menu"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M3 5h18l-7 8v6l-4-2v-4z"></path></svg> <span class="hidden sm:inline">Filters</span> <span class="rounded-full bg-slate-100 px-1.5 text-[11px] font-semibold text-slate-600"> </span></button> <!></div></div> <div class="absolute bottom-3 right-3 z-10 flex flex-col overflow-hidden rounded-lg border border-slate-200 bg-white/95 shadow-sm backdrop-blur"><button type="button" aria-label="Zoom in" class="grid h-9 w-9 place-items-center text-lg font-semibold leading-none text-slate-700 transition hover:bg-slate-100">+</button> <div class="h-px bg-slate-200"></div> <button type="button" aria-label="Zoom out" class="grid h-9 w-9 place-items-center text-lg font-semibold leading-none text-slate-700 transition hover:bg-slate-100">−</button> <div class="h-px bg-slate-200"></div> <button type="button" aria-label="Fit graph to view" class="grid h-9 w-9 place-items-center text-slate-700 transition hover:bg-slate-100"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" aria-hidden="true"><path d="M4 9V5a1 1 0 0 1 1-1h4"></path><path d="M20 9V5a1 1 0 0 0-1-1h-4"></path><path d="M4 15v4a1 1 0 0 0 1 1h4"></path><path d="M20 15v4a1 1 0 0 1-1 1h-4"></path></svg></button></div> <!></div></div> <aside class="space-y-4 p-4 lg:min-h-0 lg:overflow-y-auto"><div><h3 class="text-sm font-semibold text-slate-950">Graph Summary</h3> <div class="mt-3 grid grid-cols-2 gap-2 text-sm"><div class="rounded-md bg-slate-100 p-3"><div class="text-2xl font-semibold text-slate-950"> </div> <div class="text-xs text-slate-500">nodes</div></div> <div class="rounded-md bg-slate-100 p-3"><div class="text-2xl font-semibold text-slate-950"> </div> <div class="text-xs text-slate-500">edges</div></div></div></div> <div><h3 class="text-sm font-semibold text-slate-950">Node Types</h3> <div class="mt-2 flex flex-wrap gap-1.5"></div></div> <div><h3 class="text-sm font-semibold text-slate-950">Central Nodes</h3> <div class="mt-2 space-y-2"></div></div> <div class="rounded-md border border-slate-200 bg-slate-50 p-3"><!></div></aside></div></div></section>`);function Z(t,r){S(r,!0);let i=T(``),a=T(null),s=T(null),p=T(!1),h=T(!1),_=T(0),v=T(null),C=null,z=T(A({contains:!0,reads:!0,writes:!0,emits:!0,transitions:!0,asserts:!0,uses:!0,handles:!0})),U=T(!1),te=T(null),ne=W.length,re=j(()=>W.filter(e=>m(z)[e]).length),ae=e=>{P(z,Object.fromEntries(W.map(t=>[t,e])),!0)},G=e=>{m(U)&&m(te)&&!m(te).contains(e.target)&&P(U,!1)},ue=j(()=>r.features??(r.feature?[r.feature]:[])),q=j(()=>r.project?.name??r.feature?.name??`Behavior graph`),de=j(()=>r.project?`The whole project behavior map across ${m(ue).length} feature${m(ue).length===1?``:`s`} from the shared Unspa hub.`:`A connected map of the executable behavior model from the shared Unspa hub.`),fe=j(()=>r.project?`/projects/${r.project.id}`:r.feature?`/features/${r.feature.id}`:`/projects`),J=j(()=>r.project?`Back to project`:`Back to editor`),pe=j(()=>oe(m(ue),r.project)),Y=j(()=>se(m(pe))),X=j(()=>ce(m(Y),{search:m(i),enabledKinds:m(z)})),Z=j(()=>m(a)?m(Y).nodeById.get(m(a))??null:null),Q=j(()=>m(s)?m(X).edges.find(e=>e.id===m(s))??null:null),Oe=j(()=>m(Q)?m(Y).nodeById.get(m(Q).from)??null:null),ke=j(()=>m(Q)?m(Y).nodeById.get(m(Q).to)??null:null),Ae=j(()=>[...m(Y).nodes].sort((e,t)=>t.degree-e.degree).slice(0,6)),je=j(()=>{let e=new Map;for(let t of m(Y).nodes)e.set(t.type,(e.get(t.type)??0)+1);return e}),Me=()=>{C?.render({graph:m(X),selectedId:m(a),selectedEdgeId:m(s),labelsVisible:m(p),nodeTheme:le,edgeTheme:K})},Ne=e=>{P(z,{...m(z),[e]:!m(z)[e]},!0)},Pe=()=>{P(a,null),P(s,null),P(i,``),C?.fit()},Fe=e=>{P(a,e,!0),P(s,null),C?.select(e,null)};o(()=>{m(X).nodes,m(X).edges,m(p),m(a),m(s),Me()}),N(()=>{let e=!1,t=()=>C?.fit();return(async()=>{let n=await H(()=>import(`./D5speDV8.js`),[],import.meta.url);e||!m(v)||(C=new me(n,m(v),{onSelectedNodeChange:e=>{P(a,e,!0)},onSelectedEdgeChange:e=>{P(s,e,!0)},onNodeActivate:e=>{let t=m(Y).nodeById.get(e);t?.href&&V(t.href)},onStabilizationProgress:e=>{P(_,e,!0)},onSettledChange:e=>{P(h,e,!0)}}),Me(),window.addEventListener(`resize`,t))})(),()=>{e=!0,window.removeEventListener(`resize`,t)}}),k(()=>{C?.destroy(),C=null});var Ie=De();n(`mousedown`,f,G),n(`keydown`,f,e=>{e.key===`Escape`&&P(U,!1)});var Le=e(Ie),Re=e(Le),ze=e(Re),Be=I(e(ze));g(ze);var Ve=I(ze,2),He=I(e(Ve),2),Ue=e(He,!0);g(He);var We=I(He,2),Ge=e(We,!0);g(We),g(Ve),g(Re);var $=I(Re,2),Ke=e($),qe=e(Ke),Je=e(qe);F(Je,e=>P(v,e),()=>m(v));var Ye=I(Je,2),Xe=e(Ye),Ze=I(e(Xe),4);L(Ze),g(Xe);var Qe=I(Xe,2),$e=e(Qe),et=I(e($e),4),tt=e(et);g(et),g($e);var nt=I($e,2),rt=t=>{var n=ve(),r=e(n),i=I(e(r),2),a=e(i),o=I(a,2);g(i),g(r);var s=I(r,2);u(s,17,()=>W,D,(t,n)=>{let r=j(()=>m(z)[m(n)]);var i=ge(),a=e(i),o=I(a,2),s=e(o,!0);g(o);var u=I(o,2),d=e=>{l(e,he())};E(u,e=>{m(r)&&e(d)}),g(i),M(()=>{y(i,`aria-checked`,m(r)),ee(a,`background:${K[m(n)].color};opacity:${m(r)?1:.3}`),R(o,1,`flex-1 truncate ${m(r)?`text-slate-800`:`text-slate-400`}`),c(s,K[m(n)].label)}),B(`click`,i,()=>Ne(m(n))),l(t,i)});var d=I(s,4),f=I(e(d),2),h=I(f,2),_=e=>{l(e,_e())};E(h,e=>{m(p)&&e(_)}),g(d);var v=I(d,4),b=e(v),x=I(b,2);g(v),g(n),M(()=>{y(d,`aria-checked`,m(p)),R(f,1,`flex-1 ${m(p)?`text-slate-800`:`text-slate-600`}`)}),B(`click`,a,()=>ae(!0)),B(`click`,o,()=>ae(!1)),B(`click`,d,()=>P(p,!m(p))),B(`click`,b,()=>C?.relayout(m(X).nodes.length)),B(`click`,x,()=>{Pe(),P(U,!1)}),l(t,n)};E(nt,e=>{m(U)&&e(rt)}),g(Qe),F(Qe,e=>P(te,e),()=>m(te)),g(Ye);var it=I(Ye,2),at=e(it),ot=I(at,4),st=I(ot,4);g(it);var ct=I(it,2),lt=t=>{var n=ye(),r=e(n),i=I(e(r),2),a=e(i);g(i),g(r);var o=I(r,2),s=e(o);g(o),g(n),M(()=>{c(a,`${m(_)??``}%`),ee(s,`width:${m(_)}%`)}),l(t,n)};E(ct,e=>{!m(h)&&m(_)<100&&e(lt)}),g(qe),g(Ke);var ut=I(Ke,2),dt=e(ut),ft=I(e(dt),2),pt=e(ft),mt=e(pt),ht=e(mt,!0);g(mt),w(2),g(pt);var gt=I(pt,2),_t=e(gt),vt=e(_t,!0);g(_t),w(2),g(gt),g(ft),g(dt);var yt=I(dt,2),bt=I(e(yt),2);u(bt,21,()=>ie,D,(t,n)=>{var r=d(),i=x(r),a=t=>{var r=be(),i=e(r),a=I(i);g(r),M(e=>{ee(i,`background:${le[m(n)].fill}`),c(a,` ${le[m(n)].label??``} ${e??``}`)},[()=>m(je).get(m(n))]),l(t,r)},o=j(()=>m(je).get(m(n)));E(i,e=>{m(o)&&e(a)}),l(t,r)}),g(bt),g(yt);var xt=I(yt,2),St=I(e(xt),2);u(St,21,()=>m(Ae),D,(t,n)=>{var r=xe(),i=e(r),a=e(i,!0);g(i);var o=I(i,2),s=e(o);g(o),g(r),M(()=>{c(a,m(n).label),c(s,`${le[m(n).type].label??``} / ${m(n).degree??``} links`)}),B(`click`,r,()=>Fe(m(n).id)),l(t,r)}),g(St),g(xt);var Ct=I(xt,2),wt=e(Ct),Tt=t=>{var n=we(),r=x(n),i=e(r,!0);g(r);var a=I(r,2),o=e(a,!0);g(a);var s=I(a,2),u=t=>{var n=Se(),r=e(n,!0);g(n),M(()=>c(r,m(Z).detail)),l(t,n)};E(s,e=>{m(Z).detail&&e(u)});var d=I(s,2),f=e(d);g(d);var p=I(d,2),h=e=>{var t=Ce();M(()=>y(t,`href`,m(Z).href)),l(e,t)};E(p,e=>{m(Z).href&&e(h)}),M(()=>{c(i,le[m(Z).type].label),c(o,m(Z).label),c(f,`${m(Z).degree??``} graph links`)}),l(t,n)},Et=t=>{var n=Te(),r=x(n),i=e(r,!0);g(r);var a=I(r,2),o=e(a,!0);g(a);var s=I(a,2),u=e(s);g(s),w(2),M(()=>{c(i,K[m(Q).kind].label),c(o,m(Q).label??`Behavior link`),c(u,`${m(Oe)?.label??m(Q).from??``} -> ${m(ke)?.label??m(Q).to??``}`)}),l(t,n)},Dt=e=>{var t=Ee();w(2),l(e,t)};E(wt,e=>{m(Z)?e(Tt):m(Q)?e(Et,1):e(Dt,-1)}),g(Ct),g(ut),g($),g(Le),g(Ie),M(()=>{y(ze,`href`,m(fe)),c(Be,` ${m(J)??``}`),c(Ue,m(q)),c(Ge,m(de)),y(Je,`aria-label`,`Interactive behavior graph for ${m(q)}`),y($e,`aria-expanded`,m(U)),R($e,1,`flex h-9 items-center gap-1.5 rounded-lg border bg-white/95 px-2.5 text-sm font-medium shadow-sm backdrop-blur transition ${m(U)?`border-brand-400 text-slate-900`:`border-slate-200 text-slate-700 hover:bg-white`}`),c(tt,`${m(re)??``}/${ne??``}`),c(ht,m(Y).nodes.length),c(vt,m(Y).edges.length)}),O(Ze,()=>m(i),e=>P(i,e)),B(`click`,$e,()=>P(U,!m(U))),B(`click`,at,()=>C?.zoomBy(1.38)),B(`click`,ot,()=>C?.zoomBy(.72)),B(`click`,st,()=>C?.fit()),l(t,Ie),b()}p([`click`]);var Q=e=>e.format===`statechart`?e.edges.length>0:e.nodes.length>0,Oe=({features:e})=>{let t=e.some(e=>e.surfaces.some(e=>e.transitions.length>0||e.actions.some(e=>e.transitions.length>0||[...e.effects,...e.onBlockedEffects??[]].some(e=>e.type===`transition_surface`)))),n=e.some(e=>e.entities.length>0);return{loaded:e.length>0,hasTransitions:t,hasEntities:n}},ke=({features:e,project:t})=>{let n=oe(e,t);return{format:`graph`,title:t?.name??e[0]?.name??`Behavior graph`,nodes:n.nodes.map(e=>({id:e.id,label:e.label,kind:e.type})),edges:n.edges.map(e=>({from:e.from,to:e.to,label:e.kind}))}},Ae=class{byFormat=new Map;constructor(e=[]){for(let t of e)this.register(t)}register(e){this.byFormat.set(e.format,e)}get(e){return this.byFormat.get(e)}has(e){return this.byFormat.has(e)}list(){return[...this.byFormat.values()]}},je={format:`er`,label:`ER diagram`,supportsText:!0,project({features:e,project:t}){let n=[],r=new Set;for(let t of e){let e=String(t.id);for(let i of t.entities){let t=`${e}::entity::${String(i.id)}`;r.has(t)||(r.add(t),n.push({id:t,label:i.namespace,kind:`entity`,fields:i.fields.map(e=>({name:e.name,type:String(e.type)}))}))}}return{format:`er`,title:t?.name??e[0]?.name??`ER diagram`,nodes:n,edges:[]}}},Me=e=>`feature::${e}`,Ne=(e,t)=>`${e}::surface::${t}`,Pe=(e,t)=>`${e}::action::${t}`,Fe={format:`flowchart`,label:`Flowchart`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))};for(let t of e){let e=String(t.id),n=Me(e);a({id:n,label:t.name,kind:`feature`});for(let i of t.surfaces){let t=Ne(e,String(i.id));a({id:t,label:i.name,kind:`surface`}),r.push({from:n,to:t});for(let n of re(i.actions)){let i=Pe(e,String(n.id));a({id:i,label:n.name,kind:`action`}),r.push({from:t,to:i});for(let t of[...n.effects,...n.onBlockedEffects??[]])t.type===`transition_surface`&&r.push({from:i,to:Ne(e,String(t.target)),label:`go to`})}}}let o=r.filter(e=>i.has(e.from)&&i.has(e.to));return{format:`flowchart`,title:t?.name??e[0]?.name??`Flowchart`,nodes:n,edges:o}}},Ie=(e,t)=>`${e}::surface::${t}`,Le=(e,t)=>`${e}::action::${t}`,Re={format:`mindmap`,label:`Mindmap`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))},o=t?.name??e[0]?.name??`Model`,s=t?`project::${String(t.id)}`:`feature::${String(e[0]?.id??`root`)}`;a({id:s,label:o,kind:`root`});for(let n of e){let e=String(n.id),i=s;if(t){let t=`feature::${e}`;a({id:t,label:n.name,kind:`feature`}),r.push({from:s,to:t}),i=t}for(let t of n.surfaces){let n=Ie(e,String(t.id));a({id:n,label:t.name,kind:`surface`}),r.push({from:i,to:n});for(let i of re(t.actions)){let t=Le(e,String(i.id));a({id:t,label:i.name,kind:`action`}),r.push({from:n,to:t})}}}return{format:`mindmap`,title:o,nodes:n,edges:r}}},ze=(e,t)=>`${e}::action::${t}`,Be={format:`sequence`,label:`Sequence`,supportsText:!0,project({features:e,project:t}){let n=[],r=[],i=new Set,a=e=>{i.has(e.id)||(i.add(e.id),n.push(e))};for(let t of e){let e=String(t.id),n=new Map,i=[];for(let r of t.surfaces)for(let t of re(r.actions)){let r=ze(e,String(t.id));if(t.triggeredByEvent){let e=String(t.triggeredByEvent),i=n.get(e)??[];i.push({id:r,name:t.name}),n.set(e,i)}for(let e of t.emittedEvents)i.push({id:r,name:t.name,event:String(e)})}for(let e of i)for(let t of n.get(e.event)??[])a({id:e.id,label:e.name,kind:`action`}),a({id:t.id,label:t.name,kind:`action`}),r.push({from:e.id,to:t.id,label:e.event})}return{format:`sequence`,title:t?.name??e[0]?.name??`Sequence`,nodes:n,edges:r}}},Ve=(e,t)=>`${e}::${t}`,He={format:`statechart`,label:`Statechart`,supportsText:!0,project({features:e,project:t}){let n=[],r=new Set;for(let t of e){let e=String(t.id);for(let i of t.surfaces){let t=Ve(e,String(i.id));r.has(t)||(r.add(t),n.push({id:t,label:i.name,kind:i.type}))}}let i=[],a=(e,t,n,a)=>{let o=Ve(e,t),s=Ve(e,n);!r.has(o)||!r.has(s)||i.push({from:o,to:s,label:a})};for(let t of e){let e=String(t.id);for(let n of t.surfaces){let t=String(n.id);for(let r of n.transitions)a(e,t,String(r.target),r.label);for(let r of n.actions){for(let n of r.transitions)a(e,t,String(n.target),n.label??r.name);for(let n of[...r.effects,...r.onBlockedEffects??[]])n.type===`transition_surface`&&a(e,t,String(n.target),r.name)}}}return{format:`statechart`,title:t?.name??e[0]?.name??`Statechart`,nodes:n,edges:i}}},Ue=e=>e.replace(/[\r\n]+/g,` `).replace(/"/g,`\\"`).trim(),We=e=>e.fields?.length?`${e.label} (${e.fields.map(e=>e.name).join(`, `)})`:e.label,Ge={id:`dot`,label:`Graphviz DOT`,export(e){let t=new Map;e.nodes.forEach((e,n)=>t.set(e.id,`n${n}`));let n=[`digraph "${Ue(e.title)}" {`,` rankdir=LR;`];for(let r of e.nodes)n.push(` ${t.get(r.id)} [label="${Ue(We(r))}"];`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);if(!e||!i)continue;let a=r.label?` [label="${Ue(r.label)}"]`:``;n.push(` ${e} -> ${i}${a};`)}return n.push(`}`),n.join(`
|
|
4
4
|
`)}},$=e=>e.replace(/[\r\n]+/g,` `).replace(/["]/g,``).replace(/:/g,` `).trim(),Ke=e=>$(e).replace(/[()[\]{}]/g,` `).replace(/\s+/g,` `).trim(),qe=(e,t)=>{let n=e.replace(/[^A-Za-z0-9_-]+/g,`_`).replace(/^_+|_+$/g,``);return/^[A-Za-z]/.test(n)?n:n?`x${n}`:t},Je=e=>{let t=new Map;return e.nodes.forEach((e,n)=>t.set(e.id,`s${n}`)),t},Ye=e=>{let t=Je(e),n=[`stateDiagram-v2`];e.title&&n.push(` %% ${$(e.title)}`);for(let r of e.nodes)n.push(` state "${$(r.label)}" as ${t.get(r.id)}`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);!e||!i||n.push(r.label?` ${e} --> ${i} : ${$(r.label)}`:` ${e} --> ${i}`)}return n.join(`
|
|
5
5
|
`)},Xe=e=>{let t=Je(e),n=[`sequenceDiagram`,` autonumber`];for(let r of e.nodes)n.push(` participant ${t.get(r.id)} as ${$(r.label)}`);for(let r of e.edges){let e=t.get(r.from),i=t.get(r.to);!e||!i||n.push(` ${e}->>${i}: ${$(r.label??`event`)}`)}return n.join(`
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as e,U as t,V as n,W as r,it as i,lt as a,r as o,rt as s,t as c}from"./D50Xf4Qj.js";import{i as l,n as u,r as d,t as f}from"./BuFlayix.js";new URL(`sveltekit-internal://`);function p(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function ee(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function te(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function g(){}function ne(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}var re=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&_.delete(v(e)),re(e,t));var _=new Map;function ie(e,t){let n=v(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&_.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=f(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ae(e,t,n){if(_.size>0){let t=v(e,n),r=_.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);_.delete(t)}}return window.fetch(t,n)}function v(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${ne(...e)}"]`}return n}var y=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,oe=/^\/\((?:.+)\)$/;function se(e){let t=[];return{pattern:e===`/`||oe.test(e)?/^\/$/:RegExp(`^${le(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return de(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return de(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=y.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return de(e)}).join(``)}).join(``)}/?$`),params:t}}function ce(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function le(e){return e.slice(1).split(`/`).filter(ce)}function ue(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function de(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=se(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ue(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var b=globalThis.__sveltekit_i874d4?.base??``,he=globalThis.__sveltekit_i874d4?.assets??b??``,ge=`1783944531907`,_e=`sveltekit:snapshot`,ve=`sveltekit:scroll`,ye=`sveltekit:states`,be=`sveltekit:pageurl`,x=`sveltekit:history`,S=`sveltekit:navigation`,C={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function w(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var Se={...C,"":C.hover};function Ce(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function we(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Ce(e)}}function Te(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===xe&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Ce(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:Se[r??`off`],preload_data:Se[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Ee(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var De={v:g};function Oe(){let{set:e,subscribe:t}=a(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==ge;return n&&(e(!0),De.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function O(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function ke(e){}Uint8Array.fromBase64,typeof process==`object`&&process.versions?.node;var Ae=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ae,`entries`]);var je=new Set([...Ae]);new Set([...je,`actions`,`entries`]),new Set([`GET`,`POST`,`PATCH`,`PUT`,`DELETE`,`OPTIONS`,`HEAD`,`fallback`,`prerender`,`trailingSlash`,`config`,`entries`]);function Me(e){return e.filter(e=>e!=null)}function Ne(e,t){return e+`/`+t}function Pe(e){return e instanceof u||e instanceof l?e.status:500}function Fe(e){return e instanceof l?e.text:`Internal Error`}var k,A,Ie,Le=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),Re=`a:`;Le?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Re)},A={current:null},Ie={current:!1}):(k=new class{#e=i({});get data(){return n(this.#e)}set data(e){s(this.#e,e)}#t=i(null);get form(){return n(this.#t)}set form(e){s(this.#t,e)}#n=i(null);get error(){return n(this.#n)}set error(e){s(this.#n,e)}#r=i({});get params(){return n(this.#r)}set params(e){s(this.#r,e)}#i=i({id:null});get route(){return n(this.#i)}set route(e){s(this.#i,e)}#a=i({});get state(){return n(this.#a)}set state(e){s(this.#a,e)}#o=i(-1);get status(){return n(this.#o)}set status(e){s(this.#o,e)}#s=i(new URL(Re));get url(){return n(this.#s)}set url(e){s(this.#s,e)}},A=new class{#e=i(null);get current(){return n(this.#e)}set current(e){s(this.#e,e)}},Ie=new class{#e=i(!1);get current(){return n(this.#e)}set current(e){s(this.#e,e)}},De.v=()=>Ie.current=!0);function ze(e){Object.assign(k,e)}var Be={spanContext(){return Ve},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ve={traceId:``,spanId:``,traceFlags:0},{onMount:He,tick:Ue}=c,We=r??(e=>e()),Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:Ee({}),page:Ee({}),navigating:a(null),updated:Oe()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(g)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(b||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null}var U=new Map,Qe=new Set,$e=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},et=!1,tt=!1,nt=!0,K=!1,q=!1,rt=!1,it=!1,at,J,Y,X,ot=new Set,st=new Map,ct=new Map;async function lt(e,t,n){globalThis.__sveltekit_i874d4&&(globalThis.__sveltekit_i874d4.query,globalThis.__sveltekit_i874d4.prerender),document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),J=history.state?.[x],Y=history.state?.[S],J||(J=Y=Date.now(),history.replaceState({...history.state,[x]:J,[S]:Y},``));let r=M[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Q({type:`enter`,url:w(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function ut(){z.length=0,it=!1}function dt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ft(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function pt(){Ke(J),me(ve,M),dt(Y),me(_e,N)}async function mt(e,n,r,i){let a,o;n.invalidateAll&&H(),await Q({type:`goto`,url:w(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){it=!0,a=new Set;for(let[e,t]of st)for(let n of t.keys())a.add(Ne(e,n));o=new Set;for(let[e,t]of ct)for(let n of t.keys())o.add(Ne(e,n))}n.invalidate&&n.invalidate.forEach(Lt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of st)for(let[n,{resource:r}]of t)a?.has(Ne(e,n))&&r.refresh();for(let[e,t]of ct)for(let[n,{resource:r}]of t)o?.has(Ne(e,n))&&r.reconnect()})}async function ht(e){if(e.id!==V?.id){H();let t={};ot.add(t),V={id:e.id,token:t,promise:Tt({...e,preload:t}).then(e=>(ot.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function gt(e){let t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function _t(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},ze(e.props.page),at=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ft(Y),n){let e={from:null,to:{...r,scroll:M[J]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}tt=!0}async function vt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(b&&(e.pathname===b||e.pathname===b+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=p(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Me(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},d=!k,f=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${f}`]=u),f+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:k.data}),l}async function yt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:h(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=bt(t,r,n);return s&&e(i.href),a},setHeaders:g,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function bt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:tt?ae(r,i.href,t):ie(r,t)}}function xt(e,t,n,r,i,a){if(it)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function St(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Ct(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function wt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Tt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return ot.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:c}=i,l=[...s,c];o.forEach(e=>e?.().catch(g)),l.forEach(e=>e?.[1]().catch(g));let f=G.url?e!==At(G.url):!1,p=G.route?i.id!==G.route.id:!1,ee=Ct(G.url,n),te=!1,m=l.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!xt(te,p,f,ee,a.universal?.uses,r)?a:(te=!0,yt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await m[n])?.data);return e},server_data_node:St(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of m)e.catch(g);let h=[];for(let e=0;e<l.length;e+=1)if(l[e])try{h.push(await m[e])}catch(t){if(t instanceof d)return{type:`redirect`,location:t.location};if(ot.has(a))return wt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Pe(t),c;if(t instanceof u)c=t.body;else{if(await P.updated.check())return await Je(),await F(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let l=await Et(e,h,o);return l?vt({url:n,params:r,branch:h.slice(0,l.idx).concat(l.node),errors:o,status:s,error:c,route:i}):await Mt(n,{id:i.id},c,s)}else h.push(void 0);return vt({url:n,params:r,branch:h,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Et(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Dt({status:e,error:t,url:n,route:r}){let i={};try{return vt({url:n,params:i,branch:[await yt({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:St(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof d)return mt(new URL(e.location,location.href),{},0);throw e}}async function Ot(e){let t=e.href;if(U.has(t))return U.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>bt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();U.set(t,r),n=await r}catch{U.delete(t);return}return n}async function Z(e,t){if(e&&!O(e,b,R.hash)){let n=await Ot(e);if(!n)return;let r=kt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:At(e),invalidating:t,route:n,params:te(i),url:e}}}}function kt(e){return ee(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(b.length))||`/`}function At(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function jt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||Qe.forEach(e=>e(c)),o?null:s}async function Q({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:u=0,nav_token:d={},accept:f=g,block:p=g,event:ee}){let te=X;X=d;let m=await Z(r,!1),h=n===`enter`?Wt(G,m,r,n):jt({url:r,type:n,delta:i?.delta,intent:m,scroll:i?.scroll,event:ee});if(!h){p(),X===d&&(X=te);return}let ne=J,re=Y;f(),K=!0,tt&&h.navigation.type!==`enter`&&P.navigating.set(A.current=h.navigation);let _=m&&await Tt(m);if(!_){if(O(r,b,R.hash))return await F(r,s);_=await Mt(r,{id:null},await $(new l(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=m?.url||r,X!==d)return h.reject(Error(`navigation aborted`)),!1;if(_.type===`redirect`){if(u<20){await Q({type:n,url:new URL(_.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:u+1,nav_token:d}),h.fulfil(void 0);return}_=await Dt({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}})}else _.props.page.status>=400&&await P.updated.check()&&(await Je(),await F(r,s));if(ut(),Ke(ne),dt(re),_.props.page.url.pathname!==r.pathname&&(r.pathname=_.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[x]:J+=e,[S]:Y+=e,[ye]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(J,Y)}let ie=m&&V?.id===m.id?V.fork:null;V?.fork&&!ie&&H(),V=null,_.props.page.state=c;let ae;if(tt){let t=(await Promise.all(Array.from($e,e=>e(h.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=h.navigation.to;G={..._.state,nav:{params:n.params,route:n.route,url:n.url}},_.props.page&&(_.props.page.url=r);let i=ie&&await ie;i?ae=i.commit():(j=null,at.$set(_.props),j&&Object.assign(_.props.page,j),ze(_.props.page),ae=e?.()),rt=!0}else await _t(_,Ze,!1);let{activeElement:v}=document;if(await ae,await t(),await t(),X!==d)return h.reject(Error(`navigation aborted`)),!1;_.props.page&&j&&Object.assign(_.props.page,j);let y=null;if(nt){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(y=r.hash&&document.getElementById(qt(r)))?y.scrollIntoView():scrollTo(0,0)}let oe=document.activeElement!==v&&document.activeElement!==document.body;!a&&!oe&&Ut(r,!y),nt=!0,K=!1,n===`popstate`&&ft(Y),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=T()),W.forEach(e=>e(h.navigation)),P.navigating.set(A.current=null)}async function Mt(e,t,n,r,i){return e.origin===xe&&e.pathname===location.pathname&&!et?await Dt({status:r,error:n,url:e,route:t}):await F(e,i)}function Nt(){let e,t={element:void 0,href:void 0},n;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,C.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],C.tap)}L.addEventListener(`mousedown`,r),L.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(gt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=we(e,L),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=Te(i,b,R.hash);if(s||c)return;let l=D(i),u=o&&At(G.url)===At(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=C.tap;let e=await Z(o,!1);if(!e)return;ht(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,gt(o))}function o(){i.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:r}=Te(e,b,R.hash);if(n||r)continue;let a=D(e);a.reload||(a.preload_code===C.viewport&&i.observe(e),a.preload_code===C.eager&>(t))}}W.add(o),o()}function $(e,t){if(e instanceof u)return e.body;let n=Pe(e),r=Fe(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Pt(e,t){He(()=>(e.add(t),()=>{e.delete(t)}))}function Ft(e){Pt(W,e)}function It(e,t={}){return e=new URL(w(e)),e.origin===xe?mt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Lt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function Rt(e,t){let n={[x]:J,[S]:Y,[be]:k.url.href,[ye]:t};history.replaceState(n,``,w(e)),k.state=t,at.$set({page:We(()=>Gt(k))})}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(pt(),!K){let e=Wt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};Qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&pt()}),!navigator.connection?.saveData&&!/2g/.test(navigator.connection?.effectiveType)&&Nt(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=we(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=Te(n,b,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){jt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Ke(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,b,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht)if(t.state?.[`sveltekit:history`]){let n=t.state[x];if(X={},n===J)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[S],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(rt||s)){i!==k.state&&(k.state=i),e(a),M[J]=T(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),R.hash&&location.reload())}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[x]:++J,[S]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){G.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){et=!0;let l=new URL(location.href),u;({params:i={},route:a={id:null}}=await Z(l,!1)||{}),u=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),yt({loader:R.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:St(r)})}),o=await Promise.all(e);if(u){let e=u.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await vt({url:l,params:i,branch:o,status:t,error:n,errors:u?.errors,form:c,route:u??null})}catch(t){if(t instanceof d){await F(new URL(t.location,location.href));return}f=await Dt({status:Pe(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await _t(f,e,p)}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(g),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{P as a,Ie as c,lt as i,ke as l,It as n,A as o,Rt as r,k as s,Ft as t};
|
|
1
|
+
import{H as e,U as t,V as n,W as r,it as i,lt as a,r as o,rt as s,t as c}from"./D50Xf4Qj.js";import{i as l,n as u,r as d,t as f}from"./BuFlayix.js";new URL(`sveltekit-internal://`);function p(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function ee(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function te(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function g(){}function ne(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}var re=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&_.delete(v(e)),re(e,t));var _=new Map;function ie(e,t){let n=v(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&_.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=f(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ae(e,t,n){if(_.size>0){let t=v(e,n),r=_.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);_.delete(t)}}return window.fetch(t,n)}function v(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${ne(...e)}"]`}return n}var y=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,oe=/^\/\((?:.+)\)$/;function se(e){let t=[];return{pattern:e===`/`||oe.test(e)?/^\/$/:RegExp(`^${le(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return de(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return de(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=y.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return de(e)}).join(``)}).join(``)}/?$`),params:t}}function ce(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function le(e){return e.slice(1).split(`/`).filter(ce)}function ue(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function de(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=se(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ue(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var b=globalThis.__sveltekit_vb0rh8?.base??``,he=globalThis.__sveltekit_vb0rh8?.assets??b??``,ge=`1784127817283`,_e=`sveltekit:snapshot`,ve=`sveltekit:scroll`,ye=`sveltekit:states`,be=`sveltekit:pageurl`,x=`sveltekit:history`,S=`sveltekit:navigation`,C={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function w(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var Se={...C,"":C.hover};function Ce(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function we(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Ce(e)}}function Te(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===xe&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Ce(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:Se[r??`off`],preload_data:Se[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Ee(e){let t=a(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:o}}var De={v:g};function Oe(){let{set:e,subscribe:t}=a(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==ge;return n&&(e(!0),De.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function O(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function ke(e){}Uint8Array.fromBase64,typeof process==`object`&&process.versions?.node;var Ae=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ae,`entries`]);var je=new Set([...Ae]);new Set([...je,`actions`,`entries`]),new Set([`GET`,`POST`,`PATCH`,`PUT`,`DELETE`,`OPTIONS`,`HEAD`,`fallback`,`prerender`,`trailingSlash`,`config`,`entries`]);function Me(e){return e.filter(e=>e!=null)}function Ne(e,t){return e+`/`+t}function Pe(e){return e instanceof u||e instanceof l?e.status:500}function Fe(e){return e instanceof l?e.text:`Internal Error`}var k,A,Ie,Le=o.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(o.toString()),Re=`a:`;Le?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Re)},A={current:null},Ie={current:!1}):(k=new class{#e=i({});get data(){return n(this.#e)}set data(e){s(this.#e,e)}#t=i(null);get form(){return n(this.#t)}set form(e){s(this.#t,e)}#n=i(null);get error(){return n(this.#n)}set error(e){s(this.#n,e)}#r=i({});get params(){return n(this.#r)}set params(e){s(this.#r,e)}#i=i({id:null});get route(){return n(this.#i)}set route(e){s(this.#i,e)}#a=i({});get state(){return n(this.#a)}set state(e){s(this.#a,e)}#o=i(-1);get status(){return n(this.#o)}set status(e){s(this.#o,e)}#s=i(new URL(Re));get url(){return n(this.#s)}set url(e){s(this.#s,e)}},A=new class{#e=i(null);get current(){return n(this.#e)}set current(e){s(this.#e,e)}},Ie=new class{#e=i(!1);get current(){return n(this.#e)}set current(e){s(this.#e,e)}},De.v=()=>Ie.current=!0);function ze(e){Object.assign(k,e)}var Be={spanContext(){return Ve},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Ve={traceId:``,spanId:``,traceFlags:0},{onMount:He,tick:Ue}=c,We=r??(e=>e()),Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:Ee({}),page:Ee({}),navigating:a(null),updated:Oe()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(g)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(b||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null}var U=new Map,Qe=new Set,$e=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},et=!1,tt=!1,nt=!0,K=!1,q=!1,rt=!1,it=!1,at,J,Y,X,ot=new Set,st=new Map,ct=new Map;async function lt(e,t,n){globalThis.__sveltekit_vb0rh8&&(globalThis.__sveltekit_vb0rh8.query,globalThis.__sveltekit_vb0rh8.prerender),document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),J=history.state?.[x],Y=history.state?.[S],J||(J=Y=Date.now(),history.replaceState({...history.state,[x]:J,[S]:Y},``));let r=M[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Q({type:`enter`,url:w(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function ut(){z.length=0,it=!1}function dt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ft(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function pt(){Ke(J),me(ve,M),dt(Y),me(_e,N)}async function mt(e,n,r,i){let a,o;n.invalidateAll&&H(),await Q({type:`goto`,url:w(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){it=!0,a=new Set;for(let[e,t]of st)for(let n of t.keys())a.add(Ne(e,n));o=new Set;for(let[e,t]of ct)for(let n of t.keys())o.add(Ne(e,n))}n.invalidate&&n.invalidate.forEach(Lt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of st)for(let[n,{resource:r}]of t)a?.has(Ne(e,n))&&r.refresh();for(let[e,t]of ct)for(let[n,{resource:r}]of t)o?.has(Ne(e,n))&&r.reconnect()})}async function ht(e){if(e.id!==V?.id){H();let t={};ot.add(t),V={id:e.id,token:t,promise:Tt({...e,preload:t}).then(e=>(ot.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function gt(e){let t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function _t(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},ze(e.props.page),at=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ft(Y),n){let e={from:null,to:{...r,scroll:M[J]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}tt=!0}async function vt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(b&&(e.pathname===b||e.pathname===b+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=p(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Me(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},d=!k,f=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${f}`]=u),f+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:k.data}),l}async function yt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:h(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=bt(t,r,n);return s&&e(i.href),a},setHeaders:g,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function bt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:tt?ae(r,i.href,t):ie(r,t)}}function xt(e,t,n,r,i,a){if(it)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function St(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Ct(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function wt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Tt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return ot.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:c}=i,l=[...s,c];o.forEach(e=>e?.().catch(g)),l.forEach(e=>e?.[1]().catch(g));let f=G.url?e!==At(G.url):!1,p=G.route?i.id!==G.route.id:!1,ee=Ct(G.url,n),te=!1,m=l.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!xt(te,p,f,ee,a.universal?.uses,r)?a:(te=!0,yt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await m[n])?.data);return e},server_data_node:St(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of m)e.catch(g);let h=[];for(let e=0;e<l.length;e+=1)if(l[e])try{h.push(await m[e])}catch(t){if(t instanceof d)return{type:`redirect`,location:t.location};if(ot.has(a))return wt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Pe(t),c;if(t instanceof u)c=t.body;else{if(await P.updated.check())return await Je(),await F(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let l=await Et(e,h,o);return l?vt({url:n,params:r,branch:h.slice(0,l.idx).concat(l.node),errors:o,status:s,error:c,route:i}):await Mt(n,{id:i.id},c,s)}else h.push(void 0);return vt({url:n,params:r,branch:h,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Et(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Dt({status:e,error:t,url:n,route:r}){let i={};try{return vt({url:n,params:i,branch:[await yt({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:St(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof d)return mt(new URL(e.location,location.href),{},0);throw e}}async function Ot(e){let t=e.href;if(U.has(t))return U.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>bt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();U.set(t,r),n=await r}catch{U.delete(t);return}return n}async function Z(e,t){if(e&&!O(e,b,R.hash)){let n=await Ot(e);if(!n)return;let r=kt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:At(e),invalidating:t,route:n,params:te(i),url:e}}}}function kt(e){return ee(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(b.length))||`/`}function At(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function jt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||Qe.forEach(e=>e(c)),o?null:s}async function Q({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:u=0,nav_token:d={},accept:f=g,block:p=g,event:ee}){let te=X;X=d;let m=await Z(r,!1),h=n===`enter`?Wt(G,m,r,n):jt({url:r,type:n,delta:i?.delta,intent:m,scroll:i?.scroll,event:ee});if(!h){p(),X===d&&(X=te);return}let ne=J,re=Y;f(),K=!0,tt&&h.navigation.type!==`enter`&&P.navigating.set(A.current=h.navigation);let _=m&&await Tt(m);if(!_){if(O(r,b,R.hash))return await F(r,s);_=await Mt(r,{id:null},await $(new l(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=m?.url||r,X!==d)return h.reject(Error(`navigation aborted`)),!1;if(_.type===`redirect`){if(u<20){await Q({type:n,url:new URL(_.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:u+1,nav_token:d}),h.fulfil(void 0);return}_=await Dt({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}})}else _.props.page.status>=400&&await P.updated.check()&&(await Je(),await F(r,s));if(ut(),Ke(ne),dt(re),_.props.page.url.pathname!==r.pathname&&(r.pathname=_.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[x]:J+=e,[S]:Y+=e,[ye]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(J,Y)}let ie=m&&V?.id===m.id?V.fork:null;V?.fork&&!ie&&H(),V=null,_.props.page.state=c;let ae;if(tt){let t=(await Promise.all(Array.from($e,e=>e(h.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=h.navigation.to;G={..._.state,nav:{params:n.params,route:n.route,url:n.url}},_.props.page&&(_.props.page.url=r);let i=ie&&await ie;i?ae=i.commit():(j=null,at.$set(_.props),j&&Object.assign(_.props.page,j),ze(_.props.page),ae=e?.()),rt=!0}else await _t(_,Ze,!1);let{activeElement:v}=document;if(await ae,await t(),await t(),X!==d)return h.reject(Error(`navigation aborted`)),!1;_.props.page&&j&&Object.assign(_.props.page,j);let y=null;if(nt){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(y=r.hash&&document.getElementById(qt(r)))?y.scrollIntoView():scrollTo(0,0)}let oe=document.activeElement!==v&&document.activeElement!==document.body;!a&&!oe&&Ut(r,!y),nt=!0,K=!1,n===`popstate`&&ft(Y),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=T()),W.forEach(e=>e(h.navigation)),P.navigating.set(A.current=null)}async function Mt(e,t,n,r,i){return e.origin===xe&&e.pathname===location.pathname&&!et?await Dt({status:r,error:n,url:e,route:t}):await F(e,i)}function Nt(){let e,t={element:void 0,href:void 0},n;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,C.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],C.tap)}L.addEventListener(`mousedown`,r),L.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(gt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=we(e,L),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=Te(i,b,R.hash);if(s||c)return;let l=D(i),u=o&&At(G.url)===At(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=C.tap;let e=await Z(o,!1);if(!e)return;ht(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,gt(o))}function o(){i.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:r}=Te(e,b,R.hash);if(n||r)continue;let a=D(e);a.reload||(a.preload_code===C.viewport&&i.observe(e),a.preload_code===C.eager&>(t))}}W.add(o),o()}function $(e,t){if(e instanceof u)return e.body;let n=Pe(e),r=Fe(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Pt(e,t){He(()=>(e.add(t),()=>{e.delete(t)}))}function Ft(e){Pt(W,e)}function It(e,t={}){return e=new URL(w(e)),e.origin===xe?mt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Lt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function Rt(e,t){let n={[x]:J,[S]:Y,[be]:k.url.href,[ye]:t};history.replaceState(n,``,w(e)),k.state=t,at.$set({page:We(()=>Gt(k))})}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(pt(),!K){let e=Wt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};Qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&pt()}),!navigator.connection?.saveData&&!/2g/.test(navigator.connection?.effectiveType)&&Nt(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=we(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=Te(n,b,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){jt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Ke(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,b,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht)if(t.state?.[`sveltekit:history`]){let n=t.state[x];if(X={},n===J)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[S],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(rt||s)){i!==k.state&&(k.state=i),e(a),M[J]=T(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),R.hash&&location.reload())}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[x]:++J,[S]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){G.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){et=!0;let l=new URL(location.href),u;({params:i={},route:a={id:null}}=await Z(l,!1)||{}),u=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),yt({loader:R.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:St(r)})}),o=await Promise.all(e);if(u){let e=u.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await vt({url:l,params:i,branch:o,status:t,error:n,errors:u?.errors,form:c,route:u??null})}catch(t){if(t instanceof d){await F(new URL(t.location,location.href));return}f=await Dt({status:Pe(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await _t(f,e,p)}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(g),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{P as a,Ie as c,lt as i,ke as l,It as n,A as o,Rt as r,k as s,Ft as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,it as t,nt as n,rt as r}from"./D50Xf4Qj.js";import{K as i,N as a,P as o,V as s,dt as c,j as l,t as u,u as d,xt as f}from"./
|
|
1
|
+
import{V as e,it as t,nt as n,rt as r}from"./D50Xf4Qj.js";import{K as i,N as a,P as o,V as s,dt as c,j as l,t as u,u as d,xt as f}from"./DmeEDSB6.js";import{t as p}from"./Cl7Z3e6-.js";var m=e=>JSON.stringify({format:`unspaghettit`,version:1,feature:e},null,2),h=e=>{if(`actions`in e)return e;if(`capabilities`in e){let{capabilities:t,...n}=e;return{...n,actions:t}}return e},g=e=>{let t;try{t=JSON.parse(e)}catch(e){throw Error(`Invalid JSON: ${e.message}`)}if(!t||typeof t!=`object`)throw Error(`Expected a feature export object`);let n=t;if(n.format!==`unspaghettit`)throw Error(`Not an Unspaghettit export (missing format field)`);if(n.version!==1)throw Error(`Unsupported export version: ${n.version}`);let r=n.feature??n.experience;if(!r)throw Error(`Export envelope is missing a feature`);let o=(r.surfaces??[]).map(e=>h(e)),l=r,u=l.entities??l.data??[];return i(s(f(c({...r,tags:a(r.tags),surfaces:o,personas:r.personas??[],resources:r.resources??[],entities:u}))))},_=`Unknown`,v=new class{#e=t(!0);get loading(){return e(this.#e)}set loading(e){r(this.#e,e,!0)}#t=t(n([]));get summaries(){return e(this.#t)}set summaries(e){r(this.#t,e,!0)}#n=t(``);get search(){return e(this.#n)}set search(e){r(this.#n,e,!0)}#r=t(null);get pendingDeleteId(){return e(this.#r)}set pendingDeleteId(e){r(this.#r,e,!0)}#i=t(``);get selectedProjectId(){return e(this.#i)}set selectedProjectId(e){r(this.#i,e,!0)}#a=t(null);get error(){return e(this.#a)}set error(e){r(this.#a,e,!0)}async refresh(){try{this.loading=!0,this.error=null;let e=await u();this.summaries=[...await e.useCases.listProjects()]}catch(e){this.error=e.message}finally{this.loading=!1}}async refreshSilent(){try{let e=await u();this.summaries=[...await e.useCases.listProjects()],this.error=null}catch(e){this.error=e.message}}setSearch(e){this.search=e,p(`project.search_updated`,{query:e})}setSelectedProject(e){this.selectedProjectId=e,e&&p(`project.opened`,{id:e})}openProject(e){return this.setSelectedProject(e),`/projects/${e}`}stagePendingDelete(e){this.pendingDeleteId=e,p(`project.delete_requested`,{id:e})}clearPendingDelete(){this.pendingDeleteId=null}async create(e,t){let n=await(await u()).useCases.createProject({name:e,description:t});return await this.refreshSilent(),p(`project.created`,{id:String(n.id),name:n.name}),n.id}async remove(e){this.summaries=this.summaries.filter(t=>String(t.id)!==String(e)),this.clearPendingDelete(),await(await u()).useCases.deleteProject(e),p(`project.deleted`,{id:String(e)})}async reconcileOrphanFeatures(){let e=await u(),t=await e.useCases.listFeatures();if(t.length===0)return;let n=await e.useCases.listProjects(),r=new Set;for(let t of n){let n=await e.useCases.getProject(t.id);if(n)for(let e of n.featureIds)r.add(String(e))}let i=t.filter(e=>!r.has(String(e.id)));if(i.length===0)return;let a=n.find(e=>e.name===_);if(!a){let t=await e.useCases.createProject({name:_,description:`Auto-created bucket. Holds features that are not assigned to any other project. Rename or reassign to clean it up.`});a={id:t.id,name:t.name,description:t.description,featureCount:0,createdAt:t.createdAt,updatedAt:t.updatedAt}}for(let t of i)await e.useCases.addFeatureToProject(a.id,t.id);await this.refreshSilent()}},y=new class{#e=t(!0);get loading(){return e(this.#e)}set loading(e){r(this.#e,e,!0)}#t=t(n([]));get summaries(){return e(this.#t)}set summaries(e){r(this.#t,e,!0)}#n=t(null);get error(){return e(this.#n)}set error(e){r(this.#n,e,!0)}async refresh(){try{this.loading=!0,this.error=null;let e=await u();this.summaries=[...await e.useCases.listFeaturesWithMaturity()]}catch(e){this.error=e.message}finally{this.loading=!1}}async refreshSilent(){try{let e=await u();this.summaries=[...await e.useCases.listFeaturesWithMaturity()],this.error=null}catch(e){this.error=e.message}}async create(e,t){let n=await(await u()).useCases.createFeature({name:e,description:t});return await this.refreshSilent(),p(`feature.created`,{id:n.id,name:n.name}),n.id}async addTag(e,t){let n=await u(),r=await n.useCases.getFeature(e);r&&(await n.useCases.saveFeature({...r,tags:l(r.tags,t)}),await this.refreshSilent())}async removeTag(e,t){let n=await u(),r=await n.useCases.getFeature(e);r&&(await n.useCases.saveFeature({...r,tags:o(r.tags,t)}),await this.refreshSilent())}async setCore(e,t){let n=await u(),r=await n.useCases.getFeature(e);r&&(await n.useCases.saveFeature({...r,tags:d(r.tags,t)}),await this.refreshSilent())}async remove(e){this.summaries=this.summaries.filter(t=>String(t.id)!==String(e)),await(await u()).useCases.deleteFeature(e),p(`feature.deleted`,{id:e})}async loadSamples(){let e=await(await u()).useCases.loadSamples();return await this.refreshSilent(),await v.refreshSilent(),e}async importJson(e){let t=g(e),n=await u(),r=this.summaries.some(e=>e.id===t.id),i=await n.useCases.saveFeature(t);return await this.refreshSilent(),{id:i.id,name:i.name,overwrote:r}}};export{v as n,m as r,y as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,F as t,M as n,N as r,R as i,V as a,_t as o,a as s,d as c,dt as l,et as ee,ft as u,j as d,ot as f,q as p,tt as m,y as h,z as g}from"./D50Xf4Qj.js";import"./xihTtKlq.js";import{t as te}from"./
|
|
1
|
+
import{$ as e,F as t,M as n,N as r,R as i,V as a,_t as o,a as s,d as c,dt as l,et as ee,ft as u,j as d,ot as f,q as p,tt as m,y as h,z as g}from"./D50Xf4Qj.js";import"./xihTtKlq.js";import{t as te}from"./DI3q_uvm.js";import{t as _}from"./BoAjz79U2.js";var v=t(`<p class="line-clamp-3 text-sm leading-6 text-slate-600"> </p>`),ne=t(`<p class="text-sm leading-6 text-slate-500">No description yet. Open this feature to shape its behavior model.</p>`),re=t(`<span class="px-1">/</span>`),ie=t(`<span class="text-red-600"> </span> <!>`,1),ae=t(`<span class="text-amber-700"> </span>`),y=t(`<span class="text-emerald-700">All checks pass</span>`),b=t(`<button type="button"> </button>`),x=t(`<article class="group relative flex h-full min-h-52 flex-col justify-between overflow-hidden rounded-xl border border-cyan-100 bg-white p-5 shadow-sm shadow-cyan-950/5 transition duration-150 hover:-translate-y-0.5 hover:border-cyan-200 hover:bg-cyan-50/20 hover:shadow-md hover:shadow-cyan-950/10 focus-within:border-cyan-300"><div></div> <div class="space-y-4"><div class="flex items-start justify-between gap-3"><a class="block min-w-0 flex-1 after:absolute after:inset-0"><h3 class="truncate text-base font-semibold text-slate-950 group-hover:text-brand-800"> </h3></a> <div class="relative z-10 flex shrink-0 flex-col items-end gap-1"><span><span class="text-[9px] font-semibold uppercase tracking-wide opacity-70">Mat</span> <span class="tabular-nums"> </span></span> <span><span class="text-[9px] font-semibold uppercase tracking-wide opacity-70">Impl</span> <span class="tabular-nums"> </span></span></div></div> <!> <div class="relative z-10"><!></div> <div class="space-y-2"><!> <div class="text-xs text-slate-500"><!> <!> <!></div></div></div> <div class="mt-5 flex items-center justify-between gap-3 border-t border-hairline pt-3 text-xs text-slate-500"><span class="min-w-0 flex-1 truncate"> </span> <div class="relative z-10 flex shrink-0 items-center gap-1"><!> <button type="button" class="rounded px-2 py-1 text-slate-400 opacity-0 transition group-hover:opacity-100 group-focus-within:opacity-100 hover:bg-red-50 hover:text-red-600"> </button></div></div></article>`);function S(t,i){u(i,!0);let S=s(i,`tagTypeOptions`,19,()=>[]),oe=s(i,`deleteLabel`,3,`Delete`),C=s(i,`queued`,3,!1),w=e=>e>=80?`bg-emerald-50 text-emerald-700 border-emerald-200`:e>=50?`bg-amber-50 text-amber-800 border-amber-200`:`bg-red-50 text-red-700 border-red-200`,se=f(()=>w(i.summary.maturityPercentage)),ce=f(()=>i.summary.implementationPercentage===null||!i.summary.implementationHasReport?`bg-slate-50 text-slate-500 border-slate-200`:w(i.summary.implementationPercentage)),le=f(()=>i.summary.implementationPercentage===null?`-`:i.summary.implementationHasReport?`${i.summary.implementationPercentage}%`:`-`),T=f(()=>i.summary.implementationPercentage===null?`No taggable entities yet (actions, events, rules...)`:i.summary.implementationHasReport?`Implementation coverage: ${i.summary.implementationFoundCount} of ${i.summary.implementationExpectedCount} expected tags found in code`:`No .unspa.json report yet. Run report_implementation_status_batch to populate.`),E=f(()=>i.summary.maturityPercentage>=80?`from-emerald-400 via-brand-mint to-brand-500`:i.summary.maturityPercentage>=50?`from-amber-400 via-brand-ochre to-brand-peach`:`from-red-400 via-brand-coral to-brand-pink`);var D=x(),O=e(D),k=m(O,2),A=e(k),j=e(A),M=e(j),ue=e(M,!0);o(M),o(j);var N=m(j,2),P=e(N),F=m(e(P),2),I=e(F);o(F),o(P);var L=m(P,2),R=m(e(L),2),z=e(R,!0);o(R),o(L),o(N),o(A);var B=m(A,2),V=t=>{var a=v(),s=e(a,!0);o(a),p(()=>n(s,i.summary.description)),r(t,a)},H=e=>{r(e,ne())};d(B,e=>{i.summary.description?e(V):e(H,-1)});var U=m(B,2);te(e(U),{get tags(){return i.summary.tags},get onAddTag(){return i.onAddTag},get onRemoveTag(){return i.onRemoveTag},get typeOptions(){return S()}}),o(U);var W=m(U,2),G=e(W);_(G,{get percentage(){return i.summary.maturityPercentage},size:`sm`,get ariaLabel(){return`Maturity ${i.summary.maturityPercentage??``}%`}});var K=m(G,2),q=e(K),de=t=>{var a=ie(),s=ee(a),c=e(s);o(s);var l=m(s,2),u=e=>{r(e,re())};d(l,e=>{i.summary.recommendedIssueCount>0&&e(u)}),p(()=>n(c,`${i.summary.criticalIssueCount??``} critical`)),r(t,a)};d(q,e=>{i.summary.criticalIssueCount>0&&e(de)});var J=m(q,2),fe=t=>{var a=ae(),s=e(a);o(a),p(()=>n(s,`${i.summary.recommendedIssueCount??``} recommended`)),r(t,a)};d(J,e=>{i.summary.recommendedIssueCount>0&&e(fe)});var pe=m(J,2),me=e=>{r(e,y())};d(pe,e=>{i.summary.criticalIssueCount===0&&i.summary.recommendedIssueCount===0&&e(me)}),o(K),o(W),o(k);var Y=m(k,2),X=e(Y),he=e(X);o(X);var Z=m(X,2),Q=e(Z),ge=t=>{var a=b(),s=e(a,!0);o(a),p(()=>{h(a,1,`rounded px-2 py-1 transition ${C()?`font-medium text-brand-700 opacity-100 hover:bg-cyan-50 hover:text-brand-900`:`text-slate-400 opacity-0 hover:bg-cyan-50 hover:text-brand-800 group-hover:opacity-100 group-focus-within:opacity-100`}`),c(a,`title`,C()?`In implementation queue (click to remove)`:`Add to implementation queue`),n(s,C()?`✓ queued`:`+ queue`)}),g(`click`,a,function(...e){(C()?i.onRemoveFromQueue:i.onAddToQueue)?.apply(this,e)}),r(t,a)};d(Q,e=>{(i.onAddToQueue||i.onRemoveFromQueue)&&e(ge)});var $=m(Q,2),_e=e($,!0);o($),o(Z),o(Y),o(D),p(e=>{h(O,1,`absolute inset-x-0 top-0 h-1 bg-linear-to-r ${a(E)??``}`),c(j,`href`,`/features/${i.summary.id}`),n(ue,i.summary.name),h(P,1,`inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[10px] font-medium ${a(se)??``}`),c(P,`title`,`Maturity score: how complete this feature's behavior model is (${i.summary.maturityPercentage??``}% of spec quality checks pass)`),n(I,`${i.summary.maturityPercentage??``}%`),h(L,1,`inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[10px] font-medium ${a(ce)??``}`),c(L,`title`,a(T)),n(z,a(le)),n(he,`${i.summary.surfaceCount??``} surface${i.summary.surfaceCount===1?``:`s`} / ${i.summary.actionCount??``}
|
|
2
2
|
action${i.summary.actionCount===1?``:`s`} / Updated ${e??``}`),n(_e,oe())},[()=>new Date(i.summary.updatedAt).toLocaleDateString()]),g(`click`,$,function(...e){i.onDelete?.apply(this,e)}),r(t,D),l()}i([`click`]);export{S as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,it as t,rt as n}from"./D50Xf4Qj.js";import{R as r}from"./
|
|
1
|
+
import{V as e,it as t,rt as n}from"./D50Xf4Qj.js";import{R as r}from"./DmeEDSB6.js";import{r as i}from"./y29y8M4A.js";var a=new class{#e=t(!1);get loading(){return e(this.#e)}set loading(e){n(this.#e,e,!0)}#t=t(!1);get refreshing(){return e(this.#t)}set refreshing(e){n(this.#t,e,!0)}#n=t(null);get status(){return e(this.#n)}set status(e){n(this.#n,e,!0)}#r=t(null);get error(){return e(this.#r)}set error(e){n(this.#r,e,!0)}#i=t(null);get lastFetchedAt(){return e(this.#i)}set lastFetchedAt(e){n(this.#i,e,!0)}#a=t(null);get lastUpdateSignalAt(){return e(this.#a)}set lastUpdateSignalAt(e){n(this.#a,e,!0)}currentId=null;client=null;clientUnsubscribe=null;async load(e){this.currentId=e,this.error=null,this.loading=!0;try{await this.fetchOnce(e),this.subscribeRoom(e)}finally{this.loading=!1}}async refresh(){if(!(!this.currentId||this.refreshing)){this.refreshing=!0,this.error=null;try{await this.fetchOnce(this.currentId)}finally{this.refreshing=!1}}}reset(){this.clientUnsubscribe&&=(this.clientUnsubscribe(),null),this.client=null,this.currentId=null,this.status=null,this.error=null,this.loading=!1,this.refreshing=!1,this.lastFetchedAt=null,this.lastUpdateSignalAt=null}async fetchOnce(e){try{let t=await r(`/api/snapshots/${e}/implementation-status`);if(!t.ok){this.status=null;return}let n=await t.json();this.status=n??null,this.lastFetchedAt=new Date().toISOString()}catch(e){this.error=e.message}}subscribeRoom(e){this.clientUnsubscribe&&=(this.clientUnsubscribe(),null);let t=i(`implementation-status`,e);this.client=t,this.clientUnsubscribe=t.observe((t,n)=>{this.currentId===e&&n!==`local`&&(this.lastUpdateSignalAt=new Date().toISOString(),this.status=t,this.lastFetchedAt=this.lastUpdateSignalAt)})}};export{a as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./D50Xf4Qj.js";import{a as e}from"./
|
|
1
|
+
import"./D50Xf4Qj.js";import{a as e}from"./Bgdg6DPR.js";var t=()=>{let t=e;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},n={subscribe(e){return t().page.subscribe(e)}};export{n as t};
|
|
Binary file
|
|
Binary file
|