@phosart/devtool 0.3.3 → 0.3.4
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/editor/_app/immutable/assets/0.DtxgSyjt.css +1 -0
- package/build/client/editor/_app/immutable/assets/0.DtxgSyjt.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/0.DtxgSyjt.css.gz +0 -0
- package/build/client/editor/_app/immutable/assets/Modal.BW-C5phW.css +1 -0
- package/build/client/editor/_app/immutable/assets/Modal.BW-C5phW.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/Modal.BW-C5phW.css.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/B34tJ6cT.js +1 -0
- package/build/client/editor/_app/immutable/chunks/B34tJ6cT.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/B34tJ6cT.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BBIFqQsP.js +1 -0
- package/build/client/editor/_app/immutable/chunks/BBIFqQsP.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BBIFqQsP.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DrZfFIG4.js → BFbS_uKR.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BFbS_uKR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BFbS_uKR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BDsuxU11.js → BHwvZiHu.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BHwvZiHu.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BHwvZiHu.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{B8dptkxa.js → BNV8aWpA.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BNV8aWpA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BNV8aWpA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{CHz30aZi.js → BOWzgE0W.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BOWzgE0W.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BOWzgE0W.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Bbh5gH2c.js +12 -0
- package/build/client/editor/_app/immutable/chunks/Bbh5gH2c.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Bbh5gH2c.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BkrMQZA1.js +3 -0
- package/build/client/editor/_app/immutable/chunks/BkrMQZA1.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BkrMQZA1.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{4hIBzQ4_.js → BmPG8j70.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BmPG8j70.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BmPG8j70.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C3vmO4Nz.js +1 -0
- package/build/client/editor/_app/immutable/chunks/C3vmO4Nz.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C3vmO4Nz.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C5OC5uxi.js +1 -0
- package/build/client/editor/_app/immutable/chunks/C5OC5uxi.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C5OC5uxi.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DPUojd5V.js → C_6VgW5U.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/C_6VgW5U.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/{DPUojd5V.js.gz → C_6VgW5U.js.gz} +0 -0
- package/build/client/editor/_app/immutable/chunks/{C-A59nkV.js → Cl3OuPWj.js} +2 -2
- package/build/client/editor/_app/immutable/chunks/Cl3OuPWj.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Cl3OuPWj.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Cpl1xZcR.js → Clqpx6Fc.js} +3 -3
- package/build/client/editor/_app/immutable/chunks/Clqpx6Fc.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Clqpx6Fc.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Dg3PYjM6.js → Co_rOEwX.js} +2 -2
- package/build/client/editor/_app/immutable/chunks/Co_rOEwX.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Co_rOEwX.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Y3Jw1gDP.js → CoaMkvv_.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CoaMkvv_.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CoaMkvv_.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{gJYnYvRf.js → CpKCa_gu.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CpKCa_gu.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CpKCa_gu.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Ba5SSrNi.js → CsGnFCYN.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CsGnFCYN.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CsGnFCYN.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DwuiomVV.js → CzKyBacq.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CzKyBacq.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CzKyBacq.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/D3TOTuVO.js +1 -0
- package/build/client/editor/_app/immutable/chunks/D3TOTuVO.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/D3TOTuVO.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Bg7QG-lR.js → DDbagcfB.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DDbagcfB.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DDbagcfB.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DEWgCBDt.js +1 -0
- package/build/client/editor/_app/immutable/chunks/DEWgCBDt.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DEWgCBDt.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{2_fpIYfw.js → DEkLMHay.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DEkLMHay.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DEkLMHay.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{_QiFnDly.js → DLzsKsMW.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DLzsKsMW.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DLzsKsMW.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DXmCjs-N.js +2 -0
- package/build/client/editor/_app/immutable/chunks/DXmCjs-N.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DXmCjs-N.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DGf07soP.js → DhhrKZdn.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DhhrKZdn.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DhhrKZdn.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DBso62O3.js → DiGEiffF.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DiGEiffF.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DiGEiffF.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{CIJYBsz7.js → Dod547Wj.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/Dod547Wj.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dod547Wj.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{6M6_Jaku.js → Dvj4DoMA.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/Dvj4DoMA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dvj4DoMA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{C_1cFU8t.js → FsbNKlUV.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/FsbNKlUV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/FsbNKlUV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/I5CduftN.js +1 -0
- package/build/client/editor/_app/immutable/chunks/I5CduftN.js.br +1 -0
- package/build/client/editor/_app/immutable/chunks/I5CduftN.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{CWeHQSrA.js → ILOhLsKY.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/ILOhLsKY.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/ILOhLsKY.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Chzdb0MJ.js → MTeUycsA.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/MTeUycsA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/MTeUycsA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js +1 -0
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/cnVLp2qa.js +1 -0
- package/build/client/editor/_app/immutable/chunks/cnVLp2qa.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/cnVLp2qa.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/cuT_pRcC.js +1 -0
- package/build/client/editor/_app/immutable/chunks/cuT_pRcC.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/cuT_pRcC.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/t-gD3O97.js +1 -0
- package/build/client/editor/_app/immutable/chunks/t-gD3O97.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/t-gD3O97.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BD8Rif0F.js → wabKUHyo.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/wabKUHyo.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/wabKUHyo.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DbXE2WOu.js → ysghqVTL.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/ysghqVTL.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/ysghqVTL.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/app.Bb0XbkrV.js +2 -0
- package/build/client/editor/_app/immutable/entry/app.Bb0XbkrV.js.br +0 -0
- package/build/client/editor/_app/immutable/entry/app.Bb0XbkrV.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/start.DO05v42g.js +1 -0
- package/build/client/editor/_app/immutable/entry/start.DO05v42g.js.br +2 -0
- package/build/client/editor/_app/immutable/entry/start.DO05v42g.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/0.DK8vgPdS.js +6 -0
- package/build/client/editor/_app/immutable/nodes/0.DK8vgPdS.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/0.DK8vgPdS.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/1.DjmgH1Pw.js +1 -0
- package/build/client/editor/_app/immutable/nodes/1.DjmgH1Pw.js.br +1 -0
- package/build/client/editor/_app/immutable/nodes/1.DjmgH1Pw.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/{2.BVlID6hX.js → 2.CIUtKsrG.js} +1 -1
- package/build/client/editor/_app/immutable/nodes/2.CIUtKsrG.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/2.CIUtKsrG.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/3.CmteJcu6.js +1 -0
- package/build/client/editor/_app/immutable/nodes/3.CmteJcu6.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/3.CmteJcu6.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/{4.DjfUZW-0.js → 4.DWNZ50cv.js} +2 -2
- package/build/client/editor/_app/immutable/nodes/4.DWNZ50cv.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/4.DWNZ50cv.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/{5.DpzxICR_.js → 5.CXUwgrmA.js} +1 -1
- package/build/client/editor/_app/immutable/nodes/5.CXUwgrmA.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/5.CXUwgrmA.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/6.RfU7HdOb.js +1 -0
- package/build/client/editor/_app/immutable/nodes/6.RfU7HdOb.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/6.RfU7HdOb.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/{7.KYo096cz.js → 7.CQB2gwW1.js} +1 -1
- package/build/client/editor/_app/immutable/nodes/7.CQB2gwW1.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/7.CQB2gwW1.js.gz +0 -0
- package/build/client/editor/_app/version.json +1 -1
- package/build/client/editor/_app/version.json.br +0 -0
- package/build/client/editor/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-Cl82DFHp.js → 0-Ao5NhRE6.js} +28 -10
- package/build/server/chunks/0-Ao5NhRE6.js.map +1 -0
- package/build/server/chunks/1-BgvkyZRf.js +9 -0
- package/build/server/chunks/{1-WZpvXsvK.js.map → 1-BgvkyZRf.js.map} +1 -1
- package/build/server/chunks/{2-BSdBJsoK.js → 2-DlMzzgzZ.js} +9 -9
- package/build/server/chunks/2-DlMzzgzZ.js.map +1 -0
- package/build/server/chunks/{3-DwVuBR19.js → 3-Bq8guJdI.js} +4 -4
- package/build/server/chunks/3-Bq8guJdI.js.map +1 -0
- package/build/server/chunks/{4-C9UZaWrt.js → 4-CzifAEEU.js} +4 -4
- package/build/server/chunks/4-CzifAEEU.js.map +1 -0
- package/build/server/chunks/{5-CJ1jxAcG.js → 5-KxFN6H-4.js} +3 -3
- package/build/server/chunks/{5-CJ1jxAcG.js.map → 5-KxFN6H-4.js.map} +1 -1
- package/build/server/chunks/{6-Camf_PqY.js → 6-CHNHDqOu.js} +9 -9
- package/build/server/chunks/6-CHNHDqOu.js.map +1 -0
- package/build/server/chunks/7-ODJrm9aw.js +35 -0
- package/build/server/chunks/7-ODJrm9aw.js.map +1 -0
- package/build/server/chunks/{ActionButton-BVpJOdmZ.js → ActionButton-B4R2bBP0.js} +2 -2
- package/build/server/chunks/{ActionButton-BVpJOdmZ.js.map → ActionButton-B4R2bBP0.js.map} +1 -1
- package/build/server/chunks/{AddImageButton-wkRQwQyU.js → AddImageButton-DbThUDFF.js} +4 -4
- package/build/server/chunks/AddImageButton-DbThUDFF.js.map +1 -0
- package/build/server/chunks/{Checkbox-o_OQis9x.js → Checkbox-CA5KvN5s.js} +2 -2
- package/build/server/chunks/{Checkbox-o_OQis9x.js.map → Checkbox-CA5KvN5s.js.map} +1 -1
- package/build/server/chunks/Collapsable-iM7FOA4K.js +46 -0
- package/build/server/chunks/Collapsable-iM7FOA4K.js.map +1 -0
- package/build/server/chunks/{Icon-D6YekQ8Q.js → Icon-Bbbqk-yg.js} +2 -2
- package/build/server/chunks/{Icon-D6YekQ8Q.js.map → Icon-Bbbqk-yg.js.map} +1 -1
- package/build/server/chunks/{Layout-Cbf9GL2n.js → Layout-cPjF6REk.js} +5 -5
- package/build/server/chunks/{Layout-Cbf9GL2n.js.map → Layout-cPjF6REk.js.map} +1 -1
- package/build/server/chunks/{Modal-BmkqyOQk.js → Modal-CIjCa_0v.js} +33 -39
- package/build/server/chunks/Modal-CIjCa_0v.js.map +1 -0
- package/build/server/chunks/{OriginalImage-T1O1RjA4.js → OriginalImage-Copbs9Kr.js} +4 -4
- package/build/server/chunks/{OriginalImage-T1O1RjA4.js.map → OriginalImage-Copbs9Kr.js.map} +1 -1
- package/build/server/chunks/SearchInput-uqrDo5Pk.js +51 -0
- package/build/server/chunks/SearchInput-uqrDo5Pk.js.map +1 -0
- package/build/server/chunks/{TagEdit-DKl5am0n.js → TagEdit-B7vW0sjR.js} +5 -4
- package/build/server/chunks/TagEdit-B7vW0sjR.js.map +1 -0
- package/build/server/chunks/TextBox-fDrH7Jnv.js +95 -0
- package/build/server/chunks/TextBox-fDrH7Jnv.js.map +1 -0
- package/build/server/chunks/{SearchInput-6iIV7qsX.js → TextInput-Dnk-aR1D.js} +3 -48
- package/build/server/chunks/TextInput-Dnk-aR1D.js.map +1 -0
- package/build/server/chunks/_layout.svelte-BLfVQZLo.js +1005 -0
- package/build/server/chunks/_layout.svelte-BLfVQZLo.js.map +1 -0
- package/build/server/chunks/{_page.svelte-DwxJ8m-6.js → _page.svelte-7a-e-T0-.js} +14 -13
- package/build/server/chunks/_page.svelte-7a-e-T0-.js.map +1 -0
- package/build/server/chunks/{_page.svelte-qqm4rNsV.js → _page.svelte-8wgQyGh0.js} +13 -12
- package/build/server/chunks/_page.svelte-8wgQyGh0.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BZdh5P6v.js → _page.svelte-B2RCOcDK.js} +18 -17
- package/build/server/chunks/_page.svelte-B2RCOcDK.js.map +1 -0
- package/build/server/chunks/{_page.svelte-Bheq9Ffm.js → _page.svelte-BFOQV882.js} +10 -10
- package/build/server/chunks/_page.svelte-BFOQV882.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B6Fk2uaq.js → _page.svelte-C7ORjs-e.js} +21 -70
- package/build/server/chunks/_page.svelte-C7ORjs-e.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B_b_4W_t.js → _page.svelte-DlBlr7xL.js} +21 -20
- package/build/server/chunks/_page.svelte-DlBlr7xL.js.map +1 -0
- package/build/server/chunks/{_server.ts-Ct5jwND_.js → _server.ts--PXfbGVP.js} +8 -7
- package/build/server/chunks/{_server.ts-Ct5jwND_.js.map → _server.ts--PXfbGVP.js.map} +1 -1
- package/build/server/chunks/_server.ts-4zh-F0Ge.js +31 -0
- package/build/server/chunks/_server.ts-4zh-F0Ge.js.map +1 -0
- package/build/server/chunks/{_server.ts-BbrBd9qr.js → _server.ts-9JRCRhh1.js} +8 -7
- package/build/server/chunks/_server.ts-9JRCRhh1.js.map +1 -0
- package/build/server/chunks/{_server.ts-4InKcvV0.js → _server.ts-B3TfA2nR.js} +3 -2
- package/build/server/chunks/{_server.ts-4InKcvV0.js.map → _server.ts-B3TfA2nR.js.map} +1 -1
- package/build/server/chunks/_server.ts-BFbeda0y.js +36 -0
- package/build/server/chunks/_server.ts-BFbeda0y.js.map +1 -0
- package/build/server/chunks/{_server.ts-CLng4zD2.js → _server.ts-BGUKkmXU.js} +3 -2
- package/build/server/chunks/{_server.ts-CLng4zD2.js.map → _server.ts-BGUKkmXU.js.map} +1 -1
- package/build/server/chunks/_server.ts-BM5-aq-4.js +43 -0
- package/build/server/chunks/_server.ts-BM5-aq-4.js.map +1 -0
- package/build/server/chunks/{_server.ts-BDsjpmO7.js → _server.ts-Ba69rHII.js} +3 -2
- package/build/server/chunks/{_server.ts-BDsjpmO7.js.map → _server.ts-Ba69rHII.js.map} +1 -1
- package/build/server/chunks/_server.ts-BoJ81mMn.js +29 -0
- package/build/server/chunks/_server.ts-BoJ81mMn.js.map +1 -0
- package/build/server/chunks/_server.ts-BpHF4fy8.js +23 -0
- package/build/server/chunks/_server.ts-BpHF4fy8.js.map +1 -0
- package/build/server/chunks/{_server.ts-LofwHGyu.js → _server.ts-C--84VFn.js} +8 -7
- package/build/server/chunks/{_server.ts-LofwHGyu.js.map → _server.ts-C--84VFn.js.map} +1 -1
- package/build/server/chunks/{_server.ts-4CB_gvO3.js → _server.ts-CNZLDB4j.js} +3 -2
- package/build/server/chunks/{_server.ts-4CB_gvO3.js.map → _server.ts-CNZLDB4j.js.map} +1 -1
- package/build/server/chunks/_server.ts-CmmhI0JF.js +16 -0
- package/build/server/chunks/_server.ts-CmmhI0JF.js.map +1 -0
- package/build/server/chunks/{_server.ts-56AUug1F.js → _server.ts-D1aHE6Ny.js} +3 -2
- package/build/server/chunks/_server.ts-D1aHE6Ny.js.map +1 -0
- package/build/server/chunks/{_server.ts-DQccEkuS.js → _server.ts-D5Ay41jf.js} +8 -7
- package/build/server/chunks/{_server.ts-DQccEkuS.js.map → _server.ts-D5Ay41jf.js.map} +1 -1
- package/build/server/chunks/_server.ts-D8Nx71Uu.js +16 -0
- package/build/server/chunks/_server.ts-D8Nx71Uu.js.map +1 -0
- package/build/server/chunks/_server.ts-DF8DgsRk.js +16 -0
- package/build/server/chunks/_server.ts-DF8DgsRk.js.map +1 -0
- package/build/server/chunks/{_server.ts-k0OCZsPt.js → _server.ts-DZn2CDCT.js} +3 -2
- package/build/server/chunks/{_server.ts-k0OCZsPt.js.map → _server.ts-DZn2CDCT.js.map} +1 -1
- package/build/server/chunks/_server.ts-Dnp-8aUJ.js +25 -0
- package/build/server/chunks/_server.ts-Dnp-8aUJ.js.map +1 -0
- package/build/server/chunks/{_server.ts-DjCVj_-y.js → _server.ts-DxoPGH8Q.js} +3 -2
- package/build/server/chunks/{_server.ts-DjCVj_-y.js.map → _server.ts-DxoPGH8Q.js.map} +1 -1
- package/build/server/chunks/{_server.ts-25JIEREN.js → _server.ts-IHbTzEpv.js} +8 -7
- package/build/server/chunks/{_server.ts-25JIEREN.js.map → _server.ts-IHbTzEpv.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CR7NpJz0.js → _server.ts-X5GHcTz7.js} +3 -2
- package/build/server/chunks/{_server.ts-CR7NpJz0.js.map → _server.ts-X5GHcTz7.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CpKRML6n.js → _server.ts-_lgiRKkf.js} +3 -2
- package/build/server/chunks/{_server.ts-CpKRML6n.js.map → _server.ts-_lgiRKkf.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CV5o78gm.js → _server.ts-o_jWpkhH.js} +3 -2
- package/build/server/chunks/{_server.ts-CV5o78gm.js.map → _server.ts-o_jWpkhH.js.map} +1 -1
- package/build/server/chunks/{circle-x-BfwNryZh.js → circle-x-CvVNi5Cn.js} +3 -3
- package/build/server/chunks/{circle-x-BfwNryZh.js.map → circle-x-CvVNi5Cn.js.map} +1 -1
- package/build/server/chunks/ensure-CsFUJhIq.js +27 -0
- package/build/server/chunks/ensure-CsFUJhIq.js.map +1 -0
- package/build/server/chunks/{error.svelte-C6YxQrsH.js → error.svelte-D4ERg87G.js} +4 -4
- package/build/server/chunks/{error.svelte-C6YxQrsH.js.map → error.svelte-D4ERg87G.js.map} +1 -1
- package/build/server/chunks/{exports-BJD76umC.js → exports-Cj2LkLxl.js} +2 -2
- package/build/server/chunks/{exports-BJD76umC.js.map → exports-Cj2LkLxl.js.map} +1 -1
- package/build/server/chunks/{galleryoverride.svelte-BV3YLOis.js → galleryoverride.svelte-BLb0HLfo.js} +2 -2
- package/build/server/chunks/{galleryoverride.svelte-BV3YLOis.js.map → galleryoverride.svelte-BLb0HLfo.js.map} +1 -1
- package/build/server/chunks/{galleryutil-BSy19g0y.js → galleryutil-D_xqIkqX.js} +3 -3
- package/build/server/chunks/galleryutil-D_xqIkqX.js.map +1 -0
- package/build/server/chunks/git-BTwUd3PR.js +48 -0
- package/build/server/chunks/git-BTwUd3PR.js.map +1 -0
- package/build/server/chunks/hooks.server-CshlB9l-.js +14 -0
- package/build/server/chunks/hooks.server-CshlB9l-.js.map +1 -0
- package/build/server/chunks/{index-lhTMmBNn.js → index-BUkq9xmQ.js} +3 -3
- package/build/server/chunks/index-BUkq9xmQ.js.map +1 -0
- package/build/server/chunks/{index-6GdTEbjU.js → index-Dqoyt3qe.js} +3 -3
- package/build/server/chunks/{index-6GdTEbjU.js.map → index-Dqoyt3qe.js.map} +1 -1
- package/build/server/chunks/psk-BbUMsogN.js +6 -0
- package/build/server/chunks/psk-BbUMsogN.js.map +1 -0
- package/build/server/chunks/{root-CupBMgyF.js → root-CaUozMBL.js} +2 -2
- package/build/server/chunks/{root-CupBMgyF.js.map → root-CaUozMBL.js.map} +1 -1
- package/build/server/chunks/{routing-DTYvkbgc.js → routing-MUJ6-d6g.js} +2 -2
- package/build/server/chunks/{routing-DTYvkbgc.js.map → routing-MUJ6-d6g.js.map} +1 -1
- package/build/server/chunks/{server2-92GrlBNh.js → server2-BVjW8MLI.js} +3 -3
- package/build/server/chunks/{server2-92GrlBNh.js.map → server2-BVjW8MLI.js.map} +1 -1
- package/build/server/chunks/{trash-rtKFMGED.js → trash-BeZtaH4W.js} +3 -3
- package/build/server/chunks/{trash-rtKFMGED.js.map → trash-BeZtaH4W.js.map} +1 -1
- package/build/server/chunks/util-jLfy7Z7C.js +24 -0
- package/build/server/chunks/util-jLfy7Z7C.js.map +1 -0
- package/build/server/chunks/{util-DS6EORSM.js → util2-cjQ5-tyO.js} +2 -2
- package/build/server/chunks/util2-cjQ5-tyO.js.map +1 -0
- package/build/server/chunks/utils-BAX50FA_.js +4 -0
- package/build/server/chunks/utils-BAX50FA_.js.map +1 -0
- package/build/server/index.js +7 -5
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +73 -31
- package/build/server/manifest.js.map +1 -1
- package/package.json +6 -1
- package/build/client/editor/_app/immutable/assets/0.BMnYWEys.css +0 -1
- package/build/client/editor/_app/immutable/assets/0.BMnYWEys.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/0.BMnYWEys.css.gz +0 -0
- package/build/client/editor/_app/immutable/assets/Modal.CeVxwqrD.css +0 -1
- package/build/client/editor/_app/immutable/assets/Modal.CeVxwqrD.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/Modal.CeVxwqrD.css.gz +0 -0
- package/build/client/editor/_app/immutable/assets/Tooltip.CP1SAIN7.css +0 -1
- package/build/client/editor/_app/immutable/assets/Tooltip.CP1SAIN7.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/Tooltip.CP1SAIN7.css.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/2_fpIYfw.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/2_fpIYfw.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/36fRYPqv.js +0 -2
- package/build/client/editor/_app/immutable/chunks/36fRYPqv.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/36fRYPqv.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/4hIBzQ4_.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/4hIBzQ4_.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/6M6_Jaku.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/6M6_Jaku.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/B8dptkxa.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/B8dptkxa.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BD8Rif0F.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BD8Rif0F.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BDsuxU11.js.br +0 -1
- package/build/client/editor/_app/immutable/chunks/BDsuxU11.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js +0 -1
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BY8Jsuov.js +0 -1
- package/build/client/editor/_app/immutable/chunks/BY8Jsuov.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BY8Jsuov.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Ba5SSrNi.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Ba5SSrNi.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Bg7QG-lR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Bg7QG-lR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BiZuc77T.js +0 -1
- package/build/client/editor/_app/immutable/chunks/BiZuc77T.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BiZuc77T.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C-A59nkV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C-A59nkV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C7QddZX6.js +0 -1
- package/build/client/editor/_app/immutable/chunks/C7QddZX6.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C7QddZX6.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C9apqzJz.js +0 -1
- package/build/client/editor/_app/immutable/chunks/C9apqzJz.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C9apqzJz.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CGRPYk0Z.js +0 -3
- package/build/client/editor/_app/immutable/chunks/CGRPYk0Z.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CGRPYk0Z.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CHz30aZi.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CHz30aZi.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CIJYBsz7.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CIJYBsz7.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CWeHQSrA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CWeHQSrA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C_1cFU8t.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C_1cFU8t.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js +0 -1
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Chzdb0MJ.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Chzdb0MJ.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Cpl1xZcR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Cpl1xZcR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/D6oxHNYy.js +0 -12
- package/build/client/editor/_app/immutable/chunks/D6oxHNYy.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/D6oxHNYy.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DAsycyym.js +0 -1
- package/build/client/editor/_app/immutable/chunks/DAsycyym.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DAsycyym.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DBso62O3.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DBso62O3.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DGf07soP.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DGf07soP.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DPUojd5V.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DaWb7mMs.js +0 -1
- package/build/client/editor/_app/immutable/chunks/DaWb7mMs.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DaWb7mMs.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DbXE2WOu.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DbXE2WOu.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Dg3PYjM6.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dg3PYjM6.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Dj5A_YN9.js +0 -1
- package/build/client/editor/_app/immutable/chunks/Dj5A_YN9.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dj5A_YN9.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DrZfFIG4.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DrZfFIG4.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DwuiomVV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DwuiomVV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Y3Jw1gDP.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Y3Jw1gDP.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/_QiFnDly.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/_QiFnDly.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/gJYnYvRf.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/gJYnYvRf.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/app.BV0kyKCW.js +0 -2
- package/build/client/editor/_app/immutable/entry/app.BV0kyKCW.js.br +0 -0
- package/build/client/editor/_app/immutable/entry/app.BV0kyKCW.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/start.D-Sr3qC_.js +0 -1
- package/build/client/editor/_app/immutable/entry/start.D-Sr3qC_.js.br +0 -2
- package/build/client/editor/_app/immutable/entry/start.D-Sr3qC_.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/0.C818YFK2.js +0 -1
- package/build/client/editor/_app/immutable/nodes/0.C818YFK2.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/0.C818YFK2.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/1.DLP9aYs0.js +0 -1
- package/build/client/editor/_app/immutable/nodes/1.DLP9aYs0.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/1.DLP9aYs0.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/2.BVlID6hX.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/2.BVlID6hX.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/3.CNi9wRJI.js +0 -1
- package/build/client/editor/_app/immutable/nodes/3.CNi9wRJI.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/3.CNi9wRJI.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/4.DjfUZW-0.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/4.DjfUZW-0.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/5.DpzxICR_.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/5.DpzxICR_.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/6.CMSmT3-z.js +0 -1
- package/build/client/editor/_app/immutable/nodes/6.CMSmT3-z.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/6.CMSmT3-z.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/7.KYo096cz.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/7.KYo096cz.js.gz +0 -0
- package/build/server/chunks/0-Cl82DFHp.js.map +0 -1
- package/build/server/chunks/1-WZpvXsvK.js +0 -9
- package/build/server/chunks/2-BSdBJsoK.js.map +0 -1
- package/build/server/chunks/3-DwVuBR19.js.map +0 -1
- package/build/server/chunks/4-C9UZaWrt.js.map +0 -1
- package/build/server/chunks/6-Camf_PqY.js.map +0 -1
- package/build/server/chunks/7-CZ8SjQUv.js +0 -35
- package/build/server/chunks/7-CZ8SjQUv.js.map +0 -1
- package/build/server/chunks/AddImageButton-wkRQwQyU.js.map +0 -1
- package/build/server/chunks/Modal-BmkqyOQk.js.map +0 -1
- package/build/server/chunks/SearchInput-6iIV7qsX.js.map +0 -1
- package/build/server/chunks/TagEdit-DKl5am0n.js.map +0 -1
- package/build/server/chunks/Tooltip-CcYD8tLg.js +0 -31
- package/build/server/chunks/Tooltip-CcYD8tLg.js.map +0 -1
- package/build/server/chunks/_layout.svelte-B6foPZhp.js +0 -300
- package/build/server/chunks/_layout.svelte-B6foPZhp.js.map +0 -1
- package/build/server/chunks/_page.svelte-B6Fk2uaq.js.map +0 -1
- package/build/server/chunks/_page.svelte-BZdh5P6v.js.map +0 -1
- package/build/server/chunks/_page.svelte-B_b_4W_t.js.map +0 -1
- package/build/server/chunks/_page.svelte-Bheq9Ffm.js.map +0 -1
- package/build/server/chunks/_page.svelte-DwxJ8m-6.js.map +0 -1
- package/build/server/chunks/_page.svelte-qqm4rNsV.js.map +0 -1
- package/build/server/chunks/_server.ts-56AUug1F.js.map +0 -1
- package/build/server/chunks/_server.ts-BbrBd9qr.js.map +0 -1
- package/build/server/chunks/_server.ts-CDSLj_Cz.js +0 -153
- package/build/server/chunks/_server.ts-CDSLj_Cz.js.map +0 -1
- package/build/server/chunks/_server.ts-D7rlRPg6.js +0 -19
- package/build/server/chunks/_server.ts-D7rlRPg6.js.map +0 -1
- package/build/server/chunks/_server.ts-DJhLhLB4.js +0 -144
- package/build/server/chunks/_server.ts-DJhLhLB4.js.map +0 -1
- package/build/server/chunks/eye-BlNCCVn1.js +0 -43
- package/build/server/chunks/eye-BlNCCVn1.js.map +0 -1
- package/build/server/chunks/galleryutil-BSy19g0y.js.map +0 -1
- package/build/server/chunks/github-CM6dx0ky.js +0 -22
- package/build/server/chunks/github-CM6dx0ky.js.map +0 -1
- package/build/server/chunks/index-lhTMmBNn.js.map +0 -1
- package/build/server/chunks/util-DS6EORSM.js.map +0 -1
- /package/build/client/editor/_app/immutable/assets/{ImageEdit.CXTVejeF.css → TextBox.CXTVejeF.css} +0 -0
- /package/build/client/editor/_app/immutable/assets/{ImageEdit.CXTVejeF.css.br → TextBox.CXTVejeF.css.br} +0 -0
- /package/build/client/editor/_app/immutable/assets/{ImageEdit.CXTVejeF.css.gz → TextBox.CXTVejeF.css.gz} +0 -0
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { r as requestToken } from './github-CM6dx0ky.js';
|
|
2
|
-
import { e as error, j as json } from './index-lhTMmBNn.js';
|
|
3
|
-
import fs from 'node:fs/promises';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import os from 'node:os';
|
|
6
|
-
import { spawn } from 'node:child_process';
|
|
7
|
-
|
|
8
|
-
const winscript = '# win-secret.ps1\n# Reads stdin: COMMAND\\nHANDLE\\n[VALUE_B64]\\n\n# Writes stdout: STATUS\\nPAYLOAD\\n\n\n$ErrorActionPreference = "Stop"\n\nfunction Out-TwoLines([string]$status, [string]$payload) {\n Write-Output $status\n Write-Output $payload\n}\n\ntry {\n $lines = @()\n while ($null -ne ($l = [Console]::In.ReadLine())) { $lines += $l }\n\n if ($lines.Count -lt 2) { Out-TwoLines "ERROR" "invalid input"; exit 0 }\n\n $cmd = $lines[0].Trim()\n $handle = $lines[1].Trim()\n\n if ($handle -notmatch \'^[A-Za-z0-9._-]{1,128}$\') {\n Out-TwoLines "ERROR" "invalid handle"\n exit 0\n }\n\n $baseDir = Join-Path $env:LOCALAPPDATA "phosart-devtool\\secrets"\n [IO.Directory]::CreateDirectory($baseDir) | Out-Null\n $path = Join-Path $baseDir "$handle.bin"\n\n Add-Type -AssemblyName System.Security\n\n function Protect([byte[]]$plain) {\n return [Security.Cryptography.ProtectedData]::Protect(\n $plain, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser\n )\n }\n\n function Unprotect([byte[]]$cipher) {\n return [Security.Cryptography.ProtectedData]::Unprotect(\n $cipher, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser\n )\n }\n\n function ReadExistingB64OrNull() {\n if (-not (Test-Path -LiteralPath $path)) { return $null }\n $cipher = [IO.File]::ReadAllBytes($path)\n $plain = Unprotect $cipher\n return [Convert]::ToBase64String($plain)\n }\n\n if ($cmd -eq "READ") {\n $cur = ReadExistingB64OrNull\n if ($null -eq $cur) { Out-TwoLines "MISSING" "null" } else { Out-TwoLines "OK" $cur }\n exit 0\n }\n\n if ($cmd -eq "WRITE") {\n if ($lines.Count -lt 3) { Out-TwoLines "ERROR" "missing value"; exit 0 }\n $valueB64 = $lines[2].Trim()\n $newPlain = [Convert]::FromBase64String($valueB64)\n\n $old = ReadExistingB64OrNull\n\n $cipher = Protect $newPlain\n [IO.File]::WriteAllBytes($path, $cipher)\n\n if ($null -eq $old) { Out-TwoLines "OK" "null" } else { Out-TwoLines "OK" $old }\n exit 0\n }\n\n if ($cmd -eq "DELETE") {\n $old = ReadExistingB64OrNull\n if (Test-Path -LiteralPath $path) { Remove-Item -LiteralPath $path -Force }\n if ($null -eq $old) { Out-TwoLines "MISSING" "null" } else { Out-TwoLines "OK" $old }\n exit 0\n }\n\n Out-TwoLines "ERROR" "unknown command"\n} catch {\n Out-TwoLines "ERROR" ($_.Exception.Message.Replace("`r","").Replace("`n"," "))\n}\n';
|
|
9
|
-
const macscript = '#!/usr/bin/env bash\n# mac-secret.sh\n\nset -euo pipefail\n\nread -r CMD || true\nread -r HANDLE || true\nVALUE_B64=""\nif [[ "${CMD:-}" == "WRITE" ]]; then\n read -r VALUE_B64 || VALUE_B64=""\nfi\n\nSERVICE="com.phosart.devtool.secrets"\n\ntwo_lines() { printf "%s\\n%s\\n" "$1" "$2"; }\n\nvalid_handle() {\n [[ "$HANDLE" =~ ^[A-Za-z0-9._-]{1,128}$ ]]\n}\n\nif ! valid_handle; then\n two_lines "ERROR" "invalid handle"\n exit 0\nfi\n\nread_existing() {\n # Prints existing secret to stdout, or returns nonzero if not found.\n security find-generic-password -a "$HANDLE" -s "$SERVICE" -w 2>/dev/null\n}\n\ncase "${CMD:-}" in\n READ)\n if out="$(read_existing)"; then\n two_lines "OK" "$out"\n else\n two_lines "MISSING" "null"\n fi\n ;;\n\n WRITE)\n old="null"\n if out="$(read_existing)"; then old="$out"; fi\n\n # Add or update\n security add-generic-password -a "$HANDLE" -s "$SERVICE" -w "$VALUE_B64" -U >/dev/null 2>&1\n\n two_lines "OK" "$old"\n ;;\n\n DELETE)\n if out="$(read_existing)"; then\n security delete-generic-password -a "$HANDLE" -s "$SERVICE" >/dev/null 2>&1 || true\n two_lines "OK" "$out"\n else\n two_lines "MISSING" "null"\n fi\n ;;\n\n *)\n two_lines "ERROR" "unknown command"\n ;;\nesac\n';
|
|
10
|
-
const linuxscript = '#!/usr/bin/env bash\n\nset -euo pipefail\n\nread -r CMD || true\nread -r HANDLE || true\nVALUE_B64=""\nif [[ "${CMD:-}" == "WRITE" ]]; then\n read -r VALUE_B64 || VALUE_B64=""\nfi\n\nSERVICE="com.phosart.devtool.secrets"\n\ntwo_lines() { printf "%s\\n%s\\n" "$1" "$2"; }\n\nvalid_handle() {\n [[ "$HANDLE" =~ ^[A-Za-z0-9._-]{1,128}$ ]]\n}\n\nif ! valid_handle; then\n two_lines "ERROR" "invalid handle"\n exit 0\nfi\n\nif ! command -v secret-tool >/dev/null 2>&1; then\n two_lines "NOT_SUPPORTED" "null"\n exit 0\nfi\n\nread_existing() {\n # secret-tool lookup returns 0 with value, or 1 if not found.\n secret-tool lookup service "$SERVICE" account "$HANDLE" 2>/dev/null\n}\n\ncase "${CMD:-}" in\n READ)\n if out="$(read_existing)"; then\n two_lines "OK" "$out"\n else\n two_lines "MISSING" "null"\n fi\n ;;\n\n WRITE)\n old="null"\n if out="$(read_existing)"; then old="$out"; fi\n\n # store (replace)\n printf "%s" "$VALUE_B64" | secret-tool store --label="YourApp secret $HANDLE" service "$SERVICE" account "$HANDLE" >/dev/null\n\n two_lines "OK" "$old"\n ;;\n\n DELETE)\n if out="$(read_existing)"; then\n secret-tool clear service "$SERVICE" account "$HANDLE" >/dev/null || true\n two_lines "OK" "$out"\n else\n two_lines "MISSING" "null"\n fi\n ;;\n\n *)\n two_lines "ERROR" "unknown command"\n ;;\nesac\n';
|
|
11
|
-
let cachedpath = null;
|
|
12
|
-
async function scriptpath() {
|
|
13
|
-
if (cachedpath) {
|
|
14
|
-
return cachedpath;
|
|
15
|
-
}
|
|
16
|
-
const platform = os.platform();
|
|
17
|
-
const tmp = await fs.mkdtemp(path.join(os.tmpdir(), "phosart-devtool"));
|
|
18
|
-
const toCache = path.resolve(path.join(tmp, `script.${platform === "win32" ? "ps1" : "sh"}`));
|
|
19
|
-
let script = linuxscript;
|
|
20
|
-
if (platform === "darwin") {
|
|
21
|
-
script = macscript;
|
|
22
|
-
} else if (platform === "win32") {
|
|
23
|
-
script = winscript;
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
await fs.stat(toCache);
|
|
27
|
-
return toCache;
|
|
28
|
-
} catch {
|
|
29
|
-
}
|
|
30
|
-
await fs.writeFile(toCache, script, { encoding: "utf-8" });
|
|
31
|
-
await fs.chmod(toCache, 493);
|
|
32
|
-
cachedpath = toCache;
|
|
33
|
-
return cachedpath;
|
|
34
|
-
}
|
|
35
|
-
function b64FromBytes(bytes) {
|
|
36
|
-
return Buffer.from(bytes).toString("base64");
|
|
37
|
-
}
|
|
38
|
-
function bytesFromB64(b64) {
|
|
39
|
-
return Buffer.from(b64, "base64");
|
|
40
|
-
}
|
|
41
|
-
function runHelper(helperPath, input, shell = false) {
|
|
42
|
-
return new Promise((resolve) => {
|
|
43
|
-
const child = spawn(helperPath, [], {
|
|
44
|
-
stdio: "pipe",
|
|
45
|
-
shell,
|
|
46
|
-
windowsHide: true
|
|
47
|
-
});
|
|
48
|
-
let out = "";
|
|
49
|
-
let err = "";
|
|
50
|
-
child.stdout.setEncoding("utf8");
|
|
51
|
-
child.stderr.setEncoding("utf8");
|
|
52
|
-
child.stdout.on("data", (d) => out += d);
|
|
53
|
-
child.stderr.on("data", (d) => err += d);
|
|
54
|
-
child.on("close", () => {
|
|
55
|
-
const lines = out.replace(/\r/g, "").split("\n").filter((l) => l.length > 0);
|
|
56
|
-
const status = lines[0] ?? "ERROR";
|
|
57
|
-
const payload = lines[1] ?? "null";
|
|
58
|
-
if (status === "OK")
|
|
59
|
-
return resolve({ status: "OK", value: payload === "null" ? null : payload });
|
|
60
|
-
if (status === "MISSING") return resolve({ status: "MISSING", value: null });
|
|
61
|
-
if (status === "NOT_SUPPORTED") return resolve({ status: "NOT_SUPPORTED", value: null });
|
|
62
|
-
return resolve({
|
|
63
|
-
status: "ERROR",
|
|
64
|
-
value: payload !== "null" ? payload : err.trim() || "unknown error"
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
child.stdin.end(input);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
class SecretStore {
|
|
71
|
-
#ephemeral = /* @__PURE__ */ new Map();
|
|
72
|
-
async helperCall(cmd, handle, valueB64) {
|
|
73
|
-
const path2 = await scriptpath();
|
|
74
|
-
const p = os.platform();
|
|
75
|
-
if (p === "win32") {
|
|
76
|
-
const ps = "powershell.exe";
|
|
77
|
-
const args = `-NoProfile -ExecutionPolicy Bypass -File "${path2}"`;
|
|
78
|
-
return runHelper(
|
|
79
|
-
`${ps} ${args}`,
|
|
80
|
-
[cmd, handle, ...cmd === "WRITE" ? [valueB64 ?? ""] : []].join("\n") + "\n",
|
|
81
|
-
true
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
if (p === "darwin") {
|
|
85
|
-
return runHelper(
|
|
86
|
-
path2,
|
|
87
|
-
[cmd, handle, ...cmd === "WRITE" ? [valueB64 ?? ""] : []].join("\n") + "\n"
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
return runHelper(
|
|
91
|
-
path2,
|
|
92
|
-
[cmd, handle, ...cmd === "WRITE" ? [valueB64 ?? ""] : []].join("\n") + "\n"
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
async read(handle) {
|
|
96
|
-
const res = await this.helperCall("READ", handle);
|
|
97
|
-
if (res.status === "OK") return res.value ? bytesFromB64(res.value) : new Uint8Array();
|
|
98
|
-
if (res.status === "MISSING") return null;
|
|
99
|
-
if (res.status === "NOT_SUPPORTED") {
|
|
100
|
-
const v = this.#ephemeral.get(handle);
|
|
101
|
-
return v ? bytesFromB64(v) : null;
|
|
102
|
-
}
|
|
103
|
-
throw new Error(`secret read failed: ${res.value}`);
|
|
104
|
-
}
|
|
105
|
-
async write(handle, value) {
|
|
106
|
-
const valueB64 = b64FromBytes(value);
|
|
107
|
-
const res = await this.helperCall("WRITE", handle, valueB64);
|
|
108
|
-
if (res.status === "OK") {
|
|
109
|
-
this.#ephemeral.set(handle, valueB64);
|
|
110
|
-
return res.value ? bytesFromB64(res.value) : null;
|
|
111
|
-
}
|
|
112
|
-
if (res.status === "NOT_SUPPORTED") {
|
|
113
|
-
const old = this.#ephemeral.get(handle) ?? null;
|
|
114
|
-
this.#ephemeral.set(handle, valueB64);
|
|
115
|
-
return old ? bytesFromB64(old) : null;
|
|
116
|
-
}
|
|
117
|
-
throw new Error(`secret write failed: ${res.status === "ERROR" ? res.value : "unknown"}`);
|
|
118
|
-
}
|
|
119
|
-
async delete(handle) {
|
|
120
|
-
const res = await this.helperCall("DELETE", handle);
|
|
121
|
-
if (res.status === "OK") {
|
|
122
|
-
this.#ephemeral.delete(handle);
|
|
123
|
-
return res.value ? bytesFromB64(res.value) : null;
|
|
124
|
-
}
|
|
125
|
-
if (res.status === "MISSING") {
|
|
126
|
-
this.#ephemeral.delete(handle);
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
if (res.status === "NOT_SUPPORTED") {
|
|
130
|
-
const old = this.#ephemeral.get(handle) ?? null;
|
|
131
|
-
this.#ephemeral.delete(handle);
|
|
132
|
-
return old ? bytesFromB64(old) : null;
|
|
133
|
-
}
|
|
134
|
-
throw new Error(`secret delete failed: ${res.value}`);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
const secrets = new SecretStore();
|
|
138
|
-
const POST = async ({ request }) => {
|
|
139
|
-
const state = await request.json();
|
|
140
|
-
if (state.stage !== "has_code") {
|
|
141
|
-
return error(400, "wrong state");
|
|
142
|
-
}
|
|
143
|
-
const resp = await requestToken(state.device_code);
|
|
144
|
-
if (resp.access_token) {
|
|
145
|
-
secrets.write("gha_token", Buffer.from(resp.access_token, "utf-8"));
|
|
146
|
-
return json({ stage: "completed" });
|
|
147
|
-
}
|
|
148
|
-
state.last_attempt = resp.error;
|
|
149
|
-
return json(state);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export { POST };
|
|
153
|
-
//# sourceMappingURL=_server.ts-CDSLj_Cz.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-CDSLj_Cz.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/git/hub/login/request_access_token/_server.ts.js"],"sourcesContent":["import { r as requestToken } from \"../../../../../../../chunks/github.js\";\nimport { error, json } from \"@sveltejs/kit\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport os from \"node:os\";\nimport { spawn } from \"node:child_process\";\nconst winscript = '# win-secret.ps1\\n# Reads stdin: COMMAND\\\\nHANDLE\\\\n[VALUE_B64]\\\\n\\n# Writes stdout: STATUS\\\\nPAYLOAD\\\\n\\n\\n$ErrorActionPreference = \"Stop\"\\n\\nfunction Out-TwoLines([string]$status, [string]$payload) {\\n Write-Output $status\\n Write-Output $payload\\n}\\n\\ntry {\\n $lines = @()\\n while ($null -ne ($l = [Console]::In.ReadLine())) { $lines += $l }\\n\\n if ($lines.Count -lt 2) { Out-TwoLines \"ERROR\" \"invalid input\"; exit 0 }\\n\\n $cmd = $lines[0].Trim()\\n $handle = $lines[1].Trim()\\n\\n if ($handle -notmatch \\'^[A-Za-z0-9._-]{1,128}$\\') {\\n Out-TwoLines \"ERROR\" \"invalid handle\"\\n exit 0\\n }\\n\\n $baseDir = Join-Path $env:LOCALAPPDATA \"phosart-devtool\\\\secrets\"\\n [IO.Directory]::CreateDirectory($baseDir) | Out-Null\\n $path = Join-Path $baseDir \"$handle.bin\"\\n\\n Add-Type -AssemblyName System.Security\\n\\n function Protect([byte[]]$plain) {\\n return [Security.Cryptography.ProtectedData]::Protect(\\n $plain, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser\\n )\\n }\\n\\n function Unprotect([byte[]]$cipher) {\\n return [Security.Cryptography.ProtectedData]::Unprotect(\\n $cipher, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser\\n )\\n }\\n\\n function ReadExistingB64OrNull() {\\n if (-not (Test-Path -LiteralPath $path)) { return $null }\\n $cipher = [IO.File]::ReadAllBytes($path)\\n $plain = Unprotect $cipher\\n return [Convert]::ToBase64String($plain)\\n }\\n\\n if ($cmd -eq \"READ\") {\\n $cur = ReadExistingB64OrNull\\n if ($null -eq $cur) { Out-TwoLines \"MISSING\" \"null\" } else { Out-TwoLines \"OK\" $cur }\\n exit 0\\n }\\n\\n if ($cmd -eq \"WRITE\") {\\n if ($lines.Count -lt 3) { Out-TwoLines \"ERROR\" \"missing value\"; exit 0 }\\n $valueB64 = $lines[2].Trim()\\n $newPlain = [Convert]::FromBase64String($valueB64)\\n\\n $old = ReadExistingB64OrNull\\n\\n $cipher = Protect $newPlain\\n [IO.File]::WriteAllBytes($path, $cipher)\\n\\n if ($null -eq $old) { Out-TwoLines \"OK\" \"null\" } else { Out-TwoLines \"OK\" $old }\\n exit 0\\n }\\n\\n if ($cmd -eq \"DELETE\") {\\n $old = ReadExistingB64OrNull\\n if (Test-Path -LiteralPath $path) { Remove-Item -LiteralPath $path -Force }\\n if ($null -eq $old) { Out-TwoLines \"MISSING\" \"null\" } else { Out-TwoLines \"OK\" $old }\\n exit 0\\n }\\n\\n Out-TwoLines \"ERROR\" \"unknown command\"\\n} catch {\\n Out-TwoLines \"ERROR\" ($_.Exception.Message.Replace(\"`r\",\"\").Replace(\"`n\",\" \"))\\n}\\n';\nconst macscript = '#!/usr/bin/env bash\\n# mac-secret.sh\\n\\nset -euo pipefail\\n\\nread -r CMD || true\\nread -r HANDLE || true\\nVALUE_B64=\"\"\\nif [[ \"${CMD:-}\" == \"WRITE\" ]]; then\\n read -r VALUE_B64 || VALUE_B64=\"\"\\nfi\\n\\nSERVICE=\"com.phosart.devtool.secrets\"\\n\\ntwo_lines() { printf \"%s\\\\n%s\\\\n\" \"$1\" \"$2\"; }\\n\\nvalid_handle() {\\n [[ \"$HANDLE\" =~ ^[A-Za-z0-9._-]{1,128}$ ]]\\n}\\n\\nif ! valid_handle; then\\n two_lines \"ERROR\" \"invalid handle\"\\n exit 0\\nfi\\n\\nread_existing() {\\n # Prints existing secret to stdout, or returns nonzero if not found.\\n security find-generic-password -a \"$HANDLE\" -s \"$SERVICE\" -w 2>/dev/null\\n}\\n\\ncase \"${CMD:-}\" in\\n READ)\\n if out=\"$(read_existing)\"; then\\n two_lines \"OK\" \"$out\"\\n else\\n two_lines \"MISSING\" \"null\"\\n fi\\n ;;\\n\\n WRITE)\\n old=\"null\"\\n if out=\"$(read_existing)\"; then old=\"$out\"; fi\\n\\n # Add or update\\n security add-generic-password -a \"$HANDLE\" -s \"$SERVICE\" -w \"$VALUE_B64\" -U >/dev/null 2>&1\\n\\n two_lines \"OK\" \"$old\"\\n ;;\\n\\n DELETE)\\n if out=\"$(read_existing)\"; then\\n security delete-generic-password -a \"$HANDLE\" -s \"$SERVICE\" >/dev/null 2>&1 || true\\n two_lines \"OK\" \"$out\"\\n else\\n two_lines \"MISSING\" \"null\"\\n fi\\n ;;\\n\\n *)\\n two_lines \"ERROR\" \"unknown command\"\\n ;;\\nesac\\n';\nconst linuxscript = '#!/usr/bin/env bash\\n\\nset -euo pipefail\\n\\nread -r CMD || true\\nread -r HANDLE || true\\nVALUE_B64=\"\"\\nif [[ \"${CMD:-}\" == \"WRITE\" ]]; then\\n read -r VALUE_B64 || VALUE_B64=\"\"\\nfi\\n\\nSERVICE=\"com.phosart.devtool.secrets\"\\n\\ntwo_lines() { printf \"%s\\\\n%s\\\\n\" \"$1\" \"$2\"; }\\n\\nvalid_handle() {\\n [[ \"$HANDLE\" =~ ^[A-Za-z0-9._-]{1,128}$ ]]\\n}\\n\\nif ! valid_handle; then\\n two_lines \"ERROR\" \"invalid handle\"\\n exit 0\\nfi\\n\\nif ! command -v secret-tool >/dev/null 2>&1; then\\n two_lines \"NOT_SUPPORTED\" \"null\"\\n exit 0\\nfi\\n\\nread_existing() {\\n # secret-tool lookup returns 0 with value, or 1 if not found.\\n secret-tool lookup service \"$SERVICE\" account \"$HANDLE\" 2>/dev/null\\n}\\n\\ncase \"${CMD:-}\" in\\n READ)\\n if out=\"$(read_existing)\"; then\\n two_lines \"OK\" \"$out\"\\n else\\n two_lines \"MISSING\" \"null\"\\n fi\\n ;;\\n\\n WRITE)\\n old=\"null\"\\n if out=\"$(read_existing)\"; then old=\"$out\"; fi\\n\\n # store (replace)\\n printf \"%s\" \"$VALUE_B64\" | secret-tool store --label=\"YourApp secret $HANDLE\" service \"$SERVICE\" account \"$HANDLE\" >/dev/null\\n\\n two_lines \"OK\" \"$old\"\\n ;;\\n\\n DELETE)\\n if out=\"$(read_existing)\"; then\\n secret-tool clear service \"$SERVICE\" account \"$HANDLE\" >/dev/null || true\\n two_lines \"OK\" \"$out\"\\n else\\n two_lines \"MISSING\" \"null\"\\n fi\\n ;;\\n\\n *)\\n two_lines \"ERROR\" \"unknown command\"\\n ;;\\nesac\\n';\nlet cachedpath = null;\nasync function scriptpath() {\n if (cachedpath) {\n return cachedpath;\n }\n const platform = os.platform();\n const tmp = await fs.mkdtemp(path.join(os.tmpdir(), \"phosart-devtool\"));\n const toCache = path.resolve(path.join(tmp, `script.${platform === \"win32\" ? \"ps1\" : \"sh\"}`));\n let script = linuxscript;\n if (platform === \"darwin\") {\n script = macscript;\n } else if (platform === \"win32\") {\n script = winscript;\n }\n try {\n await fs.stat(toCache);\n return toCache;\n } catch {\n }\n await fs.writeFile(toCache, script, { encoding: \"utf-8\" });\n await fs.chmod(toCache, 493);\n cachedpath = toCache;\n return cachedpath;\n}\nfunction b64FromBytes(bytes) {\n return Buffer.from(bytes).toString(\"base64\");\n}\nfunction bytesFromB64(b64) {\n return Buffer.from(b64, \"base64\");\n}\nfunction runHelper(helperPath, input, shell = false) {\n return new Promise((resolve) => {\n const child = spawn(helperPath, [], {\n stdio: \"pipe\",\n shell,\n windowsHide: true\n });\n let out = \"\";\n let err = \"\";\n child.stdout.setEncoding(\"utf8\");\n child.stderr.setEncoding(\"utf8\");\n child.stdout.on(\"data\", (d) => out += d);\n child.stderr.on(\"data\", (d) => err += d);\n child.on(\"close\", () => {\n const lines = out.replace(/\\r/g, \"\").split(\"\\n\").filter((l) => l.length > 0);\n const status = lines[0] ?? \"ERROR\";\n const payload = lines[1] ?? \"null\";\n if (status === \"OK\")\n return resolve({ status: \"OK\", value: payload === \"null\" ? null : payload });\n if (status === \"MISSING\") return resolve({ status: \"MISSING\", value: null });\n if (status === \"NOT_SUPPORTED\") return resolve({ status: \"NOT_SUPPORTED\", value: null });\n return resolve({\n status: \"ERROR\",\n value: payload !== \"null\" ? payload : err.trim() || \"unknown error\"\n });\n });\n child.stdin.end(input);\n });\n}\nclass SecretStore {\n #ephemeral = /* @__PURE__ */ new Map();\n async helperCall(cmd, handle, valueB64) {\n const path2 = await scriptpath();\n const p = os.platform();\n if (p === \"win32\") {\n const ps = \"powershell.exe\";\n const args = `-NoProfile -ExecutionPolicy Bypass -File \"${path2}\"`;\n return runHelper(\n `${ps} ${args}`,\n [cmd, handle, ...cmd === \"WRITE\" ? [valueB64 ?? \"\"] : []].join(\"\\n\") + \"\\n\",\n true\n );\n }\n if (p === \"darwin\") {\n return runHelper(\n path2,\n [cmd, handle, ...cmd === \"WRITE\" ? [valueB64 ?? \"\"] : []].join(\"\\n\") + \"\\n\"\n );\n }\n return runHelper(\n path2,\n [cmd, handle, ...cmd === \"WRITE\" ? [valueB64 ?? \"\"] : []].join(\"\\n\") + \"\\n\"\n );\n }\n async read(handle) {\n const res = await this.helperCall(\"READ\", handle);\n if (res.status === \"OK\") return res.value ? bytesFromB64(res.value) : new Uint8Array();\n if (res.status === \"MISSING\") return null;\n if (res.status === \"NOT_SUPPORTED\") {\n const v = this.#ephemeral.get(handle);\n return v ? bytesFromB64(v) : null;\n }\n throw new Error(`secret read failed: ${res.value}`);\n }\n async write(handle, value) {\n const valueB64 = b64FromBytes(value);\n const res = await this.helperCall(\"WRITE\", handle, valueB64);\n if (res.status === \"OK\") {\n this.#ephemeral.set(handle, valueB64);\n return res.value ? bytesFromB64(res.value) : null;\n }\n if (res.status === \"NOT_SUPPORTED\") {\n const old = this.#ephemeral.get(handle) ?? null;\n this.#ephemeral.set(handle, valueB64);\n return old ? bytesFromB64(old) : null;\n }\n throw new Error(`secret write failed: ${res.status === \"ERROR\" ? res.value : \"unknown\"}`);\n }\n async delete(handle) {\n const res = await this.helperCall(\"DELETE\", handle);\n if (res.status === \"OK\") {\n this.#ephemeral.delete(handle);\n return res.value ? bytesFromB64(res.value) : null;\n }\n if (res.status === \"MISSING\") {\n this.#ephemeral.delete(handle);\n return null;\n }\n if (res.status === \"NOT_SUPPORTED\") {\n const old = this.#ephemeral.get(handle) ?? null;\n this.#ephemeral.delete(handle);\n return old ? bytesFromB64(old) : null;\n }\n throw new Error(`secret delete failed: ${res.value}`);\n }\n}\nconst secrets = new SecretStore();\nconst POST = async ({ request }) => {\n const state = await request.json();\n if (state.stage !== \"has_code\") {\n return error(400, \"wrong state\");\n }\n const resp = await requestToken(state.device_code);\n if (resp.access_token) {\n secrets.write(\"gha_token\", Buffer.from(resp.access_token, \"utf-8\"));\n return json({ stage: \"completed\" });\n }\n state.last_attempt = resp.error;\n return json(state);\n};\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,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK;AACjC,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC;AACpB;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { a as requestDeviceCode } from './github-CM6dx0ky.js';
|
|
2
|
-
import { e as error, j as json } from './index-lhTMmBNn.js';
|
|
3
|
-
|
|
4
|
-
const POST = async ({ request }) => {
|
|
5
|
-
const state = await request.json();
|
|
6
|
-
if (state.stage !== "start") {
|
|
7
|
-
return error(400, "wrong stage");
|
|
8
|
-
}
|
|
9
|
-
const resp = await requestDeviceCode();
|
|
10
|
-
return json({
|
|
11
|
-
stage: "has_code",
|
|
12
|
-
device_code: resp.device_code,
|
|
13
|
-
user_code: resp.user_code,
|
|
14
|
-
verification_uri: resp.verification_uri
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { POST };
|
|
19
|
-
//# sourceMappingURL=_server.ts-D7rlRPg6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-D7rlRPg6.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/git/hub/login/request_code/_server.ts.js"],"sourcesContent":["import { a as requestDeviceCode } from \"../../../../../../../chunks/github.js\";\nimport { error, json } from \"@sveltejs/kit\";\nconst POST = async ({ request }) => {\n const state = await request.json();\n if (state.stage !== \"start\") {\n return error(400, \"wrong stage\");\n }\n const resp = await requestDeviceCode();\n return json({\n stage: \"has_code\",\n device_code: resp.device_code,\n user_code: resp.user_code,\n verification_uri: resp.verification_uri\n });\n};\nexport {\n POST\n};\n"],"names":[],"mappings":";;;AAEK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AACpC,EAAE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AACpC,EAAE,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,EAAE;AAC/B,IAAI,OAAO,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC;AACpC,EAAE;AACF,EAAE,MAAM,IAAI,GAAG,MAAM,iBAAiB,EAAE;AACxC,EAAE,OAAO,IAAI,CAAC;AACd,IAAI,KAAK,EAAE,UAAU;AACrB,IAAI,WAAW,EAAE,IAAI,CAAC,WAAW;AACjC,IAAI,SAAS,EAAE,IAAI,CAAC,SAAS;AAC7B,IAAI,gBAAgB,EAAE,IAAI,CAAC;AAC3B,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { j as json } from './index-lhTMmBNn.js';
|
|
2
|
-
import { $ART } from '@phosart/common/server';
|
|
3
|
-
import { spawn } from 'node:child_process';
|
|
4
|
-
|
|
5
|
-
function ordinaryStatusRegex() {
|
|
6
|
-
return /1 ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\d{6}) (\d{6}) (\d{6}) ([a-f0-9]+) ([a-f0-9]+) (.+)$/;
|
|
7
|
-
}
|
|
8
|
-
function copyStatusRegex() {
|
|
9
|
-
return /2 ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\d{6}) (\d{6}) (\d{6}) ([a-f0-9]+) ([a-f0-9]+) ([RC])(\d+) ([^\t]+)\t(.+)$/;
|
|
10
|
-
}
|
|
11
|
-
function unmergeRegex() {
|
|
12
|
-
return /u ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\d{6}) (\d{6}) (\d{6}) (\d{6}) ([a-f0-9]+) ([a-f0-9]+) ([a-f0-9]+) (.+)$/;
|
|
13
|
-
}
|
|
14
|
-
function untrackRegex() {
|
|
15
|
-
return /\? (.+)$/;
|
|
16
|
-
}
|
|
17
|
-
function headerRegex() {
|
|
18
|
-
return /# ([^.]+)\.([^.]+?) (.*)/;
|
|
19
|
-
}
|
|
20
|
-
class Git {
|
|
21
|
-
async status() {
|
|
22
|
-
const proc = spawn("git", ["status", "--porcelain=2", "--branch", "--untracked-files"], {
|
|
23
|
-
stdio: "pipe",
|
|
24
|
-
cwd: $ART()
|
|
25
|
-
});
|
|
26
|
-
let out = "";
|
|
27
|
-
proc.stdout.on("data", (d) => out += d);
|
|
28
|
-
await new Promise((resolve) => proc.on("close", resolve));
|
|
29
|
-
const status = {
|
|
30
|
-
branch: { head: "", oid: "" },
|
|
31
|
-
changes: []
|
|
32
|
-
};
|
|
33
|
-
for (const line of out.split("\n")) {
|
|
34
|
-
let match = headerRegex().exec(line);
|
|
35
|
-
if (match) {
|
|
36
|
-
const [, domain, key, value] = match;
|
|
37
|
-
if (domain !== "branch") continue;
|
|
38
|
-
switch (key) {
|
|
39
|
-
case "oid":
|
|
40
|
-
status.branch.oid = value;
|
|
41
|
-
break;
|
|
42
|
-
case "head":
|
|
43
|
-
status.branch.head = value;
|
|
44
|
-
break;
|
|
45
|
-
case "upstream":
|
|
46
|
-
status.branch.upstream = value;
|
|
47
|
-
break;
|
|
48
|
-
case "ab": {
|
|
49
|
-
const [, plus, minus] = /\+(\d+) -(\d+)/.exec(value);
|
|
50
|
-
status.branch.ab = {
|
|
51
|
-
ahead: plus,
|
|
52
|
-
behind: minus
|
|
53
|
-
};
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
match = untrackRegex().exec(line);
|
|
60
|
-
if (match) {
|
|
61
|
-
const [, path] = match;
|
|
62
|
-
status.changes.push({ type: "untracked", path });
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
match = unmergeRegex().exec(line);
|
|
66
|
-
if (match) {
|
|
67
|
-
const [, xy, ns, c, m, u, m1, m2, m3, mW, h1, h2, h3, path] = match;
|
|
68
|
-
status.changes.push({
|
|
69
|
-
type: "unmerged",
|
|
70
|
-
status: {
|
|
71
|
-
index: xy[0],
|
|
72
|
-
worktree: xy[1]
|
|
73
|
-
},
|
|
74
|
-
path,
|
|
75
|
-
stage1Mode: parseInt(m1, 8),
|
|
76
|
-
stage1Name: h1,
|
|
77
|
-
stage2Mode: parseInt(m2, 8),
|
|
78
|
-
stage2Name: h2,
|
|
79
|
-
stage3Mode: parseInt(m3, 8),
|
|
80
|
-
stage3Name: h3,
|
|
81
|
-
submoduleState: {
|
|
82
|
-
type: ns === "N" ? "normal" : "submodule",
|
|
83
|
-
didCommitChange: c === "C",
|
|
84
|
-
hasTrackedChanges: m === "M",
|
|
85
|
-
hasUntrackedChanges: u === "U"
|
|
86
|
-
},
|
|
87
|
-
worktreeMode: parseInt(mW, 8)
|
|
88
|
-
});
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
match = copyStatusRegex().exec(line);
|
|
92
|
-
if (match) {
|
|
93
|
-
const [, xy, ns, c, m, u, mH, mI, mW, hH, hI, x, score, path, origPath] = match;
|
|
94
|
-
status.changes.push({
|
|
95
|
-
type: x === "R" ? "renamed" : "copied",
|
|
96
|
-
headName: hH,
|
|
97
|
-
indexName: hI,
|
|
98
|
-
modeHead: parseInt(mH, 8),
|
|
99
|
-
modeIndex: parseInt(mI, 8),
|
|
100
|
-
modeWorktree: parseInt(mW, 8),
|
|
101
|
-
origPath,
|
|
102
|
-
path,
|
|
103
|
-
score: parseInt(score),
|
|
104
|
-
status: { index: xy[0], worktree: xy[1] },
|
|
105
|
-
submoduleState: {
|
|
106
|
-
type: ns === "N" ? "normal" : "submodule",
|
|
107
|
-
didCommitChange: c === "C",
|
|
108
|
-
hasTrackedChanges: m === "M",
|
|
109
|
-
hasUntrackedChanges: u === "U"
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
match = ordinaryStatusRegex().exec(line);
|
|
115
|
-
if (match) {
|
|
116
|
-
const [, xy, ns, c, m, u, mH, mI, mW, hH, hI, path] = match;
|
|
117
|
-
status.changes.push({
|
|
118
|
-
type: "normal",
|
|
119
|
-
headName: hH,
|
|
120
|
-
indexName: hI,
|
|
121
|
-
modeHead: parseInt(mH, 8),
|
|
122
|
-
modeIndex: parseInt(mI, 8),
|
|
123
|
-
modeWorktree: parseInt(mW, 8),
|
|
124
|
-
path,
|
|
125
|
-
status: { index: xy[0], worktree: xy[1] },
|
|
126
|
-
submoduleState: {
|
|
127
|
-
type: ns === "N" ? "normal" : "submodule",
|
|
128
|
-
didCommitChange: c === "C",
|
|
129
|
-
hasTrackedChanges: m === "M",
|
|
130
|
-
hasUntrackedChanges: u === "U"
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return status;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const GET = async () => {
|
|
140
|
-
return json(await new Git().status());
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export { GET };
|
|
144
|
-
//# sourceMappingURL=_server.ts-DJhLhLB4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts-DJhLhLB4.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/git/status/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { $ART } from \"@phosart/common/server\";\nimport { spawn } from \"node:child_process\";\nfunction ordinaryStatusRegex() {\n return /1 ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\\d{6}) (\\d{6}) (\\d{6}) ([a-f0-9]+) ([a-f0-9]+) (.+)$/;\n}\nfunction copyStatusRegex() {\n return /2 ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\\d{6}) (\\d{6}) (\\d{6}) ([a-f0-9]+) ([a-f0-9]+) ([RC])(\\d+) ([^\\t]+)\\t(.+)$/;\n}\nfunction unmergeRegex() {\n return /u ([.MTADRCU?]{2}) ([NS])([C.])([M.])([U.]) (\\d{6}) (\\d{6}) (\\d{6}) (\\d{6}) ([a-f0-9]+) ([a-f0-9]+) ([a-f0-9]+) (.+)$/;\n}\nfunction untrackRegex() {\n return /\\? (.+)$/;\n}\nfunction headerRegex() {\n return /# ([^.]+)\\.([^.]+?) (.*)/;\n}\nclass Git {\n async status() {\n const proc = spawn(\"git\", [\"status\", \"--porcelain=2\", \"--branch\", \"--untracked-files\"], {\n stdio: \"pipe\",\n cwd: $ART()\n });\n let out = \"\";\n proc.stdout.on(\"data\", (d) => out += d);\n await new Promise((resolve) => proc.on(\"close\", resolve));\n const status = {\n branch: { head: \"\", oid: \"\" },\n changes: []\n };\n for (const line of out.split(\"\\n\")) {\n let match = headerRegex().exec(line);\n if (match) {\n const [, domain, key, value] = match;\n if (domain !== \"branch\") continue;\n switch (key) {\n case \"oid\":\n status.branch.oid = value;\n break;\n case \"head\":\n status.branch.head = value;\n break;\n case \"upstream\":\n status.branch.upstream = value;\n break;\n case \"ab\": {\n const [, plus, minus] = /\\+(\\d+) -(\\d+)/.exec(value);\n status.branch.ab = {\n ahead: plus,\n behind: minus\n };\n break;\n }\n }\n continue;\n }\n match = untrackRegex().exec(line);\n if (match) {\n const [, path] = match;\n status.changes.push({ type: \"untracked\", path });\n continue;\n }\n match = unmergeRegex().exec(line);\n if (match) {\n const [, xy, ns, c, m, u, m1, m2, m3, mW, h1, h2, h3, path] = match;\n status.changes.push({\n type: \"unmerged\",\n status: {\n index: xy[0],\n worktree: xy[1]\n },\n path,\n stage1Mode: parseInt(m1, 8),\n stage1Name: h1,\n stage2Mode: parseInt(m2, 8),\n stage2Name: h2,\n stage3Mode: parseInt(m3, 8),\n stage3Name: h3,\n submoduleState: {\n type: ns === \"N\" ? \"normal\" : \"submodule\",\n didCommitChange: c === \"C\",\n hasTrackedChanges: m === \"M\",\n hasUntrackedChanges: u === \"U\"\n },\n worktreeMode: parseInt(mW, 8)\n });\n continue;\n }\n match = copyStatusRegex().exec(line);\n if (match) {\n const [, xy, ns, c, m, u, mH, mI, mW, hH, hI, x, score, path, origPath] = match;\n status.changes.push({\n type: x === \"R\" ? \"renamed\" : \"copied\",\n headName: hH,\n indexName: hI,\n modeHead: parseInt(mH, 8),\n modeIndex: parseInt(mI, 8),\n modeWorktree: parseInt(mW, 8),\n origPath,\n path,\n score: parseInt(score),\n status: { index: xy[0], worktree: xy[1] },\n submoduleState: {\n type: ns === \"N\" ? \"normal\" : \"submodule\",\n didCommitChange: c === \"C\",\n hasTrackedChanges: m === \"M\",\n hasUntrackedChanges: u === \"U\"\n }\n });\n continue;\n }\n match = ordinaryStatusRegex().exec(line);\n if (match) {\n const [, xy, ns, c, m, u, mH, mI, mW, hH, hI, path] = match;\n status.changes.push({\n type: \"normal\",\n headName: hH,\n indexName: hI,\n modeHead: parseInt(mH, 8),\n modeIndex: parseInt(mI, 8),\n modeWorktree: parseInt(mW, 8),\n path,\n status: { index: xy[0], worktree: xy[1] },\n submoduleState: {\n type: ns === \"N\" ? \"normal\" : \"submodule\",\n didCommitChange: c === \"C\",\n hasTrackedChanges: m === \"M\",\n hasUntrackedChanges: u === \"U\"\n }\n });\n continue;\n }\n }\n return status;\n }\n}\nconst GET = async () => {\n return json(await new Git().status());\n};\nexport {\n GET\n};\n"],"names":[],"mappings":";;;;AAGA,SAAS,mBAAmB,GAAG;AAC/B,EAAE,OAAO,mGAAmG;AAC5G;AACA,SAAS,eAAe,GAAG;AAC3B,EAAE,OAAO,yHAAyH;AAClI;AACA,SAAS,YAAY,GAAG;AACxB,EAAE,OAAO,uHAAuH;AAChI;AACA,SAAS,YAAY,GAAG;AACxB,EAAE,OAAO,UAAU;AACnB;AACA,SAAS,WAAW,GAAG;AACvB,EAAE,OAAO,0BAA0B;AACnC;AACA,MAAM,GAAG,CAAC;AACV,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,mBAAmB,CAAC,EAAE;AAC5F,MAAM,KAAK,EAAE,MAAM;AACnB,MAAM,GAAG,EAAE,IAAI;AACf,KAAK,CAAC;AACN,IAAI,IAAI,GAAG,GAAG,EAAE;AAChB,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAA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.js';
|
|
2
|
-
import { I as Icon } from './Icon-D6YekQ8Q.js';
|
|
3
|
-
|
|
4
|
-
function Eye($$renderer, $$props) {
|
|
5
|
-
$$renderer.component(($$renderer2) => {
|
|
6
|
-
let { $$slots, $$events, ...props } = $$props;
|
|
7
|
-
const iconNode = [
|
|
8
|
-
[
|
|
9
|
-
"path",
|
|
10
|
-
{
|
|
11
|
-
"d": "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
["circle", { "cx": "12", "cy": "12", "r": "3" }]
|
|
15
|
-
];
|
|
16
|
-
Icon($$renderer2, spread_props([
|
|
17
|
-
{ name: "eye" },
|
|
18
|
-
/**
|
|
19
|
-
* @component @name Eye
|
|
20
|
-
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
21
|
-
*
|
|
22
|
-
* @preview  - https://lucide.dev/icons/eye
|
|
23
|
-
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
24
|
-
*
|
|
25
|
-
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
26
|
-
* @returns {FunctionalComponent} Svelte component
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
props,
|
|
30
|
-
{
|
|
31
|
-
iconNode,
|
|
32
|
-
children: ($$renderer3) => {
|
|
33
|
-
props.children?.($$renderer3);
|
|
34
|
-
$$renderer3.push(`<!---->`);
|
|
35
|
-
},
|
|
36
|
-
$$slots: { default: true }
|
|
37
|
-
}
|
|
38
|
-
]));
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { Eye as E };
|
|
43
|
-
//# sourceMappingURL=eye-BlNCCVn1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eye-BlNCCVn1.js","sources":["../../../.svelte-kit/adapter-node/chunks/eye.js"],"sourcesContent":["import { j as spread_props } from \"./root.js\";\nimport { I as Icon } from \"./Icon.js\";\nfunction Eye($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n let { $$slots, $$events, ...props } = $$props;\n const iconNode = [\n [\n \"path\",\n {\n \"d\": \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\"\n }\n ],\n [\"circle\", { \"cx\": \"12\", \"cy\": \"12\", \"r\": \"3\" }]\n ];\n Icon($$renderer2, spread_props([\n { name: \"eye\" },\n /**\n * @component @name Eye\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/eye\n * @see https://lucide.dev/guide/packages/lucide-svelte - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {FunctionalComponent} Svelte component\n *\n */\n props,\n {\n iconNode,\n children: ($$renderer3) => {\n props.children?.($$renderer3);\n $$renderer3.push(`<!---->`);\n },\n $$slots: { default: true }\n }\n ]));\n });\n}\nexport {\n Eye as E\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE;AAClC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO;AACjD,IAAI,MAAM,QAAQ,GAAG;AACrB,MAAM;AACN,QAAQ,MAAM;AACd,QAAQ;AACR,UAAU,GAAG,EAAE;AACf;AACA,OAAO;AACP,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE;AACrD,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC;AACnC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK;AACX,MAAM;AACN,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,CAAC,WAAW,KAAK;AACnC,UAAU,KAAK,CAAC,QAAQ,GAAG,WAAW,CAAC;AACvC,UAAU,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AACrC,QAAQ,CAAC;AACT,QAAQ,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAChC;AACA,KAAK,CAAC,CAAC;AACP,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"galleryutil-BSy19g0y.js","sources":["../../../.svelte-kit/adapter-node/chunks/galleryutil.js"],"sourcesContent":["import { r as resolve } from \"./server2.js\";\nimport path from \"node:path\";\nimport { t as truthy, u as uploadImage } from \"./util.js\";\nfunction normalizeGalleryPath(path$1) {\n return (path$1 ?? \"\").replaceAll(path.sep, \"/\").replaceAll(/^\\/*/g, \"\");\n}\nfunction getGalleryDir(galleryPath) {\n const parts = galleryPath.split(\"/\");\n return parts.slice(0, -1).join(\"/\");\n}\nfunction getGalleryName(galleryPath) {\n const parts = galleryPath.split(\"/\");\n return parts.at(-1).split(\".\")[0];\n}\nfunction isBaseGallery(gallery) {\n return !isExtendsGallery(gallery);\n}\nfunction isExtendsGallery(gallery) {\n return !!gallery && \"$extends\" in gallery;\n}\nfunction createNewPiece(image, filePath, index, identifiers, thumbPath) {\n let slug = image.name.replaceAll(/[^A-Za-z0-9]/g, \"-\") + \"-\" + index;\n while (identifiers.includes(slug)) {\n slug += \" copy\";\n }\n const piece = {\n id: slug,\n alt: \"\",\n characters: [],\n date: new Date(image.lastModified),\n name: image.name,\n image: \"\",\n slug,\n tags: [],\n alts: [],\n artist: void 0,\n description: \"\",\n position: void 0,\n video: void 0\n };\n if (image.type.startsWith(\"video\")) {\n piece.video = { full: filePath, thumb: filePath };\n piece.image = thumbPath ?? \"\";\n } else {\n piece.image = filePath;\n }\n return piece;\n}\nfunction getImageUrls(galleryPath, piece, epoch) {\n return {\n image: resolve(`/api/gallery/${galleryPath}/${piece.slug}/original-image?epoch=${\"\"}`),\n alts: Object.fromEntries(\n piece.alts?.map((alt, i) => {\n return [\n alt.name,\n {\n image: resolve(\n `/api/gallery/${galleryPath}/${piece.slug}/original-image?epoch=${\"\"}&alt=${alt.name}&altIndex=${i}`\n ),\n video: {\n full: alt.video?.full ? resolve(\n `/api/gallery/${galleryPath}/${piece.slug}/original-image?epoch=${\"\"}&alt=${alt.name}&altIndex=${i}&video=true`\n ) : void 0,\n thumb: alt.video?.thumb ? resolve(\n `/api/gallery/${galleryPath}/${piece.slug}/original-image?epoch=${\"\"}&alt=${alt.name}&altIndex=${i}&video=true&thumb=true`\n ) : void 0\n }\n }\n ];\n }) ?? []\n ),\n video: {\n full: piece.video?.full ? resolve(\n `/api/gallery/${galleryPath}/${piece.slug}/original-image?video=true&epoch=${\"\"}`\n ) : void 0,\n thumb: piece.video?.thumb ? resolve(\n `/api/gallery/${galleryPath}/${piece.slug}/original-image?video=true&thumb=true&epoch=${\"\"}`\n ) : void 0\n }\n };\n}\nasync function copyPiece(piece, srcGalleryPath, targetGalleryPath) {\n const urls = getImageUrls(srcGalleryPath, piece);\n const newPiece = {\n ...piece,\n id: \"copy-\" + (piece.id ?? piece.slug) + Date.now() + Math.floor(Math.random() * 4096)\n };\n async function upload(path2) {\n return (await uploadImage(\n { gallery: targetGalleryPath, piece: \"\" },\n await fetch(path2).then((r) => r.blob()),\n piece.name\n )).filename;\n }\n newPiece.image = await upload(urls.image);\n newPiece.alts = newPiece.alts ? await Promise.all(\n newPiece.alts.map(async (alt) => {\n const aurls = urls.alts[alt.name];\n if (!aurls) return null;\n return {\n ...alt,\n image: await upload(aurls.image),\n video: aurls.video.full && aurls.video.thumb ? {\n full: await upload(aurls.video.full),\n thumb: await upload(aurls.video.thumb)\n } : void 0\n };\n })\n ).then((p) => p.filter(truthy)) : void 0;\n if (urls.video.full && urls.video.thumb) {\n newPiece.video = { full: await upload(urls.video.full), thumb: await upload(urls.video.thumb) };\n }\n return newPiece;\n}\nasync function copyPieces(pieces, srcGalleryPath, targetGalleryPath) {\n return await Promise.all(pieces.map((p) => copyPiece(p, srcGalleryPath, targetGalleryPath)));\n}\nexport {\n isBaseGallery as a,\n getGalleryName as b,\n copyPieces as c,\n createNewPiece as d,\n getGalleryDir as g,\n isExtendsGallery as i,\n normalizeGalleryPath as n\n};\n"],"names":[],"mappings":";;;;AAGA,SAAS,oBAAoB,CAAC,MAAM,EAAE;AACtC,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;AACzE;AACA,SAAS,aAAa,CAAC,WAAW,EAAE;AACpC,EAAE,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC;AACtC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AACrC;AACA,SAAS,cAAc,CAAC,WAAW,EAAE;AACrC,EAAE,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC;AACtC,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC;AACA,SAAS,aAAa,CAAC,OAAO,EAAE;AAChC,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC;AACnC;AACA,SAAS,gBAAgB,CAAC,OAAO,EAAE;AACnC,EAAE,OAAO,CAAC,CAAC,OAAO,IAAI,UAAU,IAAI,OAAO;AAC3C;AACA,SAAS,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE;AACxE,EAAE,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,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QAAQ,KAAK,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;AACxC,QAAQ,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG;AACvD,UAAU,IAAI,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;AAC9C,UAAU,KAAK,EAAE,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK;AAC/C,SAAS,GAAG;AACZ,OAAO;AACP,IAAI,CAAC;AACL,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM;AAC1C,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AAC3C,IAAI,QAAQ,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACnG,EAAE;AACF,EAAE,OAAO,QAAQ;AACjB;AACA,eAAe,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE;AACrE,EAAE,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,EAAE,cAAc,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAC9F;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const CLIENT_ID = "Iv23ligolIXXVSYrPwJx";
|
|
2
|
-
async function requestDeviceCode() {
|
|
3
|
-
const fd = new FormData();
|
|
4
|
-
fd.append("client_id", CLIENT_ID);
|
|
5
|
-
return await fetch("https://github.com/login/device/code", {
|
|
6
|
-
body: fd,
|
|
7
|
-
headers: { Accept: "application/json" }
|
|
8
|
-
}).then((r) => r.json());
|
|
9
|
-
}
|
|
10
|
-
async function requestToken(deviceCode) {
|
|
11
|
-
const fd = new FormData();
|
|
12
|
-
fd.append("client_id", CLIENT_ID);
|
|
13
|
-
fd.append("device_code", deviceCode);
|
|
14
|
-
fd.append("grant_type", "urn:ietf:params:oauth:grant-type:device_code");
|
|
15
|
-
return await fetch("https://github.com/login/oauth/access_token", {
|
|
16
|
-
body: fd,
|
|
17
|
-
headers: { Accept: "application/json" }
|
|
18
|
-
}).then((r) => r.json());
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { requestDeviceCode as a, requestToken as r };
|
|
22
|
-
//# sourceMappingURL=github-CM6dx0ky.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"github-CM6dx0ky.js","sources":["../../../.svelte-kit/adapter-node/chunks/github.js"],"sourcesContent":["const CLIENT_ID = \"Iv23ligolIXXVSYrPwJx\";\nasync function requestDeviceCode() {\n const fd = new FormData();\n fd.append(\"client_id\", CLIENT_ID);\n return await fetch(\"https://github.com/login/device/code\", {\n body: fd,\n headers: { Accept: \"application/json\" }\n }).then((r) => r.json());\n}\nasync function requestToken(deviceCode) {\n const fd = new FormData();\n fd.append(\"client_id\", CLIENT_ID);\n fd.append(\"device_code\", deviceCode);\n fd.append(\"grant_type\", \"urn:ietf:params:oauth:grant-type:device_code\");\n return await fetch(\"https://github.com/login/oauth/access_token\", {\n body: fd,\n headers: { Accept: \"application/json\" }\n }).then((r) => r.json());\n}\nexport {\n requestDeviceCode as a,\n requestToken as r\n};\n"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,sBAAsB;AACxC,eAAe,iBAAiB,GAAG;AACnC,EAAE,MAAM,EAAE,GAAG,IAAI,QAAQ,EAAE;AAC3B,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;AACnC,EAAE,OAAO,MAAM,KAAK,CAAC,sCAAsC,EAAE;AAC7D,IAAI,IAAI,EAAE,EAAE;AACZ,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB;AACzC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1B;AACA,eAAe,YAAY,CAAC,UAAU,EAAE;AACxC,EAAE,MAAM,EAAE,GAAG,IAAI,QAAQ,EAAE;AAC3B,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC;AACnC,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC;AACtC,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,8CAA8C,CAAC;AACzE,EAAE,OAAO,MAAM,KAAK,CAAC,6CAA6C,EAAE;AACpE,IAAI,IAAI,EAAE,EAAE;AACZ,IAAI,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB;AACzC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-lhTMmBNn.js","sources":["../../../node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@6.2.1_svelte@5.56.2_@typescript-eslin_ab9783a66cb0903e3d7671d76a7b88a3/node_modules/@sveltejs/kit/src/exports/internal/index.js","../../../node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@6.2.1_svelte@5.56.2_@typescript-eslin_ab9783a66cb0903e3d7671d76a7b88a3/node_modules/@sveltejs/kit/src/runtime/utils.js","../../../node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@6.2.1_svelte@5.56.2_@typescript-eslin_ab9783a66cb0903e3d7671d76a7b88a3/node_modules/@sveltejs/kit/src/exports/index.js"],"sourcesContent":["/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nexport class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\ttry {\n\t\t\tnew Headers({ location });\n\t\t} catch {\n\t\t\tthrow new Error(\n\t\t\t\t`Invalid redirect location ${JSON.stringify(location)}: ` +\n\t\t\t\t\t'this string contains characters that cannot be used in HTTP headers'\n\t\t\t);\n\t\t}\n\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404.\n * `SvelteKitError` goes through `handleError`.\n * @extends Error\n */\nexport class SvelteKitError extends Error {\n\t/**\n\t * @param {number} status\n\t * @param {string} text\n\t * @param {string} message\n\t */\n\tconstructor(status, text, message) {\n\t\tsuper(message);\n\t\tthis.status = status;\n\t\tthis.text = text;\n\t}\n}\n\n/**\n * @template [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} data\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * Error thrown when form validation fails imperatively\n */\nexport class ValidationError extends Error {\n\t/**\n\t * @param {StandardSchemaV1.Issue[]} issues\n\t */\n\tconstructor(issues) {\n\t\tsuper('Validation failed');\n\t\tthis.name = 'ValidationError';\n\t\tthis.issues = issues;\n\t}\n}\n\nexport { init_remote_functions } from './remote-functions.js';\n","import { BROWSER } from 'esm-env';\n\nexport const text_encoder = new TextEncoder();\n\n/**\n * Like node's path.relative, but without using node\n * @param {string} from\n * @param {string} to\n */\nexport function get_relative_path(from, to) {\n\tconst from_parts = from.split(/[/\\\\]/);\n\tconst to_parts = to.split(/[/\\\\]/);\n\tfrom_parts.pop(); // get dirname\n\n\twhile (from_parts[0] === to_parts[0]) {\n\t\tfrom_parts.shift();\n\t\tto_parts.shift();\n\t}\n\n\tlet i = from_parts.length;\n\twhile (i--) from_parts[i] = '..';\n\n\treturn from_parts.concat(to_parts).join('/');\n}\n\n/**\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nexport function base64_encode(bytes) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\treturn globalThis.Buffer.from(bytes).toString('base64');\n\t}\n\n\tlet binary = '';\n\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary);\n}\n\n/**\n * @param {string} encoded\n * @returns {Uint8Array}\n */\nexport function base64_decode(encoded) {\n\t// Using `Buffer` is faster than iterating\n\tif (!BROWSER && globalThis.Buffer) {\n\t\tconst buffer = globalThis.Buffer.from(encoded, 'base64');\n\t\treturn new Uint8Array(buffer);\n\t}\n\n\tconst binary = atob(encoded);\n\tconst bytes = new Uint8Array(binary.length);\n\n\tfor (let i = 0; i < binary.length; i++) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\n\treturn bytes;\n}\n","/** @import { StandardSchemaV1 } from '@standard-schema/spec' */\n\nimport { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js';\nimport { BROWSER, DEV } from 'esm-env';\nimport {\n\tadd_data_suffix,\n\tadd_resolution_suffix,\n\thas_data_suffix,\n\thas_resolution_suffix,\n\tstrip_data_suffix,\n\tstrip_resolution_suffix\n} from '../runtime/pathname.js';\nimport { text_encoder } from '../runtime/utils.js';\n\nexport { VERSION } from '../version.js';\n\n// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change)\n/**\n * @template {number} TNumber\n * @template {any[]} [TArray=[]]\n * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>} LessThan\n */\n\n/**\n * @template {number} TStart\n * @template {number} TEnd\n * @typedef {Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>} NumericRange\n */\n\n// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits\n// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780\n\n// we have to repeat the JSDoc because the display for function overloads is broken\n// see https://github.com/microsoft/TypeScript/issues/55056\n\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {App.Error} body\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @overload\n * @param {number} status\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body]\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\n/**\n * Throws an error with a HTTP status code and an optional message.\n * When called during request handling, this will cause SvelteKit to\n * return an error response without invoking `handleError`.\n * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.\n * @return {never}\n * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.\n * @throws {Error} If the provided status is invalid (not between 400 and 599).\n */\nexport function error(status, body) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) {\n\t\tthrow new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`);\n\t}\n\n\tthrow new HttpError(status, body);\n}\n\n/**\n * Checks whether this is an error thrown by {@link error}.\n * @template {number} T\n * @param {unknown} e\n * @param {T} [status] The status to filter for.\n * @return {e is (HttpError & { status: T extends undefined ? never : T })}\n */\nexport function isHttpError(e, status) {\n\tif (!(e instanceof HttpError)) return false;\n\treturn !status || e.status === status;\n}\n\n/**\n * Redirect a request. When called during request handling, SvelteKit will return a redirect response.\n * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.\n *\n * Most common status codes:\n * * `303 See Other`: redirect as a GET request (often used after a form POST request)\n * * `307 Temporary Redirect`: redirect will keep the request method\n * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page\n *\n * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)\n *\n * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.\n * @param {string | URL} location The location to redirect to.\n * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.\n * @throws {Error} If the provided status is invalid or the location cannot be used as a header value.\n * @return {never}\n */\nexport function redirect(status, location) {\n\tif ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) {\n\t\tthrow new Error('Invalid status code');\n\t}\n\n\tthrow new Redirect(\n\t\t// @ts-ignore\n\t\tstatus,\n\t\tlocation.toString()\n\t);\n}\n\n/**\n * Checks whether this is a redirect thrown by {@link redirect}.\n * @param {unknown} e The object to check.\n * @return {e is Redirect}\n */\nexport function isRedirect(e) {\n\treturn e instanceof Redirect;\n}\n\n/**\n * Create a JSON `Response` object from the supplied data.\n * @param {any} data The value that will be serialized as JSON.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.\n */\nexport function json(data, init) {\n\t// TODO deprecate this in favour of `Response.json` when it's\n\t// more widely supported\n\tconst body = JSON.stringify(data);\n\n\t// we can't just do `text(JSON.stringify(data), init)` because\n\t// it will set a default `content-type` header. duplicated code\n\t// means less duplicated work\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\theaders.set('content-length', text_encoder.encode(body).byteLength.toString());\n\t}\n\n\tif (!headers.has('content-type')) {\n\t\theaders.set('content-type', 'application/json');\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create a `Response` object from the supplied body.\n * @param {string} body The value that will be used as-is.\n * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.\n */\nexport function text(body, init) {\n\tconst headers = new Headers(init?.headers);\n\tif (!headers.has('content-length')) {\n\t\tconst encoded = text_encoder.encode(body);\n\t\theaders.set('content-length', encoded.byteLength.toString());\n\t\treturn new Response(encoded, {\n\t\t\t...init,\n\t\t\theaders\n\t\t});\n\t}\n\n\treturn new Response(body, {\n\t\t...init,\n\t\theaders\n\t});\n}\n\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @overload\n * @param {number} status\n * @returns {import('./public.js').ActionFailure<undefined>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @template [T=undefined]\n * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.\n * @param {T} data Data associated with the failure (e.g. validation errors)\n * @overload\n * @param {number} status\n * @param {T} data\n * @returns {import('./public.js').ActionFailure<T>}\n */\n/**\n * Create an `ActionFailure` object. Call when form submission fails.\n * @param {number} status\n * @param {any} [data]\n * @returns {import('./public.js').ActionFailure<any>}\n */\nexport function fail(status, data) {\n\t// @ts-expect-error unique symbol missing\n\treturn new ActionFailure(status, data);\n}\n\n/**\n * Checks whether this is an action failure thrown by {@link fail}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n */\nexport function isActionFailure(e) {\n\treturn e instanceof ActionFailure;\n}\n\n/**\n * Use this to throw a validation error to imperatively fail form validation.\n * Can be used in combination with `issue` passed to form actions to create field-specific issues.\n *\n * @example\n * ```ts\n * import { invalid } from '@sveltejs/kit';\n * import { form } from '$app/server';\n * import { tryLogin } from '$lib/server/auth';\n * import * as v from 'valibot';\n *\n * export const login = form(\n * v.object({ name: v.string(), _password: v.string() }),\n * async ({ name, _password }) => {\n * const success = tryLogin(name, _password);\n * if (!success) {\n * invalid('Incorrect username or password');\n * }\n *\n * // ...\n * }\n * );\n * ```\n * @param {...(StandardSchemaV1.Issue | string)} issues\n * @returns {never}\n * @since 2.47.3\n */\nexport function invalid(...issues) {\n\tthrow new ValidationError(\n\t\tissues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue))\n\t);\n}\n\n/**\n * Checks whether this is an validation error thrown by {@link invalid}.\n * @param {unknown} e The object to check.\n * @return {e is import('./public.js').ActionFailure}\n * @since 2.47.3\n */\nexport function isValidationError(e) {\n\treturn e instanceof ValidationError;\n}\n\n/**\n * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname.\n * Returns the normalized URL as well as a method for adding the potential suffix back\n * based on a new pathname (possibly including search) or URL.\n * ```js\n * import { normalizeUrl } from '@sveltejs/kit';\n *\n * const { url, denormalize } = normalizeUrl('/blog/post/__data.json');\n * console.log(url.pathname); // /blog/post\n * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json\n * ```\n * @param {URL | string} url\n * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }}\n * @since 2.18.0\n */\nexport function normalizeUrl(url) {\n\turl = new URL(url, 'a://a');\n\n\tconst is_route_resolution = has_resolution_suffix(url.pathname);\n\tconst is_data_request = has_data_suffix(url.pathname);\n\tconst has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/');\n\n\tif (is_route_resolution) {\n\t\turl.pathname = strip_resolution_suffix(url.pathname);\n\t} else if (is_data_request) {\n\t\turl.pathname = strip_data_suffix(url.pathname);\n\t} else if (has_trailing_slash) {\n\t\turl.pathname = url.pathname.slice(0, -1);\n\t}\n\n\treturn {\n\t\turl,\n\t\twasNormalized: is_data_request || is_route_resolution || has_trailing_slash,\n\t\tdenormalize: (new_url = url) => {\n\t\t\tnew_url = new URL(new_url, url);\n\t\t\tif (is_route_resolution) {\n\t\t\t\tnew_url.pathname = add_resolution_suffix(new_url.pathname);\n\t\t\t} else if (is_data_request) {\n\t\t\t\tnew_url.pathname = add_data_suffix(new_url.pathname);\n\t\t\t} else if (has_trailing_slash && !new_url.pathname.endsWith('/')) {\n\t\t\t\tnew_url.pathname += '/';\n\t\t\t}\n\t\t\treturn new_url;\n\t\t}\n\t};\n}\n"],"names":[],"mappings":"AAAA;;AAEO,MAAM,SAAS,CAAC;AACvB;AACA;AACA;AACA;AACA,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE;AAC3B,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM;AACtB,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAChC,GAAG,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,IAAI,EAA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AQ,EAAE,CAAC;AAChF,CAAC;;AAED,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;AACnC,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC;AACjD,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACjC,CAAC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC3C,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AACrC,EAAE,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC;AAC3C,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC9D,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;AAC/B,GAAG,GAAG,IAAI;AACV,GAAG;AACH,GAAG,CAAC;AACJ,CAAC;;AAED,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC3B,EAAE,GAAG,IAAI;AACT,EAAE;AACF,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util-DS6EORSM.js","sources":["../../../.svelte-kit/adapter-node/chunks/util.js"],"sourcesContent":["import { c as createLogger } from \"./log.js\";\nimport { r as resolve } from \"./server2.js\";\nconst logger = createLogger();\nfunction unique(arr) {\n return [...new Set(arr)];\n}\nasync function uploadImage(path, f, name) {\n logger.debug(\"Uploading image from blob\", name, \"to\", path);\n const formData = new FormData();\n formData.append(\"file\", f);\n formData.append(\"filename\", name);\n formData.append(\"filetype\", f.type);\n let reqpath;\n if (path.character !== void 0) {\n reqpath = resolve(`/api/characters/upload-image?for=${path.for}`);\n } else {\n reqpath = resolve(\"/api/gallery/[...gallerypath]/upload-image\", { gallerypath: path.gallery });\n }\n const res = await fetch(reqpath, {\n method: \"POST\",\n body: formData\n });\n const json = await res.json();\n let thumbnail = void 0;\n if (typeof json === \"object\" && \"tname\" in json && typeof json.tname === \"string\") {\n thumbnail = json.tname;\n }\n if (typeof json === \"object\" && \"fname\" in json && typeof json.fname === \"string\") {\n const ret = { filename: json.fname, thumbnail };\n logger.debug(\"Upload complete:\", ret);\n return ret;\n }\n throw new Error(\n `return value from image upload did not contain expected filename: ${JSON.stringify(json)}`\n );\n}\nfunction truthy(t) {\n return !!t;\n}\nexport {\n unique as a,\n truthy as t,\n uploadImage as u\n};\n"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG,YAAY,EAAE;AAC7B,SAAS,MAAM,CAAC,GAAG,EAAE;AACrB,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1B;AACA,eAAe,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;AAC1C,EAAE,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC7D,EAAE,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE;AACjC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5B,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC;AACnC,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC;AACrC,EAAE,IAAI,OAAO;AACb,EAAE,IAAI,IAAI,CAAC,SAAS,KAAK,MAAM,EAAE;AACjC,IAAI,OAAO,GAAG,OAAO,CAAC,CAAC,iCAAiC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,EAAE,CAAC,MAAM;AACT,IAAI,OAAO,GAAG,OAAO,CAAC,4CAA4C,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;AAClG,EAAE;AACF,EAAE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE;AACnC,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,IAAI,EAAE;AACV,GAAG,CAAC;AACJ,EAAE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE;AAC/B,EAAE,IAAI,SAAS,GAAG,MAAM;AACxB,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;AACrF,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK;AAC1B,EAAE;AACF,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;AACrF,IAAI,MAAM,GAAG,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE;AACnD,IAAI,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC;AACzC,IAAI,OAAO,GAAG;AACd,EAAE;AACF,EAAE,MAAM,IAAI,KAAK;AACjB,IAAI,CAAC,kEAAkE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9F,GAAG;AACH;AACA,SAAS,MAAM,CAAC,CAAC,EAAE;AACnB,EAAE,OAAO,CAAC,CAAC,CAAC;AACZ;;;;"}
|
/package/build/client/editor/_app/immutable/assets/{ImageEdit.CXTVejeF.css → TextBox.CXTVejeF.css}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|