@abtnode/blocklet-services 1.16.45-beta-20250630-024910-24ef8c24 → 1.16.45-beta-20250630-233332-04c2bd6f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{access-control-BI8hR4m6.js → access-control-D6jgL4-Q.js} +1 -1
- package/dist/assets/{add-component-core-DJ6wP3Fb.js → add-component-core-BG8enqM8.js} +1 -1
- package/dist/assets/{add-resource-Xzrl9J9E.js → add-resource-DBw6Hwrb.js} +1 -1
- package/dist/assets/{advanced-DAKR9vq6.js → advanced-BpYEMYw4.js} +1 -1
- package/dist/assets/{appearance-CLcBa2If.js → appearance-CjcxJ6ic.js} +1 -1
- package/dist/assets/{audit-logs-BpxjWxH9.js → audit-logs-BFnhmmF4.js} +1 -1
- package/dist/assets/{authorize-CJAHvI6f.js → authorize-Gx35POqY.js} +1 -1
- package/dist/assets/{branding-Ds5vrS60.js → branding-CgdEHwXJ.js} +2 -2
- package/dist/assets/{branding-BqmpdYqw.js → branding-DepEIhg-.js} +1 -1
- package/dist/assets/{bundle-avatar-DAWssS61.js → bundle-avatar-DZSSBP_H.js} +1 -1
- package/dist/assets/{complete-CoItwYYG.js → complete-DTGHOMGf.js} +1 -1
- package/dist/assets/{component-D4dOU94T.js → component-DHj65rcS.js} +3 -3
- package/dist/assets/{config-CrGTIwll.js → config-CJAobwc5.js} +1 -1
- package/dist/assets/{config-navigation-Ba_9bXNB.js → config-navigation-C-BE_6dA.js} +3 -3
- package/dist/assets/{config-space-C_-wUm8x.js → config-space-D4KxQRvm.js} +1 -1
- package/dist/assets/{confirm-Cr4yXaP3.js → confirm-C4bZXKUn.js} +1 -1
- package/dist/assets/connect-DuQLxqA4.js +5 -0
- package/dist/assets/{connect-LANmhgqd.js → connect-igCX-2p5.js} +1 -1
- package/dist/assets/{connect-to-CcDyzDBC.js → connect-to-ge1ZQPSM.js} +1 -1
- package/dist/assets/{dashboard-BrJfe1tK.js → dashboard-D5eoQ8IH.js} +3 -3
- package/dist/assets/{delete-confirm-BTxOYOoY.js → delete-confirm-BnUaxWhM.js} +1 -1
- package/dist/assets/{domain-action-card-C9RDnMzS.js → domain-action-card-BPy2Ol9a.js} +1 -1
- package/dist/assets/domain-iBSqIwzr.js +9 -0
- package/dist/assets/domains-CWzmnE49.js +1 -0
- package/dist/assets/dot-DRiNXWva.js +7 -0
- package/dist/assets/{email-CslWHpNP.js → email-xNJcprp1.js} +1 -1
- package/dist/assets/{exchange-passport-CkSkVesx.js → exchange-passport-xYyJcB-J.js} +1 -1
- package/dist/assets/{fuel-BWsBctX0.js → fuel-Ckwg6eTe.js} +1 -1
- package/dist/assets/{gen-access-key-jpSB31VW.js → gen-access-key-DEIbVQFA.js} +1 -1
- package/dist/assets/{index-CCuD6_Rj.js → index-2BZwphUf.js} +1 -1
- package/dist/assets/{index-Bv_IEtVv.js → index-Ao_gDiOd.js} +1 -1
- package/dist/assets/{index-C0WYw-jd.js → index-BK3wAAMT.js} +1 -1
- package/dist/assets/{index-D-vHTvCV.js → index-BMxp4XYs.js} +1 -1
- package/dist/assets/{index-DUGQ4cKm.js → index-BmL5CdAn.js} +1 -1
- package/dist/assets/{index-DzRGp0If.js → index-BngwF-PN.js} +3 -3
- package/dist/assets/{index-GAl9W53I.js → index-CRqllBas.js} +4 -4
- package/dist/assets/{index-YO79r625.js → index-CTczgaOQ.js} +1 -1
- package/dist/assets/{index-B6novXpp.js → index-Cf3dTiyQ.js} +1 -1
- package/dist/assets/{index-C0kIXw5r.js → index-D2bUzebR.js} +2 -2
- package/dist/assets/{index-B8h7EuKB.js → index-DKsTz8U6.js} +1 -1
- package/dist/assets/{index-l5blEEs7.js → index-DL4w482x.js} +1 -1
- package/dist/assets/{index-D4KLEWFm.js → index-DwZjLaMe.js} +1 -1
- package/dist/assets/{index-CYp1xoZ4.js → index-_99_qC2a.js} +1 -1
- package/dist/assets/{index-ha4GQCBu.js → index-b_hFKwRq.js} +1 -1
- package/dist/assets/{index-Br-eR92d.js → index-rlbe1JM_.js} +1 -1
- package/dist/assets/{invitation-49Fgeotv.js → invitation-Cxmm6AFq.js} +1 -1
- package/dist/assets/{invite-DLJIQmdJ.js → invite-DO-4LQH8.js} +1 -1
- package/dist/assets/{issue-passport-DDCqVv1N.js → issue-passport-C7gVa0yz.js} +1 -1
- package/dist/assets/{item-fK0vcLaQ.js → item-BYHK6spa.js} +1 -1
- package/dist/assets/{layout-feohUWg7.js → layout-Ccou1sEP.js} +1 -1
- package/dist/assets/{list-C8TeMgEe.js → list-8RFvyNnQ.js} +1 -1
- package/dist/assets/{list-DeTNTY_6.js → list-CtZmVtTv.js} +2 -2
- package/dist/assets/{log-BiuahUh0.js → log-BirUybVP.js} +1 -1
- package/dist/assets/{login-5jPX--4W.js → login-myX9lDqn.js} +1 -1
- package/dist/assets/{logo-uploader-DC4SpQmr.js → logo-uploader-Btt6h3-w.js} +3 -3
- package/dist/assets/{lost-passport-BNyxQig9.js → lost-passport-CqYRKR7e.js} +1 -1
- package/dist/assets/{overview-DtickflS.js → overview-eq98s4cm.js} +1 -1
- package/dist/assets/{passport-item-BTBWvJCh.js → passport-item-DHlh26r-.js} +1 -1
- package/dist/assets/{publish-resource-DyUoB0-C.js → publish-resource-CCGxby4r.js} +1 -1
- package/dist/assets/{runtime-Bta2wOnU.js → runtime-B2GP2ZaR.js} +1 -1
- package/dist/assets/{security-Bs24V5aw.js → security-CDJf-siQ.js} +1 -1
- package/dist/assets/setup-C3ECwM0S.js +30 -0
- package/dist/assets/{start-CxjnQYOx.js → start-37CP03ge.js} +1 -1
- package/dist/assets/{status-Cht9_8hC.js → status-DQ2_UfyN.js} +1 -1
- package/dist/assets/{step-actions-BaBVLHSP.js → step-actions-OF8wtaVt.js} +1 -1
- package/dist/assets/{traffic-BdpKUL58.js → traffic-rj9mSgdM.js} +1 -1
- package/dist/assets/{transfer-CyBsVivd.js → transfer-DQB6PRl7.js} +1 -1
- package/dist/assets/{unsubscribe-DUaYCo9A.js → unsubscribe-Bd0HynPK.js} +1 -1
- package/dist/assets/{use-blocklet-logo-fumCZVth.js → use-blocklet-logo-C4yfnUqa.js} +1 -1
- package/dist/assets/useAsync-LB28iJ2a.js +1 -0
- package/dist/assets/useAsync-egXtU13O.js +1 -0
- package/dist/assets/{user-center-DxImDlwk.js → user-center-Puvbe55Q.js} +1 -1
- package/dist/assets/{util-BMWW9F7x.js → util-DeHM07tQ.js} +1 -1
- package/dist/assets/{wrap-locale-BQFJOrpH.js → wrap-locale-rGr2CQ98.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +24 -24
- package/dist/assets/connect-CT4V0Shw.js +0 -5
- package/dist/assets/domain-q-cSvLb-.js +0 -9
- package/dist/assets/domains-DzDEWZRA.js +0 -1
- package/dist/assets/dot-4jhL56kz.js +0 -7
- package/dist/assets/setup-DLQmZAqt.js +0 -30
- package/dist/assets/useAsync-C62uE2pS.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as h,j as e,aa as c,bo as E,bu as g,bs as L,bv as N,H as y,ah as I}from"./vendor-mui-core-Bq8gXTan.js";import{r as m}from"./vendor-react-DEoibe3W.js";import{a as b,k as o,a3 as j}from"./vendor-ux-did-connect-pzpsrvqx.js";import{A as O}from"./config-BZuiK8BP.js";import{P}from"./page-header-DNvUdNpI.js";import{k as T,f as v,e as R}from"./index-
|
|
1
|
+
import{e as h,j as e,aa as c,bo as E,bu as g,bs as L,bv as N,H as y,ah as I}from"./vendor-mui-core-Bq8gXTan.js";import{r as m}from"./vendor-react-DEoibe3W.js";import{a as b,k as o,a3 as j}from"./vendor-ux-did-connect-pzpsrvqx.js";import{A as O}from"./config-BZuiK8BP.js";import{P}from"./page-header-DNvUdNpI.js";import{k as T,f as v,e as R}from"./index-D2bUzebR.js";import{S as Y}from"./layout-Ccou1sEP.js";import{S as k}from"./step-actions-OF8wtaVt.js";import{S as H}from"./button-D_ZVjN82.js";import"./vendor-utils-BfZ4tlod.js";import"./vendor-hooks-DqdmWCmo.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CwufDgLV.js";import"./content-layout-BC2QkTYi.js";import"./use-mobile-DwzRjjku.js";function C({onNext:s}){const S=h(),{t:n,locale:p}=b(),[i,l]=m.useState(!1),[f,d]=m.useState(""),{blocklet:r}=T();m.useEffect(()=>{var a;const t=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((a=t==null?void 0:t.config)==null?void 0:a.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async t=>{let a=o.ACCESS_POLICY_PUBLIC;t===o.WHO_CAN_ACCESS.ALL?a=o.ACCESS_POLICY_PUBLIC:t===o.WHO_CAN_ACCESS.INVITED?a=o.ACCESS_POLICY_INVITED_ONLY:t===o.WHO_CAN_ACCESS.OWNER?a=o.ACCESS_POLICY_OWNER_ONLY:t===o.WHO_CAN_ACCESS.ADMIN&&(a=o.ACCESS_POLICY_ADMIN_ONLY);try{l(!0),await R.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:a}}}),l(!1)}catch(A){l(!1),j.error(A.message)}},x=async t=>{i||(d(t.target.value),await u(t.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return e.jsxs(D,{children:[e.jsx(c,{className:"header",children:e.jsx(P,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(E,{component:"fieldset",children:e.jsx(g,{name:"inherit",value:f,onChange:x,children:O.map(t=>e.jsxs(c,{sx:{mb:2},children:[e.jsx(L,{value:t.value,control:e.jsx(N,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:_}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(c,{className:"tip",children:t.description[p]})]},t.value))})}),e.jsx(k,{mt:8,disabled:i,blocklet:r,onStartNow:()=>s("complete"),children:e.jsx(H,{loading:i,variant:"contained",disabled:i,onClick:()=>s(),children:n("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const D=I(Y)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
.header {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a9 as Cl,j as o,H as _,ab as St,ah as Ve,aa as Y,T as ge,v as Qt,bs as ki,bR as Oi,I as Os,bJ as Is,bY as Rs,A as Cs,be as Pl,b8 as Ps,bq as Ll,O as Tr,bE as _l,bF as Nl,bG as Al,bx as Dl,ak as Ls,L as Ml,b7 as Fl,b5 as Bl,q as Ii,ad as _s,af as $l,al as rt,e as Zt,bK as Ul,y as ar,Z as Ns,a1 as As,M as Ds,bT as Ms,an as Wl,ai as Yt,as as ko,D as zl,E as Oo,a7 as ql,P as Kl,G as Gl,w as Hl,a8 as Vl,N as Io}from"./vendor-mui-core-Bq8gXTan.js";import{r as A,g as Ri,h as Xl,f as Yl,a as Ci,e as Te,b as Wt,l as Ql}from"./vendor-react-DEoibe3W.js";import{j as Fs,d as Jl,S as Zl,s as Bs,A as ec}from"./item-
|
|
1
|
+
import{a9 as Cl,j as o,H as _,ab as St,ah as Ve,aa as Y,T as ge,v as Qt,bs as ki,bR as Oi,I as Os,bJ as Is,bY as Rs,A as Cs,be as Pl,b8 as Ps,bq as Ll,O as Tr,bE as _l,bF as Nl,bG as Al,bx as Dl,ak as Ls,L as Ml,b7 as Fl,b5 as Bl,q as Ii,ad as _s,af as $l,al as rt,e as Zt,bK as Ul,y as ar,Z as Ns,a1 as As,M as Ds,bT as Ms,an as Wl,ai as Yt,as as ko,D as zl,E as Oo,a7 as ql,P as Kl,G as Gl,w as Hl,a8 as Vl,N as Io}from"./vendor-mui-core-Bq8gXTan.js";import{r as A,g as Ri,h as Xl,f as Yl,a as Ci,e as Te,b as Wt,l as Ql}from"./vendor-react-DEoibe3W.js";import{j as Fs,d as Jl,S as Zl,s as Bs,A as ec}from"./item-BYHK6spa.js";import{r as tc,B as ft,ar as Pi,a1 as $s,k as Us,a as gt,I as pt,aR as nc,aI as rc,i as jr,bd as ic,bz as oc,bA as sc,aY as ac,at as Ws,a3 as kr,bB as Ro,aw as lc,F as cc,s as en,a2 as xr,aD as Co,ao as zs,bC as uc,d as qs,bh as Ks,p as dc,E as Gs,a5 as hc,bD as fc,b as li,Q as pc,bE as mc}from"./vendor-ux-did-connect-pzpsrvqx.js";import{m as Po,c as wt,n as gc,E as Or,q as vc,s as yc,t as bc,L as xc,S as wc}from"./vendor-arcblock-CwufDgLV.js";import{L as Lo}from"./launch-result-message-AharZGq2.js";import{P as Hs}from"./page-header-DNvUdNpI.js";import{e as ht,v as Ec,B as Sc,A as vn,z as Ir,E as _o,a1 as Vs,a9 as Tc,ai as jc,J as kc,o as Br,$ as Oc,aj as Ic,ak as Rc,al as Cc,b as Jn,am as Pc,c as Lc}from"./vendor-utils-BfZ4tlod.js";import{f as ci}from"./index-8eXqqyHQ.js";import{D as Nn,f as Ut,a0 as _c,a1 as Nc,a2 as Ac,H as Dc,a3 as Mc,a4 as Fc,a5 as Bc,G as Rr,a6 as Xs,_ as $c,a7 as Uc,a8 as Wc,a9 as zc,aa as ur,ab as No,ac as qc}from"./index-D2bUzebR.js";import{u as Kc,C as Gc}from"./config-space-D4KxQRvm.js";import{R as $r}from"./logo-uploader-Btt6h3-w.js";import{S as Hc}from"./index-BMxp4XYs.js";import{s as Ys,h as Vc,w as Xc,f as Yc,a as Qc,b as Jc,c as Zc,M as eu}from"./index-CTlzm-Mc.js";import{l as lr,b as tu,u as nu,f as Qs,a as ru,t as iu}from"./vendor-hooks-DqdmWCmo.js";import{g as ou}from"./get-safe-url-B0-S5PGZ.js";import{p as su}from"./index-BxJZWVOT.js";import{r as au}from"./cloneDeep-CDl5kZTY.js";import{_ as Li}from"./useLocalStorage-CaPDqrQ7.js";import{I as Ao}from"./index-DPIWnhb5.js";import{u as lu}from"./session-BGdAM8zS.js";import{W as cu}from"./did-address-NnOD1W_A.js";import{a as Do}from"./api-C1S8LUld.js";import{d as uu,a as du,v as hu,e as fu}from"./util-DeHM07tQ.js";import{u as Js}from"./use-mobile-CtTQsfXN.js";import{C as pu}from"./content-layout-BC2QkTYi.js";import{C as mu,D as gu,a as vu}from"./connect-to-ge1ZQPSM.js";import{d as yu}from"./ArrowDropDown-DBJPIOl4.js";import{d as bu}from"./ChevronLeft-BBJJJhVi.js";import{d as xu}from"./ChevronRight-BU9I7WD4.js";import{d as Ur}from"./search-4YYphs0l.js";const yg="blocklet-add-component-registry",bg="server-add-registry",xg=e=>`resource-${e}-add-registry`;var _i={},wu=Cl;Object.defineProperty(_i,"__esModule",{value:!0});var Zs=_i.default=void 0,Eu=wu(tc()),Su=o;Zs=_i.default=(0,Eu.default)((0,Su.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function ea(e){const{info:t}=Nn();return A.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Ni({disabled:e,children:t,onConfirm:n}){return A.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Ni.propTypes={disabled:_.bool,children:_.any.isRequired,onConfirm:_.func.isRequired};Ni.defaultProps={disabled:!1};function Ai({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=A.useState(!1),c=()=>a(f=>!f);return o.jsxs(o.Fragment,{children:[o.jsx(Tu,{children:o.jsxs(Ni,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(ft,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(St,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(Pi,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}Ai.propTypes={onContinue:_.func.isRequired,nextDisabled:_.bool,launching:_.bool,description:_.any,texts:_.object};Ai.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const Tu=Ve.div`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as B,j as h}from"./vendor-mui-core-Bq8gXTan.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-BfZ4tlod.js";import{a as O,ar as T}from"./vendor-ux-did-connect-pzpsrvqx.js";import{m as w,u as _,s as F}from"./vendor-hooks-DqdmWCmo.js";import{A as K,S as $}from"./add-component-core-
|
|
1
|
+
import{v as B,j as h}from"./vendor-mui-core-Bq8gXTan.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-BfZ4tlod.js";import{a as O,ar as T}from"./vendor-ux-did-connect-pzpsrvqx.js";import{m as w,u as _,s as F}from"./vendor-hooks-DqdmWCmo.js";import{A as K,S as $}from"./add-component-core-BG8enqM8.js";import{k as z,U as G}from"./index-D2bUzebR.js";import"./lottie-web-jYmAQWuC.js";import"./item-BYHK6spa.js";import"./vendor-arcblock-CwufDgLV.js";import"./index-8eXqqyHQ.js";import"./Launch-DFS3fgjy.js";import"./Done-ASNftAOL.js";import"./DeleteOutline-BKSMNwfT.js";import"./delete-confirm-BnUaxWhM.js";import"./click-to-copy-By4fgGR7.js";import"./confirm-C4bZXKUn.js";import"./session-BGdAM8zS.js";import"./get-safe-url-B0-S5PGZ.js";import"./did-address-NnOD1W_A.js";import"./launch-result-message-AharZGq2.js";import"./page-header-DNvUdNpI.js";import"./config-space-D4KxQRvm.js";import"./spaces-DUkzPTBd.js";import"./api-C1S8LUld.js";import"./logo-uploader-Btt6h3-w.js";import"./index-DVQCgvFb.js";import"./index-BMxp4XYs.js";import"./collapse-DAaiuAEY.js";import"./Google-C28yeMZW.js";import"./cloneDeep-CDl5kZTY.js";import"./index-CTlzm-Mc.js";import"./index-BxJZWVOT.js";import"./useLocalStorage-CaPDqrQ7.js";import"./index-DPIWnhb5.js";import"./util-DeHM07tQ.js";import"./use-mobile-CtTQsfXN.js";import"./content-layout-BC2QkTYi.js";import"./connect-to-ge1ZQPSM.js";import"./ArrowDropDown-DBJPIOl4.js";import"./ChevronLeft-BBJJJhVi.js";import"./ChevronRight-BU9I7WD4.js";import"./search-4YYphs0l.js";function Le(){var u;const{t:f}=O(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",p=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",E=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",y=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await A.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:E,enableRunBackground:y,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Le as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as Oe,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as _t,j as L,ab as Ze,H as Ee,aa as U,y as mr,T as Be,ah as wt,bs as pr,bR as gr,bx as yr,ak as vr,E as br,al as He,O as _r,N as wr,bt as Ue,X as De,ad as Qt}from"./vendor-mui-core-Bq8gXTan.js";import{D as Je,G as xr,f as Mr,aM as $r,n as kr,aE as jr,z as Xt,W as sr,V as nr}from"./index-
|
|
1
|
+
import{r as Oe,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as _t,j as L,ab as Ze,H as Ee,aa as U,y as mr,T as Be,ah as wt,bs as pr,bR as gr,bx as yr,ak as vr,E as br,al as He,O as _r,N as wr,bt as Ue,X as De,ad as Qt}from"./vendor-mui-core-Bq8gXTan.js";import{D as Je,G as xr,f as Mr,aM as $r,n as kr,aE as jr,z as Xt,W as sr,V as nr}from"./index-D2bUzebR.js";import{P as Sr,w as Ge}from"./permission-DQvXGutX.js";import{r as xt,a as We,B as qe,a3 as Le,at as ir,f as Rr,ar,c3 as Ar,aR as Or,i as Te,k as Er,a1 as er,bb as Cr}from"./vendor-ux-did-connect-pzpsrvqx.js";import{x as or}from"./vendor-hooks-DqdmWCmo.js";import{c as Ne}from"./vendor-arcblock-CwufDgLV.js";import{d as tr}from"./InfoOutlined-BVWbftGI.js";import{C as Mt}from"./confirm-C4bZXKUn.js";import{f as Ve}from"./index-8eXqqyHQ.js";import{_ as Dr}from"./useSetState-CWq0AVWn.js";import{u as lr}from"./session-BGdAM8zS.js";import{S as Ce}from"./section-BDMQAX_r.js";import{C as Ir}from"./click-to-copy-By4fgGR7.js";import{u as cr}from"./dashboard-D5eoQ8IH.js";import{r as Tr,aL as Lr}from"./vendor-utils-BfZ4tlod.js";import{I as qr}from"./index-DPIWnhb5.js";import{W as Nr}from"./did-address-NnOD1W_A.js";import{V as Pr}from"./status-DQ2_UfyN.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-CaPDqrQ7.js";import"./PlayArrow-BqVYRyLK.js";import"./get-safe-url-B0-S5PGZ.js";import"./use-blocklet-logo-C4yfnUqa.js";import"./dot-DRiNXWva.js";import"./useAsync-egXtU13O.js";import"./use-mobile-DwzRjjku.js";import"./omit-Cao4GLS7.js";var $t={},zr=_t;Object.defineProperty($t,"__esModule",{value:!0});var ur=$t.default=void 0,Fr=zr(xt()),Br=L;ur=$t.default=(0,Fr.default)((0,Br.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var kt={},Jr=_t;Object.defineProperty(kt,"__esModule",{value:!0});var jt=kt.default=void 0,Ur=Jr(xt()),rr=L;jt=kt.default=(0,Ur.default)([(0,rr.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,rr.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const Vr=localStorage.getItem("enableDebug")==="true";function Wr({teamDid:I,size:P="small",...B}){const{t:T}=We(),{api:q}=Je(),[p,b]=Oe.useState(!1),[l,M]=Oe.useState(null),v=()=>{b(!1),M(null)},m=async()=>{var a;try{b(!0);const i=await q.clearCache({input:{teamDid:I}});Le.success(T("blocklet.config.clearCache.success",{count:((a=i.removed)==null?void 0:a.length)||0}))}catch(i){Le.error(Ve(i))}finally{b(!1),M(null)}},e={title:T("blocklet.config.clearCache.title"),description:T("blocklet.config.clearCache.description"),confirm:T("common.confirm"),cancel:T("common.cancel"),onConfirm:m,onCancel:v};return L.jsxs("div",{...B,children:[L.jsxs(qe,{onClick:()=>M(e),color:"error",variant:"outlined",size:P,children:[p?L.jsx(Ze,{size:16,style:{marginRight:5}}):null,T("blocklet.config.clearCache.action")]}),l&&L.jsx(Mt,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}var St={},Kr=_t;Object.defineProperty(St,"__esModule",{value:!0});var fr=St.default=void 0,Hr=Kr(xt()),Zr=L;fr=St.default=(0,Hr.default)((0,Zr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function Rt({onChange:I,disabled:P,loading:B,inService:T}){const{t:q}=We(),{api:p,session:b}=lr(),{blocklet:l}=xr(),[M,v]=Dr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),m=()=>v({isConnectOpen:!1}),e=()=>{if(Mr.isInProgress(l.status)){Le.error(q("blocklet.error.isInProgress"));return}v({confirmDialogOpen:!0})};return L.jsxs(L.Fragment,{children:[L.jsx(Ce,{title:q("blocklet.config.migrate.button"),desc:q("blocklet.config.migrate.description"),children:L.jsx(U,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:L.jsxs(mr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:P||B,onClick:e,children:[L.jsx(fr,{style:{fontSize:"1.3em",marginRight:4}}),q("blocklet.config.migrate.button")]})})}),L.jsxs(L.Fragment,{children:[M.isConnectOpen&&L.jsx(ir,{popup:!0,open:M.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:p.get,checkTimeout:5*60*1e3,onSuccess:()=>{I(),T&&b.logout(),m()},extraParams:{appDid:l.appDid},messages:{title:q("setup.keyPair.title"),scan:q("setup.keyPair.scan"),confirm:q("setup.keyPair.confirm"),success:q("setup.keyPair.success")},onClose:m}),M.confirmDialogOpen&&L.jsx(Mt,{title:L.jsx(Be,{sx:{fontSize:"20px",fontWeight:"500"},children:q("blocklet.config.migrate.title")}),description:L.jsx(Be,{sx:{fontSize:"14px",color:"#9397A1"},children:q("blocklet.config.migrate.confirm")}),confirm:q("common.confirm"),cancel:q("common.cancel"),onConfirm:()=>v({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>v({confirmDialogOpen:!1})})]})]})}Rt.propTypes={onChange:Ee.func,disabled:Ee.bool,loading:Ee.bool,inService:Ee.bool};Rt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function At({onCancel:I,onSuccess:P,onError:B}){const{api:T}=Oe.useContext(Rr),[q,p]=Oe.useState(!1),{t:b,locale:l}=We(),[M,v]=Oe.useState(""),[m,e]=Oe.useState(!1),[a,i]=Oe.useState(0),[r,t]=Oe.useState(""),{endpoint:c}=cr(),[s,o]=Oe.useState(!1),h=f=>{v(null),p(!0);try{t(f.result),i(R.length-1)}catch(y){const x=Ve(y);v(x),B(y)}finally{p(!1)}},g=()=>{e(!0),i(1)},w=()=>{e(!1),i(0)},R=[{body:L.jsxs(U,{children:[L.jsx(Be,{children:b("team.transferApp.transferDialog.tips.progress")}),L.jsx(Be,{mt:3,mb:2,children:b("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:b("common.cancel"),confirm:b("team.transferApp.transferDialog.createTransferLink"),onCancel:I,onConfirm:g},{cancel:b("common.cancel"),confirm:b("team.transferApp.transferDialog.createTransferLink"),body:()=>L.jsx(ir,{action:"transfer-app-owner",open:m,locale:l,checkFn:T.get,onClose:w,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:b("team.transferApp.connectDialog.title"),scan:b("team.transferApp.connectDialog.scan"),confirm:b("team.transferApp.connectDialog.confirm"),success:b("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const f=$r({transferId:r.transferId,endpoint:c});return L.jsxs(L.Fragment,{children:[L.jsx(U,{component:Fe,dangerouslySetInnerHTML:{__html:b("team.transferApp.transferDialog.createSuccessTip1")}}),L.jsx(U,{component:Fe,mt:2,children:L.jsx(Fe,{children:b("team.transferApp.transferDialog.createSuccessTip3")})}),L.jsxs(U,{children:[L.jsx(U,{component:Fe,mt:2,children:L.jsx(Fe,{children:b("team.transferApp.transferDialog.createSuccessTip2",{expireDate:kr(r.expireDate,l)})})}),L.jsx(U,{my:1,children:L.jsx(Ir,{children:f})})]}),L.jsx("div",{children:L.jsx(pr,{value:"end",control:L.jsx(gr,{checked:s,onChange:y=>o(y.target.checked)}),label:b("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:b("common.confirm"),onConfirm:P}],j=R[a];return L.jsxs(ar,{title:L.jsx(Fe,{className:"title",children:b("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:L.jsxs(L.Fragment,{children:[j.cancel&&L.jsx(qe,{onClick:j.onCancel,color:"inherit",children:j.cancel}),L.jsxs(qe,{onClick:j.onConfirm,color:"error",disabled:q||a===R.length-1&&!s,variant:"contained",autoFocus:!0,children:[q&&L.jsx(Ze,{size:16}),j.confirm]})]}),children:[L.jsx(yr,{component:"div",children:typeof j.body=="function"?j.body():j.body}),!!M&&L.jsx(vr,{severity:"error",variant:"icon",children:M})]})}At.propTypes={onCancel:Ee.func.isRequired,onSuccess:Ee.func.isRequired,onError:Ee.func};At.defaultProps={onError:()=>{}};const Fe=wt.div`
|
|
2
2
|
font-size: 16px;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
&.title {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as E,J as k}from"./vendor-utils-BfZ4tlod.js";import{a as T,k as j}from"./vendor-ux-did-connect-pzpsrvqx.js";import{r as e}from"./vendor-react-DEoibe3W.js";import{D as M,G as B}from"./index-
|
|
1
|
+
import{A as E,J as k}from"./vendor-utils-BfZ4tlod.js";import{a as T,k as j}from"./vendor-ux-did-connect-pzpsrvqx.js";import{r as e}from"./vendor-react-DEoibe3W.js";import{D as M,G as B}from"./index-D2bUzebR.js";import{u as D}from"./use-mobile-CtTQsfXN.js";import{e as H,j as o,aa as w,ab as I}from"./vendor-mui-core-Bq8gXTan.js";import"./vendor-hooks-DqdmWCmo.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CwufDgLV.js";function J(){const{info:x,inService:g}=M(),{blocklet:y}=B(),{locale:d}=T(),u=e.useRef(null),r=H(),[L,R]=e.useState(0),f=D(),[t,S]=e.useState(!0),s=e.useRef(null);let a="";g?a=j.WELLKNOWN_SERVICE_PATH_PREFIX:a=x.routing.adminPath;const m=new URLSearchParams;g||m.set("authKey","__sst"),m.set("schemaKey",E(window.location.origin,a,`/api/theme?id=${encodeURIComponent(y.meta.did)}`));const c=e.useCallback(()=>{if(s.current){const n=k(JSON.parse(JSON.stringify(r)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);s.current.contentWindow.postMessage({type:"SEND_THEME",payload:n},window.location.origin)}},[r]),l=e.useCallback(()=>{s.current&&s.current.contentWindow.postMessage({type:"SEND_LOCALE",payload:d},window.location.origin)},[d]);return e.useEffect(()=>{const n=i=>{i.origin===window.location.origin&&(i.data.type==="REQUEST_THEME"&&c(),i.data.type==="THEME_BUILDER_LOADED"&&(l(),S(!1)))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[c,l]),e.useEffect(()=>{t===!1&&c()},[r,t,c]),e.useEffect(()=>{t===!1&&l()},[d,t,l]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),i=document.querySelector(".dashboard-content"),p=()=>{if(u.current){const{height:b}=n.getBoundingClientRect(),{top:C}=i.getBoundingClientRect(),{top:_}=u.current.getBoundingClientRect();let h=b-_+C-(f?108:164);f&&(h=Math.min(h,600)),R(h)}};return p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[f,r]),o.jsxs(o.Fragment,{children:[o.jsx(w,{ref:u}),t&&o.jsx(w,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(I,{})}),o.jsx("iframe",{title:"Theme Builder",ref:s,src:`${E(window.location.origin,a,"/hosted/theme-builder/")}?${m.toString()}`,style:{border:0,width:"100%",height:`${L}px`,display:t?"none":"block"}})]})}export{J as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as U,r as H,a as $,k as V,$ as F,bu as Z,bJ as q,a5 as G}from"./vendor-ux-did-connect-pzpsrvqx.js";import{j as e,a9 as K,e as B,aa as u,aq as J,T as j,ad as X,I as M,ab as Q,bo as Y,br as ee,bn as te,q as re,bP as ae,ah as oe}from"./vendor-mui-core-Bq8gXTan.js";import{p as se}from"./util-BQAJqeb4.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-CaPDqrQ7.js";import{D}from"./index-
|
|
1
|
+
import{a3 as U,r as H,a as $,k as V,$ as F,bu as Z,bJ as q,a5 as G}from"./vendor-ux-did-connect-pzpsrvqx.js";import{j as e,a9 as K,e as B,aa as u,aq as J,T as j,ad as X,I as M,ab as Q,bo as Y,br as ee,bn as te,q as re,bP as ae,ah as oe}from"./vendor-mui-core-Bq8gXTan.js";import{p as se}from"./util-BQAJqeb4.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-CaPDqrQ7.js";import{D}from"./index-D2bUzebR.js";import{M as I}from"./index-CTlzm-Mc.js";import{O as le}from"./vendor-arcblock-CwufDgLV.js";import{d as ce}from"./InfoOutlined-BVWbftGI.js";import{d as de,e as _}from"./vendor-utils-BfZ4tlod.js";import{S as T}from"./shorten-label-BQvbtscf.js";import{r as O}from"./index-Bv7OAPJU.js";import{u as ue}from"./dashboard-D5eoQ8IH.js";import"./vendor-hooks-DqdmWCmo.js";import"./lottie-web-jYmAQWuC.js";import"./base32-DUSifB4M.js";import"./index-8eXqqyHQ.js";import"./confirm-C4bZXKUn.js";import"./PlayArrow-BqVYRyLK.js";import"./get-safe-url-B0-S5PGZ.js";import"./session-BGdAM8zS.js";import"./use-blocklet-logo-C4yfnUqa.js";import"./dot-DRiNXWva.js";import"./useAsync-egXtU13O.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-DwzRjjku.js";const R=s.createContext({}),{Provider:pe,Consumer:Xe}=R;function me(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:l="",categories:r=[],showScope:n,scopeFormatter:p}){const{api:m,info:v}=D(),[L,C]=s.useState([]),[c,h]=s.useState({total:0,pageSize:me(),pageCount:0,page:1}),[f,d]=s.useState(!1),[x,a]=s.useState(""),[i,S]=ie(`audit-log-category-${l}`,"all"),z=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>r.length?b.value==="all"||r.includes(b.value):!0),w=async({page:b=1,pageSize:o=20,silent:y=!0}={})=>{if(!f){y||d(!0);try{const g=await m.getAuditLogs({input:{paging:{page:b,pageSize:o},category:i==="all"?"":i,scope:l,actionOrContent:x}});n&&(g.list||[]).forEach(P=>{P.scope!==v.did&&(P.link=`/blocklets/${P.scope}/components`)}),C(g.list),h(g.paging),d(!1)}catch(g){U.error(g.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[i,x]);const k={loading:f,fetch:w,filter:{category:i,scope:l},categories:z,setCategory:S,data:L,paging:c,setPaging:h,showScope:n,scopeFormatter:p,actionOrContent:x,setActionOrContent:a};return e.jsx(pe,{value:{auditLogs:k},children:t})}function W(){const{auditLogs:t}=s.useContext(R);return t}var A={},ge=K;Object.defineProperty(A,"__esModule",{value:!0});var N=A.default=void 0,xe=ge(H()),Le=e;N=A.default=(0,xe.default)((0,Le.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");function he(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n;for(;(n=l.exec(t))!==null;)r.push({text:n[1],url:n[2]});return r}const ve=`
|
|
2
2
|
<svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as I,j as e,aa as t,ab as z,y as d,T as a,aq as L,ad as D,bQ as O,bs as T,bR as F,X as B,ap as w,al as U}from"./vendor-mui-core-Bq8gXTan.js";import{r as x}from"./vendor-react-DEoibe3W.js";import{x as H}from"./vendor-hooks-DqdmWCmo.js";import{A as v}from"./vendor-utils-BfZ4tlod.js";import{a as M,k as u,b6 as p,bp as Q,D as C}from"./vendor-ux-did-connect-pzpsrvqx.js";import{R as X,H as K}from"./vendor-arcblock-CwufDgLV.js";import{W as V}from"./did-address-NnOD1W_A.js";import{d as $}from"./Home-Dujcj083.js";import{u as q,d as G}from"./index-
|
|
1
|
+
import{v as I,j as e,aa as t,ab as z,y as d,T as a,aq as L,ad as D,bQ as O,bs as T,bR as F,X as B,ap as w,al as U}from"./vendor-mui-core-Bq8gXTan.js";import{r as x}from"./vendor-react-DEoibe3W.js";import{x as H}from"./vendor-hooks-DqdmWCmo.js";import{A as v}from"./vendor-utils-BfZ4tlod.js";import{a as M,k as u,b6 as p,bp as Q,D as C}from"./vendor-ux-did-connect-pzpsrvqx.js";import{R as X,H as K}from"./vendor-arcblock-CwufDgLV.js";import{W as V}from"./did-address-NnOD1W_A.js";import{d as $}from"./Home-Dujcj083.js";import{u as q,d as G}from"./index-D2bUzebR.js";import"./lottie-web-jYmAQWuC.js";function oe(){var f,b,y,_;const{searchParams:r}=new URL(window.location.href),{session:o}=q(),{t:c}=M(),m=r.get("client_id"),k=r.get("scope")||"profile:read",[g,S]=x.useState(k.split(" ").filter(Boolean)),P=I("(max-width: 600px)"),A=v(window.location.origin,u.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),N=x.useCallback(i=>i?i.startsWith("http")?i:`${v(u.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/media/upload",window.blocklet.appPid)}/${i}`:"",[]),[h,j]=H({client:null,loading:!0});x.useEffect(()=>{(async()=>{const{data:n}=await G.get("/oauth/client",{params:{clientId:m}});j({client:n,loading:!1})})()},[m,j]);const R=i=>{i!=="profile:read"&&S(n=>n.includes(i)?n.filter(E=>E!==i):[...n,i])};if(h.loading||!(o!=null&&o.user))return e.jsx(p,{did:(f=window.blocklet)==null?void 0:f.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(z,{})})});if(!h.client)return e.jsx(p,{did:(b=window.blocklet)==null?void 0:b.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(X,{style:{backgroundColor:"transparent"},status:"error",title:c("notFoundOauthClient"),extra:e.jsx(d,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx($,{}),href:"/",style:{borderRadius:4},children:c("connectCli.home")})})})});const{client:s}=h,{user:l}=o,W=(s.scope||"").split(" ");return e.jsxs(p,{did:(y=window.blocklet)==null?void 0:y.appPid,standalone:!0,children:[e.jsx(K,{children:e.jsx("title",{children:c("oauth.authorize")})}),e.jsx(Q,{hideCloseButton:!0,children:e.jsxs(t,{sx:{display:"flex",flexDirection:"column",p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(C,{src:(_=window.blocklet)==null?void 0:_.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(C,{src:N(s.logo_uri),alt:s.client_name,width:48,height:48})]}),e.jsxs(a,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:s.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(L,{src:l.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(D,{title:l.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:l.fullName})}),e.jsx(t,{className:"did",children:e.jsx(V,{compact:!0,responsive:!1,did:l.did,showQrcode:!P})})]})]}),e.jsxs(a,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",s.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(O,{children:Object.entries(u.OAUTH_SCOPES).filter(([i])=>W.includes(i)).map(([i,n])=>e.jsx(T,{control:e.jsx(F,{checked:g.includes(i),onChange:()=>R(i),disabled:i==="profile:read"||["blocklet:read","blocklet:write"].includes(i)&&!["owner","admin","member"].includes(l.role),color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(a,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},i))})}),(s.tos_uri||s.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(B,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(a,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!s.tos_uri&&e.jsx(w,{href:s.tos_uri,target:"_blank",children:"Terms of Use"}),!!s.tos_uri&&!!s.policy_uri&&" and ",!!s.policy_uri&&e.jsx(w,{href:s.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:A,children:[r.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:r.get("client_id")}),r.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:r.get("response_type")}),r.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:r.get("redirect_uri")}),r.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:r.get("code_challenge")}),r.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:r.get("code_challenge_method")}),r.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:r.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:g.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(U,{direction:"row",spacing:2,children:[e.jsx(d,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(d,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),r.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(a,{variant:"body2",color:"text.secondary",children:"You will be redirected to"}),e.jsx(a,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:r.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(a,{variant:"body2",children:["Not you?"," ",e.jsx(d,{variant:"text",color:"primary",onClick:()=>o.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})})]})}export{oe as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{r as Se,a as Ie,_ as Pe,bm as ke,k as O}from"./vendor-ux-did-connect-pzpsrvqx.js";import{a9 as Re,j as e,al as z,T as P,aa as m,aq as Ee,ad as re,I as F,D as ue,H as w,aj as _e,t as De,bT as Le,N as oe,z as Oe,y as $,ah as Ve}from"./vendor-mui-core-Bq8gXTan.js";import{E as M}from"./empty-spinner-BHwHZpq-.js";import{d as ie}from"./DeleteOutline-BKSMNwfT.js";import{l as Te,f as $e}from"./vendor-hooks-DqdmWCmo.js";import{r as h}from"./vendor-react-DEoibe3W.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-02tdagHZ.js";import{S as K}from"./studio-I9lo0Itp.js";import"./vendor-utils-BfZ4tlod.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./vendor-arcblock-CwufDgLV.js";import"./TuneOutlined-CKzi_VZZ.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,g;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(g=t.split("vimeo.com/")[1])==null?void 0:g.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const R={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(R[i]!==void 0)return R[i];const[a,u]=V(i);return u==="youtube"?R[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?R[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:R[i]="",R[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function qe(r){const t=r.trim();return V(t).length>0}var X={},He=Re;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(Se()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Pe(()=>import("./index-DzRGp0If.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Ie(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[g,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,q]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),k=h.useRef(null),f=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},H=async o=>{const n=Array.from(g),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},ge=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ge(o):o.source.droppableId==="videos"&&await H(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?g.map(d=>d===n?o.trim():d):g.filter(d=>d!==n):o&&(c=[...g,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Ee,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=k.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=f.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[g.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(fe,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,g.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:g})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:k,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=k.current)==null||o.close(),q(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(le,{ref:f,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=f.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var k;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[g,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((k=navigator.clipboard)!=null&&k.readText),{run:q}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(_e,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(De,{children:[e.jsx(Le,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?q(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(ke,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();a(f),p(f)}catch(f){console.error(f)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&g&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:Ue(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(fe,{})})})]}),e.jsxs(Oe,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(f){x.current="";const v=Ae(f);j(f?!v:!1),v&&(y(!0),fetch(v).then(H=>{H.ok?(x.current=f,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function fe(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=Ve.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BngwF-PN.js","assets/vendor-ux-did-connect-pzpsrvqx.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-BfZ4tlod.js","assets/vendor-mui-core-Bq8gXTan.js","assets/vendor-hooks-DqdmWCmo.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-CwufDgLV.js","assets/index-BxJZWVOT.js","assets/index-D2bUzebR.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as Se,a as Ie,_ as Pe,bm as ke,k as O}from"./vendor-ux-did-connect-pzpsrvqx.js";import{a9 as Re,j as e,al as z,T as P,aa as m,aq as Ee,ad as re,I as F,D as ue,H as w,aj as _e,t as De,bT as Le,N as oe,z as Oe,y as $,ah as Ve}from"./vendor-mui-core-Bq8gXTan.js";import{E as M}from"./empty-spinner-BHwHZpq-.js";import{d as ie}from"./DeleteOutline-BKSMNwfT.js";import{l as Te,f as $e}from"./vendor-hooks-DqdmWCmo.js";import{r as h}from"./vendor-react-DEoibe3W.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-02tdagHZ.js";import{S as K}from"./studio-I9lo0Itp.js";import"./vendor-utils-BfZ4tlod.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./vendor-arcblock-CwufDgLV.js";import"./TuneOutlined-CKzi_VZZ.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,g;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(g=t.split("vimeo.com/")[1])==null?void 0:g.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const R={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(R[i]!==void 0)return R[i];const[a,u]=V(i);return u==="youtube"?R[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?R[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:R[i]="",R[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function qe(r){const t=r.trim();return V(t).length>0}var X={},He=Re;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(Se()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Pe(()=>import("./index-BngwF-PN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Ie(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[g,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,q]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),k=h.useRef(null),f=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},H=async o=>{const n=Array.from(g),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},ge=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ge(o):o.source.droppableId==="videos"&&await H(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?g.map(d=>d===n?o.trim():d):g.filter(d=>d!==n):o&&(c=[...g,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Ee,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=k.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=f.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[g.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(fe,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,g.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:g})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:k,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=k.current)==null||o.close(),q(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(le,{ref:f,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=f.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var k;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[g,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((k=navigator.clipboard)!=null&&k.readText),{run:q}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(_e,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(De,{children:[e.jsx(Le,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?q(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(ke,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();a(f),p(f)}catch(f){console.error(f)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&g&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:Ue(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(fe,{})})})]}),e.jsxs(Oe,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(f){x.current="";const v=Ae(f);j(f?!v:!1),v&&(y(!0),fetch(v).then(H=>{H.ok?(x.current=f,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function fe(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=Ve.div`
|
|
3
3
|
margin-top: 24px;
|
|
4
4
|
.image-wrapper {
|
|
5
5
|
margin-bottom: 16px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as a1,r as x}from"./vendor-react-DEoibe3W.js";import{H as t,j as e,I as G,bw as y1,y as N,P as t1,w as Z1,a8 as w1,M as b1,q as k1,c0 as L1,O as c1,aa as i,ab as s1,ah as W,d1 as l1,bY as M1,E as R1,bq as S1,bK as E1,aq as _1,ai as C1,T as _,al as P1,X as T}from"./vendor-mui-core-Bq8gXTan.js";import{bb as r1,d as X,T as B1,D as O1,a1 as H1,a3 as A1}from"./vendor-ux-did-connect-pzpsrvqx.js";import{x as V1}from"./vendor-hooks-DqdmWCmo.js";import{c as L}from"./vendor-arcblock-CwufDgLV.js";import{s as I1}from"./sanitize-e0A8A-yt.js";import{d as o1}from"./Done-ASNftAOL.js";import{F as h1,R as n1,L as A}from"./logo-uploader-
|
|
1
|
+
import{b as a1,r as x}from"./vendor-react-DEoibe3W.js";import{H as t,j as e,I as G,bw as y1,y as N,P as t1,w as Z1,a8 as w1,M as b1,q as k1,c0 as L1,O as c1,aa as i,ab as s1,ah as W,d1 as l1,bY as M1,E as R1,bq as S1,bK as E1,aq as _1,ai as C1,T as _,al as P1,X as T}from"./vendor-mui-core-Bq8gXTan.js";import{bb as r1,d as X,T as B1,D as O1,a1 as H1,a3 as A1}from"./vendor-ux-did-connect-pzpsrvqx.js";import{x as V1}from"./vendor-hooks-DqdmWCmo.js";import{c as L}from"./vendor-arcblock-CwufDgLV.js";import{s as I1}from"./sanitize-e0A8A-yt.js";import{d as o1}from"./Done-ASNftAOL.js";import{F as h1,R as n1,L as A}from"./logo-uploader-Btt6h3-w.js";import{E as T1}from"./EditIcon-DfiDnAsm.js";import{d as z1}from"./ArrowDropDown-DBJPIOl4.js";import{D as d1,V as F1,W as N1}from"./index-D2bUzebR.js";import{w as p1}from"./permission-DQvXGutX.js";import{h as D1}from"./use-blocklet-logo-C4yfnUqa.js";import{S as z}from"./section-BDMQAX_r.js";import"./vendor-utils-BfZ4tlod.js";import"./lottie-web-jYmAQWuC.js";import"./omit-Cao4GLS7.js";import"./index-BxJZWVOT.js";import"./index-DVQCgvFb.js";import"./session-BGdAM8zS.js";function J({triggers:a,onEnterEdit:s,disabled:p}){const h=a1.useRef(null),[M,m]=a1.useState(!1),u=f=>{m(!1),f()},l=()=>{m(f=>!f)},o=f=>{h.current&&h.current.contains(f.target)||m(!1)};return a.length===0?e.jsx(G,{"data-cy":"schema-form-item-edit",onClick:s,disabled:p,size:"large",children:e.jsx(T1,{})}):e.jsxs(e.Fragment,{children:[e.jsx(y1,{variant:"outlined",ref:h,"aria-label":"split button",children:e.jsx(N,{size:"large","aria-controls":M?"split-button-menu":void 0,"aria-expanded":M?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:l,children:e.jsx(z1,{})})}),e.jsx(t1,{sx:{zIndex:9999},open:M,anchorEl:h.current,role:void 0,placement:"bottom-end",children:e.jsx(Z1,{children:e.jsx(w1,{onClickAway:o,children:e.jsx(b1,{id:"split-button-menu",autoFocusItem:!0,children:a.map(f=>e.jsx(k1,{onClick:()=>u(f.handler),children:f.title},f.key))})})})})]})}J.propTypes={triggers:t.arrayOf(t.shape({key:t.string.isRequired,title:t.string.isRequired,handler:t.func.isRequired})),onEnterEdit:t.func.isRequired,disabled:t.bool.isRequired};J.defaultProps={triggers:[]};const i1=(a,s,p)=>a===null&&s&&p?"******":a?s?"******":a:"",U1=L1`
|
|
2
2
|
0%, 100% {
|
|
3
3
|
transform: scale(1) translateX(0);
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f,aq as $,H as a}from"./vendor-mui-core-Bq8gXTan.js";import{k as E,a2 as P}from"./vendor-ux-did-connect-pzpsrvqx.js";import{A as g}from"./vendor-utils-BfZ4tlod.js";import{D as y,E as j,Z as h,_ as R,$ as A}from"./index-
|
|
1
|
+
import{j as f,aq as $,H as a}from"./vendor-mui-core-Bq8gXTan.js";import{k as E,a2 as P}from"./vendor-ux-did-connect-pzpsrvqx.js";import{A as g}from"./vendor-utils-BfZ4tlod.js";import{D as y,E as j,Z as h,_ as R,$ as A}from"./index-D2bUzebR.js";function w({blocklet:r,ancestors:p=[]}){var d,m;const s=y(),{inService:n}=s,i=j(r==null?void 0:r.status)||h(r==null?void 0:r.status),o=`?v=${(d=r==null?void 0:r.meta)==null?void 0:d.version}${i?"~":""}`;let t=n?`${g(A,E.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:g(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${g(r.deployedFrom,R(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=((m=window.env)==null?void 0:m.apiPrefix)||"/",e=p.concat(r),c=n?e.slice(1):e;t=`${g(u,`/blocklet/logo-bundle${c.map(x=>`/${x.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:p,size:s,ancestors:n,...i}){const o=y(),{logoUrl:t,inService:d}=w({blocklet:r,ancestors:n}),{variant:m}=i,u=d?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let e=f.jsx("img",{src:t,onError:u,alt:r.meta.name,style:{width:s}});return r.meta.logo||(e=f.jsx(P,{did:r.meta.did||"",responsive:!0})),f.jsx($,{variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},p),...i,children:e})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-Bq8gXTan.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-pzpsrvqx.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-
|
|
1
|
+
import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-Bq8gXTan.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-pzpsrvqx.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-D2bUzebR.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as X,z as fe}from"./vendor-utils-BfZ4tlod.js";import{u as ge,b as j}from"./vendor-hooks-DqdmWCmo.js";import{L as we}from"./launch-result-message-AharZGq2.js";import{g as xe}from"./get-safe-url-D5KSEAKZ.js";import{g as be,a as ye}from"./setup-C3ECwM0S.js";import{S as q}from"./button-D_ZVjN82.js";import{S as ke}from"./layout-Ccou1sEP.js";import{P as Ue,S as ve,p as Le}from"./starting-progress-CYgfPTsE.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CwufDgLV.js";import"./config-space-D4KxQRvm.js";import"./spaces-DUkzPTBd.js";import"./api-C1S8LUld.js";import"./addon-DdjBFoHI.js";import"./QuestionMarkCircle-jbhclAfX.js";import"./use-server-logo-UTr-CyJD.js";import"./use-mobile-CtTQsfXN.js";import"./content-layout-BC2QkTYi.js";const Re=P(we)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
var Yw=Object.defineProperty;var Xw=(e,t,n)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Xw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Qw,cr as Te,cq as Ze,co as Zw,a9 as Se,j as x,aa as Re,ad as Vn,H as te,d3 as bv,d4 as vv,d5 as Jw,bD as yv,ah as Nt,d6 as Js,c0 as Yt,J as el,d7 as mi,b9 as Zn,cK as ft,b5 as It,d8 as eS,d9 as tS,c as Pe,_ as N,Y as yr,da as Ke,db as nS,dc as ys,b as qn,dd as Xa,de as rS,cL as oS,df as aS,c4 as iS,d0 as sS,dg as lS,cM as cS,g as ze,a as Le,k as Fe,dh as Cv,u as Kt,di as uS,d as nn,dj as tl,dk as qp,o as on,dl as xv,i as Fr,dm as dS,dn as hi,dp as fS,dq as Hp,f as Dd,dr as wv,ds as pS,dt as mS,p as nl,K as hS,du as gS,b2 as Gp,e as Sv,ak as Kp,O as Jt,I as an,al as Pv,T as Un,s as bS,v as vS,q as mr,ab as zr,aq as yS,ap as rl,dv as CS,bu as xS,bs as Bu,bv as Yp,bh as Tv,y as wS,D as Xp,aj as Qp,t as Zp,bR as Jp,as as Ni,z as SS,bt as PS}from"./vendor-mui-core-Bq8gXTan.js";import{aN as em,A as Qa,n as tm,a7 as TS,aO as kS}from"./vendor-utils-BfZ4tlod.js";import{r as S,R as DS,d as gi,a as $e,g as Rd,b as tt,e as kv,c as RS,f as Dv}from"./vendor-react-DEoibe3W.js";import{c6 as Ce,r as Tr,a as qt,a3 as ot,cj as ES,ck as MS,bv as nm,bw as $S,bx as OS,by as IS,E as _S,bd as bi,bm as rm,bC as AS,R as BS,cl as jS,bb as kr,ar as ol,_ as LS,k as Ae,a8 as NS,bg as FS,$ as hc,ab as zS,I as Mn,B as gc,a5 as WS}from"./vendor-ux-did-connect-pzpsrvqx.js";import{v as Rv,c as Xn,M as bc,_ as VS}from"./vendor-arcblock-CwufDgLV.js";import{D as Xt,G as Ur,W as yo,f as dt,V as Za,aO as US,a9 as Ev,aa as Co,aw as Mv,aP as $v,b as Ia,aQ as qS,a8 as HS}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BngwF-PN.js","assets/vendor-ux-did-connect-pzpsrvqx.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-BfZ4tlod.js","assets/vendor-mui-core-Bq8gXTan.js","assets/vendor-hooks-DqdmWCmo.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-CwufDgLV.js","assets/index-BxJZWVOT.js","assets/index-D2bUzebR.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Yw=Object.defineProperty;var Xw=(e,t,n)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Xw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Qw,cr as Te,cq as Ze,co as Zw,a9 as Se,j as x,aa as Re,ad as Vn,H as te,d3 as bv,d4 as vv,d5 as Jw,bD as yv,ah as Nt,d6 as Js,c0 as Yt,J as el,d7 as mi,b9 as Zn,cK as ft,b5 as It,d8 as eS,d9 as tS,c as Pe,_ as N,Y as yr,da as Ke,db as nS,dc as ys,b as qn,dd as Xa,de as rS,cL as oS,df as aS,c4 as iS,d0 as sS,dg as lS,cM as cS,g as ze,a as Le,k as Fe,dh as Cv,u as Kt,di as uS,d as nn,dj as tl,dk as qp,o as on,dl as xv,i as Fr,dm as dS,dn as hi,dp as fS,dq as Hp,f as Dd,dr as wv,ds as pS,dt as mS,p as nl,K as hS,du as gS,b2 as Gp,e as Sv,ak as Kp,O as Jt,I as an,al as Pv,T as Un,s as bS,v as vS,q as mr,ab as zr,aq as yS,ap as rl,dv as CS,bu as xS,bs as Bu,bv as Yp,bh as Tv,y as wS,D as Xp,aj as Qp,t as Zp,bR as Jp,as as Ni,z as SS,bt as PS}from"./vendor-mui-core-Bq8gXTan.js";import{aN as em,A as Qa,n as tm,a7 as TS,aO as kS}from"./vendor-utils-BfZ4tlod.js";import{r as S,R as DS,d as gi,a as $e,g as Rd,b as tt,e as kv,c as RS,f as Dv}from"./vendor-react-DEoibe3W.js";import{c6 as Ce,r as Tr,a as qt,a3 as ot,cj as ES,ck as MS,bv as nm,bw as $S,bx as OS,by as IS,E as _S,bd as bi,bm as rm,bC as AS,R as BS,cl as jS,bb as kr,ar as ol,_ as LS,k as Ae,a8 as NS,bg as FS,$ as hc,ab as zS,I as Mn,B as gc,a5 as WS}from"./vendor-ux-did-connect-pzpsrvqx.js";import{v as Rv,c as Xn,M as bc,_ as VS}from"./vendor-arcblock-CwufDgLV.js";import{D as Xt,G as Ur,W as yo,f as dt,V as Za,aO as US,a9 as Ev,aa as Co,aw as Mv,aP as $v,b as Ia,aQ as qS,a8 as HS}from"./index-D2bUzebR.js";import{f as En}from"./index-8eXqqyHQ.js";import{d as Ov}from"./TuneOutlined-CKzi_VZZ.js";import{f as GS,W as xo,c as KS,g as Ed,B as Iv,a as YS}from"./dashboard-D5eoQ8IH.js";import{S as XS}from"./switch-control-Brwb8ptk.js";import{P as ju,w as al}from"./permission-DQvXGutX.js";import{d as Md}from"./Edit-CiTb-w5P.js";import{d as om,c as QS,b as nt,_ as Je,o as ZS,e as JS,i as e1,p as t1,g as n1,r as Dr}from"./slicedToArray-DFQjSbCD.js";import{r as Ye,A as $d,B as Qt,C as Cs,D as Lu,t as qe,E as _v,F as Av,j as Nu,m as r1,G as sr,H as o1,I as a1,J as Fu,K as Bv,L as i1,M as s1,N as jv,O as Od,P as am,Q as l1,R as im,S as c1,T as u1,p as d1,e as sm,g as f1,b as vc,a as lm,c as p1,q as Fi,o as Qr,i as m1,d as h1,k as zi,l as yc,h as Wi,s as Cc,f as xc,x as g1,z as b1,n as v1,u as y1,v as C1,w as x1,U as w1,y as S1,V as P1,W as T1}from"./index-B2NkqENf.js";import{a as Qe,u as Me,r as Ja,d as qr,b as k1,w as xs,g as Lv,e as Nv,c as D1,o as zu}from"./raf-schd.esm-B3j6BePR.js";import{s as R1}from"./sanitize-e0A8A-yt.js";import{C as cm}from"./click-to-copy-By4fgGR7.js";import{d as um}from"./ChevronRight-BU9I7WD4.js";import{d as E1}from"./ChevronLeft-BBJJJhVi.js";import{d as M1}from"./ArrowDropDown-DBJPIOl4.js";import{A as $1,a as O1,b as I1,d as Fv,I as _1,B as A1,f as B1,c as j1}from"./add-component-core-BG8enqM8.js";import{C as Mo}from"./confirm-C4bZXKUn.js";import{v as L1,b as ws}from"./util-DeHM07tQ.js";import{L as N1}from"./LockIcon-BEG59s5q.js";import{d as zv}from"./Launch-DFS3fgjy.js";import{D as F1}from"./delete-confirm-BnUaxWhM.js";import{d as z1}from"./InfoOutlined-BVWbftGI.js";import{I as W1}from"./iframe-DFg8oeD0.js";import{B as V1}from"./bundle-avatar-DZSSBP_H.js";import{d as U1}from"./PlayArrow-BqVYRyLK.js";import{A as Wv}from"./actions-DnTVXQ_Z.js";import{I as wc}from"./index-DPIWnhb5.js";import{W as q1}from"./did-address-NnOD1W_A.js";import{u as H1}from"./vendor-hooks-DqdmWCmo.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-CaPDqrQ7.js";import"./get-safe-url-B0-S5PGZ.js";import"./session-BGdAM8zS.js";import"./use-blocklet-logo-C4yfnUqa.js";import"./dot-DRiNXWva.js";import"./useAsync-egXtU13O.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-DwzRjjku.js";import"./omit-Cao4GLS7.js";import"./index-BxJZWVOT.js";import"./item-BYHK6spa.js";import"./Done-ASNftAOL.js";import"./DeleteOutline-BKSMNwfT.js";import"./launch-result-message-AharZGq2.js";import"./page-header-DNvUdNpI.js";import"./config-space-D4KxQRvm.js";import"./spaces-DUkzPTBd.js";import"./api-C1S8LUld.js";import"./logo-uploader-Btt6h3-w.js";import"./index-DVQCgvFb.js";import"./index-BMxp4XYs.js";import"./collapse-DAaiuAEY.js";import"./Google-C28yeMZW.js";import"./cloneDeep-CDl5kZTY.js";import"./index-CTlzm-Mc.js";import"./use-mobile-CtTQsfXN.js";import"./content-layout-BC2QkTYi.js";import"./connect-to-ge1ZQPSM.js";import"./search-4YYphs0l.js";import"./MoreHoriz-ChJ3K52h.js";var G1=36e5;function K1(e,t){Ye(2,arguments);var n=Qt(t);return $d(e,n*G1)}var Y1=864e5;function X1(e,t){Ye(2,arguments);var n=Cs(e),r=Cs(t),o=n.getTime()-Lu(n),a=r.getTime()-Lu(r);return Math.round((o-a)/Y1)}var Q1=6e4;function Z1(e,t){Ye(2,arguments);var n=Qt(t);return $d(e,n*Q1)}function J1(e,t){Ye(2,arguments);var n=Qt(t);return $d(e,n*1e3)}function Fa(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function eP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function dm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Vv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=dm(n,r),a=Math.abs(X1(n,r));n.setDate(n.getDate()-o*a);var i=+(dm(n,r)===-o),s=o*(a-i);return s===0?0:s}function il(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var fm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},tP="trunc";function vi(e){return e?fm[e]:fm[tP]}function nP(e,t,n){Ye(2,arguments);var r=il(e,t)/_v;return vi(void 0)(r)}function rP(e,t,n){Ye(2,arguments);var r=il(e,t)/Av;return vi(void 0)(r)}function Wu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function oP(e){Ye(1,arguments);var t=qe(e);return Wu(t).getTime()===Nu(t).getTime()}function Uv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(r1(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=Fa(n,r)===-o;oP(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function aP(e,t,n){Ye(2,arguments);var r=Uv(e,t)/3;return vi(void 0)(r)}function iP(e,t,n){Ye(2,arguments);var r=il(e,t)/1e3;return vi(void 0)(r)}function sP(e,t,n){Ye(2,arguments);var r=Vv(e,t)/7;return vi(void 0)(r)}function lP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(eP(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=Fa(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function cP(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function uP(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function dP(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=sr(o.getDate(),2),f=sr(o.getMonth()+1,2),m=sr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var g=o.getTimezoneOffset();if(g!==0){var h=Math.abs(g),w=sr(Math.floor(h/60),2),v=sr(h%60,2),b=g<0?"+":"-";c="".concat(b).concat(w,":").concat(v)}else c="Z";var p=sr(o.getHours(),2),y=sr(o.getMinutes(),2),D=sr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function fP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function pP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function mP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function hP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function gP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function pm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Qw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function qv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qv=function(){return!!e})()}function rt(e){var t=qv();return function(){var n,r=om(e);if(t){var o=om(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return QS(this,n)}}var bP=10,Hv=function(){function e(){Je(this,e),Ce(this,"priority",void 0),Ce(this,"subPriority",0)}return Ze(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),vP=function(e){nt(n,e);var t=rt(n);function n(r,o,a,i,s){var c;return Je(this,n),c=t.call(this),c.value=r,c.validateValue=o,c.setValue=a,c.priority=i,s&&(c.subPriority=s),c}return Ze(n,[{key:"validate",value:function(o,a){return this.validateValue(o,this.value,a)}},{key:"set",value:function(o,a,i){return this.setValue(o,a,this.value,i)}}]),n}(Hv),yP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",bP),Ce(Te(r),"subPriority",-1),r}return Ze(n,[{key:"set",value:function(o,a){if(a.timestampIsSet)return o;var i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}}]),n}(Hv),at=function(){function e(){Je(this,e),Ce(this,"incompatibleTokens",void 0),Ce(this,"priority",void 0),Ce(this,"subPriority",void 0)}return Ze(e,[{key:"run",value:function(n,r,o,a){var i=this.parse(n,r,o,a);return i?{setter:new vP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),CP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",140),Ce(Te(r),"incompatibleTokens",["R","u","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}},{key:"set",value:function(o,a,i){return a.era=i,o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rt(e,t){return e&&{value:t(e.value),rest:e.rest}}function vt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function zn(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*_v+a*Av+i*o1),rest:t.slice(n[0].length)}}function Gv(e){return vt(Dt.anyDigitsSigned,e)}function kt(e,t){switch(e){case 1:return vt(Dt.singleDigit,t);case 2:return vt(Dt.twoDigits,t);case 3:return vt(Dt.threeDigits,t);case 4:return vt(Dt.fourDigits,t);default:return vt(new RegExp("^\\d{1,"+e+"}"),t)}}function Ss(e,t){switch(e){case 1:return vt(Dt.singleDigitSigned,t);case 2:return vt(Dt.twoDigitsSigned,t);case 3:return vt(Dt.threeDigitsSigned,t);case 4:return vt(Dt.fourDigitsSigned,t);default:return vt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Id(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Kv(e,t){var n=t>0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var a=r+50,i=Math.floor(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function Yv(e){return e%400===0||e%4===0&&e%100!==0}var xP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Rt(kt(4,o),s);case"yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i){var s=o.getUTCFullYear();if(i.isTwoDigitYear){var c=Kv(i.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),wP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Rt(kt(4,o),s);case"Yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i,s){var c=a1(o,s);if(i.isTwoDigitYear){var l=Kv(i.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fu(o,s)}var d=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(d,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fu(o,s)}}]),n}(at),SP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ss(a==="R"?4:a.length,o)}},{key:"set",value:function(o,a,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Bv(s)}}]),n}(at),PP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ss(a==="u"?4:a.length,o)}},{key:"set",value:function(o,a,i){return o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),TP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"Q":case"QQ":return kt(a.length,o);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})||i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),kP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"q":case"qq":return kt(a.length,o);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})||i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),DP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ce(Te(r),"priority",110),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"M":return Rt(vt(Dt.month,o),s);case"MM":return Rt(kt(2,o),s);case"Mo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})||i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),RP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",110),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"L":return Rt(vt(Dt.month,o),s);case"LL":return Rt(kt(2,o),s);case"Lo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})||i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at);function EP(e,t,n){Ye(2,arguments);var r=qe(e),o=Qt(t),a=i1(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var MP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"w":return vt(Dt.week,o);case"wo":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i,s){return Fu(EP(o,i,s),s)}}]),n}(at);function $P(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t),o=s1(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var OP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"I":return vt(Dt.week,o);case"Io":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i){return Bv($P(o,i))}}]),n}(at),IP=[31,28,31,30,31,30,31,31,30,31,30,31],_P=[31,29,31,30,31,30,31,31,30,31,30,31],AP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subPriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"d":return vt(Dt.date,o);case"do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Yv(i),c=o.getUTCMonth();return s?a>=1&&a<=_P[c]:a>=1&&a<=IP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),BP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subpriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"D":case"DD":return vt(Dt.dayOfYear,o);case"Do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Yv(i);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(o,a,i){return o.setUTCMonth(0,i),o.setUTCHours(0,0,0,0),o}}]),n}(at);function _d(e,t,n){var r,o,a,i,s,c,l,d;Ye(2,arguments);var u=jv(),f=Qt((r=(o=(a=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(s=n.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=qe(e),g=Qt(t),h=m.getUTCDay(),w=g%7,v=(w+7)%7,b=(v<f?7:0)+g-h;return m.setUTCDate(m.getUTCDate()+b),m}var jP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=_d(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),LP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Rt(kt(a.length,o),c);case"eo":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"eee":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=_d(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),NP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Rt(kt(a.length,o),c);case"co":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})||i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=_d(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at);function FP(e,t){Ye(2,arguments);var n=Qt(t);n%7===0&&(n=n-7);var r=1,o=qe(e),a=o.getUTCDay(),i=n%7,s=(i+7)%7,c=(s<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+c),o}var zP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return kt(a.length,o);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return Rt(i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Rt(i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Rt(i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Rt(i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,a){return a>=1&&a<=7}},{key:"set",value:function(o,a,i){return o=FP(o,i),o.setUTCHours(0,0,0,0),o}}]),n}(at),WP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Id(i),0,0,0),o}}]),n}(at),VP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Id(i),0,0,0),o}}]),n}(at),UP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","b","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Id(i),0,0,0),o}}]),n}(at),qP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"h":return vt(Dt.hour12h,o);case"ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=12}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):!s&&i===12?o.setUTCHours(0,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),HP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"H":return vt(Dt.hour23h,o);case"Ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=23}},{key:"set",value:function(o,a,i){return o.setUTCHours(i,0,0,0),o}}]),n}(at),GP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"K":return vt(Dt.hour11h,o);case"Ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),KP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"k":return vt(Dt.hour24h,o);case"ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=24}},{key:"set",value:function(o,a,i){var s=i<=24?i%24:i;return o.setUTCHours(s,0,0,0),o}}]),n}(at),YP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",60),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"m":return vt(Dt.minute,o);case"mo":return i.ordinalNumber(o,{unit:"minute"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCMinutes(i,0,0),o}}]),n}(at),XP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",50),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"s":return vt(Dt.second,o);case"so":return i.ordinalNumber(o,{unit:"second"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCSeconds(i,0),o}}]),n}(at),QP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",30),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){var i=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return Rt(kt(a.length,o),i)}},{key:"set",value:function(o,a,i){return o.setUTCMilliseconds(i),o}}]),n}(at),ZP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","x"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"X":return zn(Fn.basicOptionalMinutes,o);case"XX":return zn(Fn.basic,o);case"XXXX":return zn(Fn.basicOptionalSeconds,o);case"XXXXX":return zn(Fn.extendedOptionalSeconds,o);case"XXX":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),JP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","X"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"x":return zn(Fn.basicOptionalMinutes,o);case"xx":return zn(Fn.basic,o);case"xxxx":return zn(Fn.basicOptionalSeconds,o);case"xxxxx":return zn(Fn.extendedOptionalSeconds,o);case"xxx":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),eT=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Gv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(at),tT=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Gv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),nT={G:new CP,y:new xP,Y:new wP,R:new SP,u:new PP,Q:new TP,q:new kP,M:new DP,L:new RP,w:new MP,I:new OP,d:new AP,D:new BP,E:new jP,e:new LP,c:new NP,i:new zP,a:new WP,b:new VP,B:new UP,h:new qP,H:new HP,K:new GP,k:new KP,m:new YP,s:new XP,S:new QP,X:new ZP,x:new JP,t:new eT,T:new tT},rT=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oT=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aT=/^'([^]*?)'?$/,iT=/''/g,sT=/\S/,lT=/[a-zA-Z]/;function cT(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,g,h,w,v,b,p,y,D;Ye(3,arguments);var P=String(e),T=String(t),k=jv(),C=(o=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:k.locale)!==null&&o!==void 0?o:Od;if(!C.match)throw new RangeError("locale must contain match property");var R=Qt((i=(s=(c=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c:k.firstWeekContainsDate)!==null&&s!==void 0?s:(f=k.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Qt((g=(h=(w=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(b=r.locale)===null||b===void 0||(p=b.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&w!==void 0?w:k.weekStartsOn)!==null&&h!==void 0?h:(y=k.locale)===null||y===void 0||(D=y.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&g!==void 0?g:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return P===""?qe(n):new Date(NaN);var $={firstWeekContainsDate:R,weekStartsOn:M,locale:C},O=[new yP],I=T.match(oT).map(function(H){var K=H[0];if(K in am){var Q=am[K];return Q(H,C.formatLong)}return H}).join("").match(rT),_=[],A=pm(I),F;try{var L=function(){var K=F.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&l1(K)&&im(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&c1(K)&&im(K,T,e);var Q=K[0],ie=nT[Q];if(ie){var Y=ie.incompatibleTokens;if(Array.isArray(Y)){var J=_.find(function(ge){return Y.includes(ge.token)||ge.token===Q});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(K,"` at the same time"))}else if(ie.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(K,"` and any other token at the same time"));_.push({token:Q,fullToken:K});var re=ie.run(P,K,C.match,$);if(!re)return{v:new Date(NaN)};O.push(re.setter),P=re.rest}else{if(Q.match(lT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=uT(K)),P.indexOf(K)===0)P=P.slice(K.length);else return{v:new Date(NaN)}}};for(A.s();!(F=A.n()).done;){var W=L();if(Zw(W)==="object")return W.v}}catch(H){A.e(H)}finally{A.f()}if(P.length>0&&sT.test(P))return new Date(NaN);var G=O.map(function(H){return H.priority}).sort(function(H,K){return K-H}).filter(function(H,K,Q){return Q.indexOf(H)===K}).map(function(H){return O.filter(function(K){return K.priority===H}).sort(function(K,Q){return Q.subPriority-K.subPriority})}).map(function(H){return H[0]}),E=qe(n);if(isNaN(E.getTime()))return new Date(NaN);var q=u1(E,Lu(E)),U={},j=pm(G),z;try{for(j.s();!(z=j.n()).done;){var B=z.value;if(!B.validate(q,$))return new Date(NaN);var V=B.set(q,U,$);Array.isArray(V)?(q=V[0],uP(U,V[1])):q=V}}catch(H){j.e(H)}finally{j.f()}return q}function uT(e){return e.match(aT)[1].replace(iT,"'")}function mm(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function dT(e,t){Ye(2,arguments);var n=mm(e),r=mm(t);return n.getTime()===r.getTime()}function fT(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function pT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setDate(r),n}function mT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setHours(r),n}function hT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setMinutes(r),n}function gT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setSeconds(r),n}var Ad={},bT=Se;Object.defineProperty(Ad,"__esModule",{value:!0});var Xv=Ad.default=void 0,vT=bT(Tr()),yT=x;Xv=Ad.default=(0,vT.default)((0,yT.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Bd({children:e,...t}){var l;const{t:n}=qt(),{api:r}=Xt(),{blocklet:o}=Ur(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return x.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,x.jsx(Vn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:x.jsx("div",{children:x.jsx(XS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Bd.propTypes={children:te.any};Bd.defaultProps={children:null};var Qv={},Go={},Sc={};function Zv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Zv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Zv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function Ps(e){return typeof e=="string"}function Vu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Jv(e){if(typeof e!="string")throw new Error(Vu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function hr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ey(e){if(!hr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ey(e[n])}),t}function Nr(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return hr(e)&&hr(t)&&Object.keys(t).forEach(o=>{hr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&hr(e[o])?r[o]=Nr(e[o],t[o],n):n.clone?r[o]=hr(t[o])?ey(t[o]):t[o]:r[o]=t[o]}),r}function za(e,t){return t?Nr(e,t,{clone:!1}):e}function CT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function xT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function wT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function ST(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const sl={xs:0,sm:600,md:900,lg:1200,xl:1536},hm={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sl[e]}px)`},PT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:sl[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||hm;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||hm;return Object.keys(t).reduce((i,s)=>{if(xT(a.keys,s)){const c=wT(r.containerQueries?r:PT,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||sl).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function TT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function kT(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function ll(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Ts(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ll(e,n)||r,t&&(o=t(o,r,e)),o}function Mt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=ll(c,r)||{};return Jn(i,s,u=>{let f=Ts(l,o,u);return u===f&&typeof u=="string"&&(f=Ts(l,o,`${t}${u==="default"?"":Jv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function DT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const RT={m:"margin",p:"padding"},ET={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},gm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},MT=DT(e=>{if(e.length>2)if(gm[e])e=gm[e];else return[e];const[t,n]=e.split(""),r=RT[t],o=ET[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),jd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ld=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...jd,...Ld];function yi(e,t,n,r){const o=ll(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Nd(e){return yi(e,"spacing",8)}function Ci(e,t){return typeof t=="string"||t==null?t:e(t)}function $T(e,t){return n=>e.reduce((r,o)=>(r[o]=Ci(t,n),r),{})}function OT(e,t,n,r){if(!t.includes(n))return null;const o=MT(n),a=$T(o,r),i=e[n];return Jn(e,i,a)}function ty(e,t){const n=Nd(e.theme);return Object.keys(e).map(r=>OT(e,t,r,n)).reduce(za,{})}function xt(e){return ty(e,jd)}xt.propTypes={};xt.filterProps=jd;function wt(e){return ty(e,Ld)}wt.propTypes={};wt.filterProps=Ld;function cl(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?za(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function mn(e){return typeof e!="number"?e:`${e}px solid`}function Pn(e,t){return Mt({prop:e,themeKey:"borders",transform:t})}const IT=Pn("border",mn),_T=Pn("borderTop",mn),AT=Pn("borderRight",mn),BT=Pn("borderBottom",mn),jT=Pn("borderLeft",mn),LT=Pn("borderColor"),NT=Pn("borderTopColor"),FT=Pn("borderRightColor"),zT=Pn("borderBottomColor"),WT=Pn("borderLeftColor"),VT=Pn("outline",mn),UT=Pn("outlineColor"),ul=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ci(t,r)});return Jn(e,e.borderRadius,n)}return null};ul.propTypes={};ul.filterProps=["borderRadius"];cl(IT,_T,AT,BT,jT,LT,NT,FT,zT,WT,ul,VT,UT);const dl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yi(e.theme,"spacing",8),n=r=>({gap:Ci(t,r)});return Jn(e,e.gap,n)}return null};dl.propTypes={};dl.filterProps=["gap"];const fl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yi(e.theme,"spacing",8),n=r=>({columnGap:Ci(t,r)});return Jn(e,e.columnGap,n)}return null};fl.propTypes={};fl.filterProps=["columnGap"];const pl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yi(e.theme,"spacing",8),n=r=>({rowGap:Ci(t,r)});return Jn(e,e.rowGap,n)}return null};pl.propTypes={};pl.filterProps=["rowGap"];const qT=Mt({prop:"gridColumn"}),HT=Mt({prop:"gridRow"}),GT=Mt({prop:"gridAutoFlow"}),KT=Mt({prop:"gridAutoColumns"}),YT=Mt({prop:"gridAutoRows"}),XT=Mt({prop:"gridTemplateColumns"}),QT=Mt({prop:"gridTemplateRows"}),ZT=Mt({prop:"gridTemplateAreas"}),JT=Mt({prop:"gridArea"});cl(dl,fl,pl,qT,HT,GT,KT,YT,XT,QT,ZT,JT);function mo(e,t){return t==="grey"?t:e}const ek=Mt({prop:"color",themeKey:"palette",transform:mo}),tk=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),nk=Mt({prop:"backgroundColor",themeKey:"palette",transform:mo});cl(ek,tk,nk);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const rk=Mt({prop:"width",transform:en}),Fd=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||sl[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:en(n)}};return Jn(e,e.maxWidth,t)}return null};Fd.filterProps=["maxWidth"];const ok=Mt({prop:"minWidth",transform:en}),ak=Mt({prop:"height",transform:en}),ik=Mt({prop:"maxHeight",transform:en}),sk=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const lk=Mt({prop:"boxSizing"});cl(rk,Fd,ok,ak,ik,sk,lk);const xi={border:{themeKey:"borders",transform:mn},borderTop:{themeKey:"borders",transform:mn},borderRight:{themeKey:"borders",transform:mn},borderBottom:{themeKey:"borders",transform:mn},borderLeft:{themeKey:"borders",transform:mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ul},color:{themeKey:"palette",transform:mo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mo},backgroundColor:{themeKey:"palette",transform:mo},p:{style:wt},pt:{style:wt},pr:{style:wt},pb:{style:wt},pl:{style:wt},px:{style:wt},py:{style:wt},padding:{style:wt},paddingTop:{style:wt},paddingRight:{style:wt},paddingBottom:{style:wt},paddingLeft:{style:wt},paddingX:{style:wt},paddingY:{style:wt},paddingInline:{style:wt},paddingInlineStart:{style:wt},paddingInlineEnd:{style:wt},paddingBlock:{style:wt},paddingBlockStart:{style:wt},paddingBlockEnd:{style:wt},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:dl},rowGap:{style:pl},columnGap:{style:fl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:en},maxWidth:{style:Fd},minWidth:{transform:en},height:{transform:en},maxHeight:{transform:en},minHeight:{transform:en},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ck(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function uk(e,t){return typeof e=="function"?e(t):e}function dk(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=ll(o,l)||{};return u?u(i):Jn(i,r,g=>{let h=Ts(f,d,g);return g===h&&typeof g=="string"&&(h=Ts(f,d,`${n}${g==="default"?"":Jv(g)}`,g)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??xi;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=TT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=uk(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=za(u,e(f,m,o,a));else{const g=Jn({theme:o},m,h=>({[f]:h}));ck(g,m)?u[f]=t({sx:m,theme:o}):u=za(u,g)}else u=za(u,e(f,m,o,a))}),CT(o,kT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Hr=dk();Hr.filterProps=["sx"];const fk=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??xi;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function ny(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=fk(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return hr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const pk=e=>{const t=vv(e);class n extends Jw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let Uu;typeof document=="object"&&(Uu=pk({key:"css",prepend:!0}));function mk(e){const{injectFirst:t,children:n}=e;return t&&Uu?x.jsx(bv,{value:Uu,children:n}):n}function hk(e){return e==null||Object.keys(e).length===0}function ry(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(hk(o)?n:o):t;return x.jsx(yv,{styles:r})}/**
|
|
4
4
|
* @mui/styled-engine v6.1.0
|
|
5
5
|
*
|
|
@@ -629,7 +629,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
629
629
|
.ux-dialog_closeButton {
|
|
630
630
|
margin: 0;
|
|
631
631
|
}
|
|
632
|
-
`;var kp={},zH=Se;Object.defineProperty(kp,"__esModule",{value:!0});var Ww=kp.default=void 0,WH=zH(Tr()),VH=x;Ww=kp.default=(0,WH.default)((0,VH.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");const UH=S.lazy(()=>LS(()=>import("./index-
|
|
632
|
+
`;var kp={},zH=Se;Object.defineProperty(kp,"__esModule",{value:!0});var Ww=kp.default=void 0,WH=zH(Tr()),VH=x;Ww=kp.default=(0,WH.default)((0,VH.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");const UH=S.lazy(()=>LS(()=>import("./index-BngwF-PN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(e=>({default:e.Uploader}))),qH="/blocklet/component/upload",mv=[".html",".htm",".tgz",".zip"];var gv;const HH=Number((gv=window.env)==null?void 0:gv.MAX_UPLOAD_FILE_SIZE)||Ae.MAX_UPLOAD_FILE_SIZE,GH=HH*1024*1024;function Dp({did:e,prefix:t,headers:n,onUploaded:r,open:o,onClose:a}){const{t:i,locale:s}=qt(),c=S.useRef(null),l=S.useCallback(d=>{const{status:u,data:f}=d;if(u===200){r(f);return}ot.error(i("blocklet.component.addComponentTip.uploadFailed"))},[r,i]);return S.useEffect(()=>{var d,u;o?(d=c.current)==null||d.open():(u=c.current)==null||u.close()},[o]),x.jsx(KH,{id:`component-uploader-${e}`,children:x.jsx(UH,{ref:c,locale:s,popup:!0,onUploadFinish:l,plugins:[],onClose:a,installerProps:{disabled:!0},apiPathProps:{uploader:Qa(t,qH,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:mv,maxFileSize:GH,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:i("blocklet.component.addComponentTip.allowedFileTypes",{types:mv.map(d=>d.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}Dp.propTypes={did:te.string.isRequired,prefix:te.string.isRequired,open:te.bool,headers:te.func,onUploaded:te.func,onClose:te.func};Dp.defaultProps={open:!1,headers:()=>({}),onUploaded:tm,onClose:tm};const KH=bS("div")`
|
|
633
633
|
.uploader-wrapper {
|
|
634
634
|
display: inline-flex;
|
|
635
635
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,ah as F,H as p}from"./vendor-mui-core-Bq8gXTan.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as G,a1 as q,am as H,J as M}from"./vendor-utils-BfZ4tlod.js";import{a as z,k as D,a3 as V}from"./vendor-ux-did-connect-pzpsrvqx.js";import{S as Y}from"./index-
|
|
1
|
+
import{j as r,ah as F,H as p}from"./vendor-mui-core-Bq8gXTan.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as G,a1 as q,am as H,J as M}from"./vendor-utils-BfZ4tlod.js";import{a as z,k as D,a3 as V}from"./vendor-ux-did-connect-pzpsrvqx.js";import{S as Y}from"./index-BMxp4XYs.js";import{P as $}from"./page-header-DNvUdNpI.js";import{k as Q,L as W,f as A}from"./index-D2bUzebR.js";import{c as a}from"./vendor-arcblock-CwufDgLV.js";import{S as X}from"./layout-Ccou1sEP.js";import{S as J}from"./step-actions-OF8wtaVt.js";import{S as Z}from"./button-D_ZVjN82.js";import"./vendor-hooks-DqdmWCmo.js";import"./lottie-web-jYmAQWuC.js";import"./Done-ASNftAOL.js";import"./collapse-DAaiuAEY.js";import"./Google-C28yeMZW.js";import"./cloneDeep-CDl5kZTY.js";import"./logo-uploader-Btt6h3-w.js";import"./index-DVQCgvFb.js";import"./content-layout-BC2QkTYi.js";import"./use-mobile-DwzRjjku.js";function x({children:h,bottom:T,onBottomFix:m}){const i=d.useRef(null),l=d.useRef(null),L=d.useRef(null),c=d.useRef(null),[C,E]=d.useState(!1);return d.useEffect(()=>{let t;const u=()=>{t||(t=setTimeout(()=>{l.current&&(l.current.scrollHeight>i.current.clientHeight-L.current.clientHeight?(c.current!=="fix"&&(m("fix"),c.current="fix"),E(!0)):(c.current!=="scroll"&&(m("scroll"),c.current="scroll"),E(!1))),t=null},50))};let f;return window.ResizeObserver?f=new ResizeObserver(u):window.addEventListener("resize",u),f.observe(i.current),f.observe(l.current),()=>{f?f.disconnect():window.removeEventListener("resize",u),t&&clearTimeout(t)}},[m]),r.jsxs(ee,{ref:i,className:`${C?"scroll-mode":""}`,children:[r.jsx("div",{className:"compact-context",ref:l,children:h}),r.jsx("div",{className:"fix-container",ref:L,children:T})]})}const ee=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|