@abtnode/webapp 1.16.32-beta-04a5da00 → 1.16.32-beta-4d47ae7f
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-DAhuXmJ1.js → Add-dnfsKeWz.js} +1 -1
- package/dist/assets/{ArrowDropDown-C-N10Amf.js → ArrowDropDown-D5yKgLtP.js} +1 -1
- package/dist/assets/{Autocomplete-CAASvyWi.js → Autocomplete-BSn-5DMw.js} +1 -1
- package/dist/assets/{Breadcrumbs-UBhuabmW.js → Breadcrumbs-C1yNv4P4.js} +1 -1
- package/dist/assets/{ButtonGroup-BCRFvUIs.js → ButtonGroup-rj0U42N7.js} +1 -1
- package/dist/assets/{CheckCircle-B1OfEs-V.js → CheckCircle-DPohrgKR.js} +1 -1
- package/dist/assets/{ChevronLeft-aad23IwV.js → ChevronLeft-BklOCwb5.js} +1 -1
- package/dist/assets/{ChevronRight-BUIMq7Nq.js → ChevronRight-Cy5oOgJM.js} +1 -1
- package/dist/assets/{Close-BVLxGhqf.js → Close-8IwpjhC5.js} +1 -1
- package/dist/assets/{Delete-BRWePean.js → Delete-B0fykqSv.js} +1 -1
- package/dist/assets/{DeleteOutline-BNzcbICD.js → DeleteOutline-DEgVfrUs.js} +1 -1
- package/dist/assets/{Done-5TItrtsm.js → Done-BtTm21Vc.js} +1 -1
- package/dist/assets/{Edit-nWZYAw8W.js → Edit-DNMwtJ42.js} +1 -1
- package/dist/assets/{EditIcon-BDQYGQAE.js → EditIcon-BWg3vQRC.js} +1 -1
- package/dist/assets/{ExpandMore-Xg-kLmr9.js → ExpandMore-w7mBNAbG.js} +1 -1
- package/dist/assets/{FilterList-BdP9J-wV.js → FilterList-DhkfKYuD.js} +1 -1
- package/dist/assets/{Google-C6UiHFa0.js → Google-3qO0oUTH.js} +1 -1
- package/dist/assets/{Https-CgyGFjQZ.js → Https-CogpIPjb.js} +1 -1
- package/dist/assets/{InputAdornment-CLNpGzfL.js → InputAdornment-C4wvo3mY.js} +1 -1
- package/dist/assets/{InputLabel-DS6GLy5V.js → InputLabel-Dk0k1wxQ.js} +1 -1
- package/dist/assets/{LastPage-CwzRxQNH.js → LastPage-CK19i1GM.js} +1 -1
- package/dist/assets/{Launch-qR9d30uC.js → Launch-5hm3IlRc.js} +1 -1
- package/dist/assets/{Link-BI5l28az.js → Link-BREsjd_K.js} +1 -1
- package/dist/assets/{LoadingButton-BfHt3xng.js → LoadingButton-D1zztI8Y.js} +1 -1
- package/dist/assets/{LockIcon-DK1BOt7K.js → LockIcon--V5Fr4Qv.js} +1 -1
- package/dist/assets/{Loop-Dt_-Q4IM.js → Loop-CCCvJbPZ.js} +1 -1
- package/dist/assets/{MoreHoriz-DcAnQoa0.js → MoreHoriz-CgE1nQjP.js} +1 -1
- package/dist/assets/{MoreVert-DIRoN8EP.js → MoreVert-B2z5RSzn.js} +1 -1
- package/dist/assets/{Pagination-DtpYqViF.js → Pagination-BqebM3WP.js} +1 -1
- package/dist/assets/{Public-AVxa4I55.js → Public-CNSkavrM.js} +1 -1
- package/dist/assets/{SchemaReference.es-VhNWmDRq.js → SchemaReference.es-Czd8VjNU.js} +1 -1
- package/dist/assets/{Search-BkXnaF-1.js → Search-DiD8rSmP.js} +1 -1
- package/dist/assets/{Select-_CZTaseY.js → Select-C9dnMaBi.js} +1 -1
- package/dist/assets/{Skeleton-CvnVrBp6.js → Skeleton-CgfCVzTR.js} +1 -1
- package/dist/assets/{Slider-C9M3KOKF.js → Slider-C9ATxrld.js} +1 -1
- package/dist/assets/{Stepper-BPCzoss2.js → Stepper-DbXOEvNn.js} +1 -1
- package/dist/assets/{TextField-s3PjFgNL.js → TextField-DVBgajf0.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-uTYhFmax.js → ToggleButtonGroup-CIYQdG-6.js} +1 -1
- package/dist/assets/{ViewList-BX_F3ewn.js → ViewList-CfaSgmZ_.js} +1 -1
- package/dist/assets/{actions-DvtkfsBD.js → actions-CYOtciGG.js} +1 -1
- package/dist/assets/{actions-C-KjbqKb.js → actions-DX1xw5S7.js} +1 -1
- package/dist/assets/{agreement-BlHdQOu0.js → agreement-Dl7_pFXc.js} +1 -1
- package/dist/assets/api-DYXwBG9u.js +1 -0
- package/dist/assets/{app-avatar-DaU2r4-K.js → app-avatar-CgIjV1PQ.js} +1 -1
- package/dist/assets/{audit-logs-BowEovBa.js → audit-logs-Cr1uhYQQ.js} +1 -1
- package/dist/assets/blocklet-uada39gX.js +1 -0
- package/dist/assets/{brace-fold.es-DwwFaaS_.js → brace-fold.es-B-MIKlDJ.js} +1 -1
- package/dist/assets/{bundle-avatar-DwSCgSDH.js → bundle-avatar-BBqlxK_u.js} +1 -1
- package/dist/assets/{chart-CWyf6SJc.js → chart-i8lNbY7K.js} +1 -1
- package/dist/assets/{click-to-copy-DLb2KMQf.js → click-to-copy-DB7iKgQI.js} +1 -1
- package/dist/assets/{closebrackets.es-oyoaS3zK.js → closebrackets.es-j1eDGXwE.js} +1 -1
- package/dist/assets/{codemirror.es-g-VpeCS8.js → codemirror.es-BOzJFD5o.js} +1 -1
- package/dist/assets/{comment.es-BzEi7FX2.js → comment.es-DtR3S6b9.js} +1 -1
- package/dist/assets/{config-navigation-BXlcxf9z.js → config-navigation-CUr1lk5l.js} +1 -1
- package/dist/assets/{delete-confirm-lfp_3VFJ.js → delete-confirm-BK6NDdtj.js} +1 -1
- package/dist/assets/{detail-BCfiAWgS.js → detail-BNXtHfSr.js} +3 -3
- package/dist/assets/{dialog.es-i4ZxISO3.js → dialog.es-TaLKdDsD.js} +1 -1
- package/dist/assets/{download-tPUJmguR.js → download-DcJQb3qH.js} +1 -1
- package/dist/assets/{foldgutter.es-CAmpFR3u.js → foldgutter.es-Dy4azD1D.js} +1 -1
- package/dist/assets/getValidReactChildren-CWIs5P8J.js +1 -0
- package/dist/assets/{hint.es-RD7Abd4q.js → hint.es-u77uAf0G.js} +1 -1
- package/dist/assets/{hint.es2-Cdlixz2r.js → hint.es2-DwJHlvJJ.js} +1 -1
- package/dist/assets/{iframe-CQaZXCQF.js → iframe-BQmWj7PI.js} +1 -1
- package/dist/assets/{index-BQhzyzVs.js → index-0MBL3T74.js} +1 -1
- package/dist/assets/{index-C5X9a7cc.js → index-8YS3tvqQ.js} +1 -1
- package/dist/assets/{index-CrPqLlr1.js → index-AfGDhKem.js} +1 -1
- package/dist/assets/{index-DSc5Ifom.js → index-BA8q4T5d.js} +1 -1
- package/dist/assets/{index-Cb_bB7kh.js → index-BC2YsQtX.js} +1 -1
- package/dist/assets/{index-Ch5YEO2u.js → index-BEBt2OVN.js} +1 -1
- package/dist/assets/{index-BeUG4zog.js → index-BEEITpm2.js} +1 -1
- package/dist/assets/{index-B1OmL87T.js → index-BK3y8xZc.js} +1 -1
- package/dist/assets/{index-GdO1eONN.js → index-BN4cj6Ge.js} +3 -3
- package/dist/assets/{index-CKq30dWL.js → index-BR6RAeFJ.js} +1 -1
- package/dist/assets/{index-DGLsN6jA.js → index-BRgfWHhj.js} +1 -1
- package/dist/assets/{index-BBDmvM0V.js → index-BSDY11-t.js} +1 -1
- package/dist/assets/{index-Dw0vqdTl.js → index-BT6VGB9G.js} +1 -1
- package/dist/assets/{index-_8dyjhUy.js → index-BX4iEp1D.js} +1 -1
- package/dist/assets/{index-DHYjjr2A.js → index-BfRxX64H.js} +1 -1
- package/dist/assets/{index-Cx9r7Bw-.js → index-Bnq8YC_d.js} +1 -1
- package/dist/assets/{index-CTZJ4N-O.js → index-Bva9O3_u.js} +1 -1
- package/dist/assets/{index-BvofXJ2V.js → index-BxGkIZkv.js} +1 -1
- package/dist/assets/{index-DfSHgbPL.js → index-ByWyjM2a.js} +1 -1
- package/dist/assets/{index-COlbopzU.js → index-CF2SXTd_.js} +1 -1
- package/dist/assets/{index-CGLq3fFG.js → index-CGOUaJ_z.js} +1 -1
- package/dist/assets/{index-B1ahK-2I.js → index-CKU0PpEw.js} +2 -2
- package/dist/assets/{index-9rj31wlW.js → index-CLaUBzpx.js} +1 -1
- package/dist/assets/{index-DXp6uQcX.js → index-CV3ryoS4.js} +1 -1
- package/dist/assets/{index-BTZLTyBO.js → index-CVPBRbm1.js} +1 -1
- package/dist/assets/{index-2urvy1x8.js → index-Ce7_NM_l.js} +5 -5
- package/dist/assets/{index-CYRsRd2j.js → index-CoH2bFyE.js} +1 -1
- package/dist/assets/{index-enOTN9ar.js → index-Cp3qTuzw.js} +1 -1
- package/dist/assets/{index-cJ5JnE9Y.js → index-Cvvgotet.js} +1 -1
- package/dist/assets/{index-BE_-Llg6.js → index-DF7t5ulw.js} +1 -1
- package/dist/assets/{index-CE2nv6FG.js → index-DGyfdk8f.js} +1 -1
- package/dist/assets/{index-SR8pTZR1.js → index-DPcAeqds.js} +1 -1
- package/dist/assets/{index-BlTu0Z2Q.js → index-DZQS_4gu.js} +1 -1
- package/dist/assets/{index-BMLIhSHw.js → index-DZjB4N8F.js} +1 -1
- package/dist/assets/{index-AH6-CvHc.js → index-Dg1KeOMS.js} +1 -1
- package/dist/assets/{index-BMAP1AB4.js → index-Dg4p7m7g.js} +1 -1
- package/dist/assets/{index-DtiWySTZ.js → index-Dm-4lIW1.js} +1 -1
- package/dist/assets/{index-CxZjc-gj.js → index-Dp1i8yMQ.js} +1 -1
- package/dist/assets/{index-BUOXYT7X.js → index-R9IrSene.js} +3 -3
- package/dist/assets/{index-JdHcWmyW.js → index-Ro8S3v1v.js} +2 -2
- package/dist/assets/{index-CuXg_ZaK.js → index-_57evWXG.js} +1 -1
- package/dist/assets/{index-DzfRFxAA.js → index-sx4u53xb.js} +1 -1
- package/dist/assets/{index-DGuKpTxy.js → index-yU18hYDn.js} +1 -1
- package/dist/assets/{index.es-BLLlydG4.js → index.es-CNAugZ9D.js} +1 -1
- package/dist/assets/{index.esm-Dn548FrI.js → index.esm-CbROOlWk.js} +1 -1
- package/dist/assets/{info-addon.es-CitM4bMJ.js → info-addon.es-BJXbjQmj.js} +1 -1
- package/dist/assets/{info.es-U16lfRIu.js → info.es-CnO41P_j.js} +1 -1
- package/dist/assets/{install-from-url-De3qslJe.js → install-from-url-CYqL_tS8.js} +1 -1
- package/dist/assets/{invitation-BL8ckd5a.js → invitation-Dkr7HTfM.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-C7ZHgYDw.js → is-path-prefix-equal-dM_7v7sm.js} +1 -1
- package/dist/assets/{isEqual-CsmMcSuc.js → isEqual-CWkOkE3q.js} +1 -1
- package/dist/assets/{item-COR877Y7.js → item-Dfdy3fBF.js} +1 -1
- package/dist/assets/{javascript.es-aiCWKHMT.js → javascript.es-1zj6tny8.js} +1 -1
- package/dist/assets/{jump-to-line.es-B57loqaV.js → jump-to-line.es-B52gKugW.js} +1 -1
- package/dist/assets/{jump.es-DN7DQdT-.js → jump.es-DEfCvlSx.js} +1 -1
- package/dist/assets/{line-BbyRx9SO.js → line-DJF9U3Hn.js} +3 -3
- package/dist/assets/{lint.es-BjRh9GWD.js → lint.es-Cr4lTT47.js} +1 -1
- package/dist/assets/{lint.es2-BE-_vzHy.js → lint.es2-CG8CQOKj.js} +1 -1
- package/dist/assets/{lint.es3-CLLx2W8W.js → lint.es3-tZUxhQQv.js} +1 -1
- package/dist/assets/{list-header-C7QBrUa7.js → list-header-D-2TeKGc.js} +1 -1
- package/dist/assets/{log-BEbnTZZk.js → log-CCZylFBp.js} +1 -1
- package/dist/assets/{lottie-CtZDSDCx.js → lottie-BYjrbQZi.js} +1 -1
- package/dist/assets/{matchbrackets.es--bW5AU6Z.js → matchbrackets.es-C5S4hCvt.js} +1 -1
- package/dist/assets/{memory-CLAyz0qg.js → memory-CCJf6Oap.js} +1 -1
- package/dist/assets/{mode.es-DfELLuC7.js → mode.es-Cftfqo0_.js} +1 -1
- package/dist/assets/{mode.es2-BSqgBS-A.js → mode.es2-23_w6MZe.js} +1 -1
- package/dist/assets/{mode.es3-CkjBPJwA.js → mode.es3-DIim34HU.js} +1 -1
- package/dist/assets/{onlineParser.es-CjDm9qzw.js → onlineParser.es-c9pwtp6F.js} +1 -1
- package/dist/assets/{overview-D6hkcgGB.js → overview-DFU3sn32.js} +1 -1
- package/dist/assets/{react-BID-V9dy.js → react-v4Fmho2P.js} +3 -3
- package/dist/assets/{redux-_AC4VJGq.js → redux-Deq08ymq.js} +1 -1
- package/dist/assets/{resource-dialog-3h3yAvkC.js → resource-dialog-B_GC7Wxr.js} +1 -1
- package/dist/assets/{runtime-Bb4UUdI0.js → runtime-BU8s3Bm9.js} +1 -1
- package/dist/assets/{schema-BY5sl2-H.js → schema-9CKP9bpC.js} +1 -1
- package/dist/assets/sdk-CmnXPS9s.js +1 -0
- package/dist/assets/{search.es-DFzVaahw.js → search.es-BBUTlD5z.js} +1 -1
- package/dist/assets/{searchcursor.es-B6izKcHD.js → searchcursor.es-B01leWAX.js} +1 -1
- package/dist/assets/service-hS_k_yhL.js +1 -0
- package/dist/assets/{shorten-label-BVjBo-Di.js → shorten-label-CWSupRVi.js} +1 -1
- package/dist/assets/{show-hint.es-8Vjxa886.js → show-hint.es-D5cxnYFx.js} +1 -1
- package/dist/assets/{slicedToArray-9D5F9PAz.js → slicedToArray-CZpLbkLy.js} +1 -1
- package/dist/assets/{spaces-oE7wS1Bm.js → spaces-hi4ftAfe.js} +1 -1
- package/dist/assets/{status-Ca8qwT5I.js → status-CK93XHvg.js} +1 -1
- package/dist/assets/{sublime.es-s81PLoJW.js → sublime.es-BpQZvmGp.js} +1 -1
- package/dist/assets/{switch-control-B71IvTSN.js → switch-control-CJEXTYUM.js} +1 -1
- package/dist/assets/{table-icons-Y18_UHJP.js → table-icons-Cx83vwiQ.js} +1 -1
- package/dist/assets/{team-B91lHyZ2.js → team-CBAJp8tp.js} +1 -1
- package/dist/assets/{toUpper-Ci7HX04C.js → toUpper-ytGltLlY.js} +1 -1
- package/dist/assets/{traffic-DwUZrFe9.js → traffic-DufPWisE.js} +1 -1
- package/dist/assets/{url-evaluation-D1BRyZ9U.js → url-evaluation-C4OHH0Ug.js} +1 -1
- package/dist/assets/{url-join-sQxThqCr.js → url-join-O3PI6xjl.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-ChleEcCM.js → use-blocklet-info-for-connect-did-spaces-DJY1Mwej.js} +1 -1
- package/dist/assets/{useLocalStorage-BE8pQq9o.js → useLocalStorage-B5JaxT-E.js} +1 -1
- package/dist/assets/{useThemeProps-BXhGf-7k.js → useThemeProps-AvaZ9peg.js} +1 -1
- package/dist/assets/{util-BJBtVSNx.js → util-j-puprzy.js} +1 -1
- package/dist/assets/{wait-container-mOzU7w1w.js → wait-container-DALbMZLf.js} +1 -1
- package/dist/assets/{withStyles-iFEvNGyW.js → withStyles-EplDP6p4.js} +1 -1
- package/dist/assets/{wrap-locale-P1NWYJW8.js → wrap-locale-B2waNGO5.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-6dUIEDVl.js +0 -1
- package/dist/assets/blocklet-CjG3S1lO.js +0 -1
- package/dist/assets/getValidReactChildren-DDuHQUQL.js +0 -1
- package/dist/assets/sdk-DWrnJTtv.js +0 -1
- package/dist/assets/service-DUfhniW5.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
var _m=Object.defineProperty;var Pm=(i,e,t)=>e in i?_m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Le=(i,e,t)=>Pm(i,typeof e!="symbol"?e+"":e,t);import{bJ as Sm,j as st,hM as Fm,dm as Cm,fb as Em,g as Ft,hN as Tm,hO as hd,hP as fd,hQ as md,cL as gd,eU as So,dw as gi,hR as wr,P as N,r as he,cN as Nc,c1 as Mc,av as km,fH as Am,bn as vd,aO as Dm,J as Om,hS as Lc,dH as Im,Q as bd,a2 as Rm,he as Bc,hT as Um,fg as Nm,dk as Mm}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BN4cj6Ge.js","./index-CKU0PpEw.js","./index-BEj64JY8.css","./TextField-DVBgajf0.js","./Select-C9dnMaBi.js","./InputLabel-Dk0k1wxQ.js","./status-CK93XHvg.js","./Delete-B0fykqSv.js","./url-evaluation-C4OHH0Ug.js","./Slider-C9ATxrld.js","./Skeleton-CgfCVzTR.js","./Close-8IwpjhC5.js","./index-DF7t5ulw.js","./preact.module-DJUF--8d.js","./index-BR6RAeFJ.js","./index-0MBL3T74.js","./memoize-one.esm-BdPwpGay.js","./index-Dg4p7m7g.js","./ExpandMore-w7mBNAbG.js","./resource-dialog-B_GC7Wxr.js","./index-CF2SXTd_.js","./index-DZjB4N8F.js","./index-BC2YsQtX.js","./index-AfGDhKem.js","./index-yU18hYDn.js","./FilterList-DhkfKYuD.js","./useThemeProps-AvaZ9peg.js","./LastPage-CK19i1GM.js","./index-Dg1KeOMS.js","./redux-Deq08ymq.js","./Search-DiD8rSmP.js","./MoreVert-B2z5RSzn.js","./index-BK3y8xZc.js","./url-join-O3PI6xjl.js","./toUpper-ytGltLlY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var _m=Object.defineProperty;var Pm=(i,e,t)=>e in i?_m(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Le=(i,e,t)=>Pm(i,typeof e!="symbol"?e+"":e,t);import{bJ as Sm,j as st,hM as Fm,dm as Cm,fb as Em,g as Ft,hN as Tm,hO as hd,hP as fd,hQ as md,cL as gd,eU as So,dw as gi,hR as wr,P as N,r as he,cN as Nc,c1 as Mc,av as km,fH as Am,bn as vd,aO as Dm,J as Om,hS as Lc,dH as Im,Q as bd,a2 as Rm,he as Bc,hT as Um,fg as Nm,dk as Mm}from"./index-CKU0PpEw.js";import{u as Lm}from"./index-DF7t5ulw.js";import{B as zc,_ as d,b as ii,l as Bm,k as mi,H as si,m as zm,E as yd}from"./preact.module-DJUF--8d.js";import{a as jm}from"./index-BR6RAeFJ.js";import{c as Se}from"./index-0MBL3T74.js";import{m as jc}from"./memoize-one.esm-BdPwpGay.js";import"./index-Dg4p7m7g.js";import{W as $m}from"./resource-dialog-B_GC7Wxr.js";import"./index-CF2SXTd_.js";import"./index-DZjB4N8F.js";import"./index-BC2YsQtX.js";import"./index-AfGDhKem.js";import"./index-yU18hYDn.js";import{p as Hm}from"./index-BK3y8xZc.js";import{j as Hs}from"./url-join-O3PI6xjl.js";import{u as xd,t as qm}from"./toUpper-ytGltLlY.js";const Wm=Sm(st.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");function Vm(i,e,t,n){for(var a=-1,s=i==null?0:i.length;++a<s;){var o=i[a];e(n,o,t(o),i)}return n}var Gm=Vm,Km=Fm;function Xm(i,e,t,n){return Km(i,function(a,s,o){e(n,a,t(a),o)}),n}var Ym=Xm,Qm=Gm,Zm=Ym,Jm=Cm,eg=Em;function tg(i,e){return function(t,n){var a=eg(t)?Qm:Zm,s=e?e():{};return a(t,i,Jm(n),s)}}var ig=tg,ng=Tm,ag=ig,sg=ag(function(i,e,t){ng(i,t,e)}),og=sg;const wd=Ft(og);function is(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var rg=0;function _d(i){return"__private_"+rg+++"_"+i}function lg(i,e,t){const n=[];return i.forEach(a=>typeof a!="string"?n.push(a):e[Symbol.split](a).forEach((s,o,r)=>{s!==""&&n.push(s),o<r.length-1&&n.push(t)})),n}/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
5
5
|
*
|
|
@@ -53,5 +53,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
53
53
|
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
|
|
54
54
|
</div>
|
|
55
55
|
`,n.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(n,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Le(this,"convertImgToObject",wr(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(n=>{var l;if(!(n!=null&&n.src))return;const{src:a}=n,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(u=>u.previewUrl===a),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=U_(s.originalname),[".mp4",".webm"].find(u=>{var p;return(p=n.src)==null?void 0:p.endsWith(u)})){const u=document.createElement("video");u.src=n.src,u.width=n.width,u.height=n.height,u.autoplay=!0,u.setAttribute("playsinline","playsinline"),u.muted=!0,u.loop=!0,u.style="pointer-events: none;",o.appendChild(u)}else{const u=document.createElement("object");u.data=a,u.type=s.mimetype||"image/png",u.alt=s.originalname,u.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",u.loading="lazy",o.appendChild(u)}o.appendChild(r),n.parentNode.replaceChild(o,n)}),this.canConvertImgToObject=!1)},{wait:200}));Le(this,"resetState",()=>{this.uploadedAPIData={...Yp},this.uploaded.setPluginState({...Qp}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...Yp},this.addUploadItemFlag=!0,this.icon=()=>Pe("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[Pe("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),Pe("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),Pe("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),Pe("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var n;return!this.uploadedAPIData.loading&&((n=this.uploadedAPIData.files)==null?void 0:n.length)===0&&this.queryUploadedFromMediaKit(),Pe("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new uc(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Qp}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(n,a)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===a._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==a._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,a]}))},this.view.donePicking=()=>{const{currentSelection:n}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",n),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=n=>{const{scrollHeight:a,scrollTop:s,offsetHeight:o}=n.target;a-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Zp={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},Jp={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},em={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},k3={...em,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class A3 extends ke{constructor(t,n){super(t,n);Le(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await yn.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=xd([...t.resources.map(n=>{let a="file";const{filename:s}=n,o=eo(s);return a=eo(s,400),{filename:s,_id:s,id:s,name:s,icon:a,previewUrl:a,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});Le(this,"resetState",()=>{this.apiData={...Zp},this.resources.setPluginState({...Jp})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...Zp},this.icon=()=>Pe("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[Pe("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),Pe("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),Pe("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),Pe("div",{id:"resources",className:"uploaded",children:[Pe("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(n=>Pe("button",{style:this.apiData.componentDid===n.did?k3:em,id:n.componentDid,onClick:()=>{this.apiData.componentDid!==n.did&&(this.apiData.componentDid=n.did,this.queryResources())},children:qm(n.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new uc(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Jp}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(n,a)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===a.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==a.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,a]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:n}=this.resources.getPluginState();this.uppy.emit("uploaded:selected",n),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var D3=Am();const O3=Ft(D3);/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:tm,setPrototypeOf:ed,isFrozen:I3,getPrototypeOf:R3,getOwnPropertyDescriptor:U3}=Object;let{freeze:qe,seal:pt,create:im}=Object,{apply:gl,construct:vl}=typeof Reflect<"u"&&Reflect;qe||(qe=function(e){return e});pt||(pt=function(e){return e});gl||(gl=function(e,t,n){return e.apply(t,n)});vl||(vl=function(e,t){return new e(...t)});const ys=lt(Array.prototype.forEach),td=lt(Array.prototype.pop),Qn=lt(Array.prototype.push),$s=lt(String.prototype.toLowerCase),dr=lt(String.prototype.toString),id=lt(String.prototype.match),Zn=lt(String.prototype.replace),N3=lt(String.prototype.indexOf),M3=lt(String.prototype.trim),yt=lt(Object.prototype.hasOwnProperty),je=lt(RegExp.prototype.test),Jn=L3(TypeError);function lt(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return gl(i,e,n)}}function L3(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vl(i,t)}}function Z(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$s;ed&&ed(i,null);let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const s=t(a);s!==a&&(I3(e)||(e[n]=s),a=s)}i[a]=!0}return i}function B3(i){for(let e=0;e<i.length;e++)yt(i,e)||(i[e]=null);return i}function Ai(i){const e=im(null);for(const[t,n]of tm(i))yt(i,t)&&(Array.isArray(n)?e[t]=B3(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=Ai(n):e[t]=n);return e}function ea(i,e){for(;i!==null;){const n=U3(i,e);if(n){if(n.get)return lt(n.get);if(typeof n.value=="function")return lt(n.value)}i=R3(i)}function t(){return null}return t}const nd=qe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hr=qe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fr=qe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z3=qe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mr=qe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),j3=qe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ad=qe(["#text"]),sd=qe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),gr=qe(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),od=qe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xs=qe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$3=pt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),H3=pt(/<%[\w\W]*|[\w\W]*%>/gm),q3=pt(/\${[\w\W]*}/gm),W3=pt(/^data-[\-\w.\u00B7-\uFFFF]/),V3=pt(/^aria-[\-\w]+$/),nm=pt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G3=pt(/^(?:\w+script|data):/i),K3=pt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),am=pt(/^html$/i),X3=pt(/^[a-z][.\w]*(-[.\w]+)+$/i);var rd=Object.freeze({__proto__:null,MUSTACHE_EXPR:$3,ERB_EXPR:H3,TMPLIT_EXPR:q3,DATA_ATTR:W3,ARIA_ATTR:V3,IS_ALLOWED_URI:nm,IS_SCRIPT_OR_DATA:G3,ATTR_WHITESPACE:K3,DOCTYPE_NAME:am,CUSTOM_ELEMENT:X3});const ta={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Y3=function(){return typeof window>"u"?null:window},Q3=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(n=t.getAttribute(a));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function sm(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Y3();const e=q=>sm(q);if(e.version="3.1.6",e.removed=[],!i||!i.document||i.document.nodeType!==ta.document)return e.isSupported=!1,e;let{document:t}=i;const n=t,a=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:r,Element:l,NodeFilter:u,NamedNodeMap:p=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:c,DOMParser:h,trustedTypes:f}=i,m=l.prototype,y=ea(m,"cloneNode"),g=ea(m,"remove"),v=ea(m,"nextSibling"),P=ea(m,"childNodes"),S=ea(m,"parentNode");if(typeof o=="function"){const q=t.createElement("template");q.content&&q.content.ownerDocument&&(t=q.content.ownerDocument)}let A,I="";const{implementation:x,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:U}=t,{importNode:H}=n;let L={};e.isSupported=typeof tm=="function"&&typeof S=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ee,ERB_EXPR:X,TMPLIT_EXPR:V,DATA_ATTR:Q,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:b,ATTR_WHITESPACE:_,CUSTOM_ELEMENT:E}=rd;let{IS_ALLOWED_URI:D}=rd,T=null;const W=Z({},[...nd,...hr,...fr,...mr,...ad]);let B=null;const Y=Z({},[...sd,...gr,...od,...xs]);let K=Object.seal(im(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,ne=null,xn=!0,qi=!0,Ya=!1,wn=!0,Mt=!1,Wi=!0,vi=!1,vo=!1,bo=!1,Vi=!1,Qa=!1,Za=!1,mc=!0,gc=!1;const fm="user-content-";let yo=!0,_n=!1,Gi={},Ki=null;const vc=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let bc=null;const yc=Z({},["audio","video","img","source","image","track"]);let xo=null;const xc=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ja="http://www.w3.org/1998/Math/MathML",es="http://www.w3.org/2000/svg",Lt="http://www.w3.org/1999/xhtml";let Xi=Lt,wo=!1,_o=null;const mm=Z({},[Ja,es,Lt],dr);let Pn=null;const gm=["application/xhtml+xml","text/html"],vm="text/html";let Fe=null,Yi=null;const bm=t.createElement("form"),wc=function(w){return w instanceof RegExp||w instanceof Function},Po=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yi&&Yi===w)){if((!w||typeof w!="object")&&(w={}),w=Ai(w),Pn=gm.indexOf(w.PARSER_MEDIA_TYPE)===-1?vm:w.PARSER_MEDIA_TYPE,Fe=Pn==="application/xhtml+xml"?dr:$s,T=yt(w,"ALLOWED_TAGS")?Z({},w.ALLOWED_TAGS,Fe):W,B=yt(w,"ALLOWED_ATTR")?Z({},w.ALLOWED_ATTR,Fe):Y,_o=yt(w,"ALLOWED_NAMESPACES")?Z({},w.ALLOWED_NAMESPACES,dr):mm,xo=yt(w,"ADD_URI_SAFE_ATTR")?Z(Ai(xc),w.ADD_URI_SAFE_ATTR,Fe):xc,bc=yt(w,"ADD_DATA_URI_TAGS")?Z(Ai(yc),w.ADD_DATA_URI_TAGS,Fe):yc,Ki=yt(w,"FORBID_CONTENTS")?Z({},w.FORBID_CONTENTS,Fe):vc,ie=yt(w,"FORBID_TAGS")?Z({},w.FORBID_TAGS,Fe):{},ne=yt(w,"FORBID_ATTR")?Z({},w.FORBID_ATTR,Fe):{},Gi=yt(w,"USE_PROFILES")?w.USE_PROFILES:!1,xn=w.ALLOW_ARIA_ATTR!==!1,qi=w.ALLOW_DATA_ATTR!==!1,Ya=w.ALLOW_UNKNOWN_PROTOCOLS||!1,wn=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Mt=w.SAFE_FOR_TEMPLATES||!1,Wi=w.SAFE_FOR_XML!==!1,vi=w.WHOLE_DOCUMENT||!1,Vi=w.RETURN_DOM||!1,Qa=w.RETURN_DOM_FRAGMENT||!1,Za=w.RETURN_TRUSTED_TYPE||!1,bo=w.FORCE_BODY||!1,mc=w.SANITIZE_DOM!==!1,gc=w.SANITIZE_NAMED_PROPS||!1,yo=w.KEEP_CONTENT!==!1,_n=w.IN_PLACE||!1,D=w.ALLOWED_URI_REGEXP||nm,Xi=w.NAMESPACE||Lt,K=w.CUSTOM_ELEMENT_HANDLING||{},w.CUSTOM_ELEMENT_HANDLING&&wc(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&wc(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Mt&&(qi=!1),Qa&&(Vi=!0),Gi&&(T=Z({},ad),B=[],Gi.html===!0&&(Z(T,nd),Z(B,sd)),Gi.svg===!0&&(Z(T,hr),Z(B,gr),Z(B,xs)),Gi.svgFilters===!0&&(Z(T,fr),Z(B,gr),Z(B,xs)),Gi.mathMl===!0&&(Z(T,mr),Z(B,od),Z(B,xs))),w.ADD_TAGS&&(T===W&&(T=Ai(T)),Z(T,w.ADD_TAGS,Fe)),w.ADD_ATTR&&(B===Y&&(B=Ai(B)),Z(B,w.ADD_ATTR,Fe)),w.ADD_URI_SAFE_ATTR&&Z(xo,w.ADD_URI_SAFE_ATTR,Fe),w.FORBID_CONTENTS&&(Ki===vc&&(Ki=Ai(Ki)),Z(Ki,w.FORBID_CONTENTS,Fe)),yo&&(T["#text"]=!0),vi&&Z(T,["html","head","body"]),T.table&&(Z(T,["tbody"]),delete ie.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=w.TRUSTED_TYPES_POLICY,I=A.createHTML("")}else A===void 0&&(A=Q3(f,a)),A!==null&&typeof I=="string"&&(I=A.createHTML(""));qe&&qe(w),Yi=w}},_c=Z({},["mi","mo","mn","ms","mtext"]),Pc=Z({},["foreignobject","annotation-xml"]),ym=Z({},["title","style","font","a","script"]),Sc=Z({},[...hr,...fr,...z3]),Fc=Z({},[...mr,...j3]),xm=function(w){let R=S(w);(!R||!R.tagName)&&(R={namespaceURI:Xi,tagName:"template"});const $=$s(w.tagName),se=$s(R.tagName);return _o[w.namespaceURI]?w.namespaceURI===es?R.namespaceURI===Lt?$==="svg":R.namespaceURI===Ja?$==="svg"&&(se==="annotation-xml"||_c[se]):!!Sc[$]:w.namespaceURI===Ja?R.namespaceURI===Lt?$==="math":R.namespaceURI===es?$==="math"&&Pc[se]:!!Fc[$]:w.namespaceURI===Lt?R.namespaceURI===es&&!Pc[se]||R.namespaceURI===Ja&&!_c[se]?!1:!Fc[$]&&(ym[$]||!Sc[$]):!!(Pn==="application/xhtml+xml"&&_o[w.namespaceURI]):!1},Et=function(w){Qn(e.removed,{element:w});try{S(w).removeChild(w)}catch{g(w)}},ts=function(w,R){try{Qn(e.removed,{attribute:R.getAttributeNode(w),from:R})}catch{Qn(e.removed,{attribute:null,from:R})}if(R.removeAttribute(w),w==="is"&&!B[w])if(Vi||Qa)try{Et(R)}catch{}else try{R.setAttribute(w,"")}catch{}},Cc=function(w){let R=null,$=null;if(bo)w="<remove></remove>"+w;else{const Ae=id(w,/^[\r\n\t ]+/);$=Ae&&Ae[0]}Pn==="application/xhtml+xml"&&Xi===Lt&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const se=A?A.createHTML(w):w;if(Xi===Lt)try{R=new h().parseFromString(se,Pn)}catch{}if(!R||!R.documentElement){R=x.createDocument(Xi,"template",null);try{R.documentElement.innerHTML=wo?I:se}catch{}}const Re=R.body||R.documentElement;return w&&$&&Re.insertBefore(t.createTextNode($),Re.childNodes[0]||null),Xi===Lt?U.call(R,vi?"html":"body")[0]:vi?R.documentElement:Re},Ec=function(w){return C.call(w.ownerDocument||w,w,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Tc=function(w){return w instanceof c&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof p)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},kc=function(w){return typeof r=="function"&&w instanceof r},Bt=function(w,R,$){L[w]&&ys(L[w],se=>{se.call(e,R,$,Yi)})},Ac=function(w){let R=null;if(Bt("beforeSanitizeElements",w,null),Tc(w))return Et(w),!0;const $=Fe(w.nodeName);if(Bt("uponSanitizeElement",w,{tagName:$,allowedTags:T}),w.hasChildNodes()&&!kc(w.firstElementChild)&&je(/<[/\w]/g,w.innerHTML)&&je(/<[/\w]/g,w.textContent)||w.nodeType===ta.progressingInstruction||Wi&&w.nodeType===ta.comment&&je(/<[/\w]/g,w.data))return Et(w),!0;if(!T[$]||ie[$]){if(!ie[$]&&Oc($)&&(K.tagNameCheck instanceof RegExp&&je(K.tagNameCheck,$)||K.tagNameCheck instanceof Function&&K.tagNameCheck($)))return!1;if(yo&&!Ki[$]){const se=S(w)||w.parentNode,Re=P(w)||w.childNodes;if(Re&&se){const Ae=Re.length;for(let We=Ae-1;We>=0;--We){const Tt=y(Re[We],!0);Tt.__removalCount=(w.__removalCount||0)+1,se.insertBefore(Tt,v(w))}}}return Et(w),!0}return w instanceof l&&!xm(w)||($==="noscript"||$==="noembed"||$==="noframes")&&je(/<\/no(script|embed|frames)/i,w.innerHTML)?(Et(w),!0):(Mt&&w.nodeType===ta.text&&(R=w.textContent,ys([ee,X,V],se=>{R=Zn(R,se," ")}),w.textContent!==R&&(Qn(e.removed,{element:w.cloneNode()}),w.textContent=R)),Bt("afterSanitizeElements",w,null),!1)},Dc=function(w,R,$){if(mc&&(R==="id"||R==="name")&&($ in t||$ in bm))return!1;if(!(qi&&!ne[R]&&je(Q,R))){if(!(xn&&je(F,R))){if(!B[R]||ne[R]){if(!(Oc(w)&&(K.tagNameCheck instanceof RegExp&&je(K.tagNameCheck,w)||K.tagNameCheck instanceof Function&&K.tagNameCheck(w))&&(K.attributeNameCheck instanceof RegExp&&je(K.attributeNameCheck,R)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(R))||R==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&je(K.tagNameCheck,$)||K.tagNameCheck instanceof Function&&K.tagNameCheck($))))return!1}else if(!xo[R]){if(!je(D,Zn($,_,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&w!=="script"&&N3($,"data:")===0&&bc[w])){if(!(Ya&&!je(b,Zn($,_,"")))){if($)return!1}}}}}}return!0},Oc=function(w){return w!=="annotation-xml"&&id(w,E)},Ic=function(w){Bt("beforeSanitizeAttributes",w,null);const{attributes:R}=w;if(!R)return;const $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};let se=R.length;for(;se--;){const Re=R[se],{name:Ae,namespaceURI:We,value:Tt}=Re,Sn=Fe(Ae);let Me=Ae==="value"?Tt:M3(Tt);if($.attrName=Sn,$.attrValue=Me,$.keepAttr=!0,$.forceKeepAttr=void 0,Bt("uponSanitizeAttribute",w,$),Me=$.attrValue,Wi&&je(/((--!?|])>)|<\/(style|title)/i,Me)){ts(Ae,w);continue}if($.forceKeepAttr||(ts(Ae,w),!$.keepAttr))continue;if(!wn&&je(/\/>/i,Me)){ts(Ae,w);continue}Mt&&ys([ee,X,V],Uc=>{Me=Zn(Me,Uc," ")});const Rc=Fe(w.nodeName);if(Dc(Rc,Sn,Me)){if(gc&&(Sn==="id"||Sn==="name")&&(ts(Ae,w),Me=fm+Me),A&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!We)switch(f.getAttributeType(Rc,Sn)){case"TrustedHTML":{Me=A.createHTML(Me);break}case"TrustedScriptURL":{Me=A.createScriptURL(Me);break}}try{We?w.setAttributeNS(We,Ae,Me):w.setAttribute(Ae,Me),Tc(w)?Et(w):td(e.removed)}catch{}}}Bt("afterSanitizeAttributes",w,null)},wm=function q(w){let R=null;const $=Ec(w);for(Bt("beforeSanitizeShadowDOM",w,null);R=$.nextNode();)Bt("uponSanitizeShadowNode",R,null),!Ac(R)&&(R.content instanceof s&&q(R.content),Ic(R));Bt("afterSanitizeShadowDOM",w,null)};return e.sanitize=function(q){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,$=null,se=null,Re=null;if(wo=!q,wo&&(q="<!-->"),typeof q!="string"&&!kc(q))if(typeof q.toString=="function"){if(q=q.toString(),typeof q!="string")throw Jn("dirty is not a string, aborting")}else throw Jn("toString is not a function");if(!e.isSupported)return q;if(vo||Po(w),e.removed=[],typeof q=="string"&&(_n=!1),_n){if(q.nodeName){const Tt=Fe(q.nodeName);if(!T[Tt]||ie[Tt])throw Jn("root node is forbidden and cannot be sanitized in-place")}}else if(q instanceof r)R=Cc("<!---->"),$=R.ownerDocument.importNode(q,!0),$.nodeType===ta.element&&$.nodeName==="BODY"||$.nodeName==="HTML"?R=$:R.appendChild($);else{if(!Vi&&!Mt&&!vi&&q.indexOf("<")===-1)return A&&Za?A.createHTML(q):q;if(R=Cc(q),!R)return Vi?null:Za?I:""}R&&bo&&Et(R.firstChild);const Ae=Ec(_n?q:R);for(;se=Ae.nextNode();)Ac(se)||(se.content instanceof s&&wm(se.content),Ic(se));if(_n)return q;if(Vi){if(Qa)for(Re=k.call(R.ownerDocument);R.firstChild;)Re.appendChild(R.firstChild);else Re=R;return(B.shadowroot||B.shadowrootmode)&&(Re=H.call(n,Re,!0)),Re}let We=vi?R.outerHTML:R.innerHTML;return vi&&T["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&je(am,R.ownerDocument.doctype.name)&&(We="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
|
|
56
|
-
`+We),Mt&&ys([ee,X,V],Tt=>{We=Zn(We,Tt," ")}),A&&Za?A.createHTML(We):We},e.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Po(q),vo=!0},e.clearConfig=function(){Yi=null,vo=!1},e.isValidAttribute=function(q,w,R){Yi||Po({});const $=Fe(q),se=Fe(w);return Dc($,se,R)},e.addHook=function(q,w){typeof w=="function"&&(L[q]=L[q]||[],Qn(L[q],w))},e.removeHook=function(q){if(L[q])return td(L[q])},e.removeHooks=function(q){L[q]&&(L[q]=[])},e.removeAllHooks=function(){L={}},e}var ld=sm(),Ye=Uint8Array,rn=Uint16Array,Z3=Int32Array,om=new Ye([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rm=new Ye([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),J3=new Ye([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lm=function(i,e){for(var t=new rn(31),n=0;n<31;++n)t[n]=e+=1<<i[n-1];for(var a=new Z3(t[30]),n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)a[s]=s-t[n]<<5|n;return{b:t,r:a}},cm=lm(om,2),um=cm.b,e2=cm.r;um[28]=258,e2[258]=28;var t2=lm(rm,0),i2=t2.b,bl=new rn(32768);for(var oe=0;oe<32768;++oe){var ai=(oe&43690)>>1|(oe&21845)<<1;ai=(ai&52428)>>2|(ai&13107)<<2,ai=(ai&61680)>>4|(ai&3855)<<4,bl[oe]=((ai&65280)>>8|(ai&255)<<8)>>1}var Fa=function(i,e,t){for(var n=i.length,a=0,s=new rn(e);a<n;++a)i[a]&&++s[i[a]-1];var o=new rn(e);for(a=1;a<e;++a)o[a]=o[a-1]+s[a-1]<<1;var r;if(t){r=new rn(1<<e);var l=15-e;for(a=0;a<n;++a)if(i[a])for(var u=a<<4|i[a],p=e-i[a],c=o[i[a]-1]++<<p,h=c|(1<<p)-1;c<=h;++c)r[bl[c]>>l]=u}else for(r=new rn(n),a=0;a<n;++a)i[a]&&(r[a]=bl[o[i[a]-1]++]>>15-i[a]);return r},Xa=new Ye(288);for(var oe=0;oe<144;++oe)Xa[oe]=8;for(var oe=144;oe<256;++oe)Xa[oe]=9;for(var oe=256;oe<280;++oe)Xa[oe]=7;for(var oe=280;oe<288;++oe)Xa[oe]=8;var pm=new Ye(32);for(var oe=0;oe<32;++oe)pm[oe]=5;var n2=Fa(Xa,9,1),a2=Fa(pm,5,1),vr=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},gt=function(i,e,t){var n=e/8|0;return(i[n]|i[n+1]<<8)>>(e&7)&t},br=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},s2=function(i){return(i+7)/8|0},pc=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new Ye(i.subarray(e,t))},o2=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ue=function(i,e,t){var n=new Error(e||o2[i]);if(n.code=i,Error.captureStackTrace&&Error.captureStackTrace(n,Ue),!t)throw n;return n},dc=function(i,e,t,n){var a=i.length,s=n?n.length:0;if(!a||e.f&&!e.l)return t||new Ye(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new Ye(a*3));var u=function(wn){var Mt=t.length;if(wn>Mt){var Wi=new Ye(Math.max(Mt*2,wn));Wi.set(t),t=Wi}},p=e.f||0,c=e.p||0,h=e.b||0,f=e.l,m=e.d,y=e.m,g=e.n,v=a*8;do{if(!f){p=gt(i,c,1);var P=gt(i,c+1,3);if(c+=3,P)if(P==1)f=n2,m=a2,y=9,g=5;else if(P==2){var x=gt(i,c,31)+257,C=gt(i,c+10,15)+4,k=x+gt(i,c+5,31)+1;c+=14;for(var U=new Ye(k),H=new Ye(19),L=0;L<C;++L)H[J3[L]]=gt(i,c+L*3,7);c+=C*3;for(var ee=vr(H),X=(1<<ee)-1,V=Fa(H,ee,1),L=0;L<k;){var Q=V[gt(i,c,X)];c+=Q&15;var S=Q>>4;if(S<16)U[L++]=S;else{var F=0,b=0;for(S==16?(b=3+gt(i,c,3),c+=2,F=U[L-1]):S==17?(b=3+gt(i,c,7),c+=3):S==18&&(b=11+gt(i,c,127),c+=7);b--;)U[L++]=F}}var _=U.subarray(0,x),E=U.subarray(x);y=vr(_),g=vr(E),f=Fa(_,y,1),m=Fa(E,g,1)}else Ue(1);else{var S=s2(c)+4,A=i[S-4]|i[S-3]<<8,I=S+A;if(I>a){l&&Ue(0);break}r&&u(h+A),t.set(i.subarray(S,I),h),e.b=h+=A,e.p=c=I*8,e.f=p;continue}if(c>v){l&&Ue(0);break}}r&&u(h+131072);for(var D=(1<<y)-1,T=(1<<g)-1,W=c;;W=c){var F=f[br(i,c)&D],B=F>>4;if(c+=F&15,c>v){l&&Ue(0);break}if(F||Ue(2),B<256)t[h++]=B;else if(B==256){W=c,f=null;break}else{var Y=B-254;if(B>264){var L=B-257,K=om[L];Y=gt(i,c,(1<<K)-1)+um[L],c+=K}var ie=m[br(i,c)&T],ne=ie>>4;ie||Ue(3),c+=ie&15;var E=i2[ne];if(ne>3){var K=rm[ne];E+=br(i,c)&(1<<K)-1,c+=K}if(c>v){l&&Ue(0);break}r&&u(h+131072);var xn=h+Y;if(h<E){var qi=s-E,Ya=Math.min(E,xn);for(qi+h<0&&Ue(3);h<Ya;++h)t[h]=n[qi+h]}for(;h<xn;++h)t[h]=t[h-E]}}e.l=f,e.p=W,e.b=h,e.f=p,f&&(p=1,e.m=y,e.d=m,e.n=g)}while(!p);return h!=t.length&&o?pc(t,0,h):t.subarray(0,h)},r2=new Ye(0),Dt=function(i,e){return i[e]|i[e+1]<<8},St=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},yr=function(i,e){return St(i,e)+St(i,e+4)*4294967296},l2=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Ue(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!i[t++]);return t+(e&2)},c2=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},u2=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&Ue(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&Ue(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function dm(i,e){return dc(i,{i:2},e&&e.out,e&&e.dictionary)}function p2(i,e){var t=l2(i);return t+8>i.length&&Ue(6,"invalid gzip data"),dc(i.subarray(t,-8),{i:2},e&&e.out||new Ye(c2(i)),e&&e.dictionary)}function d2(i,e){return dc(i.subarray(u2(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function xr(i,e){return i[0]==31&&i[1]==139&&i[2]==8?p2(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?dm(i,e):d2(i,e)}var yl=typeof TextDecoder<"u"&&new TextDecoder,h2=0;try{yl.decode(r2,{stream:!0}),h2=1}catch{}var f2=function(i){for(var e="",t=0;;){var n=i[t++],a=(n>127)+(n>223)+(n>239);if(t+a>i.length)return{s:e,r:pc(i,t-1)};a?a==3?(n=((n&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):a&1?e+=String.fromCharCode((n&31)<<6|i[t++]&63):e+=String.fromCharCode((n&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(n)}};function m2(i,e){if(e){for(var t="",n=0;n<i.length;n+=16384)t+=String.fromCharCode.apply(null,i.subarray(n,n+16384));return t}else{if(yl)return yl.decode(i);var a=f2(i),s=a.s,t=a.r;return t.length&&Ue(8),s}}var g2=function(i,e){return e+30+Dt(i,e+26)+Dt(i,e+28)},v2=function(i,e,t){var n=Dt(i,e+28),a=m2(i.subarray(e+46,e+46+n),!(Dt(i,e+8)&2048)),s=e+46+n,o=St(i,e+20),r=t&&o==4294967295?b2(i,s):[o,St(i,e+24),St(i,e+42)],l=r[0],u=r[1],p=r[2];return[Dt(i,e+10),l,u,a,s+Dt(i,e+30)+Dt(i,e+32),p]},b2=function(i,e){for(;Dt(i,e)!=1;e+=4+Dt(i,e+2));return[yr(i,e+12),yr(i,e+4),yr(i,e+20)]};function y2(i,e){for(var t={},n=i.length-22;St(i,n)!=101010256;--n)(!n||i.length-n>65558)&&Ue(13);var a=Dt(i,n+8);if(!a)return{};var s=St(i,n+16),o=s==4294967295||a==65535;if(o){var r=St(i,n-12);o=St(i,r)==101075792,o&&(a=St(i,r+32),s=St(i,r+48))}for(var l=e&&e.filter,u=0;u<a;++u){var p=v2(i,s,o),c=p[0],h=p[1],f=p[2],m=p[3],y=p[4],g=p[5],v=g2(i,g);s=y,(!l||l({name:m,size:h,originalSize:f,compression:c}))&&(c?c==8?t[m]=dm(i.subarray(v,v+h),{out:new Ye(f)}):Ue(14,"unknown compression type "+c):t[m]=pc(i,v,v+h))}return t}const ws={zip:y2,gz:xr,tgz:xr,deflate:xr};class x2 extends ke{constructor(t,n){super(t,{...{},...n});Le(this,"setHashFileName",async t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:s}=a,o=1024*1024*5,r=s.slice(0,o),l=O3.createHash("md5").update(await r.text()).digest("hex"),u=ga(a),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(n,{hashFileName:p})}});Le(this,"setMetaData",async t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:{relativePath:s,name:o},hashFileName:r}=a,l=s||o||r;this.uppy.setFileMeta(n,{relativePath:l,name:l})}});Le(this,"preventXssAttack",async t=>{var s;const{id:n}=t,a=this.uppy.getFile(n);if(a){const{name:o,meta:r}=this.uppy.getFile(n),l=ld.sanitize(o);if(o!==l){const u=ga(a),p=l.endsWith(`.${u}`)?l:`${l}.${u}`;this.uppy.setFileState(n,{name:p,meta:{...r,name:p,filename:p}})}if((s=a.type)!=null&&s.includes("image/svg")){const{data:u,name:p,type:c}=this.uppy.getFile(n),h=await u.text(),f=ld.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==f){const m=new Blob([f],{type:c}),y=Fp(m,p);this.uppy.setFileState(n,{...this.uppy.getFile(n),data:y})}}}});Le(this,"preventZipBombAttack",async t=>{const{id:n}=t,a=this.uppy.getFile(n);try{if(a&&ws[a.extension]){const{data:s}=a,o=ws[a.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(p,c)=>(r++,Object.entries(p instanceof Uint8Array?{[c||a.name]:p}:p).reduce((h,[f,m])=>{const y=h+m.byteLength;if(r>=5||y>a.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:y,fileSize:a.size}),new Error("Zip bomb detected, please check your file");const g=ei.extension(ei.lookup(f));if(ws[g]){const v=ws[g](m);return y+l(v,f)}return y},0)),u=l(o);if(console.info(a.name,{totalUnzippedSize:u,maxDepth:r,zippedSize:a.size}),u>a.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Le(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});Le(this,"tryDownloadRemoteFile",async t=>{var A,I;const{type:n,name:a,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:f=0}=t,m=!p&&r,y=`uploader:${u}:downloaded`,g=ga(t),v=(A=a==null?void 0:a.split("?"))==null?void 0:A[0],S=(()=>{const x=["jpg","jpeg"];return x.includes(g)&&x.some(C=>v==null?void 0:v.endsWith(C))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(m){const x=A_(s||((I=c==null?void 0:c.body)==null?void 0:I.url));if(f>=3)throw new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await yn.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:x}}).then(C=>C==null?void 0:C.data).then(async C=>{const k=Fp(C,S);this.uppy.setFileState(u,{name:S,extension:g,type:n,data:k,preview:s||Sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:S,filename:S}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(y,async()=>{C()})}))()});Le(this,"getPreviewFromData",t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:s,type:o,preview:r}=a;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(n,{preview:Sp(s)})},o.indexOf("gif")>-1?1e3:0)}});Le(this,"prepareUpload",t=>{const n=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),a=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(n).then(a)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w2 extends ke{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>Pe("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:Pe("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[Pe("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),Pe("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return Pe("div",{id:"ai-image",className:"ai-image",children:Pe("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _2="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",P2=he.lazy(()=>vd(()=>import("./index-GdO1eONN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url)),cd="uploader-container",_s="uploader-dashboard",xl=localStorage.getItem("uppy_debug"),S2=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:n}=i,{companionUrl:a}=If(e),s=async l=>(await yn.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Qh,options:{quality:1},alwayUse:!0},(xl||va()&&!Cp())&&{id:"Uploaded",plugin:T3,options:{params:n==null?void 0:n.params}},(xl||va()&&!Cp())&&{id:"Resources",plugin:A3,options:{params:n==null?void 0:n.params}},va()&&D_()&&t.AIImage&&{id:"AIImage",plugin:w2,options:{companionUrl:a},onShowPanel:l=>{function u(){setTimeout(()=>{var c,h;const p=document.getElementById("ai-image");p?Nm(p).render(st.jsx(P2,{api:s,restrictions:o,i18n:(h=(c=l.current)==null?void 0:c.getUploader())==null?void 0:h.i18n,onSelect:f=>{const m=l.current.getUploader();m==null||m.emit("ai-image:selected",f),f.forEach((y,g)=>{const v=`AI Image [${g+1}].png`,P={name:v,type:"image/png",data:k_(y,v),source:"AIImage",isRemote:!1};m==null||m.addFile(P)})}})):u()},100)}u()}},{id:"Url",plugin:Ha,options:{companionUrl:a}},{id:"Webcam",plugin:Id,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Qd,options:{companionUrl:a,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:x2,options:{companionUrl:a},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Ml,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function hc(i){const{id:e,plugins:t,locale:n,onAfterResponse:a,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c}=i,h=wd(p,"id"),{uploaderUrl:f}=If(r);let m=new Fl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(xl||""),locale:u_[n||"en"],onBeforeFileAdded:(y,g)=>{if(Object.hasOwn(g,y.id))return!1;const v=!!ei.extension(y.type),P=ei.lookup(y.name)||"";if(!v&&P&&P!==y.type){const S=ga(y);S&&(y.extension=S),y.type=P}return y},...o,restrictions:c}).use(Ff,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:f,async onBeforeRequest(y,g){var x;const{hashFileName:v,id:P,meta:S}=g,A=ga(g);y.setHeader("x-uploader-file-name",`${v}`),y.setHeader("x-uploader-file-id",`${P}`),y.setHeader("x-uploader-file-ext",`${A}`),y.setHeader("x-uploader-base-url",new URL(y.getURL()).pathname),y.setHeader("x-uploader-endpoint-url",f),y.setHeader("x-uploader-metadata",JSON.stringify(S,(C,k)=>typeof k=="string"?encodeURIComponent(k):k));const I=(window==null?void 0:window.uploaderComponentId)||((x=window==null?void 0:window.blocklet)==null?void 0:x.componentId);I&&y.setHeader("x-component-did",(I||"").split("/").pop())},onAfterResponse:async(y,g)=>{const v={},P=y.getUnderlyingObject();try{P.response&&(v.data=JSON.parse(P.response))}catch{v.data={}}v.method=y.getMethod().toUpperCase(),v.url=y.getURL(),v.status=P.status,v.headers={...y._headers};const S=P.getAllResponseHeaders();if(S&&S.split(`\r
|
|
56
|
+
`+We),Mt&&ys([ee,X,V],Tt=>{We=Zn(We,Tt," ")}),A&&Za?A.createHTML(We):We},e.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Po(q),vo=!0},e.clearConfig=function(){Yi=null,vo=!1},e.isValidAttribute=function(q,w,R){Yi||Po({});const $=Fe(q),se=Fe(w);return Dc($,se,R)},e.addHook=function(q,w){typeof w=="function"&&(L[q]=L[q]||[],Qn(L[q],w))},e.removeHook=function(q){if(L[q])return td(L[q])},e.removeHooks=function(q){L[q]&&(L[q]=[])},e.removeAllHooks=function(){L={}},e}var ld=sm(),Ye=Uint8Array,rn=Uint16Array,Z3=Int32Array,om=new Ye([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),rm=new Ye([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),J3=new Ye([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lm=function(i,e){for(var t=new rn(31),n=0;n<31;++n)t[n]=e+=1<<i[n-1];for(var a=new Z3(t[30]),n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)a[s]=s-t[n]<<5|n;return{b:t,r:a}},cm=lm(om,2),um=cm.b,e2=cm.r;um[28]=258,e2[258]=28;var t2=lm(rm,0),i2=t2.b,bl=new rn(32768);for(var oe=0;oe<32768;++oe){var ai=(oe&43690)>>1|(oe&21845)<<1;ai=(ai&52428)>>2|(ai&13107)<<2,ai=(ai&61680)>>4|(ai&3855)<<4,bl[oe]=((ai&65280)>>8|(ai&255)<<8)>>1}var Fa=function(i,e,t){for(var n=i.length,a=0,s=new rn(e);a<n;++a)i[a]&&++s[i[a]-1];var o=new rn(e);for(a=1;a<e;++a)o[a]=o[a-1]+s[a-1]<<1;var r;if(t){r=new rn(1<<e);var l=15-e;for(a=0;a<n;++a)if(i[a])for(var u=a<<4|i[a],p=e-i[a],c=o[i[a]-1]++<<p,h=c|(1<<p)-1;c<=h;++c)r[bl[c]>>l]=u}else for(r=new rn(n),a=0;a<n;++a)i[a]&&(r[a]=bl[o[i[a]-1]++]>>15-i[a]);return r},Xa=new Ye(288);for(var oe=0;oe<144;++oe)Xa[oe]=8;for(var oe=144;oe<256;++oe)Xa[oe]=9;for(var oe=256;oe<280;++oe)Xa[oe]=7;for(var oe=280;oe<288;++oe)Xa[oe]=8;var pm=new Ye(32);for(var oe=0;oe<32;++oe)pm[oe]=5;var n2=Fa(Xa,9,1),a2=Fa(pm,5,1),vr=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},gt=function(i,e,t){var n=e/8|0;return(i[n]|i[n+1]<<8)>>(e&7)&t},br=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},s2=function(i){return(i+7)/8|0},pc=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new Ye(i.subarray(e,t))},o2=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ue=function(i,e,t){var n=new Error(e||o2[i]);if(n.code=i,Error.captureStackTrace&&Error.captureStackTrace(n,Ue),!t)throw n;return n},dc=function(i,e,t,n){var a=i.length,s=n?n.length:0;if(!a||e.f&&!e.l)return t||new Ye(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new Ye(a*3));var u=function(wn){var Mt=t.length;if(wn>Mt){var Wi=new Ye(Math.max(Mt*2,wn));Wi.set(t),t=Wi}},p=e.f||0,c=e.p||0,h=e.b||0,f=e.l,m=e.d,y=e.m,g=e.n,v=a*8;do{if(!f){p=gt(i,c,1);var P=gt(i,c+1,3);if(c+=3,P)if(P==1)f=n2,m=a2,y=9,g=5;else if(P==2){var x=gt(i,c,31)+257,C=gt(i,c+10,15)+4,k=x+gt(i,c+5,31)+1;c+=14;for(var U=new Ye(k),H=new Ye(19),L=0;L<C;++L)H[J3[L]]=gt(i,c+L*3,7);c+=C*3;for(var ee=vr(H),X=(1<<ee)-1,V=Fa(H,ee,1),L=0;L<k;){var Q=V[gt(i,c,X)];c+=Q&15;var S=Q>>4;if(S<16)U[L++]=S;else{var F=0,b=0;for(S==16?(b=3+gt(i,c,3),c+=2,F=U[L-1]):S==17?(b=3+gt(i,c,7),c+=3):S==18&&(b=11+gt(i,c,127),c+=7);b--;)U[L++]=F}}var _=U.subarray(0,x),E=U.subarray(x);y=vr(_),g=vr(E),f=Fa(_,y,1),m=Fa(E,g,1)}else Ue(1);else{var S=s2(c)+4,A=i[S-4]|i[S-3]<<8,I=S+A;if(I>a){l&&Ue(0);break}r&&u(h+A),t.set(i.subarray(S,I),h),e.b=h+=A,e.p=c=I*8,e.f=p;continue}if(c>v){l&&Ue(0);break}}r&&u(h+131072);for(var D=(1<<y)-1,T=(1<<g)-1,W=c;;W=c){var F=f[br(i,c)&D],B=F>>4;if(c+=F&15,c>v){l&&Ue(0);break}if(F||Ue(2),B<256)t[h++]=B;else if(B==256){W=c,f=null;break}else{var Y=B-254;if(B>264){var L=B-257,K=om[L];Y=gt(i,c,(1<<K)-1)+um[L],c+=K}var ie=m[br(i,c)&T],ne=ie>>4;ie||Ue(3),c+=ie&15;var E=i2[ne];if(ne>3){var K=rm[ne];E+=br(i,c)&(1<<K)-1,c+=K}if(c>v){l&&Ue(0);break}r&&u(h+131072);var xn=h+Y;if(h<E){var qi=s-E,Ya=Math.min(E,xn);for(qi+h<0&&Ue(3);h<Ya;++h)t[h]=n[qi+h]}for(;h<xn;++h)t[h]=t[h-E]}}e.l=f,e.p=W,e.b=h,e.f=p,f&&(p=1,e.m=y,e.d=m,e.n=g)}while(!p);return h!=t.length&&o?pc(t,0,h):t.subarray(0,h)},r2=new Ye(0),Dt=function(i,e){return i[e]|i[e+1]<<8},St=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},yr=function(i,e){return St(i,e)+St(i,e+4)*4294967296},l2=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Ue(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!i[t++]);return t+(e&2)},c2=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},u2=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&Ue(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&Ue(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function dm(i,e){return dc(i,{i:2},e&&e.out,e&&e.dictionary)}function p2(i,e){var t=l2(i);return t+8>i.length&&Ue(6,"invalid gzip data"),dc(i.subarray(t,-8),{i:2},e&&e.out||new Ye(c2(i)),e&&e.dictionary)}function d2(i,e){return dc(i.subarray(u2(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function xr(i,e){return i[0]==31&&i[1]==139&&i[2]==8?p2(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?dm(i,e):d2(i,e)}var yl=typeof TextDecoder<"u"&&new TextDecoder,h2=0;try{yl.decode(r2,{stream:!0}),h2=1}catch{}var f2=function(i){for(var e="",t=0;;){var n=i[t++],a=(n>127)+(n>223)+(n>239);if(t+a>i.length)return{s:e,r:pc(i,t-1)};a?a==3?(n=((n&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):a&1?e+=String.fromCharCode((n&31)<<6|i[t++]&63):e+=String.fromCharCode((n&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(n)}};function m2(i,e){if(e){for(var t="",n=0;n<i.length;n+=16384)t+=String.fromCharCode.apply(null,i.subarray(n,n+16384));return t}else{if(yl)return yl.decode(i);var a=f2(i),s=a.s,t=a.r;return t.length&&Ue(8),s}}var g2=function(i,e){return e+30+Dt(i,e+26)+Dt(i,e+28)},v2=function(i,e,t){var n=Dt(i,e+28),a=m2(i.subarray(e+46,e+46+n),!(Dt(i,e+8)&2048)),s=e+46+n,o=St(i,e+20),r=t&&o==4294967295?b2(i,s):[o,St(i,e+24),St(i,e+42)],l=r[0],u=r[1],p=r[2];return[Dt(i,e+10),l,u,a,s+Dt(i,e+30)+Dt(i,e+32),p]},b2=function(i,e){for(;Dt(i,e)!=1;e+=4+Dt(i,e+2));return[yr(i,e+12),yr(i,e+4),yr(i,e+20)]};function y2(i,e){for(var t={},n=i.length-22;St(i,n)!=101010256;--n)(!n||i.length-n>65558)&&Ue(13);var a=Dt(i,n+8);if(!a)return{};var s=St(i,n+16),o=s==4294967295||a==65535;if(o){var r=St(i,n-12);o=St(i,r)==101075792,o&&(a=St(i,r+32),s=St(i,r+48))}for(var l=e&&e.filter,u=0;u<a;++u){var p=v2(i,s,o),c=p[0],h=p[1],f=p[2],m=p[3],y=p[4],g=p[5],v=g2(i,g);s=y,(!l||l({name:m,size:h,originalSize:f,compression:c}))&&(c?c==8?t[m]=dm(i.subarray(v,v+h),{out:new Ye(f)}):Ue(14,"unknown compression type "+c):t[m]=pc(i,v,v+h))}return t}const ws={zip:y2,gz:xr,tgz:xr,deflate:xr};class x2 extends ke{constructor(t,n){super(t,{...{},...n});Le(this,"setHashFileName",async t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:s}=a,o=1024*1024*5,r=s.slice(0,o),l=O3.createHash("md5").update(await r.text()).digest("hex"),u=ga(a),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(n,{hashFileName:p})}});Le(this,"setMetaData",async t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:{relativePath:s,name:o},hashFileName:r}=a,l=s||o||r;this.uppy.setFileMeta(n,{relativePath:l,name:l})}});Le(this,"preventXssAttack",async t=>{var s;const{id:n}=t,a=this.uppy.getFile(n);if(a){const{name:o,meta:r}=this.uppy.getFile(n),l=ld.sanitize(o);if(o!==l){const u=ga(a),p=l.endsWith(`.${u}`)?l:`${l}.${u}`;this.uppy.setFileState(n,{name:p,meta:{...r,name:p,filename:p}})}if((s=a.type)!=null&&s.includes("image/svg")){const{data:u,name:p,type:c}=this.uppy.getFile(n),h=await u.text(),f=ld.sanitize(h,{USE_PROFILES:{svg:!0,svgFilters:!0}});if(h!==f){const m=new Blob([f],{type:c}),y=Fp(m,p);this.uppy.setFileState(n,{...this.uppy.getFile(n),data:y})}}}});Le(this,"preventZipBombAttack",async t=>{const{id:n}=t,a=this.uppy.getFile(n);try{if(a&&ws[a.extension]){const{data:s}=a,o=ws[a.extension](new Uint8Array(await s.arrayBuffer()));let r=0;const l=(p,c)=>(r++,Object.entries(p instanceof Uint8Array?{[c||a.name]:p}:p).reduce((h,[f,m])=>{const y=h+m.byteLength;if(r>=5||y>a.size*100)throw console.error("Zip bomb detected, please check your file",{maxDepth:r,baseAcc:y,fileSize:a.size}),new Error("Zip bomb detected, please check your file");const g=ei.extension(ei.lookup(f));if(ws[g]){const v=ws[g](m);return y+l(v,f)}return y},0)),u=l(o);if(console.info(a.name,{totalUnzippedSize:u,maxDepth:r,zippedSize:a.size}),u>a.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Le(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.preventXssAttack(t),await this.preventZipBombAttack(t),await this.setMetaData(t)});Le(this,"tryDownloadRemoteFile",async t=>{var A,I;const{type:n,name:a,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:f=0}=t,m=!p&&r,y=`uploader:${u}:downloaded`,g=ga(t),v=(A=a==null?void 0:a.split("?"))==null?void 0:A[0],S=(()=>{const x=["jpg","jpeg"];return x.includes(g)&&x.some(C=>v==null?void 0:v.endsWith(C))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(m){const x=A_(s||((I=c==null?void 0:c.body)==null?void 0:I.url));if(f>=3)throw new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await yn.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:x}}).then(C=>C==null?void 0:C.data).then(async C=>{const k=Fp(C,S);this.uppy.setFileState(u,{name:S,extension:g,type:n,data:k,preview:s||Sp(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:S,filename:S}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(y,async()=>{C()})}))()});Le(this,"getPreviewFromData",t=>{const{id:n}=t,a=this.uppy.getFile(n);if(a){const{data:s,type:o,preview:r}=a;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(n,{preview:Sp(s)})},o.indexOf("gif")>-1?1e3:0)}});Le(this,"prepareUpload",t=>{const n=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),a=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(n).then(a)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}class w2 extends ke{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>Pe("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:Pe("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[Pe("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),Pe("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return Pe("div",{id:"ai-image",className:"ai-image",children:Pe("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const _2="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",P2=he.lazy(()=>vd(()=>import("./index-BN4cj6Ge.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url)),cd="uploader-container",_s="uploader-dashboard",xl=localStorage.getItem("uppy_debug"),S2=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:n}=i,{companionUrl:a}=If(e),s=async l=>(await yn.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Qh,options:{quality:1},alwayUse:!0},(xl||va()&&!Cp())&&{id:"Uploaded",plugin:T3,options:{params:n==null?void 0:n.params}},(xl||va()&&!Cp())&&{id:"Resources",plugin:A3,options:{params:n==null?void 0:n.params}},va()&&D_()&&t.AIImage&&{id:"AIImage",plugin:w2,options:{companionUrl:a},onShowPanel:l=>{function u(){setTimeout(()=>{var c,h;const p=document.getElementById("ai-image");p?Nm(p).render(st.jsx(P2,{api:s,restrictions:o,i18n:(h=(c=l.current)==null?void 0:c.getUploader())==null?void 0:h.i18n,onSelect:f=>{const m=l.current.getUploader();m==null||m.emit("ai-image:selected",f),f.forEach((y,g)=>{const v=`AI Image [${g+1}].png`,P={name:v,type:"image/png",data:k_(y,v),source:"AIImage",isRemote:!1};m==null||m.addFile(P)})}})):u()},100)}u()}},{id:"Url",plugin:Ha,options:{companionUrl:a}},{id:"Webcam",plugin:Id,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Qd,options:{companionUrl:a,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:x2,options:{companionUrl:a},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Ml,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function hc(i){const{id:e,plugins:t,locale:n,onAfterResponse:a,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c}=i,h=wd(p,"id"),{uploaderUrl:f}=If(r);let m=new Fl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(xl||""),locale:u_[n||"en"],onBeforeFileAdded:(y,g)=>{if(Object.hasOwn(g,y.id))return!1;const v=!!ei.extension(y.type),P=ei.lookup(y.name)||"";if(!v&&P&&P!==y.type){const S=ga(y);S&&(y.extension=S),y.type=P}return y},...o,restrictions:c}).use(Ff,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:f,async onBeforeRequest(y,g){var x;const{hashFileName:v,id:P,meta:S}=g,A=ga(g);y.setHeader("x-uploader-file-name",`${v}`),y.setHeader("x-uploader-file-id",`${P}`),y.setHeader("x-uploader-file-ext",`${A}`),y.setHeader("x-uploader-base-url",new URL(y.getURL()).pathname),y.setHeader("x-uploader-endpoint-url",f),y.setHeader("x-uploader-metadata",JSON.stringify(S,(C,k)=>typeof k=="string"?encodeURIComponent(k):k));const I=(window==null?void 0:window.uploaderComponentId)||((x=window==null?void 0:window.blocklet)==null?void 0:x.componentId);I&&y.setHeader("x-component-did",(I||"").split("/").pop())},onAfterResponse:async(y,g)=>{const v={},P=y.getUnderlyingObject();try{P.response&&(v.data=JSON.parse(P.response))}catch{v.data={}}v.method=y.getMethod().toUpperCase(),v.url=y.getURL(),v.status=P.status,v.headers={...y._headers};const S=P.getAllResponseHeaders();if(S&&S.split(`\r
|
|
57
57
|
`).forEach(C=>{const[k,U]=C.split(": ");k&&U&&(v.headers[k]=U)}),["PATCH","POST"].includes(v.method)&&[200,500].includes(v.status)){const x=[!0,"true"].includes(v.headers["x-uploader-file-exist"]),C=I_(v.url,v.headers["x-uploader-file-name"]),k=m.getFile(v.headers["x-uploader-file-id"]);v.file=k,v.uploadURL=C,x&&k&&(v.method==="POST"&&m.pauseResume(k.id),m.emit("upload-success",k,{uploadURL:C}),m.calculateTotalProgress()),v.status===200&&(await(s==null?void 0:s(v)),m.emitUploadSuccess(k,v))}a&&await(a==null?void 0:a(P));const A=m.getState().totalProgress===100,I=m.getFiles().every(x=>x.source==="DropTarget");A&&I&&m.close()},...l});return u&&m.use(Uh,{target:document.body,onDrop:y=>{var g;(g=m==null?void 0:m.open)==null||g.call(m)},...u}),t==null||t.forEach(y=>{if(y){const{plugin:g,options:v}=h[y]||{};g&&m.use(g,v)}}),R_(m),m}const wl=he.forwardRef((i,e)=>{const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},n=Dm({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),a=S2({...i,apiPathProps:t,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions}),{plugins:s=a.map(x=>x.id),id:o="Uploader",popup:r=!1,uploadedProps:l,onOpen:u,onClose:p,locale:c,installerProps:h}=i,f=wd(a,"id"),m=Om(x=>{var C;return(C=x==null?void 0:x.breakpoints)==null?void 0:C.down("md")}),y=Lc([...s,...a.filter(x=>x.alwayUse).map(x=>x.id)]);he.useLayoutEffect(()=>{(async()=>{var k,U,H,L,ee,X;let C=Bc((k=i==null?void 0:i.coreProps)==null?void 0:k.restrictions)?{}:(U=i==null?void 0:i.coreProps)==null?void 0:U.restrictions;va()&&!t.disableMediaKitPrefix&&Bc((H=i==null?void 0:i.coreProps)==null?void 0:H.restrictions)&&await yn.get("/api/uploader/status").then(({data:V})=>{n.availablePluginMap=V.availablePluginMap,C=V.restrictions||{}}),!((L=C==null?void 0:C.allowedFileTypes)!=null&&L.length)&&(C!=null&&C.allowedFileExts)&&(C.allowedFileTypes=Lc((X=(ee=(typeof(C==null?void 0:C.allowedFileExts)=="string"?C==null?void 0:C.allowedFileExts.split(","):C==null?void 0:C.allowedFileExts)||[])==null?void 0:ee.map(V=>ei.lookup((V==null?void 0:V.replaceAll(" ",""))||"")))==null?void 0:X.filter(V=>V)),delete C.allowedFileExts),C.maxFileSize&&typeof C.maxFileSize=="string"&&(C.maxFileSize=ae.parseSize(C.maxFileSize,{iec:!1})||void 0),n.restrictions=C})()},[]),Lm("esc",x=>{n.open&&(x.stopPropagation(),x.preventDefault(),P())},{useCapture:!0}),he.useEffect(()=>{O_(t),n.uppy=hc({...i,id:o,plugins:y,apiPathProps:t,pluginList:a,restrictions:n.restrictions}),n.uppy.open=v,n.uppy.close=P,n.uppy.openPlugin=g,n.uppy.on("dashboard:show-panel",x=>{const{onShowPanel:C}=f[x];C==null||C(e)}),(y.includes("Uploaded")||y.includes("Resources"))&&(n.uppy.off("uploaded:selected"),n.uppy.on("uploaded:selected",x=>{var C;x.forEach(k=>{n.uppy.emitUploadSuccess({id:k._id},{data:k,isMock:!0})}),(C=l==null?void 0:l.onSelectedFiles)==null||C.call(l,x),P()}))},[JSON.stringify({id:o,plugins:y,apiPathProps:t,locale:c,restrictions:n.restrictions})]);function g(x){var C,k,U;if(x=x.replace(/\s/g,""),["MyDevice",...y].map(H=>H.toLowerCase()).includes(x.toLowerCase())){let H=`div[data-uppy-acquirer-id="${x}"] > button`;(U=(k=(C=document==null?void 0:document.getElementById(_s))==null?void 0:C.querySelector(H))==null?void 0:k.click)==null||U.call(k)}}function v(x){var k,U,H,L;n.open=!0,x&&setTimeout(()=>{g(x)},200),n.uppy.emitOpen(),u==null||u(),(U=(k=document.activeElement)==null?void 0:k.blur)==null||U.call(k);const C=n.uppy.getPlugin(_s).el;(H=C==null?void 0:C.focus)==null||H.call(C),(L=C==null?void 0:C.click)==null||L.call(C)}function P(){var x;(x=n.uppy.getPlugin(_s))==null||x.hideAllPanels(),n.open=!1,n.uppy.emitClose(),p==null||p(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500)}he.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:v,close:P}));const S=r?Um:he.Fragment,A=r?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"}},invisible:!0,open:n.open,onClick:x=>{document.activeElement===document.body&&(x.stopPropagation(),P())},...i.wrapperProps}:{...i.wrapperProps},I=m?"42px":"40px";return st.jsx(S,{...A,children:st.jsxs($m,{onClose:P,did:_2,disabled:!n.open,...h,children:[st.jsx(Im,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),st.jsxs(bd,{className:"uploader-container",id:cd,onClick:x=>x.stopPropagation(),sx:{position:"relative",width:m?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}}},children:[r&&st.jsx(Rm,{"aria-label":"close",onClick:P,sx:{color:"#fafafa",position:"absolute",...m?{bottom:`calc(0px - ${I} - 16px)`,left:`calc(50vw - ${I} - 8px)`}:{right:`calc(0px - ${I} - 16px)`,top:-12}},children:st.jsx(Wm,{sx:{fontSize:I}})}),n.uppy&&st.jsx(Fh,{inline:!0,target:`#${cd}`,id:_s,uppy:n.uppy,plugins:y,fileManagerSelectionType:"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:P,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),F2=Object.freeze(Object.defineProperty({__proto__:null,Uploader:wl,default:wl,initUploader:hc},Symbol.toStringTag,{value:"Module"})),ud=he.lazy(()=>vd(()=>Promise.resolve().then(()=>F2),void 0,import.meta.url).then(i=>({default:i.Uploader}))),fc=he.createContext(null);function hm(){const i=he.useContext(fc);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function C2({onChange:i,children:e,...t}){const n=hm(),a=()=>{var o;const s=(o=n==null?void 0:n.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return st.jsx(bd,{onClick:a,...t,children:e})}function E2({children:i,popup:e,...t}){const n=he.useRef(null),a=he.useMemo(()=>e?Mm.createPortal(st.jsx(ud,{ref:n,popup:!0,...t},"uploader"),document.body):st.jsx(ud,{ref:n,popup:!1,...t},"uploader"),[n,e,t]);return st.jsxs(fc.Provider,{value:n,children:[i,a]})}const rP=Object.freeze(Object.defineProperty({__proto__:null,Uploader:wl,UploaderContext:fc,UploaderProvider:E2,UploaderTrigger:C2,initUploader:hc,useUploaderContext:hm},Symbol.toStringTag,{value:"Module"}));export{D_ as g,rP as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dU as S}from"./index-
|
|
1
|
+
import{dU as S}from"./index-CKU0PpEw.js";function I(r,t,n){return(t=S(t))in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function h(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,e)}return n}function m(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(e){I(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function i(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var E=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),v=function(){return Math.random().toString(36).substring(7).split("").join(".")},P={INIT:"@@redux/INIT"+v(),REPLACE:"@@redux/REPLACE"+v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v()}};function R(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function T(r,t,n){var e;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(i(1));return n(T)(r,t)}if(typeof r!="function")throw new Error(i(2));var u=r,a=t,p=[],c=p,f=!1;function w(){c===p&&(c=p.slice())}function g(){if(f)throw new Error(i(3));return a}function O(o){if(typeof o!="function")throw new Error(i(4));if(f)throw new Error(i(5));var b=!0;return w(),c.push(o),function(){if(b){if(f)throw new Error(i(6));b=!1,w();var s=c.indexOf(o);c.splice(s,1),p=null}}}function y(o){if(!R(o))throw new Error(i(7));if(typeof o.type>"u")throw new Error(i(8));if(f)throw new Error(i(9));try{f=!0,a=u(a,o)}finally{f=!1}for(var b=p=c,l=0;l<b.length;l++){var s=b[l];s()}return o}function N(o){if(typeof o!="function")throw new Error(i(10));u=o,y({type:P.REPLACE})}function A(){var o,b=O;return o={subscribe:function(s){if(typeof s!="object"||s===null)throw new Error(i(11));function d(){s.next&&s.next(g())}d();var x=b(d);return{unsubscribe:x}}},o[E]=function(){return this},o}return y({type:P.INIT}),e={dispatch:y,subscribe:O,getState:g,replaceReducer:N},e[E]=A,e}function j(r,t){return function(){return t(r.apply(this,arguments))}}function K(r,t){if(typeof r=="function")return j(r,t);if(typeof r!="object"||r===null)throw new Error(i(16));var n={};for(var e in r){var u=r[e];typeof u=="function"&&(n[e]=j(u,t))}return n}function L(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,u){return function(){return e(u.apply(void 0,arguments))}})}function M(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return function(e){return function(){var u=e.apply(void 0,arguments),a=function(){throw new Error(i(15))},p={getState:u.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(f){return f(p)});return a=L.apply(void 0,c)(u.dispatch),m(m({},u),{},{dispatch:a})}}}export{I as _,M as a,K as b,T as c,L as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as _,j as p,Q as S,d0 as V,fM as ne,dM as pe,r as P,q as Me,cB as ii,t as ti,ch as Le,fz as ri,fK as ai,g3 as oi,dO as ni,f$ as si,dN as li,a2 as Ae,fc as Ce,gc as ci,av as qe,cN as M,n as Ue,g as di,cz as ui,gd as bi}from"./index-B1ahK-2I.js";function he({optionalComponent:a,index:n,installStatus:f,hasPermission:l,t:E}){const h=()=>{window.open(a==null?void 0:a.installUrl,"_blank")},x=()=>{window.open(a==null?void 0:a.storeUrl,"_blank")},c=()=>{window.location.reload()},d=f==="stopped"||f==="running",s=60;return p.jsxs(S,{children:[n===0?null:p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[p.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:a.logoUrl,alt:a.meta.title}),p.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[p.jsxs(S,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var w;return x((w=a.meta)==null?void 0:w.did)},children:[a.meta.title,p.jsxs(S,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,p.jsx(ne,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:V.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),p.jsx(S,{sx:{marginTop:0,opacity:.7},children:a.meta.description}),p.jsx(S,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:f?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:d?p.jsx(pe,{variant:"contained",onClick:c,children:E("componentInstallerRefresh")},"refresh"):p.jsx(pe,{disabled:!0,sx:{color:"#333"},startIcon:p.jsx(ne,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:f},"status")}):p.jsx(pe,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var w;return h((w=a.meta)==null?void 0:w.did)},children:E("componentInstallerInstall")},"install")}),d?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:E("componentInstallerSuccessInstalled")}):null]})]})]})}he.propTypes={t:_.func.isRequired,optionalComponent:_.object.isRequired,index:_.number.isRequired,installStatus:_.string,hasPermission:_.bool.isRequired};he.defaultProps={installStatus:""};const fi={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},we=a=>typeof a=="string"?new Set(a.split(";;")):new Set(a);function pi({did:a,onInstalled:n,onError:f}){const l=Array.isArray(a)?a.join(";;"):a,[E,h]=P.useState({}),x=P.useRef({onInstalled:n,onError:f});x.current={onInstalled:n,onError:f};const{optionalComponents:c,componentMountPoints:d}=window.blocklet,s=P.useMemo(()=>{var r;if(!c||!c.length)return[];const u=we(l),e=c.filter(i=>u.has(i.meta.did));return(r=e?x.current.onError:x.current.onInstalled)==null||r(e),e},[l,c]),w=P.useMemo(()=>{if(s.length)return!0;const u=we(l);return(d||[]).find(e=>u.has(e.did))},[s,d,l]);return s.forEach(u=>{u.storeUrl=Me(u.meta.homepage,"blocklets",u.meta.did),u.installUrl=Me(window.blocklet.appUrl,ii,`/admin/components?install-component=${u.meta.did}`)}),P.useEffect(()=>{const u=e=>{var r,i,t,o,T;if(e.origin===window.blocklet.appUrl&&((r=e.data)==null?void 0:r.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let I=!1;const m=we(l);(T=(o=e.data)==null?void 0:o.blocklet)==null||T.children.forEach(b=>{var O;m.has((O=b.meta)==null?void 0:O.did)&&(I=!0,h(A=>{var C;return{...A,[(C=b.meta)==null?void 0:C.did]:b.status||"waiting"}}))}),I||h({})}};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}},[l]),{optComponents:s,installed:!s.length&&w,installStatus:E,setInstallStatus:h,definedInBlockletYML:w}}function Q({warnIcon:a,did:n,noPermissionMute:f,onInstalled:l,onError:E,children:h,closeByOutSize:x,onClose:c,fallback:d,disabled:s,roles:w=["owner","admin"]}){const{locale:u}=ti(),e=Le((m,b={})=>ri(fi,m,u,"en",b)),{installed:r,optComponents:i,installStatus:t,definedInBlockletYML:o}=pi({did:n,onInstalled:l,onError:E}),T=P.useContext(ai),I=()=>{c==null||c(!1)};return s?h:p.jsx(oi,{session:T==null?void 0:T.session,roles:w,children:({hasPermission:m})=>r?h:f&&!m?d||null:typeof h=="function"?p.jsxs(p.Fragment,{children:[d,h({hasPermission:m,optComponents:i,installStatus:t})]}):p.jsxs(p.Fragment,{children:[d,p.jsx(ni,{onClickAway:b=>{b.preventDefault(),b.stopPropagation(),x&&I()},children:p.jsx(si,{in:!0,timeout:350,children:p.jsx(li,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:V.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${V.gray6}, 0px 0px 0px 1px ${V.gray6}`},children:o?p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((b,O)=>{var A,C;return p.jsx(he,{t:e,hasPermission:m,index:O,optionalComponent:b,installStatus:t[(A=b.meta)==null?void 0:A.did]},((C=b.meta)==null?void 0:C.did)||O)})}),m?null:p.jsxs(p.Fragment,{children:[p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{padding:"20px 24px"},children:p.jsx(S,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",n]})]})})})})]})})}Q.propTypes={disabled:_.bool,warnIcon:_.node,did:_.oneOfType([_.string,_.arrayOf(_.string)]).isRequired,noPermissionMute:_.bool,onInstalled:_.func,onError:_.func,children:_.any.isRequired,closeByOutSize:_.bool,onClose:_.func,fallback:_.node,roles:_.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function He(a){return window.blocklet?p.jsx(Q,{...a}):a.children}He.propTypes={...Q.propTypes,children:_.any.isRequired};He.defaultProps={...Q.defaultProps};var ge={};Object.defineProperty(ge,"__esModule",{value:!0});var wi=ge.default=void 0;mi(P);var ze=p;function mi(a){return a&&a.__esModule?a:{default:a}}function Be(a,n){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);n&&(l=l.filter(function(E){return Object.getOwnPropertyDescriptor(a,E).enumerable})),f.push.apply(f,l)}return f}function De(a){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?Be(Object(f),!0).forEach(function(l){hi(a,l,f[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):Be(Object(f)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(f,l))})}return a}function hi(a,n,f){return(n=gi(n))in a?Object.defineProperty(a,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[n]=f,a}function gi(a){var n=vi(a,"string");return typeof n=="symbol"?n:n+""}function vi(a,n){if(typeof a!="object"||!a)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var l=f.call(a,n||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(a)}var ve=function(n){return(0,ze.jsx)("svg",De(De({},n),{},{children:(0,ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};ve.displayName="revoke";wi=ge.default=ve;_.any.isRequired,_.any.isRequired,_.string.isRequired,_.func.isRequired,_.any,_.any,_.number;P.createContext({});const Si=new ci;qe.defaults.timeout=10*1e3;qe.create();var xi={},We={},N={},xe={},H={};H.__esModule=!0;H.joinClassNames=void 0;H.joinClassNames=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return a.filter(function(f){return f}).join(" ")};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.maxHeight,d=h.color,s=h.lineSpacing,w=s===void 0?"0.7em":s,u=h.style,e={maxHeight:c,width:"100%",height:"1em",backgroundColor:d,marginTop:w};return f.createElement("div",{className:l.joinClassNames("text-row",x),style:n(n({},e),u)})};a.default=E})(xe);var ye={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,borderRadius:"500rem",width:"100%",height:"100%"};return f.createElement("div",{className:l.joinClassNames("round-shape",x),style:n(n({},s),c)})};a.default=E})(ye);var Fe={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,width:"100%",height:"100%",marginRight:10};return f.createElement("div",{className:l.joinClassNames("rect-shape",x),style:n(n({},s),c)})};a.default=E})(Fe);var ke={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=xe,E=H,h={width:"100%"},x=[97,100,94,90,98,95,98,40],c=function(d){var s=d.rows,w=d.lineSpacing,u=d.color,e=d.style,r=d.className,i=d.widths,t=i===void 0?x:i,o=function(T){return{maxHeight:100/(s*2-1)+"%",width:t[(T+t.length)%t.length]+"%"}};return f.createElement("div",{className:E.joinClassNames("text-block",r),style:n(n({},h),e)},Array.apply(null,Array(s)).map(function(T,I){return f.createElement(l.default,{color:u,style:o(I),lineSpacing:I!==0?w:0,key:I})}))};a.default=c})(ke);var Ve={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=ke,E=ye,h=H,x={display:"flex"},c=function(d){var s=d.className,w=d.style,u=d.color,e=d.rows;return f.createElement("div",{className:h.joinClassNames("media-block",s),style:n(n({},x),w)},f.createElement(E.default,{color:u,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),f.createElement(l.default,{color:u,rows:e}))};a.default=c})(Ve);N.__esModule=!0;N.media=N.text=N.rect=N.round=N.textRow=N.MediaBlock=N.TextBlock=N.RectShape=N.RoundShape=N.TextRow=void 0;var Ye=xe;N.TextRow=Ye.default;var Ge=ye;N.RoundShape=Ge.default;var Ke=Fe;N.RectShape=Ke.default;var Xe=ke;N.TextBlock=Xe.default;var Ze=Ve;N.MediaBlock=Ze.default;N.textRow=Ye.default;N.round=Ge.default;N.rect=Ke.default;N.text=Xe.default;N.media=Ze.default;(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(c){for(var d,s=1,w=arguments.length;s<w;s++){d=arguments[s];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c[u]=d[u])}return c},n.apply(this,arguments)},f=M&&M.__rest||function(c,d){var s={};for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&d.indexOf(w)<0&&(s[w]=c[w]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,w=Object.getOwnPropertySymbols(c);u<w.length;u++)d.indexOf(w[u])<0&&Object.prototype.propertyIsEnumerable.call(c,w[u])&&(s[w[u]]=c[w[u]]);return s};a.__esModule=!0;var l=P,E=N,h=H,x=function(c){var d=c.delay,s=d===void 0?0:d,w=c.type,u=w===void 0?"text":w,e=c.color,r=e===void 0?"#CDCDCD":e,i=c.rows,t=i===void 0?3:i,o=c.ready,T=c.firstLaunchOnly,I=c.children,m=c.className,b=c.showLoadingAnimation,O=c.customPlaceholder,A=f(c,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),C=l.useState(o),W=C[0],F=C[1],z=l.useRef(null),$=function(){var K=b?h.joinClassNames("show-loading-animation",m):m;if(O&&l.isValidElement(O)){var q=h.joinClassNames(O.props.className,K);return l.cloneElement(O,{className:q})}else if(O)return O;var Y=E[u];return l.createElement(Y,n({},A,{color:r,rows:t,className:K}))};return l.useEffect(function(){!T&&W&&!o?s&&s>0?z.current=window.setTimeout(function(){F(!1)},s):F(!1):o&&(z.current&&window.clearTimeout(z.current),W||F(!0))},[T,W,o,s]),l.useEffect(function(){return function(){z.current&&window.clearTimeout(z.current)}},[]),W?I:$()};a.default=x})(We);(function(a){a.__esModule=!0;var n=We;a.default=n.default})(xi);Ue(S)`
|
|
1
|
+
import{P as _,j as p,Q as S,d0 as V,fM as ne,dM as pe,r as P,q as Me,cB as ii,t as ti,ch as Le,fz as ri,fK as ai,g3 as oi,dO as ni,f$ as si,dN as li,a2 as Ae,fc as Ce,gc as ci,av as qe,cN as M,n as Ue,g as di,cz as ui,gd as bi}from"./index-CKU0PpEw.js";function he({optionalComponent:a,index:n,installStatus:f,hasPermission:l,t:E}){const h=()=>{window.open(a==null?void 0:a.installUrl,"_blank")},x=()=>{window.open(a==null?void 0:a.storeUrl,"_blank")},c=()=>{window.location.reload()},d=f==="stopped"||f==="running",s=60;return p.jsxs(S,{children:[n===0?null:p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[p.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:a.logoUrl,alt:a.meta.title}),p.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[p.jsxs(S,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var w;return x((w=a.meta)==null?void 0:w.did)},children:[a.meta.title,p.jsxs(S,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,p.jsx(ne,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:V.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),p.jsx(S,{sx:{marginTop:0,opacity:.7},children:a.meta.description}),p.jsx(S,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:f?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:d?p.jsx(pe,{variant:"contained",onClick:c,children:E("componentInstallerRefresh")},"refresh"):p.jsx(pe,{disabled:!0,sx:{color:"#333"},startIcon:p.jsx(ne,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:f},"status")}):p.jsx(pe,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var w;return h((w=a.meta)==null?void 0:w.did)},children:E("componentInstallerInstall")},"install")}),d?p.jsx(S,{sx:{marginTop:2,opacity:.7},children:E("componentInstallerSuccessInstalled")}):null]})]})]})}he.propTypes={t:_.func.isRequired,optionalComponent:_.object.isRequired,index:_.number.isRequired,installStatus:_.string,hasPermission:_.bool.isRequired};he.defaultProps={installStatus:""};const fi={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},we=a=>typeof a=="string"?new Set(a.split(";;")):new Set(a);function pi({did:a,onInstalled:n,onError:f}){const l=Array.isArray(a)?a.join(";;"):a,[E,h]=P.useState({}),x=P.useRef({onInstalled:n,onError:f});x.current={onInstalled:n,onError:f};const{optionalComponents:c,componentMountPoints:d}=window.blocklet,s=P.useMemo(()=>{var r;if(!c||!c.length)return[];const u=we(l),e=c.filter(i=>u.has(i.meta.did));return(r=e?x.current.onError:x.current.onInstalled)==null||r(e),e},[l,c]),w=P.useMemo(()=>{if(s.length)return!0;const u=we(l);return(d||[]).find(e=>u.has(e.did))},[s,d,l]);return s.forEach(u=>{u.storeUrl=Me(u.meta.homepage,"blocklets",u.meta.did),u.installUrl=Me(window.blocklet.appUrl,ii,`/admin/components?install-component=${u.meta.did}`)}),P.useEffect(()=>{const u=e=>{var r,i,t,o,T;if(e.origin===window.blocklet.appUrl&&((r=e.data)==null?void 0:r.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let I=!1;const m=we(l);(T=(o=e.data)==null?void 0:o.blocklet)==null||T.children.forEach(b=>{var O;m.has((O=b.meta)==null?void 0:O.did)&&(I=!0,h(A=>{var C;return{...A,[(C=b.meta)==null?void 0:C.did]:b.status||"waiting"}}))}),I||h({})}};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}},[l]),{optComponents:s,installed:!s.length&&w,installStatus:E,setInstallStatus:h,definedInBlockletYML:w}}function Q({warnIcon:a,did:n,noPermissionMute:f,onInstalled:l,onError:E,children:h,closeByOutSize:x,onClose:c,fallback:d,disabled:s,roles:w=["owner","admin"]}){const{locale:u}=ti(),e=Le((m,b={})=>ri(fi,m,u,"en",b)),{installed:r,optComponents:i,installStatus:t,definedInBlockletYML:o}=pi({did:n,onInstalled:l,onError:E}),T=P.useContext(ai),I=()=>{c==null||c(!1)};return s?h:p.jsx(oi,{session:T==null?void 0:T.session,roles:w,children:({hasPermission:m})=>r?h:f&&!m?d||null:typeof h=="function"?p.jsxs(p.Fragment,{children:[d,h({hasPermission:m,optComponents:i,installStatus:t})]}):p.jsxs(p.Fragment,{children:[d,p.jsx(ni,{onClickAway:b=>{b.preventDefault(),b.stopPropagation(),x&&I()},children:p.jsx(si,{in:!0,timeout:350,children:p.jsx(li,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:V.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${V.gray6}, 0px 0px 0px 1px ${V.gray6}`},children:o?p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((b,O)=>{var A,C;return p.jsx(he,{t:e,hasPermission:m,index:O,optionalComponent:b,installStatus:t[(A=b.meta)==null?void 0:A.did]},((C=b.meta)==null?void 0:C.did)||O)})}),m?null:p.jsxs(p.Fragment,{children:[p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsx(S,{sx:{padding:"20px 24px"},children:p.jsx(S,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):p.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[p.jsxs(S,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[a||p.jsx(ne,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),p.jsx(S,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),p.jsx(S,{sx:{flex:1}}),c?p.jsx(Ae,{variant:"outlined",className:"button",onClick:I,children:p.jsx(Ce,{})}):null]}),p.jsx(S,{sx:{width:"100%",height:"1px",backgroundColor:V.gray6}}),p.jsxs(S,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",n]})]})})})})]})})}Q.propTypes={disabled:_.bool,warnIcon:_.node,did:_.oneOfType([_.string,_.arrayOf(_.string)]).isRequired,noPermissionMute:_.bool,onInstalled:_.func,onError:_.func,children:_.any.isRequired,closeByOutSize:_.bool,onClose:_.func,fallback:_.node,roles:_.array};Q.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function He(a){return window.blocklet?p.jsx(Q,{...a}):a.children}He.propTypes={...Q.propTypes,children:_.any.isRequired};He.defaultProps={...Q.defaultProps};var ge={};Object.defineProperty(ge,"__esModule",{value:!0});var wi=ge.default=void 0;mi(P);var ze=p;function mi(a){return a&&a.__esModule?a:{default:a}}function Be(a,n){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);n&&(l=l.filter(function(E){return Object.getOwnPropertyDescriptor(a,E).enumerable})),f.push.apply(f,l)}return f}function De(a){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?Be(Object(f),!0).forEach(function(l){hi(a,l,f[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):Be(Object(f)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(f,l))})}return a}function hi(a,n,f){return(n=gi(n))in a?Object.defineProperty(a,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[n]=f,a}function gi(a){var n=vi(a,"string");return typeof n=="symbol"?n:n+""}function vi(a,n){if(typeof a!="object"||!a)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var l=f.call(a,n||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(a)}var ve=function(n){return(0,ze.jsx)("svg",De(De({},n),{},{children:(0,ze.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};ve.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};ve.displayName="revoke";wi=ge.default=ve;_.any.isRequired,_.any.isRequired,_.string.isRequired,_.func.isRequired,_.any,_.any,_.number;P.createContext({});const Si=new ci;qe.defaults.timeout=10*1e3;qe.create();var xi={},We={},N={},xe={},H={};H.__esModule=!0;H.joinClassNames=void 0;H.joinClassNames=function(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];return a.filter(function(f){return f}).join(" ")};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.maxHeight,d=h.color,s=h.lineSpacing,w=s===void 0?"0.7em":s,u=h.style,e={maxHeight:c,width:"100%",height:"1em",backgroundColor:d,marginTop:w};return f.createElement("div",{className:l.joinClassNames("text-row",x),style:n(n({},e),u)})};a.default=E})(xe);var ye={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,borderRadius:"500rem",width:"100%",height:"100%"};return f.createElement("div",{className:l.joinClassNames("round-shape",x),style:n(n({},s),c)})};a.default=E})(ye);var Fe={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(h){for(var x,c=1,d=arguments.length;c<d;c++){x=arguments[c];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(h[s]=x[s])}return h},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=H,E=function(h){var x=h.className,c=h.style,d=h.color,s={backgroundColor:d,width:"100%",height:"100%",marginRight:10};return f.createElement("div",{className:l.joinClassNames("rect-shape",x),style:n(n({},s),c)})};a.default=E})(Fe);var ke={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=xe,E=H,h={width:"100%"},x=[97,100,94,90,98,95,98,40],c=function(d){var s=d.rows,w=d.lineSpacing,u=d.color,e=d.style,r=d.className,i=d.widths,t=i===void 0?x:i,o=function(T){return{maxHeight:100/(s*2-1)+"%",width:t[(T+t.length)%t.length]+"%"}};return f.createElement("div",{className:E.joinClassNames("text-block",r),style:n(n({},h),e)},Array.apply(null,Array(s)).map(function(T,I){return f.createElement(l.default,{color:u,style:o(I),lineSpacing:I!==0?w:0,key:I})}))};a.default=c})(ke);var Ve={};(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(d){for(var s,w=1,u=arguments.length;w<u;w++){s=arguments[w];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[e]=s[e])}return d},n.apply(this,arguments)};a.__esModule=!0;var f=P,l=ke,E=ye,h=H,x={display:"flex"},c=function(d){var s=d.className,w=d.style,u=d.color,e=d.rows;return f.createElement("div",{className:h.joinClassNames("media-block",s),style:n(n({},x),w)},f.createElement(E.default,{color:u,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),f.createElement(l.default,{color:u,rows:e}))};a.default=c})(Ve);N.__esModule=!0;N.media=N.text=N.rect=N.round=N.textRow=N.MediaBlock=N.TextBlock=N.RectShape=N.RoundShape=N.TextRow=void 0;var Ye=xe;N.TextRow=Ye.default;var Ge=ye;N.RoundShape=Ge.default;var Ke=Fe;N.RectShape=Ke.default;var Xe=ke;N.TextBlock=Xe.default;var Ze=Ve;N.MediaBlock=Ze.default;N.textRow=Ye.default;N.round=Ge.default;N.rect=Ke.default;N.text=Xe.default;N.media=Ze.default;(function(a){var n=M&&M.__assign||function(){return n=Object.assign||function(c){for(var d,s=1,w=arguments.length;s<w;s++){d=arguments[s];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c[u]=d[u])}return c},n.apply(this,arguments)},f=M&&M.__rest||function(c,d){var s={};for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&d.indexOf(w)<0&&(s[w]=c[w]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,w=Object.getOwnPropertySymbols(c);u<w.length;u++)d.indexOf(w[u])<0&&Object.prototype.propertyIsEnumerable.call(c,w[u])&&(s[w[u]]=c[w[u]]);return s};a.__esModule=!0;var l=P,E=N,h=H,x=function(c){var d=c.delay,s=d===void 0?0:d,w=c.type,u=w===void 0?"text":w,e=c.color,r=e===void 0?"#CDCDCD":e,i=c.rows,t=i===void 0?3:i,o=c.ready,T=c.firstLaunchOnly,I=c.children,m=c.className,b=c.showLoadingAnimation,O=c.customPlaceholder,A=f(c,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),C=l.useState(o),W=C[0],F=C[1],z=l.useRef(null),$=function(){var K=b?h.joinClassNames("show-loading-animation",m):m;if(O&&l.isValidElement(O)){var q=h.joinClassNames(O.props.className,K);return l.cloneElement(O,{className:q})}else if(O)return O;var Y=E[u];return l.createElement(Y,n({},A,{color:r,rows:t,className:K}))};return l.useEffect(function(){!T&&W&&!o?s&&s>0?z.current=window.setTimeout(function(){F(!1)},s):F(!1):o&&(z.current&&window.clearTimeout(z.current),W||F(!0))},[T,W,o,s]),l.useEffect(function(){return function(){z.current&&window.clearTimeout(z.current)}},[]),W?I:$()};a.default=x})(We);(function(a){a.__esModule=!0;var n=We;a.default=n.default})(xi);Ue(S)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-
|
|
1
|
+
import{j as e,G as y,P as s,n as b,m as p,t as k,r as x,N as h,Q as u,l as v,p as B,o as R}from"./index-CKU0PpEw.js";import{D as U}from"./index-yU18hYDn.js";import{u as L}from"./blocklet-uada39gX.js";import{C as N,M as C}from"./memory-CCJf6Oap.js";import{B as D}from"./bundle-avatar-BBqlxK_u.js";import"./FilterList-DhkfKYuD.js";import"./useThemeProps-AvaZ9peg.js";import"./Select-C9dnMaBi.js";import"./Delete-B0fykqSv.js";import"./InputLabel-Dk0k1wxQ.js";import"./TextField-DVBgajf0.js";import"./LastPage-CK19i1GM.js";import"./index-Dg1KeOMS.js";import"./redux-Deq08ymq.js";import"./Search-DiD8rSmP.js";import"./index-DZjB4N8F.js";import"./MoreVert-B2z5RSzn.js";import"./chart-i8lNbY7K.js";function g({blocklet:r,cpuHistory:i,memoryHistory:n,...m}){const l=r.appRuntimeInfo||{};return e.jsx(M,{component:"div",...m,children:e.jsxs(y,{className:"page-metrics",container:!0,spacing:5,children:[e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!i.length&&e.jsx(N,{currentLoad:l.cpuUsage||0,history:i,style:{height:150}})},"cpu"),e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&e.jsx(C,{used:l.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}g.propTypes={blocklet:s.object.isRequired,cpuHistory:s.arrayOf(s.shape({date:s.number,value:s.number})),memoryHistory:s.arrayOf(s.shape({date:s.number,value:s.number}))};g.defaultProps={cpuHistory:[],memoryHistory:[]};const M=b(p)``;function P(){const{t:r,locale:i}=k(),{blocklet:n,runtimeHistory:m,actions:{refreshBlocklet:l}}=L(),a=x.useMemo(()=>{const t=[];return h.forEachBlockletSync(n,(o,{ancestors:f,id:d,level:c})=>{o.runtimeInfo&&t.push({type:"blocklet",groupId:n.meta.did,groupName:h.getDisplayName(n),id:d,name:h.getDisplayName(o,!0),blocklet:n,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:f})}),t},[n]);x.useEffect(()=>{const t=setInterval(()=>{l()},1e4);return()=>{clearInterval(t)}},[]);const I=t=>B(Number(t||0),{locale:R(i)}),j=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:f,level:d,ancestors:c}=a[t];return e.jsxs(u,{display:"flex",alignItems:"center",pl:d*2,children:[e.jsx(D,{size:14,blocklet:f,ancestors:c}),e.jsx(u,{ml:1,children:o})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return I(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return v((o==null?void 0:o.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return e.jsxs(H,{component:"div",children:[e.jsx(p,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),n.status==="running"?[e.jsx(u,{children:e.jsx(g,{blocklet:n,cpuHistory:m.cpu,memoryHistory:m.memory})}),e.jsx(u,{mt:3,children:e.jsx(U,{title:r("analytics.detail"),className:"monitor-table",locale:i,data:a,columns:j,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:e.jsx(p,{children:r("blocklet.runtimeInfo.noRunning")})]})}P.propTypes={};const H=b(p)``;export{P as default};
|