@abtnode/blocklet-services 1.17.7-beta-20251223-090654-55d57623 → 1.17.7-beta-20251224-045844-3c7f459a
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-CcqhN9eH.js → access-control-DwlD3_cw.js} +1 -1
- package/dist/assets/{add-component-core-C7Ksojy0.js → add-component-core-BITgGwN0.js} +3 -3
- package/dist/assets/{add-resource-CyoiDXcs.js → add-resource-ENVSA34x.js} +1 -1
- package/dist/assets/{addon-DbU0Ni5H.js → addon-C2qdiHVb.js} +1 -1
- package/dist/assets/{advanced-DyGgZSKn.js → advanced-BosetBVE.js} +1 -1
- package/dist/assets/{aigne-Biwp5TgZ.js → aigne-DbMeOdg9.js} +1 -1
- package/dist/assets/{appearance-CP2saN8e.js → appearance-DhUAX-xn.js} +1 -1
- package/dist/assets/{audit-logs-ClC8rsLg.js → audit-logs-BHPPGieH.js} +1 -1
- package/dist/assets/{authorize-C8addT1l.js → authorize-Dfo70g1t.js} +1 -1
- package/dist/assets/{bind-account-C3ikaqbA.js → bind-account-Drs3IDFN.js} +1 -1
- package/dist/assets/{branding-eZco46gS.js → branding-B-5oLD-k.js} +1 -1
- package/dist/assets/{branding-BYJ9wBmN.js → branding-BhvacExo.js} +1 -1
- package/dist/assets/{branding-BWDcuHK0.js → branding-ByK6n-fM.js} +1 -1
- package/dist/assets/{bundle-avatar-CBW9tbvC.js → bundle-avatar-DVOaAXid.js} +1 -1
- package/dist/assets/{complete-owQjgqP2.js → complete-Djtuko3J.js} +1 -1
- package/dist/assets/{component-CZUGuhBp.js → component-UsgyDUkb.js} +29 -29
- package/dist/assets/{config-C9Q_3I9H.js → config-CUYR0yDP.js} +1 -1
- package/dist/assets/{config-DPHytSzB.js → config-Co1ZhGgP.js} +1 -1
- package/dist/assets/{config-BwLMiIKp.js → config-DuS3gx_m.js} +2 -2
- package/dist/assets/{config-navigation-DRx0q2MD.js → config-navigation-DjF2jJY9.js} +2 -2
- package/dist/assets/{config-space-B7BwTKLT.js → config-space-zEV0JkDF.js} +1 -1
- package/dist/assets/{confirm-D3ZOq19V.js → confirm-DTx9f3Ke.js} +1 -1
- package/dist/assets/{connect-b5hYafr7.js → connect-BX2QwOaU.js} +1 -1
- package/dist/assets/{connect-DC4M6Sfk.js → connect-nknm0LHt.js} +1 -1
- package/dist/assets/{connect-to-BqMkANDm.js → connect-to-eBtGI4_9.js} +1 -1
- package/dist/assets/{dashboard-DPCpuxBj.js → dashboard-DbjH3qe4.js} +3 -3
- package/dist/assets/{delete-confirm-CvVgX89H.js → delete-confirm-HiRqbh9-.js} +1 -1
- package/dist/assets/{domain-DBV8eBwE.js → domain-Xaa2OTQZ.js} +1 -1
- package/dist/assets/{domain-action-card-BTzoEvCg.js → domain-action-card-BzceZepB.js} +1 -1
- package/dist/assets/{domains-3VVRUwD7.js → domains-D_GcYdME.js} +1 -1
- package/dist/assets/{email-CJqJ73o8.js → email-CaObtYNf.js} +1 -1
- package/dist/assets/engine-BzngvK61.js +1 -0
- package/dist/assets/{exchange-passport-CWSz84jX.js → exchange-passport-BA6t_lld.js} +1 -1
- package/dist/assets/{form-BDqnlPbC.js → form-DNo4HCRt.js} +1 -1
- package/dist/assets/{fuel-DS6CQdbE.js → fuel-Cr5W3cGy.js} +1 -1
- package/dist/assets/{gen-access-key-DSBH6387.js → gen-access-key-Bw62ox39.js} +1 -1
- package/dist/assets/{gen-simple-access-key-OIDIjNLc.js → gen-simple-access-key-QTWh5kxW.js} +1 -1
- package/dist/assets/{get-safe-url-BIGE7_Qp.js → get-safe-url-CqAaHb9L.js} +1 -1
- package/dist/assets/{home-C6D8L8l9.js → home-iaPbLBtv.js} +1 -1
- package/dist/assets/{iframe-8V4ttVHV.js → iframe-C8myLb4U.js} +1 -1
- package/dist/assets/{index-BDPrAFK5.js → index-1azOxnKy.js} +1 -1
- package/dist/assets/{index-CbA_EJi-.js → index-9h1okNKA.js} +1 -1
- package/dist/assets/{index-Bu1nTc5x.js → index-B7jV3her.js} +1 -1
- package/dist/assets/{index-CA8KVVfT.js → index-B8sa2W5r.js} +1 -1
- package/dist/assets/{index-CDZlfV0h.js → index-BHa1_Bjz.js} +3 -3
- package/dist/assets/{index-DbhZjmcw.js → index-BNeXCm1B.js} +1 -1
- package/dist/assets/{index-BmEXU6vj.js → index-BleAAm7x.js} +1 -1
- package/dist/assets/{index-qbQiaInB.js → index-BzU09Azd.js} +1 -1
- package/dist/assets/{index-BB3pIdTj.js → index-C2HNVEZ0.js} +1 -1
- package/dist/assets/{index-qXLxdehr.js → index-C4nyPKIr.js} +1 -1
- package/dist/assets/{index-BMBR4jWm.js → index-CaQnmN3Y.js} +1 -1
- package/dist/assets/{index-BoNPkce-.js → index-CnWFrsC2.js} +1 -1
- package/dist/assets/{index-CtBJPFT5.js → index-CtJhxyJT.js} +2 -2
- package/dist/assets/{index-D1ZBWiBh.js → index-CzvNhDIJ.js} +1 -1
- package/dist/assets/{index-YVLFMapw.js → index-D3g5TOJl.js} +1 -1
- package/dist/assets/{index-qF59ePP4.js → index-DHvO7Oyu.js} +1 -1
- package/dist/assets/{index-Bik7zY2I.js → index-DeG3Ee92.js} +1 -1
- package/dist/assets/{index-sxg2jpz1.js → index-Df4GSKx6.js} +1 -1
- package/dist/assets/{index-C_0pT37U.js → index-Dk6ZABgc.js} +1 -1
- package/dist/assets/{index-BQFqfTN1.js → index-Dnd0o2ng.js} +1 -1
- package/dist/assets/{index-COc3cI68.js → index-DoVbUHDU.js} +1 -1
- package/dist/assets/{index-f9kknM1U.js → index-SACCniHf.js} +1 -1
- package/dist/assets/{index-DK6Ws14k.js → index-SCaAOhtj.js} +1 -1
- package/dist/assets/{index-fvFGLK4q.js → index-YLno1Cst.js} +6 -6
- package/dist/assets/{index-DfH5MtA4.js → index-pAjb_WaG.js} +1 -1
- package/dist/assets/{index-BAErdc3T.js → index-seQ_ufVM.js} +1 -1
- package/dist/assets/{invitation-BL-oq-bZ.js → invitation-DwMnPB2W.js} +1 -1
- package/dist/assets/{invitations-D_WuwVBY.js → invitations-mhxsPoWR.js} +1 -1
- package/dist/assets/{invite-CZXWbdah.js → invite-DpZe41tL.js} +1 -1
- package/dist/assets/{isURL-CRNOx2AN.js → isURL-CASPeQFe.js} +1 -1
- package/dist/assets/{issue-passport-C8DmKg9H.js → issue-passport-ClIYXZHr.js} +1 -1
- package/dist/assets/{item-NbVFwplA.js → item-B3LlwO_A.js} +1 -1
- package/dist/assets/{landing-page-CBmSfoFm.js → landing-page-Cv6belCa.js} +1 -1
- package/dist/assets/{layout-BFN2VPgc.js → layout-DkW-u1GX.js} +1 -1
- package/dist/assets/{list-D6uynRH5.js → list-CBP3Lj7-.js} +1 -1
- package/dist/assets/{list-BHVkP4fU.js → list-Dqz9X41o.js} +1 -1
- package/dist/assets/{localization-DnFDOrOQ.js → localization-gLf4FT3Q.js} +1 -1
- package/dist/assets/{log-CzJDSGek.js → log-Ch1_gOOt.js} +1 -1
- package/dist/assets/{login-CU3trWD-.js → login-_zzURN5A.js} +1 -1
- package/dist/assets/{login-oauth-callback-37mFmo_M.js → login-oauth-callback-BiIj9E0o.js} +1 -1
- package/dist/assets/{logo-uploader-CdD4-48m.js → logo-uploader-BmnoHisE.js} +1 -1
- package/dist/assets/{lost-passport-C9Hyh4Ed.js → lost-passport-DYnJRD_t.js} +1 -1
- package/dist/assets/{open-window-0VJZR9pK.js → open-window-Btzsgc7g.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-1xzXw3lQ.js → over-due-invoice-payment-BFDFMUwK.js} +1 -1
- package/dist/assets/{overview-BJcUiexv.js → overview-Bf86Sw9l.js} +1 -1
- package/dist/assets/{passport-CWGJXEtt.js → passport-D6ZhqZ1F.js} +1 -1
- package/dist/assets/{passport-item-Bu_f0D0b.js → passport-item-Dx140DTL.js} +1 -1
- package/dist/assets/{permission-ZblvP8BW.js → permission-HtrJm1h2.js} +1 -1
- package/dist/assets/{preferences-DEzl011I.js → preferences-Dri2a4fE.js} +1 -1
- package/dist/assets/{profile-embed-iCopDM3E.js → profile-embed-BpG6-Rqz.js} +1 -1
- package/dist/assets/{publish-resource-uZOmj-Xz.js → publish-resource-CruXcF2L.js} +1 -1
- package/dist/assets/{runtime-Cucy5KcL.js → runtime-Ck_rDqm2.js} +1 -1
- package/dist/assets/sdk-C3wBexZ2.js +1 -0
- package/dist/assets/{security-B5St5gtl.js → security-Duf_ZEVi.js} +1 -1
- package/dist/assets/{session-BqnhIOZD.js → session-Cm8j8XeZ.js} +1 -1
- package/dist/assets/{setup-DAJjDkED.js → setup-COruOAew.js} +1 -1
- package/dist/assets/{spaces-CWRlaHIZ.js → spaces-BuZf3GoQ.js} +1 -1
- package/dist/assets/{start-BnztTpX3.js → start-D_yHRXzR.js} +1 -1
- package/dist/assets/{starting-progress-CGjjGpuY.js → starting-progress-DahUM5Xo.js} +1 -1
- package/dist/assets/{status-Bk4He7Xx.js → status-DVjLoqLm.js} +1 -1
- package/dist/assets/{step-actions-CNIiIH7j.js → step-actions-DkehnzsP.js} +1 -1
- package/dist/assets/{studio-BasxWENX.js → studio-D4hiQNwZ.js} +1 -1
- package/dist/assets/{team-CF6hrmVi.js → team-DNuHMrzV.js} +1 -1
- package/dist/assets/{traffic-C3uP0LAp.js → traffic-B0WH67Yr.js} +1 -1
- package/dist/assets/{transfer-IX3OJWyW.js → transfer-BpjPR3S_.js} +1 -1
- package/dist/assets/{unsubscribe-BvvM7eMA.js → unsubscribe-CzgQXfYP.js} +1 -1
- package/dist/assets/{use-app-logo-7cAapfl7.js → use-app-logo-CZWb8lrs.js} +1 -1
- package/dist/assets/{user-center-ChblBbZV.js → user-center-DndqALOV.js} +1 -1
- package/dist/assets/{user-follower-CVGmlOad.js → user-follower-Bzb2ZR_9.js} +1 -1
- package/dist/assets/{util-4RKb-Srn.js → util-CVjlaHo_.js} +1 -1
- package/dist/assets/{util-DE6S-EwK.js → util-DIVJQVg1.js} +1 -1
- package/dist/assets/{wait-connect-COGsNIA_.js → wait-connect-Be1Dmt0P.js} +1 -1
- package/dist/assets/{wizard-5PG9Y1qa.js → wizard-BhUdbQos.js} +1 -1
- package/dist/assets/{wizard-components-BgKNgavh.js → wizard-components-D3PqSMGt.js} +1 -1
- package/dist/assets/{wrap-locale-DJbgvexA.js → wrap-locale-DtcRIeKF.js} +1 -1
- package/dist/assets/{zh-CeRIETvo.js → zh-B_cpka88.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +23 -23
- package/dist/assets/engine-Ctj5gh6M.js +0 -1
- package/dist/assets/sdk-aly4y-HK.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g}from"./vendor-react-CTtPmzVP.js";import{j as e,cy as o1,at as G,ak as c,aj as W,z as h1,U as n1,I as Y,a6 as d1,by as p1,F as f1,O as x1,dg as $,W as r,c5 as v1,b2 as m1,ar as g1,T as v,a3 as u,Q as V,b6 as u1}from"./vendor-mui-core-DnR6WYuU.js";import{k as j1,M as y1,J as Z1,aT as L1,H as w1}from"./vendor-ux-DfSgTRg5.js";import{x as E1}from"./vendor-hooks-cYMUGE4V.js";import{Z as q,G as _1,ak as b1,J as d}from"./index-
|
|
1
|
+
import{r as g}from"./vendor-react-CTtPmzVP.js";import{j as e,cy as o1,at as G,ak as c,aj as W,z as h1,U as n1,I as Y,a6 as d1,by as p1,F as f1,O as x1,dg as $,W as r,c5 as v1,b2 as m1,ar as g1,T as v,a3 as u,Q as V,b6 as u1}from"./vendor-mui-core-DnR6WYuU.js";import{k as j1,M as y1,J as Z1,aT as L1,H as w1}from"./vendor-ux-DfSgTRg5.js";import{x as E1}from"./vendor-hooks-cYMUGE4V.js";import{Z as q,G as _1,ak as b1,J as d}from"./index-BHa1_Bjz.js";import{s as k1}from"./sanitize-DyRfEGVu.js";import{F as O1}from"./form-text-input-BjQKx89L.js";import{R as M1}from"./required-BQln5OcV.js";import{F as B1}from"./form-wrapper-PT5ZzMQy.js";import{w as J}from"./permission-HtrJm1h2.js";import{u as R1}from"./use-app-logo-CZWb8lrs.js";import{L as j}from"./logo-uploader-BmnoHisE.js";import{S as E}from"./section-jXB9AxBb.js";import"./vendor-utils-drLlzTVq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CPCSE54a.js";import"./omit-BgmLPtMY.js";import"./index-_tncRnTu.js";import"./edit.svg-RRSklUg-.js";import"./session-Cm8j8XeZ.js";function Q({label:i="",disabled:h=!1,required:p=!1,initialValue:s="",onChange:M=()=>{},style:z={},onSubmit:f=()=>{},triggers:m=[],options:a=[],formatterBeforeSubmit:_=Z=>Z.join(","),helperText:B="",placeholder:T="",renderImage:I=()=>null,renderLabel:N=()=>"",filterKeys:y=["name"],noEmpty:b=!1,...R}){const[Z,C]=g.useState(!1),[P,A]=g.useState(!1),[k,U]=g.useState(""),O=g.useRef(null),[L,S]=g.useState(s),[l,n]=g.useState(L),w=g.useMemo(()=>{if(!a)return{};const o={};return a.forEach(t=>{o[t.code]=t}),o},[a]),H=()=>{if(!a)return[];if(!k)return a.map(t=>t.code);const o=new RegExp(k.toLowerCase());return a.filter(t=>{for(let x=0;x<y.length;x++){const K=y[x];if(o.test(t[K]?.toLowerCase()))return!0}return!1}).map(t=>t.code)},c1=async()=>{A(!0);try{await f(typeof _=="function"?_(l):l)===!1?n(L):b&&!l.length?(n(s),S(s)):(n(l),S(l))}catch{n(L)}finally{A(!1),C(!1)}},t1=(o,t)=>{if(!Array.isArray(t)){n([]),M([]);return}const x=t.filter(K=>w[K]);if(!x.length){n([]),M([]);return}n(x),M(x)},s1=o=>{o.stopPropagation(),C(!0),setTimeout(()=>{if(O.current){const t=O.current.querySelector("input");t&&t.focus()}},500)},r1=Z?e.jsx(o1,{ref:O,options:a,value:l,onChange:t1,inputValue:k,onInputChange:(o,t)=>{U(t)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:H,getOptionLabel:o=>w[o]?.name,renderInput:o=>e.jsx(h1,{...o,label:"",placeholder:T}),renderOption:(o,t)=>{const x=l.indexOf(t)!==-1;return g.createElement(C1,{component:"li",...o,key:t},I(w[t]||{}),e.jsx(c,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:x?"700":"normal"},children:N(t,w[t])||w[t]?.name}),e.jsx(c,{component:W,sx:{opacity:.5,width:18,height:18},style:{visibility:x?"visible":"hidden"}}))},...R,slots:{popper:P1}}):e.jsx(c,{className:"form-item-input slot",onClick:s1,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:l.filter(o=>a.some(t=>t.code===o)).map(o=>e.jsx(n1,{label:a.find(t=>t.code===o).name,style:{marginRight:8},size:"small"},o))});return e.jsx(B1,{className:"form",style:z,children:e.jsxs(c,{className:"form-item",children:[e.jsxs(c,{className:"form-item-label",children:[i,p&&e.jsx(M1,{})]}),e.jsxs(c,{className:"form-item-body",children:[e.jsx(c,{className:"form-item-input",children:r1}),Z?e.jsx(c,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(Y,{"data-cy":"schema-form-item-confirm",onClick:c1,disabled:h||P,size:"large",children:P?e.jsx(d1,{size:24}):e.jsx(p1,{})}),e.jsx(Y,{"data-cy":"schema-form-item-cancel",onClick:()=>{n(L),C(!1)},disabled:h||P,size:"large",children:e.jsx(W,{})})]})}):null]}),Z&&B&&e.jsx(f1,{children:B})]})})}Q.propTypes={style:r.object,onSubmit:r.func,onChange:r.func,label:r.string,initialValue:r.string,required:r.bool,disabled:r.bool,triggers:r.array,options:r.array,helperText:r.string,formatterBeforeSubmit:r.func,placeholder:r.string,renderImage:r.func,filterKeys:r.arrayOf(r.string),noEmpty:r.bool,renderLabel:r.func};const C1=G.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
|
|
2
|
-
import{V as fe,_ as be}from"./vendor-ux-DfSgTRg5.js";import{j as e,b6 as U,T as E,ak as x,b2 as je,am as Y,I as A,bO as J,Y as se,at as ve,b5 as ye,$ as we,ca as Ce,A as Z,aJ as Se,cb as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-DnR6WYuU.js";import{c as D}from"./index-CDZlfV0h.js";import{E as N}from"./empty-spinner-BYDonf35.js";import{q as Pe,u as Re}from"./vendor-hooks-cYMUGE4V.js";import{r as m}from"./vendor-react-CTtPmzVP.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-89LKdt03.js";import{S as F}from"./studio-BasxWENX.js";import"./vendor-utils-drLlzTVq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CPCSE54a.js";import"./raf-schd.esm-XXBRsnmf.js";import"./index-BB3pIdTj.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-CtBJPFT5.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},H=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},B=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Le}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.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:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{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"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.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:q.getVideoCoverUrl(S),onClick:()=>B(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>B(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,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(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Ve,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.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 ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){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 Te=ve.div`
|
|
2
|
+
import{V as fe,_ as be}from"./vendor-ux-DfSgTRg5.js";import{j as e,b6 as U,T as E,ak as x,b2 as je,am as Y,I as A,bO as J,Y as se,at as ve,b5 as ye,$ as we,ca as Ce,A as Z,aJ as Se,cb as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-DnR6WYuU.js";import{c as D}from"./index-BHa1_Bjz.js";import{E as N}from"./empty-spinner-BYDonf35.js";import{q as Pe,u as Re}from"./vendor-hooks-cYMUGE4V.js";import{r as m}from"./vendor-react-CTtPmzVP.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-89LKdt03.js";import{S as F}from"./studio-D4hiQNwZ.js";import"./vendor-utils-drLlzTVq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CPCSE54a.js";import"./raf-schd.esm-XXBRsnmf.js";import"./index-C2HNVEZ0.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-CtJhxyJT.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},H=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},B=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Le}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.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:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{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"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.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:q.getVideoCoverUrl(S),onClick:()=>B(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>B(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,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(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Ve,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.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 ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){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 Te=ve.div`
|
|
3
3
|
margin-top: 24px;
|
|
4
4
|
.image-wrapper {
|
|
5
5
|
margin-bottom: 16px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u,b2 as x,W as e}from"./vendor-mui-core-DnR6WYuU.js";import{$}from"./vendor-ux-DfSgTRg5.js";import{C as c}from"./vendor-utils-drLlzTVq.js";import{Z as l,ai as v,bs as j,c as y,bt as E,bu as P}from"./index-
|
|
1
|
+
import{j as u,b2 as x,W as e}from"./vendor-mui-core-DnR6WYuU.js";import{$}from"./vendor-ux-DfSgTRg5.js";import{C as c}from"./vendor-utils-drLlzTVq.js";import{Z as l,ai as v,bs as j,c as y,bt as E,bu as P}from"./index-BHa1_Bjz.js";function R({blocklet:o,ancestors:d=[]}){const t=l(),{inService:s}=t,a=v(o?.status)||j(o?.status),r=`?v=${o?.meta?.version}${a?"~":""}`;let n=s?`${c(E,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${r}`:c(t.imgPrefix,"blocklet.png");if(o.source==="registry"&&o.deployedFrom&&o.meta.logo)n=`${c(o.deployedFrom,P(o.meta.bundleDid,o.meta.logo))}${r}`;else{const g=window.env?.apiPrefix||"/",i=d.concat(o),p=s?i.slice(1):i;n=`${c(g,`/blocklet/logo-bundle${p.map(m=>`/${m.meta.did}`).join("")}`)}${r}`}return{logoUrl:n,inService:s}}function h({blocklet:o,style:d={},size:t=40,ancestors:s=[],...a}){const r=l(),{logoUrl:n,inService:g}=R({blocklet:o,ancestors:s}),{variant:i}=a,p=g?()=>{}:f=>{f.target.src=`${r.imgPrefix}/blocklet.png`};let m=u.jsx("img",{src:n,onError:p,alt:o.meta.name,style:{width:t}});return o.meta.logo||(m=u.jsx($,{did:o.meta.did||"",responsive:!0})),u.jsx(x,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:t,height:t,borderRadius:10},d),...a,children:m})}h.propTypes={blocklet:e.object.isRequired,style:e.object,size:e.oneOfType([e.number,e.string]),ancestors:e.array};export{h as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{at as E,j as e,ak as m,W}from"./vendor-mui-core-DnR6WYuU.js";import{aA as Q,y as ne,K as H,cb as oe,q as ae,h as ie,cc as O,c as ce,o as le,r as ue,cd as de,O as me}from"./index-
|
|
1
|
+
import{at as E,j as e,ak as m,W}from"./vendor-mui-core-DnR6WYuU.js";import{aA as Q,y as ne,K as H,cb as oe,q as ae,h as ie,cc as O,c as ce,o as le,r as ue,cd as de,O as me}from"./index-BHa1_Bjz.js";import{r as d}from"./vendor-react-CTtPmzVP.js";import{aa as he,a2 as pe,B as fe,J as ge,C as K}from"./vendor-utils-drLlzTVq.js";import{b as we,a as j}from"./vendor-hooks-cYMUGE4V.js";import{u as xe}from"./launch-result-message-MNpx7ysR.js";import{V as be,K as ke,H as q}from"./vendor-ux-DfSgTRg5.js";import{g as Ue}from"./get-safe-url-CqAaHb9L.js";import{S as J}from"./button-D6RwAFss.js";import{S as ye}from"./layout-DkW-u1GX.js";import{p as Re,P as Se,S as Le}from"./starting-progress-DahUM5Xo.js";import"./vendor-arcblock-CPCSE54a.js";import"./lottie-web-4koyQiv_.js";import"./content-layout-DmSBGGVm.js";const ve=E(xe)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|