@abtnode/webapp 1.16.29-beta-87e06e1c → 1.16.29-beta-2eaf40bc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-9p89cr51.js → Add-3VAJlzWu.js} +1 -1
- package/dist/assets/{ArrowDropDown-PUGycbah.js → ArrowDropDown-DehQx6JH.js} +1 -1
- package/dist/assets/{Autocomplete-CBrNN6Wi.js → Autocomplete-Dd8-Wnl0.js} +1 -1
- package/dist/assets/{Breadcrumbs-YbVhGF74.js → Breadcrumbs-B-3iNfJV.js} +1 -1
- package/dist/assets/{ButtonGroup-qjpoNO9j.js → ButtonGroup-4dUIbekw.js} +1 -1
- package/dist/assets/{CheckCircle-C458wd7t.js → CheckCircle-DQOA10VV.js} +1 -1
- package/dist/assets/{ChevronLeft-Bvm6nyLn.js → ChevronLeft-BovE6bSi.js} +1 -1
- package/dist/assets/{ChevronRight-pbRslwzZ.js → ChevronRight-COT0_GJ0.js} +1 -1
- package/dist/assets/{Close-CRs5nN-9.js → Close-DSOnajKv.js} +1 -1
- package/dist/assets/Delete-B0dIMgAO.js +1 -0
- package/dist/assets/{DeleteOutline-DkbzMi-O.js → DeleteOutline-BqV9pNFr.js} +1 -1
- package/dist/assets/DeleteOutline-C3yNjgmc.js +1 -0
- package/dist/assets/{Done-DycYtcxi.js → Done-C6j7V5dY.js} +1 -1
- package/dist/assets/{Edit-CWojktHH.js → Edit-UiTtw7ED.js} +1 -1
- package/dist/assets/{EditIcon-ugJwCH0S.js → EditIcon-D-Dhs8bv.js} +1 -1
- package/dist/assets/ExpandMore-CBwUEwtf.js +1 -0
- package/dist/assets/{FilterList-Cv0uknPg.js → FilterList-BfkrQFl0.js} +4 -4
- package/dist/assets/{Google-Bpr-eboG.js → Google-U8HcYuII.js} +1 -1
- package/dist/assets/{Https-DEV-Mw3j.js → Https-DJQ_Uk5c.js} +1 -1
- package/dist/assets/{InputAdornment-GAXpW_Pc.js → InputAdornment-xbC4GBmg.js} +1 -1
- package/dist/assets/{InputLabel-CdP2Vrv8.js → InputLabel-Dyg2n4KM.js} +1 -1
- package/dist/assets/{LastPage-BTLBin5_.js → LastPage-g6ViU_79.js} +1 -1
- package/dist/assets/{Launch-C4_ktc4w.js → Launch-CstW8TMa.js} +1 -1
- package/dist/assets/{Link-DbSs28Vg.js → Link-Bz3bTK5Z.js} +1 -1
- package/dist/assets/{LoadingButton-DXivgZhE.js → LoadingButton-yzy8vaq4.js} +1 -1
- package/dist/assets/{LockIcon-QS29DL1o.js → LockIcon-C86uaqg6.js} +1 -1
- package/dist/assets/{Loop-Dpp5fctN.js → Loop-D_KRqy9W.js} +1 -1
- package/dist/assets/{MoreVert-YMJ5zQGi.js → MoreVert-BB46cKFe.js} +1 -1
- package/dist/assets/{Pagination-Dw5SQ0Cx.js → Pagination-JhNJfD4t.js} +1 -1
- package/dist/assets/{Public-DuGVgRc8.js → Public-BjhCkcv9.js} +1 -1
- package/dist/assets/{SchemaReference.es-CuLNjPJp.js → SchemaReference.es-HI-2_6NF.js} +1 -1
- package/dist/assets/{Search-CnmiZ7r5.js → Search-rqHI-c1S.js} +1 -1
- package/dist/assets/{Select-D_jjFrx2.js → Select-BioDM9Sd.js} +2 -2
- package/dist/assets/{Skeleton-DMU-9YHS.js → Skeleton-DZ26ugSB.js} +5 -5
- package/dist/assets/{Slider-OEZKoU_q.js → Slider-CIc45JJ9.js} +1 -1
- package/dist/assets/{Stepper-BLioo72i.js → Stepper-BXZWzSgf.js} +1 -1
- package/dist/assets/TextField-BKw9m9nx.js +1 -0
- package/dist/assets/{ToggleButtonGroup-DOF-aia7.js → ToggleButtonGroup-DRfzhnnx.js} +1 -1
- package/dist/assets/{ViewList-e_g9Zmbu.js → ViewList-Cm-dAQhY.js} +1 -1
- package/dist/assets/actions-Bi_LOjPn.js +1 -0
- package/dist/assets/actions-DMSeOF_9.js +11 -0
- package/dist/assets/{agreement-CvcGSLJB.js → agreement-DPo8tjJ3.js} +6 -6
- package/dist/assets/api-DQe-yphm.js +1 -0
- package/dist/assets/app-avatar-CF6TIYj9.js +1 -0
- package/dist/assets/{audit-logs-DPElXT2k.js → audit-logs-DK4wA_bl.js} +1 -1
- package/dist/assets/blocklet-BJt-raxF.js +1 -0
- package/dist/assets/{brace-fold.es-CXHeYjf1.js → brace-fold.es-DwWLXH4V.js} +1 -1
- package/dist/assets/bundle-avatar-B6arcSZZ.js +1 -0
- package/dist/assets/{chart-B4W7fRqI.js → chart-DVdOH_wE.js} +1 -1
- package/dist/assets/{click-to-copy-6L_LfYIl.js → click-to-copy-BwGLfwQv.js} +1 -1
- package/dist/assets/{closebrackets.es-ZZ8LeVnj.js → closebrackets.es-piHSryNk.js} +1 -1
- package/dist/assets/{codemirror.es-CF4ao-W3.js → codemirror.es-BX7gc_SI.js} +1 -1
- package/dist/assets/{comment.es-DQ_cLmdb.js → comment.es-kfTcaTaN.js} +1 -1
- package/dist/assets/{config-navigation-CkEBHj2r.js → config-navigation-BjBcMzix.js} +5 -5
- package/dist/assets/{delete-confirm-BN8gy06y.js → delete-confirm-B6Tu_cjp.js} +1 -1
- package/dist/assets/{detail-CP83_tPj.js → detail-DXun71hQ.js} +3 -3
- package/dist/assets/{dialog.es-DExnqR6t.js → dialog.es-qczXxs5i.js} +1 -1
- package/dist/assets/{download-DKskcy43.js → download-hCU_NL5Y.js} +1 -1
- package/dist/assets/{foldgutter.es-BRAMSNxp.js → foldgutter.es-CNjZdGfG.js} +1 -1
- package/dist/assets/getValidReactChildren-Bfzg_2yP.js +1 -0
- package/dist/assets/{hint.es-6G79xByO.js → hint.es-BcTOFmVv.js} +1 -1
- package/dist/assets/{hint.es2-Baw04wRx.js → hint.es2-Po_QXCs2.js} +1 -1
- package/dist/assets/{iframe-CpnjA8zm.js → iframe-D60s0j4M.js} +1 -1
- package/dist/assets/{index-B2cmqIK_.js → index--pVRVvBB.js} +1 -1
- package/dist/assets/{index-BIJwoRQp.js → index--tmgIfny.js} +1 -1
- package/dist/assets/{index-DQvie1Xo.js → index-20iGb6mA.js} +1 -1
- package/dist/assets/index-5ep8c_KG.js +54 -0
- package/dist/assets/{index-COF37GzL.js → index-B6BXxNti.js} +8 -8
- package/dist/assets/{index-D0qCsQ_X.js → index-BOVEdIid.js} +1 -1
- package/dist/assets/{index-Bj-A_LO-.js → index-B_G8iSj9.js} +1 -1
- package/dist/assets/{index-DOvGlVxX.js → index-BlJ5mRs4.js} +11 -11
- package/dist/assets/index-BpaAmbjH.js +278 -0
- package/dist/assets/{index-brs4Ovtr.js → index-BqZEyDkY.js} +1 -1
- package/dist/assets/{index-D3_95_AQ.js → index-By48hREf.js} +1 -1
- package/dist/assets/{index-CJBXTfA_.js → index-C2D98lgI.js} +32 -32
- package/dist/assets/{index-DcAqvRRT.js → index-C2qpMC0j.js} +1 -1
- package/dist/assets/index-CHD6Sawv.js +1 -0
- package/dist/assets/{index-XomN73iI.js → index-CJQiOTRD.js} +1 -1
- package/dist/assets/{index-BWxquNjq.js → index-CLxOAjUq.js} +1 -1
- package/dist/assets/{index-OpPbc3XM.js → index-CS1WMiVI.js} +11 -11
- package/dist/assets/{index-DH_YItOr.js → index-CSHzjJLI.js} +1 -1
- package/dist/assets/{index-aeB_hGnn.js → index-CYa2z0tY.js} +1 -1
- package/dist/assets/{index-DM-kSqOV.js → index-CfMrG-6m.js} +1 -1
- package/dist/assets/index-CgFNSj9q.js +1 -0
- package/dist/assets/index-CjoxtNQO.js +1 -0
- package/dist/assets/{index-BBsadaJh.js → index-CjpSyZA2.js} +4 -4
- package/dist/assets/index-ClJrGzyV.js +1 -0
- package/dist/assets/index-CtJUE_Ce.js +16 -0
- package/dist/assets/{index-WT4dVA5f.js → index-CuSKWisM.js} +1 -1
- package/dist/assets/{index-DYG5Tovq.js → index-D5mvFHwK.js} +1 -1
- package/dist/assets/{index-Dz1ahtjo.js → index-D6BTN5bJ.js} +1 -1
- package/dist/assets/{index-I6_9XQww.js → index-D79trrES.js} +1 -1
- package/dist/assets/{index-CIsUZHl3.js → index-D7CruCrK.js} +3 -3
- package/dist/assets/{index-D0y4Peo7.js → index-DS0UcZlk.js} +4 -4
- package/dist/assets/{index-B6T71Xra.js → index-DWoEF0Xz.js} +1 -1
- package/dist/assets/{index-DDVZbDc5.js → index-DZMLm25q.js} +7 -7
- package/dist/assets/index-Dpr1-GCJ.js +2493 -0
- package/dist/assets/{index-CS1P34PK.js → index-Dv0PfLaH.js} +1 -1
- package/dist/assets/{index-DTCh76Oq.js → index-FuyWc2kY.js} +12 -9
- package/dist/assets/{index-CB51-nwP.js → index-G0ifYRE5.js} +1 -1
- package/dist/assets/{index-mFd06l0F.js → index-Q8ecyTb-.js} +1 -1
- package/dist/assets/{index-Dylb0qYR.js → index-T3bFNwLt.js} +1 -1
- package/dist/assets/{index-2gGHhy3B.js → index-pZ4wuW0n.js} +1 -1
- package/dist/assets/{index-C3f4JgKQ.js → index-p_USl--w.js} +12 -12
- package/dist/assets/{index-Cse3dDDG.js → index-rBCOxvDw.js} +1 -1
- package/dist/assets/{index-DVd2dq8l.js → index-rYvrv8TX.js} +1 -1
- package/dist/assets/{index-DgFCpT_-.js → index-wtjGA_La.js} +5 -5
- package/dist/assets/{index.es-D1k5M1E2.js → index.es-BQGldbXt.js} +1 -1
- package/dist/assets/{index.esm-NzqlBaFf.js → index.esm-DqRgonGB.js} +1 -1
- package/dist/assets/{info-addon.es-D28Gve7b.js → info-addon.es-CYKOi7kz.js} +1 -1
- package/dist/assets/{info.es-BHx5fgaf.js → info.es-CKNL-yym.js} +1 -1
- package/dist/assets/{install-from-url-D913MaCZ.js → install-from-url-DPfj2cnI.js} +1 -1
- package/dist/assets/{invitation-DSwZ-Xej.js → invitation-BY43eo5D.js} +4 -4
- package/dist/assets/{is-path-prefix-equal-ufTBNRSJ.js → is-path-prefix-equal-OAOH-qOd.js} +1 -1
- package/dist/assets/isEqual-C32HztcX.js +1 -0
- package/dist/assets/{item-B7ZSMqn6.js → item-CDyVRhvg.js} +26 -26
- package/dist/assets/{javascript.es-WSUko8sV.js → javascript.es-BYVV5293.js} +1 -1
- package/dist/assets/{jump-to-line.es-CcgyMzYU.js → jump-to-line.es-jsNifFMh.js} +1 -1
- package/dist/assets/{jump.es-dMMEnQpp.js → jump.es-BzHWkDXH.js} +1 -1
- package/dist/assets/{line-VZzxMXH1.js → line-BZys0zer.js} +4 -4
- package/dist/assets/{lint.es-BJtFL-R1.js → lint.es-BFWMqOv1.js} +1 -1
- package/dist/assets/{lint.es2-8JV00Yve.js → lint.es2-CUt2AauZ.js} +1 -1
- package/dist/assets/{lint.es3-1yXUm-RP.js → lint.es3-di_bUcOb.js} +1 -1
- package/dist/assets/{list-header-DwVsFEjc.js → list-header-d25I2byh.js} +1 -1
- package/dist/assets/{log-BpKaLgPW.js → log-DTxt_dGq.js} +1 -1
- package/dist/assets/{lottie-O2tV-OjZ.js → lottie-CVFkVbsZ.js} +1 -1
- package/dist/assets/{matchbrackets.es-rEntxSn4.js → matchbrackets.es-DVkRqCgH.js} +1 -1
- package/dist/assets/{memory-GChDLCy_.js → memory-Bv9qf5X_.js} +1 -1
- package/dist/assets/{mode.es-BR84FRL3.js → mode.es-CifbNh02.js} +1 -1
- package/dist/assets/{mode.es2-C9o9JxCy.js → mode.es2-cIWGTWZh.js} +1 -1
- package/dist/assets/{mode.es3-hEzwa8oI.js → mode.es3-aQZkTGg6.js} +1 -1
- package/dist/assets/{onlineParser.es-bjnhX9oL.js → onlineParser.es-DLUHNAdN.js} +1 -1
- package/dist/assets/overview-6t6Ij2OO.js +26 -0
- package/dist/assets/{react-D74HYKcx.js → react-Rgfin0TQ.js} +3 -3
- package/dist/assets/{redux-AeaWrwCk.js → redux-I4eB06Ek.js} +1 -1
- package/dist/assets/{resource-dialog-RnJtI7_o.js → resource-dialog-BqDlfetI.js} +2 -2
- package/dist/assets/{runtime-DfYA5FiE.js → runtime-KPnZVG0c.js} +1 -1
- package/dist/assets/{search.es-BxNdUYNg.js → search.es-BBE6mbEs.js} +1 -1
- package/dist/assets/{searchcursor.es-s8a8A3Ii.js → searchcursor.es-BijniVLl.js} +1 -1
- package/dist/assets/service-9ctjdI1h.js +1 -0
- package/dist/assets/{shorten-label-pU8ae-Oh.js → shorten-label-Io_PRP3C.js} +1 -1
- package/dist/assets/{show-hint.es-B1JGf57k.js → show-hint.es-DS-7hlNh.js} +1 -1
- package/dist/assets/{slicedToArray-C1UbO-hj.js → slicedToArray-BXSVsBoG.js} +1 -1
- package/dist/assets/{spaces-2O-5X4yt.js → spaces-DxJMOXk2.js} +1 -1
- package/dist/assets/{sublime.es-CiN5FIO2.js → sublime.es-7jzC1I8A.js} +1 -1
- package/dist/assets/{switch-control-Dh1twa_3.js → switch-control-BemP3Qoi.js} +1 -1
- package/dist/assets/{table-icons-BmuX7Xai.js → table-icons-D4d7sHXC.js} +9 -9
- package/dist/assets/{tag-BgAeiRXM.js → tag-DJbcwSVc.js} +1 -1
- package/dist/assets/{team-DGUd51ZP.js → team-FBszwXwa.js} +1 -1
- package/dist/assets/toUpper-DcVgFeb6.js +1 -0
- package/dist/assets/{traffic-BEhPBbjp.js → traffic-IVSZlM0h.js} +6 -6
- package/dist/assets/{url-evaluation-Cw18Tjx5.js → url-evaluation-D7EkdGbI.js} +2 -2
- package/dist/assets/{url-join-Di_BFQmE.js → url-join-Bw5bTuVj.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CgjVAwmg.js → use-blocklet-info-for-connect-did-spaces-D16GfTTc.js} +1 -1
- package/dist/assets/{useLocalStorage-FbxxP1zi.js → useLocalStorage-HB6kerLO.js} +1 -1
- package/dist/assets/{util-DWgJMgY9.js → util-IfcYVLEi.js} +1 -1
- package/dist/assets/{wait-container-D5DZGw_l.js → wait-container-c5_W7fTC.js} +1 -1
- package/dist/assets/{withStyles-D9qnQfcC.js → withStyles-C51kZpfM.js} +1 -1
- package/dist/assets/{wrap-locale-CDqxNJXh.js → wrap-locale-CTfg_3mB.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Delete-BTd8aIqu.js +0 -1
- package/dist/assets/DeleteOutline-CT39B0th.js +0 -1
- package/dist/assets/TextField-udFGOQyD.js +0 -1
- package/dist/assets/actions-BWX_qXJD.js +0 -11
- package/dist/assets/actions-e3525553.js +0 -1
- package/dist/assets/api-DeLIbQas.js +0 -1
- package/dist/assets/app-avatar-CFWpqff1.js +0 -1
- package/dist/assets/blocklet-BBUrtnew.js +0 -1
- package/dist/assets/bundle-avatar-DEQzPsHD.js +0 -1
- package/dist/assets/getValidReactChildren-DItgry09.js +0 -1
- package/dist/assets/index-BdNyli-L.js +0 -16
- package/dist/assets/index-CBhH59N7.js +0 -2
- package/dist/assets/index-CIh5WVdy.js +0 -54
- package/dist/assets/index-Ca8SBrNy.js +0 -1
- package/dist/assets/index-DT3eBYfa.js +0 -1
- package/dist/assets/index-DTt6OFJv.js +0 -1
- package/dist/assets/index-DW_sEbOX.js +0 -2491
- package/dist/assets/index-DwL4aLvY.js +0 -278
- package/dist/assets/index-KGG0_6hI.js +0 -1
- package/dist/assets/isEqual-vbSrcyPi.js +0 -1
- package/dist/assets/overview-y9hXmNWR.js +0 -23
- package/dist/assets/service-CFkt34Sc.js +0 -1
- package/dist/assets/toUpper-BSJ4Soan.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l}from"./codemirror.es-
|
|
1
|
+
import{C as l}from"./codemirror.es-BX7gc_SI.js";import{s,L as d,P as c}from"./index-wtjGA_La.js";import{o as p}from"./onlineParser.es-DLUHNAdN.js";import"./index-Dpr1-GCJ.js";var u=Object.defineProperty,a=(e,t)=>u(e,"name",{value:t,configurable:!0});function i(e,t){var r,n;const o=e.levels;return((!o||o.length===0?e.indentLevel:o[o.length-1]-(!((r=this.electricInput)===null||r===void 0)&&r.test(t)?1:0))||0)*(((n=this.config)===null||n===void 0?void 0:n.indentUnit)||0)}a(i,"indent");const v=a(e=>{const t=p({eatWhitespace:r=>r.eatWhile(s),lexRules:d,parseRules:c,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:i,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");l.defineMode("graphql",v);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o}from"./codemirror.es-
|
|
1
|
+
import{C as o}from"./codemirror.es-BX7gc_SI.js";import{_ as t,$ as i,a1 as l}from"./index-wtjGA_La.js";import{o as c}from"./onlineParser.es-DLUHNAdN.js";import"./index-Dpr1-GCJ.js";var d=Object.defineProperty,b=(e,r)=>d(e,"name",{value:r,configurable:!0});o.defineMode("graphql-results",e=>{const r=c({eatWhitespace:n=>n.eatSpace(),lexRules:p,parseRules:m,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:r.startState,token:r.token,indent:s,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function s(e,r){var n,u;const a=e.levels;return((!a||a.length===0?e.indentLevel:a[a.length-1]-(!((n=this.electricInput)===null||n===void 0)&&n.test(r)?1:0))||0)*(((u=this.config)===null||u===void 0?void 0:u.indentUnit)||0)}b(s,"indent");const p={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},m={Document:[t("{"),i("Entry",t(",")),t("}")],Entry:[l("String","def"),t(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[l("Number","number")],StringValue:[l("String","string")],BooleanValue:[l("Keyword","builtin")],NullValue:[l("Keyword","keyword")],ListValue:[t("["),i("Value",t(",")),t("]")],ObjectValue:[t("{"),i("ObjectField",t(",")),t("}")],ObjectField:[l("String","property"),t(":"),"Value"]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as b}from"./codemirror.es-
|
|
1
|
+
import{C as b}from"./codemirror.es-BX7gc_SI.js";import{_ as t,$ as i,a0 as s,a1 as n}from"./index-wtjGA_La.js";import{o as m}from"./onlineParser.es-DLUHNAdN.js";import"./index-Dpr1-GCJ.js";var p=Object.defineProperty,c=(e,a)=>p(e,"name",{value:a,configurable:!0});b.defineMode("graphql-variables",e=>{const a=m({eatWhitespace:r=>r.eatSpace(),lexRules:V,parseRules:v,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:a.startState,token:a.token,indent:d,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});function d(e,a){var r,u;const l=e.levels;return((!l||l.length===0?e.indentLevel:l[l.length-1]-(!((r=this.electricInput)===null||r===void 0)&&r.test(a)?1:0))||0)*(((u=this.config)===null||u===void 0?void 0:u.indentUnit)||0)}c(d,"indent");const V={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},v={Document:[t("{"),i("Variable",s(t(","))),t("}")],Variable:[o("variable"),t(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[n("Number","number")],StringValue:[n("String","string")],BooleanValue:[n("Keyword","builtin")],NullValue:[n("Keyword","keyword")],ListValue:[t("["),i("Value",s(t(","))),t("]")],ObjectValue:[t("{"),i("ObjectField",s(t(","))),t("}")],ObjectField:[o("attribute"),t(":"),"Value"]};function o(e){return{style:e,match:a=>a.kind==="String",update(a,r){a.name=r.value.slice(1,-1)}}}c(o,"namedKey");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as t,s as L,L as A,P}from"./index-
|
|
1
|
+
import{K as t,s as L,L as A,P}from"./index-wtjGA_La.js";var b=Object.defineProperty,o=(e,n)=>b(e,"name",{value:n,configurable:!0});function w(e={eatWhitespace:n=>n.eatWhile(L),lexRules:A,parseRules:P,editorConfig:{}}){return{startState(){const n={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return f(e.parseRules,n,t.DOCUMENT),n},token(n,l){return h(n,l,e)}}}o(w,"onlineParser");function h(e,n,l){var i;if(n.inBlockstring)return e.match(/.*"""/)?(n.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:p,parseRules:y,eatWhitespace:m,editorConfig:v}=l;if(n.rule&&n.rule.length===0?d(n):n.needsAdvance&&(n.needsAdvance=!1,c(n,!0)),e.sol()){const r=(v==null?void 0:v.tabSize)||2;n.indentLevel=Math.floor(e.indentation()/r)}if(m(e))return"ws";const u=k(p,e);if(!u)return e.match(/\S+/)||e.match(/\s/),f(a,n,"Invalid"),"invalidchar";if(u.kind==="Comment")return f(a,n,"Comment"),"comment";const R=s({},n);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))n.indentLevel!==void 0&&(n.levels=(n.levels||[]).concat(n.indentLevel+1));else if(/^[})\]]/.test(u.value)){const r=n.levels=(n.levels||[]).slice(0,-1);n.indentLevel&&r.length>0&&r[r.length-1]<n.indentLevel&&(n.indentLevel=r[r.length-1])}}for(;n.rule;){let r=typeof n.rule=="function"?n.step===0?n.rule(u,e):null:n.rule[n.step];if(n.needsSeparator&&(r=r==null?void 0:r.separator),r){if(r.ofRule&&(r=r.ofRule),typeof r=="string"){f(y,n,r);continue}if(!((i=r.match)===null||i===void 0)&&i.call(r,u))return r.update&&r.update(n,u),u.kind==="Punctuation"?c(n,!0):n.needsAdvance=!0,r.style}g(n)}return s(n,R),f(a,n,"Invalid"),"invalidchar"}o(h,"getToken");function s(e,n){const l=Object.keys(n);for(let i=0;i<l.length;i++)e[l[i]]=n[l[i]];return e}o(s,"assign");const a={Invalid:[],Comment:[]};function f(e,n,l){if(!e[l])throw new TypeError("Unknown rule: "+l);n.prevState=Object.assign({},n),n.kind=l,n.name=null,n.type=null,n.rule=e[l],n.step=0,n.needsSeparator=!1}o(f,"pushRule");function d(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}o(d,"popRule");function c(e,n){var l;if(S(e)&&e.rule){const i=e.rule[e.step];if(i.separator){const p=i.separator;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&p.ofRule)return}if(n)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)d(e),e.rule&&(S(e)?!((l=e.rule)===null||l===void 0)&&l[e.step].separator&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}o(c,"advanceRule");function S(e){const n=Array.isArray(e.rule)&&typeof e.rule[e.step]!="string"&&e.rule[e.step];return n&&n.isList}o(S,"isList");function g(e){for(;e.rule&&!(Array.isArray(e.rule)&&e.rule[e.step].ofRule);)d(e);e.rule&&c(e,!1)}o(g,"unsuccessful");function k(e,n){const l=Object.keys(e);for(let i=0;i<l.length;i++){const p=n.match(e[l[i]]);if(p&&p instanceof Array)return{kind:l[i],value:p[0]}}}o(k,"lex");export{w as o};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{bc as Q,H as ce,aK as de,aL as me,j as e,gz as pt,g as Fe,gA as ft,gB as ht,gC as xt,gD as gt,gE as yt,X as jt,cv as bt,cy as vt,P as a,aW as Be,q as E,r as C,bm as U,e as Dt,b as Ee,J as Me,ax as q,C as H,ad as G,A as O,v as ue,gF as Oe,gG as wt,gH as Ct,O as h,m as T,gI as Ue,aU as St,V as Pe,i as At,x as It,av as Tt,dA as _e,c6 as We,S as He,B as V,aQ as kt,aD as Rt,a9 as Et,b1 as Ve,b2 as Ke,b3 as Qe,k as Pt,b4 as Le,b0 as _t,bH as Je,n as Ge,cd as Lt,gJ as Xe,b5 as $t,gK as qt,M as J,a2 as Nt,W as M,fX as ne,gL as zt,cN as Ft,at as Bt,T as Mt}from"./index-Dpr1-GCJ.js";import{K as Ot}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{I as Ye}from"./index-CSHzjJLI.js";import{u as pe}from"./blocklet-BJt-raxF.js";import{D as $e,B as Ut}from"./url-evaluation-D7EkdGbI.js";import{d as Wt}from"./Add-3VAJlzWu.js";import{d as Ht}from"./ExpandMore-CBwUEwtf.js";import{d as Vt}from"./LockIcon-C86uaqg6.js";import{E as Kt}from"./index-D5mvFHwK.js";import{d as Qt,a as Ze}from"./Https-DJQ_Uk5c.js";import{d as Jt}from"./is-path-prefix-equal-OAOH-qOd.js";import{r as Gt}from"./index-CYa2z0tY.js";import"./api-DQe-yphm.js";import{p as qe}from"./util-IfcYVLEi.js";import{T as Xt}from"./TextField-BKw9m9nx.js";import{L as Yt}from"./LoadingButton-yzy8vaq4.js";import{d as et}from"./Delete-B0dIMgAO.js";import{A as Zt}from"./actions-Bi_LOjPn.js";import"./tag-DJbcwSVc.js";import"./Select-BioDM9Sd.js";import"./InputLabel-Dyg2n4KM.js";function en({key:n="sm"}){const t=Q();return ce(t.breakpoints.down(n))}var fe={},tn=me;Object.defineProperty(fe,"__esModule",{value:!0});var tt=fe.default=void 0,nn=tn(de()),on=e;tt=fe.default=(0,nn.default)((0,on.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew");const sn={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},rn=sn;var an=pt;function ln(n,t){for(var o=-1,s=n.length;++o<s&&an(t,n[o],0)>-1;);return o}var cn=ln,dn=ft,mn=ht,un=xt,pn=gt,fn=cn,Ne=yt,hn=jt;function xn(n,t,o){if(n=hn(n),n&&(o||t===void 0))return mn(n);if(!n||!(t=dn(t)))return n;var s=Ne(n),r=Ne(t),l=fn(s,r),i=pn(s,r)+1;return un(s,l,i).join("")}var gn=xn;const he=Fe(gn);var xe={},yn=me;Object.defineProperty(xe,"__esModule",{value:!0});var se=xe.default=void 0,jn=yn(de()),bn=e;se=xe.default=(0,jn.default)((0,bn.jsx)("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond");var ge={},vn=me;Object.defineProperty(ge,"__esModule",{value:!0});var nt=ge.default=void 0,Dn=vn(de()),wn=e;nt=ge.default=(0,Dn.default)((0,wn.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");class Cn{constructor(t,o,s){this.name=t,this.prefix=o,this.baseEncode=s}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Sn{constructor(t,o,s){if(this.name=t,this.prefix=o,o.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=o.codePointAt(0),this.baseDecode=s}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return ot(this,t)}}class An{constructor(t){this.decoders=t}or(t){return ot(this,t)}decode(t){const o=t[0],s=this.decoders[o];if(s)return s.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ot=(n,t)=>new An({...n.decoders||{[n.prefix]:n},...t.decoders||{[t.prefix]:t}});class In{constructor(t,o,s,r){this.name=t,this.prefix=o,this.baseEncode=s,this.baseDecode=r,this.encoder=new Cn(t,o,s),this.decoder=new Sn(t,o,r)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Tn=({name:n,prefix:t,encode:o,decode:s})=>new In(n,t,o,s),kn=(n,t,o,s)=>{const r={};for(let u=0;u<t.length;++u)r[t[u]]=u;let l=n.length;for(;n[l-1]==="=";)--l;const i=new Uint8Array(l*o/8|0);let c=0,d=0,p=0;for(let u=0;u<l;++u){const g=r[n[u]];if(g===void 0)throw new SyntaxError(`Non-${s} character`);d=d<<o|g,c+=o,c>=8&&(c-=8,i[p++]=255&d>>c)}if(c>=o||255&d<<8-c)throw new SyntaxError("Unexpected end of data");return i},Rn=(n,t,o)=>{const s=t[t.length-1]==="=",r=(1<<o)-1;let l="",i=0,c=0;for(let d=0;d<n.length;++d)for(c=c<<8|n[d],i+=8;i>o;)i-=o,l+=t[r&c>>i];if(i&&(l+=t[r&c<<o-i]),s)for(;l.length*o&7;)l+="=";return l},N=({name:n,prefix:t,bitsPerChar:o,alphabet:s})=>Tn({prefix:t,name:n,encode(r){return Rn(r,s,o)},decode(r){return kn(r,s,o,n)}}),En=N({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Pn=N({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),_n=N({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ln=N({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),$n=N({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qn=N({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Nn=N({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),zn=N({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Fn=N({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Bn=Object.freeze(Object.defineProperty({__proto__:null,base32:En,base32hex:$n,base32hexpad:Nn,base32hexpadupper:zn,base32hexupper:qn,base32pad:_n,base32padupper:Ln,base32upper:Pn,base32z:Fn},Symbol.toStringTag,{value:"Module"})),Mn=bt(Bn),{toBuffer:On,toAddress:Un,toBase58:Wn,toHex:Hn}=vt,{base32:st}=Mn,Vn=n=>{if(!n)return n;const t=On(Un(n));return st.encode(t)},Kn=n=>{if(!n)return n;const t=st.decode(n),o=Wn(t);return o.length>30?o:Hn(t)};var Qn={encode:Vn,decode:Kn};const Jn=n=>["waiting","creating","renewaling"].includes(n);function ye(n){var b,w;const{t}=E(),[o,s]=C.useState(!1),{inService:r}=U(),[l,i]=C.useState(null),{siteId:c,domain:d,onAdd:p,children:u,did:g}=n,[P,j]=C.useState(!1),{api:S,ws:{useSubscription:k}}=U(),{mode:R,actions:{refreshDomainStatus:f}}=pe(),v=Dt(async()=>{const{cert:y}=await S.findCertificateByDomain({input:{domain:d,did:g}});return y}),A=(y,L)=>{y.domain===d&&(j(!1),s(!1),r&&R!=="setup"&&(L==="success"?O.success(t("setup.domain.genCertSuccess",{domain:y.domain})):L==="error"&&O.error(t("setup.domain.genCertFailed",{domain:y.domain,message:y.message}))))};if(C.useEffect(()=>{var y;v.loading||j(Jn((y=v.value)==null?void 0:y.status))},[v.loading,(b=v.value)==null?void 0:b.status]),k(Ee.BlockletEvents.certError,y=>A(y,"error")),k(Ee.BlockletEvents.certIssued,y=>{v.retry(),f(y.domain),A(y,"success")}),v.loading||((w=v.value)==null?void 0:w.status)==="normal")return"";const D=()=>{s(!1),i(null)},m=async()=>{s(!0);try{await S.issueLetsEncryptCert({input:{siteId:c,domain:d,did:g,inBlockletSetup:R==="setup"}}),p(),j(!0)}catch(y){console.error(y),j(!1)}finally{s(!1),i(null)}},_={title:t("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(Me,{severity:"success",children:t("router.cert.genLetsEncryptCert.dnsTip")}),t("router.cert.genLetsEncryptCert.description")]}),confirm:t("common.confirm"),onConfirm:m,onCancel:D},W=y=>{y.stopPropagation(),i(_)};return e.jsxs(e.Fragment,{children:[P?e.jsx(q,{title:t("router.cert.issuing"),children:e.jsx(H,{size:12})}):u({loading:o,open:W}),l&&e.jsx(G,{color:"primary",title:l.title,description:l.description,confirm:l.confirm,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}ye.propTypes={domain:a.string.isRequired,did:a.string.isRequired,siteId:a.string.isRequired,onAdd:a.func,children:a.any};ye.defaultProps={onAdd:()=>{},children:null};function je(n){const{domain:t,domainStatus:o,...s}=n;return!Be(t)||o!=null&&o.isHttps?"":e.jsx(ye,{domain:t,...s})}je.propTypes={domain:a.string.isRequired,domainStatus:a.shape({isHttps:a.bool}).isRequired,did:a.string.isRequired,onAdd:a.func,children:a.any};je.defaultProps={onAdd:()=>{},children:null};const it=C.createContext({}),{Provider:Gn,Consumer:qo}=it;function Xn({children:n}){const[t,o]=ue({domain:"",error:null}),{locale:s}=E(),r={error:t.error,domain:t.domain,setError:l=>{o({error:l})},setDomain:l=>{const i=he(l),c=Oe(i,s);o({domain:i,error:c})}};return e.jsx(Gn,{value:{value:r},children:n})}function Yn(){const{value:n}=C.useContext(it);return n}const{joinURL:ze}=wt,Zn=Ct,rt="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",eo=async n=>{var c;if(!n||!(n!=null&&n.trim()))return null;const t=new URL(n);t.pathname="__blocklet__.js",t.searchParams.set("type","json");const{data:o}=await Zn.get(t.toString()),s=(c=o==null?void 0:o.componentMountPoints)==null?void 0:c.find(d=>d.did===rt),r=new URL(n);r.pathname=s==null?void 0:s.mountPoint;const l=r.toString(),i=ze(l,"/api");return{base:l,api:i,domain:ze(i,"/domains")}};var to={DID_DOMAIN_SERVICE_DID:rt,getDidDomainServiceURL:eo},X={exports:{}};const no=Gt,oo=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class at extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const so=(n,t,o)=>{const s=o.retries-(t-1);return n.attemptNumber=t,n.retriesLeft=s,n},io=n=>oo.includes(n),lt=(n,t)=>new Promise((o,s)=>{t={onFailedAttempt:()=>{},retries:10,...t};const r=no.operation(t);r.attempt(async l=>{try{o(await n(l))}catch(i){if(!(i instanceof Error)){s(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof at)r.stop(),s(i.originalError);else if(i instanceof TypeError&&!io(i.message))r.stop(),s(i);else{so(i,l,t);try{await t.onFailedAttempt(i)}catch(c){s(c);return}r.retry(i)||s(r.mainError())}}})});X.exports=lt;X.exports.default=lt;X.exports.AbortError=at;var ro=X.exports;const ao=Fe(ro);function be({domain:n,resolvedTarget:t,...o}){const{t:s,locale:r}=E();return e.jsxs(h,{sx:{backgroundColor:"rgb(236, 251, 253)",borderColor:"rgb(236, 251, 253)",borderRadius:"8px",padding:"12px"},...o,children:[e.jsxs(h,{display:"flex",children:[s("router.domain.setup.tipStart"),n&&e.jsx(h,{mx:.5,color:"primary.main",fontWeight:"fontWeightBold",children:n}),s("router.domain.setup.tipEnd"),":"]}),e.jsxs(h,{sx:{"&>div":{mb:0},marginTop:"8px"},children:[e.jsx(ie,{label:s("router.domain.setup.recordType"),value:"CNAME",locale:r}),e.jsx(ie,{label:s("router.domain.setup.recordValue"),value:t,locale:r})]})]})}be.propTypes={domain:a.string,resolvedTarget:a.string.isRequired};be.defaultProps={domain:""};function ie({locale:n,label:t,value:o}){const s=ce(l=>l.breakpoints.down("md")),r=Q();return e.jsx(Ye,{name:t,nameWidth:120,children:e.jsxs(h,{sx:{display:"flex",alignItems:"center",lineHeight:1},children:[e.jsx(T,{component:"span",color:"primary.main",overflow:"auto",sx:s?{maxWidth:"95%",wordWrap:"break-word"}:{wordWrap:"break-word"},children:o}),e.jsx(Ue,{content:o,locale:n,style:{marginLeft:"4px",color:r.palette.text.secondary}})]})})}ie.propTypes={locale:a.string.isRequired,label:a.string.isRequired,value:a.string.isRequired};function ve({siteId:n,teamDid:t,cnameDomain:o,defaultCustomDomain:s,onInputDomain:r,appId:l,appPk:i,onSuccess:c,onError:d,disabled:p,autoFocus:u,inBlockletSetup:g,shouldCheckDomain:P,onStateChange:j,currentIp:S,resolveDomain:k,...R}){const{t:f,locale:v}=E(),{api:A,info:D}=U(),m=Yn(),_=Q(),W=en({key:"sm"}),[b,w]=ue({submittingDomain:!1,domain:s,error:null,type:D!=null&&D.nftDomainUrl?"nftDomain":"inputDomain",showNFTDomainAuth:!1,showDnsTip:!1}),y=St(()=>to.getDidDomainServiceURL(D==null?void 0:D.nftDomainUrl));if(D!=null&&D.nftDomainUrl&&y.loading)return e.jsx(h,{...R,children:e.jsx(Pe,{relative:"parent",children:e.jsx(H,{})})});if(y.error)return e.jsx(h,{...R,children:e.jsx(Pe,{relative:"parent",children:y.error.message})});const L=y.value,ct=()=>{w({invalidDNSDomain:null})},ee=async x=>{j(f("setup.domain.addingDomain")),await A.addDomainAlias({input:{id:n,domainAlias:x,teamDid:t,inBlockletSetup:!0}}),w({submittingDomain:!1}),c({domain:x,type:"inputDomain"})},Ie=async({domain:x,type:I,nftDid:B,chainHost:$})=>{try{if(!P){if(I==="inputDomain"){await ee(x);return}c({domain:x,type:I,nftDid:B,chainHost:$});return}j({text:f("setup.domain.checkingResolvable")});let z=30;const te=3e3,ut=z*1e3/te,ke=setInterval(()=>{if(z<=0){clearInterval(ke);return}j({text:`${f("setup.domain.checkingResolvable")} (${z--}s)`})},1e3),Re=await ao(async()=>{const{data:F}=await k(x);if(!F.address)throw new Error("Cannot resolve domain");return F.address},{retries:ut,minTimeout:te,maxTimeout:te,onFailedAttempt:console.error}).catch(console.error);if(clearInterval(ke),!Re){const F=f("setup.domain.cannotResolve",{domain:x});if(I==="nftDomain"){O.error(F),c({domain:x,type:"nftDomain"});return}j({text:""}),w({invalidDNSDomain:{domain:x,error:F},domain:x,type:I,submittingDomain:!1});return}if(Re!==S){const F=f("setup.domain.resolvedAddressError",{domain:x,curDomain:window.location.hostname});if(I==="nftDomain"){O.error(F),c({domain:x,type:"nftDomain"});return}j({text:""}),w({invalidDNSDomain:{domain:x,error:F},domain:x,type:I,submittingDomain:!1});return}if(I==="nftDomain"){c({domain:x,type:"nftDomain"});return}await ee(x)}catch(z){O.error(z.message),j({text:""}),w({submittingDomain:!1})}},dt=async({domain:x,nftDid:I,chainHost:B})=>{try{const $=qe(x);w({submittingDomain:!0}),await A.addDomainAlias({input:{id:n,type:"nft-domain",domainAlias:$,nftDid:I,chainHost:B,teamDid:t,inBlockletSetup:g}});const z="nftDomain";w({showNFTDomainAuth:!1,type:z}),await Ie({domain:$,type:z,nftDid:I,chainHost:B})}catch($){O.error($.message)}finally{w({showNFTDomainAuth:!1,submittingDomain:!1})}},mt=async()=>{try{w({submittingDomain:!0});const x=qe(b.domain);if(D.nftDomainUrl&&L&&(await A.isDidDomain({input:{domain:x}})).value===!0){w({showNFTDomainAuth:!0});return}await Ie({domain:x,type:b.type})}catch(x){w({submittingDomain:!1}),m.setError(x.message)}},Te=m.error||b.error;return e.jsx(h,{...R,children:e.jsxs(h,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",gap:"1em"},children:[e.jsxs(h,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[D.nftDomainUrl&&L&&e.jsxs(h,{sx:{color:_.palette.text.primary},children:[e.jsx(T,{children:f("router.domainAlias.addDomainNFT.tips")}),e.jsxs(T,{component:"div",children:[f("router.domainAlias.addDomainNFT.buyTip"),e.jsxs(At,{href:L.base,sx:{display:"inline-flex",alignItems:"center"},target:"_blank",children:[e.jsx("i",{children:f("router.domainAlias.addDomainNFT.buy")}),e.jsx(tt,{fontSize:"small"})]})]})]}),e.jsx(Xt,{sx:{display:"block",marginTop:"8px"},label:f("router.domainAlias.add.domainDescription"),helperText:b.type==="inputDomain"&&Te||f("router.domainAlias.add.helperText"),inputProps:{"data-cy":"domain-name-input"},fullWidth:!0,disabled:p,value:b.domain,size:"small",variant:"outlined",error:!!Te&&b.type==="inputDomain",onChange:x=>{var $;const I=he(($=x.target)==null?void 0:$.value);m.setDomain(I);const B=Oe(I,v);w({domain:I,error:B,type:"inputDomain"}),r({domain:I,error:B,type:"inputDomain"})},autoFocus:u,onBlur:()=>{m.domain||(w({error:null}),m.setError(null))}}),e.jsx(h,{sx:{width:"100%",display:"flex",justifyContent:"flex-end"},children:e.jsx(Yt,{"data-cy":"confirm-add-domain",fullWidth:W,variant:"contained",loading:b.submittingDomain,onClick:mt,children:f("common.add")})}),e.jsxs(h,{sx:{cursor:"pointer",fontSize:"14px",display:"flex",alignItems:"center",gap:"4px",lineHeight:1,color:_.palette.primary.main},onClick:()=>w({showDnsTip:!b.showDnsTip}),children:[e.jsx(Jt,{fontSize:"1em"}),f("router.domainAlias.showTipHint")]}),b.showDnsTip&&e.jsx(be,{domain:b.domain,resolvedTarget:o,style:{marginTop:"4px"}})]}),b.invalidDNSDomain&&e.jsx(G,{title:f("common.reminder"),description:f("setup.domain.invalidDNSReminder",{error:b.invalidDNSDomain.error}),color:"primary",confirm:f("setup.domain.continueAdd"),onConfirm:()=>ee(b.invalidDNSDomain.domain,b.type),onCancel:ct}),L&&e.jsx(It,{open:b.showNFTDomainAuth,popup:!0,useSocket:!1,action:"authorize",baseUrl:L.api,checkFn:Tt.create({baseURL:L.api}).get,extraParams:{delegatee:l,delegateePk:i,domain:b.domain},onSuccess:dt,onClose:()=>w({showNFTDomainAuth:!1,submittingDomain:!1}),checkTimeout:60*5e3,showDownload:!1,messages:{title:f("router.domainAlias.addDomainNFT.connect.title"),scan:f("router.domainAlias.addDomainNFT.connect.scan"),confirm:f("router.domainAlias.addDomainNFT.connect.confirm"),success:f("router.domainAlias.addDomainNFT.connect.success")}})]})})}ve.propTypes={siteId:a.string.isRequired,currentIp:a.string,teamDid:a.string.isRequired,cnameDomain:a.string.isRequired,defaultCustomDomain:a.string,onInputDomain:a.func,onSuccess:a.func,appId:a.string,appPk:a.string,disabled:a.bool,autoFocus:a.bool,inBlockletSetup:a.bool,shouldCheckDomain:a.bool,onStateChange:a.func,resolveDomain:a.func,onError:a.func};ve.defaultProps={defaultCustomDomain:"",currentIp:"",onInputDomain:_e,onSuccess:_e,appId:"",appPk:"",disabled:!1,autoFocus:!0,inBlockletSetup:!1,shouldCheckDomain:!1,onStateChange:()=>{},resolveDomain:()=>{},onError:()=>{}};function De({id:n,children:t,title:o,teamDid:s,systemDomains:r,appId:l,appPk:i}){const{t:c}=E(),[d,p]=ue({loading:!1,confirmSetting:null}),u=r.find(S=>We.isDidDomain(S)),g=()=>{p({loading:!1,confirmSetting:null})},P={title:o||c("router.domainAlias.add.title"),description:function(k,R,f){return e.jsx(ve,{siteId:n,teamDid:s,cnameDomain:u,onSuccess:()=>p({confirmSetting:null}),onInputDomain:({domain:v,type:A,error:D})=>{R({...k,domain:v,type:A,__disableConfirm:!!D}),f(D)},appId:l,appPk:i})},confirm:c("common.confirm"),cancel:c("common.cancel"),params:{domain:"",__disableConfirm:!0},onCancel:g},j=S=>{S.stopPropagation(),p({confirmSetting:P})};return e.jsxs(e.Fragment,{children:[typeof t=="function"?t({loading:d.loading,open:j}):e.jsxs(He,{onClick:j,className:"rule-action","data-cy":"action-add-domain-alias",children:[d.loading?e.jsx(H,{size:16}):e.jsx(Qt,{style:{fontSize:18,marginRight:5}}),c("router.domainAlias.add.title")]}),d.confirmSetting&&e.jsx(G,{title:d.confirmSetting.title,description:d.confirmSetting.description,confirm:d.confirmSetting.confirm,cancel:d.confirmSetting.cancel,params:d.confirmSetting.params,onCancel:d.confirmSetting.onCancel,showConfirm:!1,showCancel:!0,displayError:!1,color:"primary",loading:d.loading,maxWidth:"sm"})]})}De.propTypes={id:a.string.isRequired,children:a.any,title:a.string,teamDid:a.string,systemDomains:a.arrayOf(a.string).isRequired,appId:a.string,appPk:a.string.isRequired};De.defaultProps={children:null,title:"",teamDid:"",appId:null};function lo(n){return e.jsx(Xn,{children:e.jsx(De,{...n})})}function we(n){const{t}=E(),[o,s]=C.useState(!1),[r,l]=C.useState(null),{id:i,domain:c,children:d,teamDid:p}=n,{api:u}=U(),g=()=>{s(!1),l(null)},P=async()=>{s(!0);try{await u.deleteDomainAlias({input:{id:i,domainAlias:c,teamDid:p}}),await kt(2e3)}catch(k){O.error(k.message)}finally{l(null),s(!1)}},j={title:t("router.domainAlias.delete.title"),description:t("router.domainAlias.delete.description"),confirm:t("common.confirm"),onConfirm:P,onCancel:g},S=k=>{k.stopPropagation(),l(j)};return e.jsxs(e.Fragment,{children:[typeof d=="function"?d({loading:o,open:S}):e.jsxs(V,{edge:"end",onClick:S,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[o?e.jsx(H,{size:16}):e.jsx(et,{style:{fontSize:16}}),t("router.domainAlias.delete.title")]}),r&&e.jsx(G,{title:r.title,description:r.description,confirm:r.confirm,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})]})}we.propTypes={id:a.string.isRequired,domain:a.string.isRequired,children:a.any,teamDid:a.string};we.defaultProps={children:null,teamDid:""};function Ce({site:n,domain:t,blocklet:o}){const{t:s}=E(),r=t.value===window.location.hostname;return e.jsx(Zt,{"data-cy":"domain-actions",size:"large",actions:[({close:l})=>{var i;return e.jsx(we,{id:n.id,domain:t.value,teamDid:(i=o==null?void 0:o.meta)==null?void 0:i.did,children:({open:c})=>e.jsx(q,{title:r?s("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(He,{disabled:t.isProtected||r,dense:!0,onClick:d=>{l(),c(d)},"data-cy":"action-toggle-block",children:[e.jsx(Rt,{style:{minWidth:24,marginRight:8},children:e.jsx(et,{})}),e.jsx(Et,{primary:s("common.delete")})]},"remove")})})})}]})}Ce.propTypes={site:a.object.isRequired,domain:a.object.isRequired,blocklet:a.object.isRequired};Ce.defaultProps={};const Y=a.shape({href:a.string,accessibility:a.shape({loading:a.bool,accessible:a.bool}),domainStatus:a.shape({isHttps:a.bool,matchedCert:a.object}),dns:a.shape({resolved:a.bool,ip:a.string})});function Se({certificate:n}){const[t,o]=C.useState(null),s=U(),{t:r,locale:l}=E(),i=p=>{o(p.currentTarget)},c=()=>{o(null)},d=!!t;return e.jsxs(e.Fragment,{children:[e.jsx(Ze,{"aria-owns":d?"mouse-over-popover":void 0,onMouseEnter:i,onMouseLeave:c,style:{color:"#44cdc6",fontSize:20,cursor:"pointer"}}),e.jsx(Ve,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:d,anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:c,disableRestoreFocus:!0,children:e.jsx(Ke,{children:e.jsxs(Qe,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${s.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(T,{component:"div",children:`${r("common.issuer")}: ${Pt(n,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${r("router.cert.issuedOn")}: ${Le(n.validFrom,l)}`}),e.jsx(T,{component:"div",children:`${r("router.cert.expiryOn")}: ${Le(n.validTo,l)}`})]})]})})})]})}Se.propTypes={certificate:a.object};Se.defaultProps={certificate:{}};function K({domain:n,filters:t}){const{t:o}=E(),{value:s,domainStatus:r}=n;if(!Be(s))return null;let l=null,i=null;const{isHttps:c,matchedCert:d}=r;if(!_t(s)){const{dns:{resolved:u,ip:g}={}}=r;u||g==="127.0.0.1"?l=e.jsx(q,{title:o("router.domain.verify.ok"),children:e.jsx($e,{color:"success"})}):l=e.jsx(q,{title:o("router.domain.verify.notResolved"),children:e.jsx($e,{color:"error"})})}c?i=e.jsx(Se,{certificate:d}):i=e.jsx(q,{title:o("router.domain.https.bad"),children:e.jsx(Ze,{style:{color:"#D0021B",fontSize:20,cursor:"pointer"}})});const p=t.map(u=>u==="domain"?l:u==="http"?i:null);return C.createElement(C.Fragment,null,...p)}K.propTypes={domain:Y.isRequired,filters:a.array};K.defaultProps={filters:["domain","http"]};const co=Je(Z,"mutate_blocklets"),mo=Je(Z,"",Lt);function Ae(n){const{inService:t}=U(),{blocklet:o,loadingRuntimeInfo:s}=pe();let r=co;return t&&(r=mo),e.jsx(r,{...n,blocklet:o,inService:t,loadingRuntimeInfo:s})}Ae.propTypes={listOnly:a.bool};Ae.defaultProps={listOnly:!1};function Z({hasPermission:n,blocklet:t,loadingRuntimeInfo:o,inService:s,listOnly:r}){var f,v,A,D;const{t:l}=E(),[i,c]=C.useState(!1),d=ce(m=>m.breakpoints.down("md")),p=C.useMemo(()=>{let m=n;return Xe(t)&&(m=m&&s),m},[n,s,t]),{site:u}=t,g=C.useMemo(()=>{var m;return $t((m=t.site)==null?void 0:m.domainAliases)},[(f=t.site)==null?void 0:f.domainAliases]),P=[],j=[],S=Qn.encode(t.appPid),k=(A=(v=t.environments)==null?void 0:v.find(m=>m.key==="BLOCKLET_APP_PK"))==null?void 0:A.value,R=qt(g);return g.forEach(m=>{const _=m.value||"";We.isDidDomain(_)&&!_.startsWith(S)?j.push(m):P.push(m)}),e.jsxs(e.Fragment,{children:[!r&&e.jsxs(e.Fragment,{children:[e.jsxs(h,{className:"title first",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(h,{children:l("common.domain")}),p&&e.jsx(lo,{id:u.id,title:l("router.domain.add.title"),teamDid:(D=t.meta)==null?void 0:D.did,appId:t.appPid,appPk:k,systemDomains:R==null?void 0:R.map(m=>m.value),children:({open:m})=>e.jsxs(V,{style:{marginLeft:16},variant:"contained",color:"primary","data-cy":"add-domain-alias",onClick:m,disabled:J.isInProgress(t.status),children:[e.jsx(Wt,{style:{fontSize:"1.3em",marginRight:4}}),l("common.add")]})})]}),J.isAccessible(t.status)===!1&&e.jsx(h,{mt:1.5,mb:1.5,children:e.jsx(Me,{severity:"warning",children:l("blocklet.router.noRunning")})})]}),e.jsx(h,{sx:{display:"flex",flexDirection:"column",gap:1},children:(i?g:P).map(m=>{var W,b;const _=m.value;return e.jsxs(C.Fragment,{children:[d&&e.jsxs(h,{display:"flex",flexDirection:"column",children:[e.jsx(h,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:e.jsx(re,{domain:m,target:"_blank",children:m.value})}),e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(h,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[e.jsx(K,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(le,{siteId:(W=t.site)==null?void 0:W.id,domain:m,blocklet:t,hasMutatePermission:p})]}),e.jsx(h,{sx:{button:{padding:0}},children:e.jsx(ae,{hasMutatePermission:p,site:u,domain:m,blocklet:t})})]})]},_),!d&&e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[e.jsx(K,{domain:m,filters:["domain"]},`${m.value}-domain`),e.jsx(h,{sx:{ml:2,mr:.5},children:e.jsx(re,{domain:m,target:"_blank",children:m.value})}),e.jsx(le,{siteId:(b=t.site)==null?void 0:b.id,domain:m,blocklet:t,hasMutatePermission:p})]}),e.jsx(h,{sx:{button:{padding:0}},children:e.jsx(ae,{hasMutatePermission:p,site:u,domain:m,blocklet:t})})]},_)]},_)})}),j.length>0&&e.jsx("div",{style:{marginLeft:"20px",marginTop:"12px"},children:e.jsx(V,{endIcon:i?e.jsx(nt,{}):e.jsx(Ht,{}),onClick:()=>c(!i),children:l(i?"common.collapseAll":"blocklet.router.showAllDomains")})}),!g.length&&(o?e.jsx(H,{size:16}):e.jsx(Kt,{children:l("common.empty")}))]})}Z.propTypes={hasPermission:a.bool,blocklet:a.object.isRequired,loadingRuntimeInfo:a.bool,inService:a.bool.isRequired,listOnly:a.bool};Z.defaultProps={hasPermission:!1,loadingRuntimeInfo:!1,listOnly:!1};function re({domain:n,children:t,...o}){const{t:s,locale:r}=E(),{href:l,accessibility:i,value:c}=n,d=C.useCallback(()=>e.jsx(Ue,{content:he(c),locale:r,style:{marginLeft:"4px",color:"#999",fontSize:"0.8em",verticalAlign:"bottom"}}),[c,r]);return!i||i.loading?e.jsxs(oe,{...o,children:[t,d(),e.jsx(q,{title:s("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx("span",{className:"status",children:e.jsx(H,{size:12})})})]}):i.accessible?e.jsxs(oe,{...o,children:[e.jsx(h,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",children:t}),d()]}):e.jsxs(oe,{...o,children:[e.jsx(q,{title:s("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx("span",{children:t})}),d()]})}re.propTypes={domain:Y.isRequired,children:a.any.isRequired};const oe=Ge.span`
|
|
2
|
+
&,
|
|
3
|
+
& > * {
|
|
4
|
+
color: #222;
|
|
5
|
+
font-size: 18px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
& > * {
|
|
9
|
+
word-break: break-all;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.status {
|
|
13
|
+
margin-left: 8px;
|
|
14
|
+
}
|
|
15
|
+
`;function ae({hasMutatePermission:n,site:t,domain:o,blocklet:s}){const r=Q(),{t:l}=E();return n&&!o.isProtected?e.jsx(Ce,{site:t,domain:o,blocklet:s}):e.jsx(q,{title:l("blocklet.router.domainLockTooltip"),placement:"top",children:e.jsx(Nt,{disabled:!0,size:"large",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0},children:e.jsx(Vt,{style:{fill:r.palette.text.disabled}})})})}ae.propTypes={hasMutatePermission:a.bool.isRequired,site:a.object.isRequired,domain:Y.isRequired,blocklet:a.object.isRequired};function le({siteId:n,domain:t,blocklet:o,hasMutatePermission:s}){const r=Q(),{t:l}=E(),[i,c]=C.useState(null),d=u=>{c(u.currentTarget)},p=()=>{c(null)};return e.jsxs(h,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1},children:[t.type==="nft-domain"&&e.jsxs(e.Fragment,{children:[e.jsx(se,{onMouseEnter:d,onMouseLeave:p,style:{marginTop:"0.2em",cursor:"pointer",fill:r.palette.primary.main}}),e.jsx(Ve,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:!!i,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:p,disableRestoreFocus:!0,children:e.jsx(Ke,{children:e.jsxs(Qe,{style:{display:"flex",flexDirection:"column"},children:[e.jsxs(T,{component:"div",style:{display:"flex",alignItems:"center"},children:[e.jsx(se,{style:{fill:r.palette.primary.main}}),e.jsx(T,{component:"span",style:{marginLeft:"8px",fontSize:"18px",fontWeight:"bolder"},children:l("router.domainAlias.nftDomain")})]}),e.jsxs(T,{component:"div",style:{display:"flex",marginTop:"12px"},children:[e.jsx(T,{component:"span",style:{width:"80px",marginRight:"8px"},children:l("common.domain")}),e.jsx(T,{component:"span",children:t.value})]}),e.jsxs(T,{component:"div",style:{display:"flex"},children:[e.jsx(T,{component:"span",style:{width:"80px",marginRight:"8px"},children:"NFT"}),e.jsx(M,{did:t.nftDid})]})]})})})]}),e.jsx(K,{domain:t,filters:["http"]},`${t.value}-http`),s&&e.jsx(je,{siteId:n,domain:t.value,domainStatus:t.domainStatus,did:o.meta.did,children:({open:u})=>e.jsx(V,{sx:{padding:0},size:"small",onClick:g=>u(g),children:l("router.cert.genLetsEncryptCert.title")})})]})}le.propTypes={siteId:a.string.isRequired,domain:Y.isRequired,blocklet:a.object.isRequired,hasMutatePermission:a.bool.isRequired};const uo={arcblock:"ArcBlock",ethereum:"Ethereum"};function po(){var j,S,k,R,f;const{t:n,locale:t}=E(),{info:o,inService:s}=U(),[r,l]=C.useState(!1),{blocklet:i}=pe(),{appDid:c,appPid:d,migratedFrom:p=[]}=i,u=(j=i.environments.find(v=>v.key==="BLOCKLET_APP_CHAIN_TYPE"))==null?void 0:j.value,g=[c?{name:n("blocklet.appId"),value:e.jsx(M,{did:c,showQrcode:!0})}:null,d&&c!==d?{name:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[n("blocklet.appPid"),e.jsx(q,{title:n("blocklet.whyNeedAppPid"),children:e.jsx(ne,{icon:zt})})]}),value:e.jsx(M,{did:d,showQrcode:!0})}:null,(p==null?void 0:p.length)>1?{name:n("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(r?p.slice(1):p.slice(1,2)).map(v=>e.jsx(M,{did:v.appDid,showQrcode:!0})),p.length>2&&e.jsx(V,{style:{marginLeft:"18px"},endIcon:r?e.jsx(ne,{icon:rn}):e.jsx(ne,{icon:Ot}),onClick:()=>l(!r),children:n(r?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:n("common.name"),value:J.getDisplayName(i,!0)},{name:n("common.status"),value:e.jsx(Ut,{status:i.status,source:i.source,progress:i.progress})},Xe(i)?{name:"NFT",value:e.jsx(M,{external:!0,href:Ft((S=i==null?void 0:i.controller)==null?void 0:S.chainHost,(k=i==null?void 0:i.controller)==null?void 0:k.nftId,"asset"),did:(R=i==null?void 0:i.controller)==null?void 0:R.nftId,showQrcode:!0})}:null,{name:n("blocklet.installedAt"),value:Bt(i.installedAt,t)},{name:n("blocklet.overview.accessControl"),value:n(`team.whoCanAccess.${J.getWhoCanAccess(i)}.title`)},{name:n("common.owner"),value:(f=i.settings)!=null&&f.owner?e.jsx(M,{did:i.settings.owner.did,showQrcode:!0}):"-"},{name:n("blocklet.config.walletType.name"),value:uo[u||"arcblock"]||u},i.externalSkSource?{name:n("blocklet.skSource"),value:i.externalSkSource}:null].filter(Boolean);s&&g.push({name:n("common.serverDid"),value:e.jsx(M,{did:o.did,showQrcode:!0})},{name:n("common.serverVersion"),value:e.jsx(Mt,{children:o.version})});const P=v=>v.map(A=>e.jsx(Ye,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:A.name,nameFormatter:()=>A.name,children:A.value},A.name));return e.jsxs(fo,{component:"div",children:[e.jsx(Ae,{}),e.jsx("div",{className:"title",children:e.jsx("span",{children:n("common.basicInfo")})}),e.jsx("div",{className:"basicInfo",children:P(g)})]})}po.propTypes={};const fo=Ge(T)`
|
|
16
|
+
.title {
|
|
17
|
+
font-size: 1.2rem;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
margin-top: ${n=>n.theme.spacing(5)};
|
|
20
|
+
margin-bottom: ${n=>n.theme.spacing(3)};
|
|
21
|
+
|
|
22
|
+
&.first {
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;export{po as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-
|
|
2
|
-
var ou=Object.defineProperty;var ru=(i,e,t)=>e in i?ou(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ke=(i,e,t)=>(ru(i,typeof e!="symbol"?e+"":e,t),t);import{
|
|
1
|
+
const __vite__fileDeps=["./index-DS0UcZlk.js","./index-Dpr1-GCJ.js","./index-D7K8de1w.css","./TextField-BKw9m9nx.js","./Select-BioDM9Sd.js","./InputLabel-Dyg2n4KM.js","./url-evaluation-D7EkdGbI.js","./Delete-B0dIMgAO.js","./tag-DJbcwSVc.js","./Slider-CIc45JJ9.js","./Skeleton-DZ26ugSB.js","./Close-DSOnajKv.js","./index-CHD6Sawv.js","./preact.module-B1z5cdvs.js","./index-CYa2z0tY.js","./index-CLxOAjUq.js","./memoize-one.esm-BdPwpGay.js","./index-BpaAmbjH.js","./ExpandMore-CBwUEwtf.js","./resource-dialog-BqDlfetI.js","./index-pZ4wuW0n.js","./index-C2qpMC0j.js","./index-D5mvFHwK.js","./index--tmgIfny.js","./index-G0ifYRE5.js","./FilterList-BfkrQFl0.js","./LastPage-g6ViU_79.js","./index-B6BXxNti.js","./redux-I4eB06Ek.js","./Search-rqHI-c1S.js","./MoreVert-BB46cKFe.js","./index-T3bFNwLt.js","./url-join-Bw5bTuVj.js","./toUpper-DcVgFeb6.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
var ou=Object.defineProperty;var ru=(i,e,t)=>e in i?ou(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ke=(i,e,t)=>(ru(i,typeof e!="symbol"?e+"":e,t),t);import{bL as lu,j as Me,hK as cu,dv as pu,f9 as uu,g as tt,hL as du,hM as Il,hN as hu,hO as mu,cU as Ml,cu as fn,cw as Ct,hP as es,P as D,r as ee,cz as Eo,c7 as To,av as fu,fF as gu,bo as Nl,aO as vu,H as bu,hQ as Oo,dJ as yu,O as Bl,a2 as xu,hd as Do,hR as wu,fe as Su,dt as Pu}from"./index-Dpr1-GCJ.js";import{u as Fu}from"./index-CHD6Sawv.js";import{N as Ao,y as u,b as ft,l as ts,g as Ft,$ as vt,_ as Cu,B as jl}from"./preact.module-B1z5cdvs.js";import{a as _u}from"./index-CYa2z0tY.js";import{c as Se}from"./index-CLxOAjUq.js";import{m as Uo}from"./memoize-one.esm-BdPwpGay.js";import"./index-BpaAmbjH.js";import{W as ku}from"./resource-dialog-BqDlfetI.js";import"./index-C2qpMC0j.js";import"./index-D5mvFHwK.js";import"./index--tmgIfny.js";import"./index-G0ifYRE5.js";import{p as Eu}from"./index-T3bFNwLt.js";import{j as $s}from"./url-join-Bw5bTuVj.js";import{u as Ll,t as Tu}from"./toUpper-DcVgFeb6.js";const Ou=lu(Me.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");function Du(i,e,t,a){for(var n=-1,s=i==null?0:i.length;++n<s;){var o=i[n];e(a,o,t(o),i)}return a}var Au=Du,Uu=cu;function Ru(i,e,t,a){return Uu(i,function(n,s,o){e(a,n,t(n),o)}),a}var Iu=Ru,Mu=Au,Nu=Iu,Bu=pu,ju=uu;function Lu(i,e){return function(t,a){var n=ju(t)?Mu:Nu,s=e?e():{};return n(t,i,Bu(a),s)}}var zu=Lu,$u=du,qu=zu,Hu=qu(function(i,e,t){$u(i,t,e)}),Vu=Hu;const zl=tt(Vu);function ba(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Wu=0;function $l(i){return"__private_"+Wu+++"_"+i}function Gu(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
5
5
|
*
|
|
@@ -52,5 +52,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
52
52
|
<div class="uppy-ProviderBrowserItem-inner uploaded-add-item">
|
|
53
53
|
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
|
|
54
54
|
</div>
|
|
55
|
-
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));ke(this,"convertImgToObject",es(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(c=>c.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=yx(s.originalname),[".mp4",".webm"].find(c=>{var d;return((d=a.src)==null?void 0:d.indexOf(c))>-1})){const c=document.createElement("video");c.src=a.src,c.width=a.width,c.height=a.height,c.autoplay=!0,c.setAttribute("playsinline","playsinline"),c.muted=!0,c.loop=!0,c.style="pointer-events: none;",o.appendChild(c)}else{const c=document.createElement("object");c.data=n,c.type=s.mimetype||"image/png",c.alt=s.originalname,c.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",c.loading="lazy",o.appendChild(c)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));ke(this,"resetState",()=>{this.uploadedAPIData={...El},this.uploaded.setPluginState({...Tl}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...El},this.addUploadItemFlag=!0,this.icon=()=>ce("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ce("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ce("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ce("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ce("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ce("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Xs(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Tl}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Sx=wx,Ol={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},Dl={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},nu={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},Px={...nu,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class Fx extends he{constructor(t,a){super(t,a);ke(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await hi.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=Ll([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=on(s);return n=on(s,400),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});ke(this,"resetState",()=>{this.apiData={...Ol},this.resources.setPluginState({...Dl})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...Ol},this.icon=()=>ce("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ce("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ce("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ce("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ce("div",{id:"resources",className:"uploaded",children:[ce("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ce("button",{style:this.apiData.componentDid===a.did?Px:nu,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:Tu(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Xs(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Dl}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("uploaded:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}const Cx=Fx;var _x=gu();const kx=tt(_x);class Ex extends he{constructor(t,a){super(t,{...{},...a});ke(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=kx.createHash("md5").update(await r.text()).digest("hex"),c=sn(n),d=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});ke(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});ke(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.setMetaData(t)});ke(this,"tryDownloadRemoteFile",async t=>{var O,A;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:d,remote:p,meta:h,errorCount:b=0}=t,m=!d&&r,P=`uploader:${c}:downloaded`,g=sn(t),v=(O=n==null?void 0:n.split("?"))==null?void 0:O[0],C=(()=>{const y=["jpg","jpeg"];return y.includes(g)&&y.some(S=>v==null?void 0:v.endsWith(S))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(m){const y=mx(s||((A=p==null?void 0:p.body)==null?void 0:A.url));if(b>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await hi.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:y}}).then(S=>S==null?void 0:S.data).then(async S=>{const k=dx(S,C);this.uppy.setFileState(c,{name:C,extension:g,type:a,data:k,preview:s||Cl(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(P,c)}).catch(async S=>{console.error("Axios download remote file error: ",S),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:b+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(S=>{this.uppy.once(P,async()=>{S()})}))()});ke(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:Cl(s)})},o.indexOf("gif")>-1?1e3:0)}});ke(this,"prepareUpload",t=>{const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}const Tx=Ex;class Ox extends he{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ce("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ce("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ce("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ce("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ce("div",{id:"ai-image",className:"ai-image",children:ce("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const Dx=Ox,Ax="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",Ux=ee.lazy(()=>Nl(()=>import("./index-D0y4Peo7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)),Al="uploader-container",Ra="uploader-dashboard",Ls=localStorage.getItem("uppy_debug"),Rx=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,n=au(e==null?void 0:e.companion),s=async l=>(await hi.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Sp,options:{quality:1},alwayUse:!0},(Ls||Qi()&&!_l())&&{id:"Uploaded",plugin:Sx,options:{params:a==null?void 0:a.params}},(Ls||Qi()&&!_l())&&{id:"Resources",plugin:Cx,options:{params:a==null?void 0:a.params}},Qi()&&fx()&&t.AIImage&&{id:"AIImage",plugin:Dx,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var p,h;const d=document.getElementById("ai-image");d?Su(d).render(Me.jsx(Ux,{api:s,restrictions:o,i18n:(h=(p=l.current)==null?void 0:p.getUploader())==null?void 0:h.i18n,onSelect:b=>{const m=l.current.getUploader();m==null||m.emit("ai-image:selected",b),b.forEach((P,g)=>{const v=`AI Image [${g+1}].png`,F={name:v,type:"image/png",data:hx(P,v),source:"AIImage",isRemote:!1};m==null||m.addFile(F)})}})):c()},100)}c()}},{id:"Url",plugin:ha,options:{companionUrl:n}},{id:"Webcam",plugin:ic,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Sc,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:Tx,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:io,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function _o(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:d,restrictions:p}=i,h=zl(d,"id"),b=au(r==null?void 0:r.uploader);let m=new Jl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Ls||""),locale:Ky[a||"en"],onBeforeFileAdded:(P,g)=>{if(Object.hasOwn(g,P.id))return!1;const v=!!$t.extension(P.type),F=$t.lookup(P.name)||"";if(!v&&F&&F!==P.type){const C=sn(P);C&&(P.extension=C),P.type=F}return P},...o,restrictions:p}).use(Xp,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:b,async onBeforeRequest(P,g){var y;const{hashFileName:v,id:F,meta:C}=g,O=sn(g);P.setHeader("x-uploader-file-name",`${v}`),P.setHeader("x-uploader-file-id",`${F}`),P.setHeader("x-uploader-file-ext",`${O}`),P.setHeader("x-uploader-base-url",new URL(P.getURL()).pathname),P.setHeader("x-uploader-endpoint-url",b),P.setHeader("x-uploader-metadata",JSON.stringify(C,(S,k)=>typeof k=="string"?encodeURIComponent(k):k));const A=(window==null?void 0:window.uploaderComponentId)||((y=window==null?void 0:window.blocklet)==null?void 0:y.componentId);A&&P.setHeader("x-component-did",(A||"").split("/").pop())},onAfterResponse:async(P,g)=>{const v={},F=P.getUnderlyingObject();try{F.response&&(v.data=JSON.parse(F.response))}catch{v.data={}}v.method=P.getMethod().toUpperCase(),v.url=P.getURL(),v.status=F.status,v.headers={...P._headers};const C=F.getAllResponseHeaders();if(C&&C.split(`\r
|
|
55
|
+
`,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),t.insertBefore(a,t.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));ke(this,"convertImgToObject",es(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(c=>c.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=yx(s.originalname),[".mp4",".webm"].find(c=>{var d;return((d=a.src)==null?void 0:d.indexOf(c))>-1})){const c=document.createElement("video");c.src=a.src,c.width=a.width,c.height=a.height,c.autoplay=!0,c.setAttribute("playsinline","playsinline"),c.muted=!0,c.loop=!0,c.style="pointer-events: none;",o.appendChild(c)}else{const c=document.createElement("object");c.data=n,c.type=s.mimetype||"image/png",c.alt=s.originalname,c.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",c.loading="lazy",o.appendChild(c)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));ke(this,"resetState",()=>{this.uploadedAPIData={...El},this.uploaded.setPluginState({...Tl}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.uploadedAPIData={...El},this.addUploadItemFlag=!0,this.icon=()=>ce("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ce("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ce("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ce("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ce("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(t){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ce("div",{id:"uploaded",className:"uploaded",children:this.view.render(t)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new Xs(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Tl}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Sx=wx,Ol={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,folderId:"",componentDid:"",components:[]},Dl={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},nu={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},Px={...nu,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class Fx extends he{constructor(t,a){super(t,a);ke(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:t}=await hi.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=t.components||[],this.apiData.componentDid=t.componentDid||"",this.apiData.files=Ll([...t.resources.map(a=>{let n="file";const{filename:s}=a,o=on(s);return n=on(s,400),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});ke(this,"resetState",()=>{this.apiData={...Ol},this.resources.setPluginState({...Dl})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=t,this.componentDid="",this.apiData={...Ol},this.icon=()=>ce("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[ce("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),ce("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),ce("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(t){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ce("div",{id:"resources",className:"uploaded",children:[ce("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ce("button",{style:this.apiData.componentDid===a.did?Px:nu,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:Tu(a.name)}))}),this.view.render(t)]})}update(){}onFirstRender(){}install(){this.view=new Xs(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Dl}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("uploaded:selected",a),this.resources.parent.hideAllPanels()};const{target:t}=this.opts;t&&this.mount(t,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}const Cx=Fx;var _x=gu();const kx=tt(_x);class Ex extends he{constructor(t,a){super(t,{...{},...a});ke(this,"setHashFileName",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=kx.createHash("md5").update(await r.text()).digest("hex"),c=sn(n),d=`${l}${c?`.${c}`:""}`;this.uppy.setFileState(a,{hashFileName:d})}});ke(this,"setMetaData",async t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:{relativePath:s,name:o},hashFileName:r}=n,l=s||o||r;this.uppy.setFileMeta(a,{relativePath:l,name:l})}});ke(this,"prepareUploadWrapper",async t=>{await this.tryDownloadRemoteFile(t),await this.getPreviewFromData(t),await this.setHashFileName(t),await this.setMetaData(t)});ke(this,"tryDownloadRemoteFile",async t=>{var O,A;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:c,isLoading:d,remote:p,meta:h,errorCount:b=0}=t,m=!d&&r,P=`uploader:${c}:downloaded`,g=sn(t),v=(O=n==null?void 0:n.split("?"))==null?void 0:O[0],C=(()=>{const y=["jpg","jpeg"];return y.includes(g)&&y.some(S=>v==null?void 0:v.endsWith(S))?!0:v==null?void 0:v.endsWith(g)})()?v:`${v}${g?`.${g}`:""}`;if(m){const y=mx(s||((A=p==null?void 0:p.body)==null?void 0:A.url));if(b>=3)throw new Error("Download remote file failure");this.uppy.setFileState(c,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await hi.get(`${this.opts.companionUrl}/proxy`,{responseType:"blob",params:{url:y}}).then(S=>S==null?void 0:S.data).then(async S=>{const k=dx(S,C);this.uppy.setFileState(c,{name:C,extension:g,type:a,data:k,preview:s||Cl(k),source:o,size:k.size,isDownloading:!1,isRemote:!1,meta:{...h,name:C,filename:C}}),this.uppy.getFile(c),this.uppy.emit(P,c)}).catch(async S=>{console.error("Axios download remote file error: ",S),this.uppy.setFileState(c,{isRemote:!0,isLoading:!1,errorCount:b+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(c))})}else l&&await(async()=>new Promise(S=>{this.uppy.once(P,async()=>{S()})}))()});ke(this,"getPreviewFromData",t=>{const{id:a}=t,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:Cl(s)})},o.indexOf("gif")>-1?1e3:0)}});ke(this,"prepareUpload",t=>{const a=t.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{t.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"DownloadRemoteFiles",this.type="modifier",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async t=>{setTimeout(()=>{this.prepareUploadWrapper(t)},200)}),this.uppy.on("file-editor:complete",t=>{this.getPreviewFromData(t)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}}const Tx=Ex;class Ox extends he{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ce("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ce("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ce("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ce("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return ce("div",{id:"ai-image",className:"ai-image",children:ce("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}const Dx=Ox,Ax="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",Ux=ee.lazy(()=>Nl(()=>import("./index-DS0UcZlk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]),import.meta.url)),Al="uploader-container",Ra="uploader-dashboard",Ls=localStorage.getItem("uppy_debug"),Rx=i=>{var r;const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a}=i,n=au(e==null?void 0:e.companion),s=async l=>(await hi.post("/api/image/generations",l)).data,o={...i==null?void 0:i.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Sp,options:{quality:1},alwayUse:!0},(Ls||Qi()&&!_l())&&{id:"Uploaded",plugin:Sx,options:{params:a==null?void 0:a.params}},(Ls||Qi()&&!_l())&&{id:"Resources",plugin:Cx,options:{params:a==null?void 0:a.params}},Qi()&&fx()&&t.AIImage&&{id:"AIImage",plugin:Dx,options:{companionUrl:n},onShowPanel:l=>{function c(){setTimeout(()=>{var p,h;const d=document.getElementById("ai-image");d?Su(d).render(Me.jsx(Ux,{api:s,restrictions:o,i18n:(h=(p=l.current)==null?void 0:p.getUploader())==null?void 0:h.i18n,onSelect:b=>{const m=l.current.getUploader();m==null||m.emit("ai-image:selected",b),b.forEach((P,g)=>{const v=`AI Image [${g+1}].png`,F={name:v,type:"image/png",data:hx(P,v),source:"AIImage",isRemote:!1};m==null||m.addFile(F)})}})):c()},100)}c()}},{id:"Url",plugin:ha,options:{companionUrl:n}},{id:"Webcam",plugin:ic,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((r=window==null?void 0:window.blocklet)!=null&&r.UNSPLASH_KEY)&&t.Unsplash&&{id:"Unsplash",plugin:Sc,options:{companionUrl:n,companionHeaders:{},companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:Tx,options:{companionUrl:n},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:io,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function _o(i){const{id:e,plugins:t,locale:a,onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:d,restrictions:p}=i,h=zl(d,"id"),b=au(r==null?void 0:r.uploader);let m=new Jl({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Ls||""),locale:Ky[a||"en"],onBeforeFileAdded:(P,g)=>{if(Object.hasOwn(g,P.id))return!1;const v=!!$t.extension(P.type),F=$t.lookup(P.name)||"";if(!v&&F&&F!==P.type){const C=sn(P);C&&(P.extension=C),P.type=F}return P},...o,restrictions:p}).use(Xp,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:b,async onBeforeRequest(P,g){var y;const{hashFileName:v,id:F,meta:C}=g,O=sn(g);P.setHeader("x-uploader-file-name",`${v}`),P.setHeader("x-uploader-file-id",`${F}`),P.setHeader("x-uploader-file-ext",`${O}`),P.setHeader("x-uploader-base-url",new URL(P.getURL()).pathname),P.setHeader("x-uploader-endpoint-url",b),P.setHeader("x-uploader-metadata",JSON.stringify(C,(S,k)=>typeof k=="string"?encodeURIComponent(k):k));const A=(window==null?void 0:window.uploaderComponentId)||((y=window==null?void 0:window.blocklet)==null?void 0:y.componentId);A&&P.setHeader("x-component-did",(A||"").split("/").pop())},onAfterResponse:async(P,g)=>{const v={},F=P.getUnderlyingObject();try{F.response&&(v.data=JSON.parse(F.response))}catch{v.data={}}v.method=P.getMethod().toUpperCase(),v.url=P.getURL(),v.status=F.status,v.headers={...P._headers};const C=F.getAllResponseHeaders();if(C&&C.split(`\r
|
|
56
56
|
`).forEach(S=>{const[k,I]=S.split(": ");k&&I&&(v.headers[k]=I)}),["PATCH","POST"].includes(v.method)&&[200,500].includes(v.status)){const y=[!0,"true"].includes(v.headers["x-uploader-file-exist"]),S=vx(v.url,v.headers["x-uploader-file-name"]),k=m.getFile(v.headers["x-uploader-file-id"]);v.file=k,v.uploadURL=S,y&&k&&(v.method==="POST"&&m.pauseResume(k.id),m.emit("upload-success",k,{uploadURL:S}),m.calculateTotalProgress()),v.status===200&&(await(s==null?void 0:s(v)),m.emitUploadSuccess(k,v))}n&&await(n==null?void 0:n(F));const O=m.getState().totalProgress===100,A=m.getFiles().every(y=>y.source==="DropTarget");O&&A&&m.close()},...l});return c&&m.use(op,{target:document.body,onDrop:P=>{var g;(g=m==null?void 0:m.open)==null||g.call(m)},...c}),t==null||t.forEach(P=>{if(P){const{plugin:g,options:v}=h[P]||{};g&&m.use(g,v)}}),bx(m),m}const zs=ee.forwardRef((i,e)=>{const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,...i==null?void 0:i.apiPathProps},a=vu({open:!1,uppy:null,availablePluginMap:{},restrictions:{}}),n=Rx({...i,apiPathProps:t,availablePluginMap:a.availablePluginMap,restrictions:a.restrictions}),{plugins:s=n.map(y=>y.id),id:o="Uploader",popup:r=!1,uploadedProps:l,onOpen:c,onClose:d,locale:p,installerProps:h}=i,b=zl(n,"id"),m=bu(y=>{var S;return(S=y==null?void 0:y.breakpoints)==null?void 0:S.down("md")}),P=Oo([...s,...n.filter(y=>y.alwayUse).map(y=>y.id)]);ee.useLayoutEffect(()=>{(async()=>{var k,I,j,H,K,V;let S=Do((k=i==null?void 0:i.coreProps)==null?void 0:k.restrictions)?{}:(I=i==null?void 0:i.coreProps)==null?void 0:I.restrictions;Qi()&&!t.disableMediaKitPrefix&&Do((j=i==null?void 0:i.coreProps)==null?void 0:j.restrictions)&&await hi.get("/api/uploader/status").then(({data:B})=>{a.availablePluginMap=B.availablePluginMap,S=B.restrictions||{}}),!((H=S==null?void 0:S.allowedFileTypes)!=null&&H.length)&&(S!=null&&S.allowedFileExts)&&(S.allowedFileTypes=Oo((V=(K=(typeof(S==null?void 0:S.allowedFileExts)=="string"?S==null?void 0:S.allowedFileExts.split(","):S==null?void 0:S.allowedFileExts)||[])==null?void 0:K.map(B=>$t.lookup((B==null?void 0:B.replaceAll(" ",""))||"")))==null?void 0:V.filter(B=>B)),delete S.allowedFileExts),S.maxFileSize&&typeof S.maxFileSize=="string"&&(S.maxFileSize=G.parseSize(S.maxFileSize,{iec:!1})||void 0),a.restrictions=S})()},[]),Fu("esc",y=>{a.open&&(y.stopPropagation(),y.preventDefault(),F())},{useCapture:!0}),ee.useEffect(()=>{a.uppy=_o({...i,id:o,plugins:P,apiPathProps:t,pluginList:n,restrictions:a.restrictions}),a.uppy.open=v,a.uppy.close=F,a.uppy.openPlugin=g,a.uppy.on("dashboard:show-panel",y=>{const{onShowPanel:S}=b[y];S==null||S(e)}),(P.includes("Uploaded")||P.includes("Resources"))&&(a.uppy.off("uploaded:selected"),a.uppy.on("uploaded:selected",y=>{var S;y.forEach(k=>{a.uppy.emitUploadSuccess({id:k._id},{data:k,isMock:!0})}),(S=l==null?void 0:l.onSelectedFiles)==null||S.call(l,y),F()}))},[JSON.stringify({id:o,plugins:P,apiPathProps:t,locale:p,restrictions:a.restrictions})]);function g(y){var S,k,I;if(y=y.replace(/\s/g,""),["MyDevice",...P].map(j=>j.toLowerCase()).includes(y.toLowerCase())){let j=`div[data-uppy-acquirer-id="${y}"] > button`;(I=(k=(S=document==null?void 0:document.getElementById(Ra))==null?void 0:S.querySelector(j))==null?void 0:k.click)==null||I.call(k)}}function v(y){var k,I,j,H;a.open=!0,y&&setTimeout(()=>{g(y)},200),a.uppy.emitOpen(),c==null||c(),(I=(k=document.activeElement)==null?void 0:k.blur)==null||I.call(k);const S=a.uppy.getPlugin(Ra).el;(j=S==null?void 0:S.focus)==null||j.call(S),(H=S==null?void 0:S.click)==null||H.call(S)}function F(){var y;(y=a.uppy.getPlugin(Ra))==null||y.hideAllPanels(),a.open=!1,a.uppy.emitClose(),d==null||d(),setTimeout(()=>{a.uppy.getState().totalProgress===100&&(a.uppy.setState({files:{},currentUploads:{}}),a.uppy.calculateTotalProgress())},500)}ee.useImperativeHandle(e,()=>({getUploader:()=>a.uppy,open:v,close:F})),ee.useEffect(()=>{gx(t.disableMediaKitPrefix)},[t.disableMediaKitPrefix]);const C=r?wu:ee.Fragment,O=r?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:a.open?"block":"none"}},invisible:!0,open:a.open,onClick:y=>{document.activeElement===document.body&&(y.stopPropagation(),F())},...i.wrapperProps}:{...i.wrapperProps},A=m?"42px":"40px";return Me.jsx(C,{...O,children:Me.jsxs(ku,{onClose:F,did:Ax,...h,children:[Me.jsx(yu,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),Me.jsxs(Bl,{id:Al,onClick:y=>y.stopPropagation(),sx:{position:"relative",width:m?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}}},children:[Me.jsx(xu,{"aria-label":"close",onClick:F,sx:{color:"#fafafa",position:"absolute",...m?{bottom:`calc(0px - ${A} - 16px)`,left:`calc(50vw - ${A} - 8px)`}:{right:`calc(0px - ${A} - 16px)`,top:-12}},children:Me.jsx(Ou,{sx:{fontSize:A}})}),a.uppy&&Me.jsx(Yc,{inline:!0,target:`#${Al}`,id:Ra,uppy:a.uppy,plugins:P,fileManagerSelectionType:"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:"",doneButtonHandler:F,...i.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),Ix=Object.freeze(Object.defineProperty({__proto__:null,Uploader:zs,default:zs,initUploader:_o},Symbol.toStringTag,{value:"Module"})),Mx=ee.lazy(()=>Nl(()=>Promise.resolve().then(()=>Ix),void 0,import.meta.url).then(i=>({default:i.Uploader}))),ko=ee.createContext(null);function su(){const i=ee.useContext(ko);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function Nx({onChange:i,children:e,...t}){const a=su(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),i&&s.onceUploadSuccess((...r)=>{i(...r)})};return Me.jsx(Bl,{onClick:n,...t,children:e})}function Bx({children:i,...e}){const t=ee.useRef(null);return Me.jsxs(ko.Provider,{value:t,children:[i,Pu.createPortal(Me.jsx(Mx,{ref:t,popup:!0,...e},"uploader"),document.body)]})}const o0=Object.freeze(Object.defineProperty({__proto__:null,Uploader:zs,UploaderContext:ko,UploaderProvider:Bx,UploaderTrigger:Nx,initUploader:_o,useUploaderContext:su},Symbol.toStringTag,{value:"Module"}));export{fx as g,o0 as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dW as S}from"./index-Dpr1-GCJ.js";function I(r,t,n){return t=S(t),t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function h(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),n.push.apply(n,e)}return n}function m(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h(Object(n),!0).forEach(function(e){I(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function i(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var E=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),v=function(){return Math.random().toString(36).substring(7).split("").join(".")},P={INIT:"@@redux/INIT"+v(),REPLACE:"@@redux/REPLACE"+v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+v()}};function R(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function T(r,t,n){var e;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(i(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(i(1));return n(T)(r,t)}if(typeof r!="function")throw new Error(i(2));var u=r,a=t,p=[],c=p,f=!1;function w(){c===p&&(c=p.slice())}function g(){if(f)throw new Error(i(3));return a}function O(o){if(typeof o!="function")throw new Error(i(4));if(f)throw new Error(i(5));var l=!0;return w(),c.push(o),function(){if(l){if(f)throw new Error(i(6));l=!1,w();var s=c.indexOf(o);c.splice(s,1),p=null}}}function y(o){if(!R(o))throw new Error(i(7));if(typeof o.type>"u")throw new Error(i(8));if(f)throw new Error(i(9));try{f=!0,a=u(a,o)}finally{f=!1}for(var l=p=c,b=0;b<l.length;b++){var s=l[b];s()}return o}function N(o){if(typeof o!="function")throw new Error(i(10));u=o,y({type:P.REPLACE})}function A(){var o,l=O;return o={subscribe:function(s){if(typeof s!="object"||s===null)throw new Error(i(11));function d(){s.next&&s.next(g())}d();var x=l(d);return{unsubscribe:x}}},o[E]=function(){return this},o}return y({type:P.INIT}),e={dispatch:y,subscribe:O,getState:g,replaceReducer:N},e[E]=A,e}function j(r,t){return function(){return t(r.apply(this,arguments))}}function K(r,t){if(typeof r=="function")return j(r,t);if(typeof r!="object"||r===null)throw new Error(i(16));var n={};for(var e in r){var u=r[e];typeof u=="function"&&(n[e]=j(u,t))}return n}function L(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,u){return function(){return e(u.apply(void 0,arguments))}})}function M(){for(var r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];return function(e){return function(){var u=e.apply(void 0,arguments),a=function(){throw new Error(i(15))},p={getState:u.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(f){return f(p)});return a=L.apply(void 0,c)(u.dispatch),m(m({},u),{},{dispatch:a})}}}export{I as _,M as a,K as b,T as c,L as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as g,j as a,O as x,
|
|
1
|
+
import{P as g,j as a,O as x,d8 as q,fX as ee,dO as ce,r as A,a1 as Oe,cL as Le,q as Fe,cj as Ae,fy as We,fK as Ve,g2 as He,dQ as Ye,f_ as Ge,dP as Ke,a2 as _e,fa as Re,cI as Xe,av as ze,n as Ne,cz as Ze,g as Je,cJ as Qe,gb as $e}from"./index-Dpr1-GCJ.js";import"./index-pZ4wuW0n.js";function be({optionalComponent:n,index:b,installStatus:w,hasPermission:l,t:_}){const E=()=>{window.open(n==null?void 0:n.installUrl,"_blank")},R=()=>{window.open(n==null?void 0:n.storeUrl,"_blank")},S=()=>{window.location.reload()},O=w==="stopped"||w==="running",y=60;return a.jsxs(x,{children:[b===0?null:a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsxs(x,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[a.jsx("img",{style:{width:y,height:y,minWidth:y,minHeight:y},src:n.logoUrl,alt:n.meta.title}),a.jsxs(x,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[a.jsxs(x,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var j;return R((j=n.meta)==null?void 0:j.did)},children:[n.meta.title,a.jsxs(x,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[n.meta.version,a.jsx(ee,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:q.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),a.jsx(x,{sx:{marginTop:0,opacity:.7},children:n.meta.description}),a.jsx(x,{sx:{display:l?"flex":"none",flexDirection:"row",gap:1},children:w?a.jsx(x,{sx:{marginTop:2,opacity:.7},children:O?a.jsx(ce,{variant:"contained",onClick:S,children:_("componentInstallerRefresh")},"refresh"):a.jsx(ce,{disabled:!0,sx:{color:"#333"},startIcon:a.jsx(ee,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:w},"status")}):a.jsx(ce,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var j;return E((j=n.meta)==null?void 0:j.did)},children:_("componentInstallerInstall")},"install")}),O?a.jsx(x,{sx:{marginTop:2,opacity:.7},children:_("componentInstallerSuccessInstalled")}):null]})]})]})}be.propTypes={t:g.func.isRequired,optionalComponent:g.object.isRequired,index:g.number.isRequired,installStatus:g.string,hasPermission:g.bool.isRequired};be.defaultProps={installStatus:""};const ei={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},de=n=>typeof n=="string"?new Set(n.split(";;")):new Set(n);function ii({did:n,onInstalled:b,onError:w}){const l=Array.isArray(n)?n.join(";;"):n,[_,E]=A.useState({}),R=A.useRef({onInstalled:b,onError:w});R.current={onInstalled:b,onError:w};const{optionalComponents:S,componentMountPoints:O}=window.blocklet,y=A.useMemo(()=>{var o;if(!S||!S.length)return[];const m=de(l),e=S.filter(i=>m.has(i.meta.did));return(o=e?R.current.onError:R.current.onInstalled)==null||o(e),e},[l,S]),j=A.useMemo(()=>{if(y.length)return!0;const m=de(l);return(O||[]).find(e=>m.has(e.did))},[y,O,l]);return y.forEach(m=>{m.storeUrl=Oe(m.meta.homepage,"blocklets",m.meta.did),m.installUrl=Oe(window.blocklet.appUrl,Le,`/admin/components?install-component=${m.meta.did}`)}),A.useEffect(()=>{const m=e=>{var o,i,t,r,I;if(e.origin===window.blocklet.appUrl&&((o=e.data)==null?void 0:o.kind)==="component-installer"&&(t=(i=e.data)==null?void 0:i.blocklet)!=null&&t.children){let T=!1;const c=de(l);(I=(r=e.data)==null?void 0:r.blocklet)==null||I.children.forEach(s=>{var k;c.has((k=s.meta)==null?void 0:k.did)&&(T=!0,E(P=>{var D;return{...P,[(D=s.meta)==null?void 0:D.did]:s.status||"waiting"}}))}),T||E({})}};return window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}},[l]),{optComponents:y,installed:!y.length&&j,installStatus:_,setInstallStatus:E,definedInBlockletYML:j}}function V({warnIcon:n,did:b,noPermissionMute:w,onInstalled:l,onError:_,children:E,closeByOutSize:R,onClose:S,fallback:O,disabled:y,roles:j=["owner","admin"]}){const{locale:m}=Fe(),e=Ae((c,s={})=>We(ei,c,m,"en",s)),{installed:o,optComponents:i,installStatus:t,definedInBlockletYML:r}=ii({did:b,onInstalled:l,onError:_}),I=A.useContext(Ve),T=()=>{S==null||S(!1)};return y?E:a.jsx(He,{session:I==null?void 0:I.session,roles:j,children:({hasPermission:c})=>o?E:w&&!c?O||null:typeof E=="function"?a.jsxs(a.Fragment,{children:[O,E({hasPermission:c,optComponents:i,installStatus:t})]}):a.jsxs(a.Fragment,{children:[O,a.jsx(Ye,{onClickAway:s=>{s.preventDefault(),s.stopPropagation(),R&&T()},children:a.jsx(Ge,{in:!0,timeout:350,children:a.jsx(Ke,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:q.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${q.gray6}, 0px 0px 0px 1px ${q.gray6}`},children:r?a.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(x,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[n||a.jsx(ee,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(x,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),a.jsx(x,{sx:{flex:1}}),S?a.jsx(_e,{variant:"outlined",className:"button",onClick:T,children:a.jsx(Re,{})}):null]}),a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsx(x,{sx:{maxHeight:"70vh",overflowY:"auto"},children:i.map((s,k)=>{var P,D;return a.jsx(be,{t:e,hasPermission:c,index:k,optionalComponent:s,installStatus:t[(P=s.meta)==null?void 0:P.did]},((D=s.meta)==null?void 0:D.did)||k)})}),c?null:a.jsxs(a.Fragment,{children:[a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsx(x,{sx:{padding:"20px 24px"},children:a.jsx(x,{sx:{opacity:1},children:e("componentInstallerSuggestions")})})]})]}):a.jsxs(x,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(x,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[n||a.jsx(ee,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(x,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:e("componentInstallerTitle")}),a.jsx(x,{sx:{flex:1}}),S?a.jsx(_e,{variant:"outlined",className:"button",onClick:T,children:a.jsx(Re,{})}):null]}),a.jsx(x,{sx:{width:"100%",height:"1px",backgroundColor:q.gray6}}),a.jsxs(x,{sx:{padding:"20px 24px",marginTop:0},children:[e("componentInstallerNoDefinedInBlockletYML"),": ",b]})]})})})})]})})}V.propTypes={disabled:g.bool,warnIcon:g.node,did:g.oneOfType([g.string,g.arrayOf(g.string)]).isRequired,noPermissionMute:g.bool,onInstalled:g.func,onError:g.func,children:g.any.isRequired,closeByOutSize:g.bool,onClose:g.func,fallback:g.node,roles:g.array};V.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function De(n){return window.blocklet?a.jsx(V,{...n}):n.children}De.propTypes={...V.propTypes,children:g.any.isRequired};De.defaultProps={...V.defaultProps};var pe={};Object.defineProperty(pe,"__esModule",{value:!0});var ti=pe.default=void 0;oi(A);var Te=a;function oi(n){return n&&n.__esModule?n:{default:n}}function Pe(n,b){var w=Object.keys(n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);b&&(l=l.filter(function(_){return Object.getOwnPropertyDescriptor(n,_).enumerable})),w.push.apply(w,l)}return w}function Me(n){for(var b=1;b<arguments.length;b++){var w=arguments[b]!=null?arguments[b]:{};b%2?Pe(Object(w),!0).forEach(function(l){ri(n,l,w[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(w)):Pe(Object(w)).forEach(function(l){Object.defineProperty(n,l,Object.getOwnPropertyDescriptor(w,l))})}return n}function ri(n,b,w){return b=ni(b),b in n?Object.defineProperty(n,b,{value:w,enumerable:!0,configurable:!0,writable:!0}):n[b]=w,n}function ni(n){var b=ai(n,"string");return typeof b=="symbol"?b:String(b)}function ai(n,b){if(typeof n!="object"||!n)return n;var w=n[Symbol.toPrimitive];if(w!==void 0){var l=w.call(n,b||"default");if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(n)}var we=function(b){return(0,Te.jsx)("svg",Me(Me({},b),{},{children:(0,Te.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};we.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};we.displayName="revoke";ti=pe.default=we;g.any.isRequired,g.any.isRequired,g.string.isRequired,g.func.isRequired,g.any,g.any,g.number;A.createContext({});const ui=new Xe;ze.defaults.timeout=10*1e3;ze.create();Ne(x)`
|
|
2
2
|
.selected-container {
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 0px;
|
|
@@ -54,4 +54,4 @@ import{P as g,j as a,O as x,d7 as q,ge as ee,e4 as ce,r as A,a1 as Oe,cK as Le,q
|
|
|
54
54
|
`;Ne(x)`
|
|
55
55
|
height: 100%;
|
|
56
56
|
overflow-y: auto;
|
|
57
|
-
`;var ue={exports:{}};(function(n,b){(function(w,l){var _="1.0.37",E="",R="?",S="function",O="undefined",y="object",j="string",m="major",e="model",o="name",i="type",t="vendor",r="version",I="architecture",T="console",c="mobile",s="tablet",k="smarttv",P="wearable",D="embedded",ie=500,V="Amazon",L="Apple",fe="ASUS",me="BlackBerry",U="Browser",Y="Chrome",Ce="Edge",G="Firefox",K="Google",he="Huawei",te="LG",oe="Microsoft",xe="Motorola",X="Opera",Z="Samsung",ge="Sharp",J="Sony",re="Xiaomi",ne="Zebra",ve="Facebook",ye="Chromium OS",ke="Mac OS",qe=function(p,h){var u={};for(var v in p)h[v]&&h[v].length%2===0?u[v]=h[v].concat(p[v]):u[v]=p[v];return u},Q=function(p){for(var h={},u=0;u<p.length;u++)h[p[u].toUpperCase()]=p[u];return h},Se=function(p,h){return typeof p===j?F(h).indexOf(F(p))!==-1:!1},F=function(p){return p.toLowerCase()},Ue=function(p){return typeof p===j?p.replace(/[^\d\.]/g,E).split(".")[0]:l},ae=function(p,h){if(typeof p===j)return p=p.replace(/^\s\s*/,E),typeof h===O?p:p.substring(0,ie)},W=function(p,h){for(var u=0,v,C,z,f,d,N;u<h.length&&!d;){var le=h[u],Ee=h[u+1];for(v=C=0;v<le.length&&!d&&le[v];)if(d=le[v++].exec(p),d)for(z=0;z<Ee.length;z++)N=d[++C],f=Ee[z],typeof f===y&&f.length>0?f.length===2?typeof f[1]==S?this[f[0]]=f[1].call(this,N):this[f[0]]=f[1]:f.length===3?typeof f[1]===S&&!(f[1].exec&&f[1].test)?this[f[0]]=N?f[1].call(this,N,f[2]):l:this[f[0]]=N?N.replace(f[1],f[2]):l:f.length===4&&(this[f[0]]=N?f[3].call(this,N.replace(f[1],f[2])):l):this[f]=N||l;u+=2}},se=function(p,h){for(var u in h)if(typeof h[u]===y&&h[u].length>0){for(var v=0;v<h[u].length;v++)if(Se(h[u][v],p))return u===R?l:u}else if(Se(h[u],p))return u===R?l:u;return p},Be={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},je={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ie={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[r,[o,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[r,[o,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[o,r],[/opios[\/ ]+([\w\.]+)/i],[r,[o,X+" Mini"]],[/\bopr\/([\w\.]+)/i],[r,[o,X]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[r,[o,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[o,r],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[r,[o,"UC"+U]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[r,[o,"WeChat"]],[/konqueror\/([\w\.]+)/i],[r,[o,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[r,[o,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[r,[o,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[r,[o,"Smart Lenovo "+U]],[/(avast|avg)\/([\w\.]+)/i],[[o,/(.+)/,"$1 Secure "+U],r],[/\bfocus\/([\w\.]+)/i],[r,[o,G+" Focus"]],[/\bopt\/([\w\.]+)/i],[r,[o,X+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[r,[o,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[r,[o,"Dolphin"]],[/coast\/([\w\.]+)/i],[r,[o,X+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[r,[o,"MIUI "+U]],[/fxios\/([-\w\.]+)/i],[r,[o,G]],[/\bqihu|(qi?ho?o?|360)browser/i],[[o,"360 "+U]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[o,/(.+)/,"$1 "+U],r],[/samsungbrowser\/([\w\.]+)/i],[r,[o,Z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],r],[/metasr[\/ ]?([\d\.]+)/i],[r,[o,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[o,"Sogou Mobile"],r],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[o,r],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[o],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[o,ve],r],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[o,r],[/\bgsa\/([\w\.]+) .*safari\//i],[r,[o,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[r,[o,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[r,[o,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[o,Y+" WebView"],r],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[r,[o,"Android "+U]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[o,r],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[r,[o,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[r,o],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[o,[r,se,Be]],[/(webkit|khtml)\/([\w\.]+)/i],[o,r],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[o,"Netscape"],r],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[r,[o,G+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[o,r],[/(cobalt)\/([\w\.]+)/i],[o,[r,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[I,"amd64"]],[/(ia32(?=;))/i],[[I,F]],[/((?:i[346]|x)86)[;\)]/i],[[I,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[I,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[I,"armhf"]],[/windows (ce|mobile); ppc;/i],[[I,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[I,/ower/,E,F]],[/(sun4\w)[;\)]/i],[[I,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[I,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[e,[t,Z],[i,s]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[e,[t,Z],[i,c]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[e,[t,L],[i,c]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[e,[t,L],[i,s]],[/(macintosh);/i],[e,[t,L]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[e,[t,ge],[i,c]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[e,[t,he],[i,s]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[e,[t,he],[i,c]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[e,/_/g," "],[t,re],[i,c]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[e,/_/g," "],[t,re],[i,s]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[e,[t,"OPPO"],[i,c]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[e,[t,"Vivo"],[i,c]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[e,[t,"Realme"],[i,c]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[e,[t,xe],[i,c]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[e,[t,xe],[i,s]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[e,[t,te],[i,s]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[e,[t,te],[i,c]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[e,[t,"Lenovo"],[i,s]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[e,/_/g," "],[t,"Nokia"],[i,c]],[/(pixel c)\b/i],[e,[t,K],[i,s]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[e,[t,K],[i,c]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[e,[t,J],[i,c]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[e,"Xperia Tablet"],[t,J],[i,s]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[e,[t,"OnePlus"],[i,c]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[e,[t,V],[i,s]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[e,/(.+)/g,"Fire Phone $1"],[t,V],[i,c]],[/(playbook);[-\w\),; ]+(rim)/i],[e,t,[i,s]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[e,[t,me],[i,c]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[e,[t,fe],[i,s]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[e,[t,fe],[i,c]],[/(nexus 9)/i],[e,[t,"HTC"],[i,s]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[t,[e,/_/g," "],[i,c]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[e,[t,"Acer"],[i,s]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[e,[t,"Meizu"],[i,c]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[e,[t,"Ulefone"],[i,c]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[t,e,[i,c]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[t,e,[i,s]],[/(surface duo)/i],[e,[t,oe],[i,s]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[e,[t,"Fairphone"],[i,c]],[/(u304aa)/i],[e,[t,"AT&T"],[i,c]],[/\bsie-(\w*)/i],[e,[t,"Siemens"],[i,c]],[/\b(rct\w+) b/i],[e,[t,"RCA"],[i,s]],[/\b(venue[\d ]{2,7}) b/i],[e,[t,"Dell"],[i,s]],[/\b(q(?:mv|ta)\w+) b/i],[e,[t,"Verizon"],[i,s]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[e,[t,"Barnes & Noble"],[i,s]],[/\b(tm\d{3}\w+) b/i],[e,[t,"NuVision"],[i,s]],[/\b(k88) b/i],[e,[t,"ZTE"],[i,s]],[/\b(nx\d{3}j) b/i],[e,[t,"ZTE"],[i,c]],[/\b(gen\d{3}) b.+49h/i],[e,[t,"Swiss"],[i,c]],[/\b(zur\d{3}) b/i],[e,[t,"Swiss"],[i,s]],[/\b((zeki)?tb.*\b) b/i],[e,[t,"Zeki"],[i,s]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[t,"Dragon Touch"],e,[i,s]],[/\b(ns-?\w{0,9}) b/i],[e,[t,"Insignia"],[i,s]],[/\b((nxa|next)-?\w{0,9}) b/i],[e,[t,"NextBook"],[i,s]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[t,"Voice"],e,[i,c]],[/\b(lvtel\-)?(v1[12]) b/i],[[t,"LvTel"],e,[i,c]],[/\b(ph-1) /i],[e,[t,"Essential"],[i,c]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[e,[t,"Envizen"],[i,s]],[/\b(trio[-\w\. ]+) b/i],[e,[t,"MachSpeed"],[i,s]],[/\btu_(1491) b/i],[e,[t,"Rotor"],[i,s]],[/(shield[\w ]+) b/i],[e,[t,"Nvidia"],[i,s]],[/(sprint) (\w+)/i],[t,e,[i,c]],[/(kin\.[onetw]{3})/i],[[e,/\./g," "],[t,oe],[i,c]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[e,[t,ne],[i,s]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[e,[t,ne],[i,c]],[/smart-tv.+(samsung)/i],[t,[i,k]],[/hbbtv.+maple;(\d+)/i],[[e,/^/,"SmartTV"],[t,Z],[i,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[t,te],[i,k]],[/(apple) ?tv/i],[t,[e,L+" TV"],[i,k]],[/crkey/i],[[e,Y+"cast"],[t,K],[i,k]],[/droid.+aft(\w+)( bui|\))/i],[e,[t,V],[i,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[e,[t,ge],[i,k]],[/(bravia[\w ]+)( bui|\))/i],[e,[t,J],[i,k]],[/(mitv-\w{5}) bui/i],[e,[t,re],[i,k]],[/Hbbtv.*(technisat) (.*);/i],[t,e,[i,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[t,ae],[e,ae],[i,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[t,e,[i,T]],[/droid.+; (shield) bui/i],[e,[t,"Nvidia"],[i,T]],[/(playstation [345portablevi]+)/i],[e,[t,J],[i,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[e,[t,oe],[i,T]],[/((pebble))app/i],[t,e,[i,P]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[e,[t,L],[i,P]],[/droid.+; (glass) \d/i],[e,[t,K],[i,P]],[/droid.+; (wt63?0{2,3})\)/i],[e,[t,ne],[i,P]],[/(quest( 2| pro)?)/i],[e,[t,ve],[i,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[t,[i,D]],[/(aeobc)\b/i],[e,[t,V],[i,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[e,[i,c]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[e,[i,s]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,s]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,c]],[/(android[-\w\. ]{0,9});.+buil/i],[e,[t,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[r,[o,Ce+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[r,[o,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[o,r],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[r,o]],os:[[/microsoft (windows) (vista|xp)/i],[o,r],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[o,[r,se,je]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[r,se,je],[o,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[r,/_/g,"."],[o,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[o,ke],[r,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[r,o],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[o,r],[/\(bb(10);/i],[r,[o,me]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[r,[o,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[r,[o,G+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[r,[o,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[r,[o,"watchOS"]],[/crkey\/([\d\.]+)/i],[r,[o,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[o,ye],r],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[o,r],[/(sunos) ?([\w\.\d]*)/i],[[o,"Solaris"],r],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[o,r]]},M=function(p,h){if(typeof p===y&&(h=p,p=l),!(this instanceof M))return new M(p,h).getResult();var u=typeof w!==O&&w.navigator?w.navigator:l,v=p||(u&&u.userAgent?u.userAgent:E),C=u&&u.userAgentData?u.userAgentData:l,z=h?qe(Ie,h):Ie,f=u&&u.userAgent==v;return this.getBrowser=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.browser),d[m]=Ue(d[r]),f&&u&&u.brave&&typeof u.brave.isBrave==S&&(d[o]="Brave"),d},this.getCPU=function(){var d={};return d[I]=l,W.call(d,v,z.cpu),d},this.getDevice=function(){var d={};return d[t]=l,d[e]=l,d[i]=l,W.call(d,v,z.device),f&&!d[i]&&C&&C.mobile&&(d[i]=c),f&&d[e]=="Macintosh"&&u&&typeof u.standalone!==O&&u.maxTouchPoints&&u.maxTouchPoints>2&&(d[e]="iPad",d[i]=s),d},this.getEngine=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.engine),d},this.getOS=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.os),f&&!d[o]&&C&&C.platform!="Unknown"&&(d[o]=C.platform.replace(/chrome os/i,ye).replace(/macos/i,ke)),d},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(d){return v=typeof d===j&&d.length>ie?ae(d,ie):d,this},this.setUA(v),this};M.VERSION=_,M.BROWSER=Q([o,r,m]),M.CPU=Q([I]),M.DEVICE=Q([e,t,i,T,c,k,s,P,D]),M.ENGINE=M.OS=Q([o,r]),n.exports&&(b=n.exports=M),b.UAParser=M;var B=typeof w!==O&&(w.jQuery||w.Zepto);if(B&&!B.ua){var $=new M;B.ua=$.getResult(),B.ua.get=function(){return $.getUA()},B.ua.set=function(p){$.setUA(p);var h=$.getResult();for(var u in h)B.ua[u]=h[u]}}})(typeof window=="object"?window:Ze)})(ue,ue.exports);var si=ue.exports;const bi=Je(si);function li({src:n,open:b=!1,componentDid:w,loading:l=!0,storeUrl:_,onClose:E=()=>{},onComplete:R=()=>{},onLoad:S=()=>{}},O){const y=A.useRef(null),j=Ae(m=>{var e,o,i;b&&(((e=m==null?void 0:m.data)==null?void 0:e.event)==="resourceDialog.close"&&E(),((o=m==null?void 0:m.data)==null?void 0:o.event)==="resourceDialog.complete"&&R(),((i=m==null?void 0:m.data)==null?void 0:i.event)==="resourceDialog.loaded"&&S())});return Qe(()=>{window.addEventListener("message",j)}),$e(()=>{window.removeEventListener("message",j)}),A.useImperativeHandle(O,()=>({selectBlocklet:m=>{var e;(e=y.current)!=null&&e.contentWindow&&y.current.contentWindow.postMessage({event:"resourceDialog.select",data:m,componentDid:w,storeUrl:_},"*")}})),b?a.jsx("iframe",{ref:y,src:n,title:"Resource Dialog",style:{position:"fixed",top:0,left:l?"-100vw":0,width:"100vw",height:"100vh",zIndex:9999,backgroundColor:"transparent",border:"none"}}):null}A.forwardRef(li);export{bi as U,De as W,ui as c,ti as d};
|
|
57
|
+
`;var ue={exports:{}};(function(n,b){(function(w,l){var _="1.0.37",E="",R="?",S="function",O="undefined",y="object",j="string",m="major",e="model",o="name",i="type",t="vendor",r="version",I="architecture",T="console",c="mobile",s="tablet",k="smarttv",P="wearable",D="embedded",ie=500,H="Amazon",L="Apple",fe="ASUS",me="BlackBerry",U="Browser",Y="Chrome",Ce="Edge",G="Firefox",K="Google",he="Huawei",te="LG",oe="Microsoft",xe="Motorola",X="Opera",Z="Samsung",ge="Sharp",J="Sony",re="Xiaomi",ne="Zebra",ve="Facebook",ye="Chromium OS",ke="Mac OS",qe=function(p,h){var u={};for(var v in p)h[v]&&h[v].length%2===0?u[v]=h[v].concat(p[v]):u[v]=p[v];return u},Q=function(p){for(var h={},u=0;u<p.length;u++)h[p[u].toUpperCase()]=p[u];return h},Se=function(p,h){return typeof p===j?F(h).indexOf(F(p))!==-1:!1},F=function(p){return p.toLowerCase()},Ue=function(p){return typeof p===j?p.replace(/[^\d\.]/g,E).split(".")[0]:l},ae=function(p,h){if(typeof p===j)return p=p.replace(/^\s\s*/,E),typeof h===O?p:p.substring(0,ie)},W=function(p,h){for(var u=0,v,C,z,f,d,N;u<h.length&&!d;){var le=h[u],Ee=h[u+1];for(v=C=0;v<le.length&&!d&&le[v];)if(d=le[v++].exec(p),d)for(z=0;z<Ee.length;z++)N=d[++C],f=Ee[z],typeof f===y&&f.length>0?f.length===2?typeof f[1]==S?this[f[0]]=f[1].call(this,N):this[f[0]]=f[1]:f.length===3?typeof f[1]===S&&!(f[1].exec&&f[1].test)?this[f[0]]=N?f[1].call(this,N,f[2]):l:this[f[0]]=N?N.replace(f[1],f[2]):l:f.length===4&&(this[f[0]]=N?f[3].call(this,N.replace(f[1],f[2])):l):this[f]=N||l;u+=2}},se=function(p,h){for(var u in h)if(typeof h[u]===y&&h[u].length>0){for(var v=0;v<h[u].length;v++)if(Se(h[u][v],p))return u===R?l:u}else if(Se(h[u],p))return u===R?l:u;return p},Be={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},je={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ie={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[r,[o,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[r,[o,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[o,r],[/opios[\/ ]+([\w\.]+)/i],[r,[o,X+" Mini"]],[/\bopr\/([\w\.]+)/i],[r,[o,X]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[r,[o,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[o,r],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[r,[o,"UC"+U]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[r,[o,"WeChat"]],[/konqueror\/([\w\.]+)/i],[r,[o,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[r,[o,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[r,[o,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[r,[o,"Smart Lenovo "+U]],[/(avast|avg)\/([\w\.]+)/i],[[o,/(.+)/,"$1 Secure "+U],r],[/\bfocus\/([\w\.]+)/i],[r,[o,G+" Focus"]],[/\bopt\/([\w\.]+)/i],[r,[o,X+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[r,[o,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[r,[o,"Dolphin"]],[/coast\/([\w\.]+)/i],[r,[o,X+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[r,[o,"MIUI "+U]],[/fxios\/([-\w\.]+)/i],[r,[o,G]],[/\bqihu|(qi?ho?o?|360)browser/i],[[o,"360 "+U]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[o,/(.+)/,"$1 "+U],r],[/samsungbrowser\/([\w\.]+)/i],[r,[o,Z+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],r],[/metasr[\/ ]?([\d\.]+)/i],[r,[o,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[o,"Sogou Mobile"],r],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[o,r],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[o],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[o,ve],r],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[o,r],[/\bgsa\/([\w\.]+) .*safari\//i],[r,[o,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[r,[o,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[r,[o,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[o,Y+" WebView"],r],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[r,[o,"Android "+U]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[o,r],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[r,[o,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[r,o],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[o,[r,se,Be]],[/(webkit|khtml)\/([\w\.]+)/i],[o,r],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[o,"Netscape"],r],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[r,[o,G+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[o,r],[/(cobalt)\/([\w\.]+)/i],[o,[r,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[I,"amd64"]],[/(ia32(?=;))/i],[[I,F]],[/((?:i[346]|x)86)[;\)]/i],[[I,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[I,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[I,"armhf"]],[/windows (ce|mobile); ppc;/i],[[I,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[I,/ower/,E,F]],[/(sun4\w)[;\)]/i],[[I,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[I,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[e,[t,Z],[i,s]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[e,[t,Z],[i,c]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[e,[t,L],[i,c]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[e,[t,L],[i,s]],[/(macintosh);/i],[e,[t,L]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[e,[t,ge],[i,c]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[e,[t,he],[i,s]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[e,[t,he],[i,c]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[e,/_/g," "],[t,re],[i,c]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[e,/_/g," "],[t,re],[i,s]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[e,[t,"OPPO"],[i,c]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[e,[t,"Vivo"],[i,c]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[e,[t,"Realme"],[i,c]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[e,[t,xe],[i,c]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[e,[t,xe],[i,s]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[e,[t,te],[i,s]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[e,[t,te],[i,c]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[e,[t,"Lenovo"],[i,s]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[e,/_/g," "],[t,"Nokia"],[i,c]],[/(pixel c)\b/i],[e,[t,K],[i,s]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[e,[t,K],[i,c]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[e,[t,J],[i,c]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[e,"Xperia Tablet"],[t,J],[i,s]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[e,[t,"OnePlus"],[i,c]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[e,[t,H],[i,s]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[e,/(.+)/g,"Fire Phone $1"],[t,H],[i,c]],[/(playbook);[-\w\),; ]+(rim)/i],[e,t,[i,s]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[e,[t,me],[i,c]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[e,[t,fe],[i,s]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[e,[t,fe],[i,c]],[/(nexus 9)/i],[e,[t,"HTC"],[i,s]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[t,[e,/_/g," "],[i,c]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[e,[t,"Acer"],[i,s]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[e,[t,"Meizu"],[i,c]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[e,[t,"Ulefone"],[i,c]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[t,e,[i,c]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[t,e,[i,s]],[/(surface duo)/i],[e,[t,oe],[i,s]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[e,[t,"Fairphone"],[i,c]],[/(u304aa)/i],[e,[t,"AT&T"],[i,c]],[/\bsie-(\w*)/i],[e,[t,"Siemens"],[i,c]],[/\b(rct\w+) b/i],[e,[t,"RCA"],[i,s]],[/\b(venue[\d ]{2,7}) b/i],[e,[t,"Dell"],[i,s]],[/\b(q(?:mv|ta)\w+) b/i],[e,[t,"Verizon"],[i,s]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[e,[t,"Barnes & Noble"],[i,s]],[/\b(tm\d{3}\w+) b/i],[e,[t,"NuVision"],[i,s]],[/\b(k88) b/i],[e,[t,"ZTE"],[i,s]],[/\b(nx\d{3}j) b/i],[e,[t,"ZTE"],[i,c]],[/\b(gen\d{3}) b.+49h/i],[e,[t,"Swiss"],[i,c]],[/\b(zur\d{3}) b/i],[e,[t,"Swiss"],[i,s]],[/\b((zeki)?tb.*\b) b/i],[e,[t,"Zeki"],[i,s]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[t,"Dragon Touch"],e,[i,s]],[/\b(ns-?\w{0,9}) b/i],[e,[t,"Insignia"],[i,s]],[/\b((nxa|next)-?\w{0,9}) b/i],[e,[t,"NextBook"],[i,s]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[t,"Voice"],e,[i,c]],[/\b(lvtel\-)?(v1[12]) b/i],[[t,"LvTel"],e,[i,c]],[/\b(ph-1) /i],[e,[t,"Essential"],[i,c]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[e,[t,"Envizen"],[i,s]],[/\b(trio[-\w\. ]+) b/i],[e,[t,"MachSpeed"],[i,s]],[/\btu_(1491) b/i],[e,[t,"Rotor"],[i,s]],[/(shield[\w ]+) b/i],[e,[t,"Nvidia"],[i,s]],[/(sprint) (\w+)/i],[t,e,[i,c]],[/(kin\.[onetw]{3})/i],[[e,/\./g," "],[t,oe],[i,c]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[e,[t,ne],[i,s]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[e,[t,ne],[i,c]],[/smart-tv.+(samsung)/i],[t,[i,k]],[/hbbtv.+maple;(\d+)/i],[[e,/^/,"SmartTV"],[t,Z],[i,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[t,te],[i,k]],[/(apple) ?tv/i],[t,[e,L+" TV"],[i,k]],[/crkey/i],[[e,Y+"cast"],[t,K],[i,k]],[/droid.+aft(\w+)( bui|\))/i],[e,[t,H],[i,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[e,[t,ge],[i,k]],[/(bravia[\w ]+)( bui|\))/i],[e,[t,J],[i,k]],[/(mitv-\w{5}) bui/i],[e,[t,re],[i,k]],[/Hbbtv.*(technisat) (.*);/i],[t,e,[i,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[t,ae],[e,ae],[i,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[t,e,[i,T]],[/droid.+; (shield) bui/i],[e,[t,"Nvidia"],[i,T]],[/(playstation [345portablevi]+)/i],[e,[t,J],[i,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[e,[t,oe],[i,T]],[/((pebble))app/i],[t,e,[i,P]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[e,[t,L],[i,P]],[/droid.+; (glass) \d/i],[e,[t,K],[i,P]],[/droid.+; (wt63?0{2,3})\)/i],[e,[t,ne],[i,P]],[/(quest( 2| pro)?)/i],[e,[t,ve],[i,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[t,[i,D]],[/(aeobc)\b/i],[e,[t,H],[i,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[e,[i,c]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[e,[i,s]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,s]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,c]],[/(android[-\w\. ]{0,9});.+buil/i],[e,[t,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[r,[o,Ce+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[r,[o,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[o,r],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[r,o]],os:[[/microsoft (windows) (vista|xp)/i],[o,r],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[o,[r,se,je]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[r,se,je],[o,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[r,/_/g,"."],[o,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[o,ke],[r,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[r,o],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[o,r],[/\(bb(10);/i],[r,[o,me]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[r,[o,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[r,[o,G+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[r,[o,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[r,[o,"watchOS"]],[/crkey\/([\d\.]+)/i],[r,[o,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[o,ye],r],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[o,r],[/(sunos) ?([\w\.\d]*)/i],[[o,"Solaris"],r],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[o,r]]},M=function(p,h){if(typeof p===y&&(h=p,p=l),!(this instanceof M))return new M(p,h).getResult();var u=typeof w!==O&&w.navigator?w.navigator:l,v=p||(u&&u.userAgent?u.userAgent:E),C=u&&u.userAgentData?u.userAgentData:l,z=h?qe(Ie,h):Ie,f=u&&u.userAgent==v;return this.getBrowser=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.browser),d[m]=Ue(d[r]),f&&u&&u.brave&&typeof u.brave.isBrave==S&&(d[o]="Brave"),d},this.getCPU=function(){var d={};return d[I]=l,W.call(d,v,z.cpu),d},this.getDevice=function(){var d={};return d[t]=l,d[e]=l,d[i]=l,W.call(d,v,z.device),f&&!d[i]&&C&&C.mobile&&(d[i]=c),f&&d[e]=="Macintosh"&&u&&typeof u.standalone!==O&&u.maxTouchPoints&&u.maxTouchPoints>2&&(d[e]="iPad",d[i]=s),d},this.getEngine=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.engine),d},this.getOS=function(){var d={};return d[o]=l,d[r]=l,W.call(d,v,z.os),f&&!d[o]&&C&&C.platform!="Unknown"&&(d[o]=C.platform.replace(/chrome os/i,ye).replace(/macos/i,ke)),d},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(d){return v=typeof d===j&&d.length>ie?ae(d,ie):d,this},this.setUA(v),this};M.VERSION=_,M.BROWSER=Q([o,r,m]),M.CPU=Q([I]),M.DEVICE=Q([e,t,i,T,c,k,s,P,D]),M.ENGINE=M.OS=Q([o,r]),n.exports&&(b=n.exports=M),b.UAParser=M;var B=typeof w!==O&&(w.jQuery||w.Zepto);if(B&&!B.ua){var $=new M;B.ua=$.getResult(),B.ua.get=function(){return $.getUA()},B.ua.set=function(p){$.setUA(p);var h=$.getResult();for(var u in h)B.ua[u]=h[u]}}})(typeof window=="object"?window:Ze)})(ue,ue.exports);var si=ue.exports;const bi=Je(si);function li({src:n,open:b=!1,componentDid:w,loading:l=!0,storeUrl:_,onClose:E=()=>{},onComplete:R=()=>{},onLoad:S=()=>{}},O){const y=A.useRef(null),j=Ae(m=>{var e,o,i;b&&(((e=m==null?void 0:m.data)==null?void 0:e.event)==="resourceDialog.close"&&E(),((o=m==null?void 0:m.data)==null?void 0:o.event)==="resourceDialog.complete"&&R(),((i=m==null?void 0:m.data)==null?void 0:i.event)==="resourceDialog.loaded"&&S())});return Qe(()=>{window.addEventListener("message",j)}),$e(()=>{window.removeEventListener("message",j)}),A.useImperativeHandle(O,()=>({selectBlocklet:m=>{var e;(e=y.current)!=null&&e.contentWindow&&y.current.contentWindow.postMessage({event:"resourceDialog.select",data:m,componentDid:w,storeUrl:_},"*")}})),b?a.jsx("iframe",{ref:y,src:n,title:"Resource Dialog",style:{position:"fixed",top:0,left:l?"-100vw":0,width:"100vw",height:"100vh",zIndex:9999,backgroundColor:"transparent",border:"none"}}):null}A.forwardRef(li);export{bi as U,De as W,ui as c,ti as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,G as y,P as s,n as b,m as p,q as k,r as x,M as h,O as u,l as v,p as B,o as R}from"./index-
|
|
1
|
+
import{j as e,G as y,P as s,n as b,m as p,q as k,r as x,M as h,O as u,l as v,p as B,o as R}from"./index-Dpr1-GCJ.js";import{D as U}from"./index-G0ifYRE5.js";import{u as L}from"./blocklet-BJt-raxF.js";import{C as M,M as C}from"./memory-Bv9qf5X_.js";import{B as D}from"./bundle-avatar-B6arcSZZ.js";import"./FilterList-BfkrQFl0.js";import"./Select-BioDM9Sd.js";import"./Delete-B0dIMgAO.js";import"./InputLabel-Dyg2n4KM.js";import"./TextField-BKw9m9nx.js";import"./LastPage-g6ViU_79.js";import"./index-B6BXxNti.js";import"./redux-I4eB06Ek.js";import"./Search-rqHI-c1S.js";import"./index-D5mvFHwK.js";import"./MoreVert-BB46cKFe.js";import"./chart-DVdOH_wE.js";function g({blocklet:r,cpuHistory:i,memoryHistory:n,...m}){const l=r.appRuntimeInfo||{};return e.jsx(N,{component:"div",...m,children:e.jsxs(y,{className:"page-metrics",container:!0,spacing:5,children:[e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!i.length&&e.jsx(M,{currentLoad:l.cpuUsage||0,history:i,style:{height:150}})},"cpu"),e.jsx(y,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&e.jsx(C,{used:l.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}g.propTypes={blocklet:s.object.isRequired,cpuHistory:s.arrayOf(s.shape({date:s.number,value:s.number})),memoryHistory:s.arrayOf(s.shape({date:s.number,value:s.number}))};g.defaultProps={cpuHistory:[],memoryHistory:[]};const N=b(p)``;function P(){const{t:r,locale:i}=k(),{blocklet:n,runtimeHistory:m,actions:{refreshBlocklet:l}}=L(),a=x.useMemo(()=>{const t=[];return h.forEachBlockletSync(n,(o,{ancestors:f,id:d,level:c})=>{o.runtimeInfo&&t.push({type:"blocklet",groupId:n.meta.did,groupName:h.getDisplayName(n),id:d,name:h.getDisplayName(o,!0),blocklet:n,component:o,level:c-1>=0?c-1:0,runtimeInfo:o.runtimeInfo,ancestors:f})}),t},[n]);x.useEffect(()=>{const t=setInterval(()=>{l()},1e4);return()=>{clearInterval(t)}},[]);const I=t=>B(Number(t||0),{locale:R(i)}),j=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{name:o,component:f,level:d,ancestors:c}=a[t];return e.jsxs(u,{display:"flex",alignItems:"center",pl:d*2,children:[e.jsx(D,{size:14,blocklet:f,ancestors:c}),e.jsx(u,{ml:1,children:o})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return I(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return v((o==null?void 0:o.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=a[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return e.jsxs(H,{component:"div",children:[e.jsx(p,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),n.status==="running"?[e.jsx(u,{children:e.jsx(g,{blocklet:n,cpuHistory:m.cpu,memoryHistory:m.memory})}),e.jsx(u,{mt:3,children:e.jsx(U,{title:r("analytics.detail"),className:"monitor-table",locale:i,data:a,columns:j,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:e.jsx(p,{children:r("blocklet.runtimeInfo.noRunning")})]})}P.propTypes={};const H=b(p)``;export{P as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as L}from"./codemirror.es-
|
|
1
|
+
import{a as L}from"./codemirror.es-BX7gc_SI.js";import{a as K}from"./searchcursor.es-BijniVLl.js";import{a as U}from"./dialog.es-qczXxs5i.js";import"./index-wtjGA_La.js";import"./index-Dpr1-GCJ.js";var k=Object.defineProperty,i=(x,w)=>k(x,"name",{value:w,configurable:!0});function V(x,w){return w.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(d){if(d!=="default"&&!(d in x)){var O=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(x,d,O.get?O:{enumerable:!0,get:function(){return a[d]}})}})}),Object.freeze(x)}i(V,"_mergeNamespaces");var z={exports:{}};(function(x,w){(function(a){a(L.exports,K.exports,U.exports)})(function(a){a.defineOption("search",{bottom:!1});function d(e,t){return typeof e=="string"?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}i(d,"searchOverlay");function O(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}i(O,"SearchState");function S(e){return e.state.search||(e.state.search=new O)}i(S,"getSearchState");function N(e){return typeof e=="string"&&e==e.toLowerCase()}i(N,"queryCaseInsensitive");function m(e,t,n){return e.getSearchCursor(t,n,{caseFold:N(t),multiline:!0})}i(m,"getSearchCursor");function $(e,t,n,o,r){e.openDialog(t,o,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(e)},onKeyDown:r,bottom:e.options.search.bottom})}i($,"persistentDialog");function P(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(n,o))}i(P,"dialog");function F(e,t,n,o){e.openConfirm?e.openConfirm(t,o):confirm(n)&&o[0]()}i(F,"confirmDialog");function _(e){return e.replace(/\\([nrt\\])/g,function(t,n){return n=="n"?`
|
|
2
2
|
`:n=="r"?"\r":n=="t"?" ":n=="\\"?"\\":t})}i(_,"parseString");function C(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf("i")==-1?"":"i")}catch{}else e=_(e);return(typeof e=="string"?e=="":e.test(""))&&(e=/x^/),e}i(C,"parseQuery");function R(e,t,n){t.queryText=n,t.query=C(n),e.removeOverlay(t.overlay,N(t.query)),t.overlay=d(t.query,N(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,N(t.query)))}i(R,"startSearch");function y(e,t,n,o){var r=S(e);if(r.query)return D(e,t);var s=e.getSelection()||r.lastQuery;if(s instanceof RegExp&&s.source=="x^"&&(s=null),n&&e.openDialog){var c=null,p=i(function(f,v){a.e_stop(v),f&&(f!=r.queryText&&(R(e,r,f),r.posFrom=r.posTo=e.getCursor()),c&&(c.style.opacity=1),D(e,v.shiftKey,function(h,g){var u;g.line<3&&document.querySelector&&(u=e.display.wrapper.querySelector(".CodeMirror-dialog"))&&u.getBoundingClientRect().bottom-4>e.cursorCoords(g,"window").top&&((c=u).style.opacity=.4)}))},"searchNext");$(e,Q(e),s,p,function(f,v){var h=a.keyName(f),g=e.getOption("extraKeys"),u=g&&g[h]||a.keyMap[e.getOption("keyMap")][h];u=="findNext"||u=="findPrev"||u=="findPersistentNext"||u=="findPersistentPrev"?(a.e_stop(f),R(e,S(e),v),e.execCommand(u)):(u=="find"||u=="findPersistent")&&(a.e_stop(f),p(v,f))}),o&&s&&(R(e,r,s),D(e,t))}else P(e,Q(e),"Search for:",s,function(f){f&&!r.query&&e.operation(function(){R(e,r,f),r.posFrom=r.posTo=e.getCursor(),D(e,t)})})}i(y,"doSearch");function D(e,t,n){e.operation(function(){var o=S(e),r=m(e,o.query,t?o.posFrom:o.posTo);!r.find(t)&&(r=m(e,o.query,t?a.Pos(e.lastLine()):a.Pos(e.firstLine(),0)),!r.find(t))||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()},20),o.posFrom=r.from(),o.posTo=r.to(),n&&n(r.from(),r.to()))})}i(D,"findNext");function b(e){e.operation(function(){var t=S(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}i(b,"clearSearch");function l(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var o in t)n[o]=t[o];for(var r=2;r<arguments.length;r++){var s=arguments[r];n.appendChild(typeof s=="string"?document.createTextNode(s):s)}return n}i(l,"el");function Q(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(Q,"getQueryDialog");function j(e){return l("",null," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(j,"getReplaceQueryDialog");function A(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}i(A,"getReplacementQueryDialog");function I(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",l("button",{},e.phrase("Yes"))," ",l("button",{},e.phrase("No"))," ",l("button",{},e.phrase("All"))," ",l("button",{},e.phrase("Stop")))}i(I,"getDoReplaceConfirm");function T(e,t,n){e.operation(function(){for(var o=m(e,t);o.findNext();)if(typeof t!="string"){var r=e.getRange(o.from(),o.to()).match(t);o.replace(n.replace(/\$(\d)/g,function(s,c){return r[c]}))}else o.replace(n)})}i(T,"replaceAll");function E(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||S(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),r=l("",null,l("span",{className:"CodeMirror-search-label"},o),j(e));P(e,r,o,n,function(s){s&&(s=C(s),P(e,A(e),e.phrase("Replace with:"),"",function(c){if(c=_(c),t)T(e,s,c);else{b(e);var p=m(e,s,e.getCursor("from")),f=i(function(){var h=p.from(),g;!(g=p.findNext())&&(p=m(e,s),!(g=p.findNext())||h&&p.from().line==h.line&&p.from().ch==h.ch)||(e.setSelection(p.from(),p.to()),e.scrollIntoView({from:p.from(),to:p.to()}),F(e,I(e),e.phrase("Replace?"),[function(){v(g)},f,function(){T(e,s,c)}]))},"advance"),v=i(function(h){p.replace(typeof s=="string"?c:c.replace(/\$(\d)/g,function(g,u){return h[u]})),f()},"doReplace");f()}}))})}}i(E,"replace"),a.commands.find=function(e){b(e),y(e)},a.commands.findPersistent=function(e){b(e),y(e,!1,!0)},a.commands.findPersistentNext=function(e){y(e,!1,!0,!0)},a.commands.findPersistentPrev=function(e){y(e,!0,!0,!0)},a.commands.findNext=y,a.commands.findPrev=function(e){y(e,!0)},a.commands.clearSearch=b,a.commands.replace=E,a.commands.replaceAll=function(e){E(e,!0)}})})();var B=z.exports,X=Object.freeze(V({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[z.exports]));export{X as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as M}from"./codemirror.es-
|
|
1
|
+
import{a as M}from"./codemirror.es-BX7gc_SI.js";import"./index-wtjGA_La.js";import"./index-Dpr1-GCJ.js";var $=Object.defineProperty,g=(F,P)=>$(F,"name",{value:P,configurable:!0});function D(F,P){return P.forEach(function(u){u&&typeof u!="string"&&!Array.isArray(u)&&Object.keys(u).forEach(function(s){if(s!=="default"&&!(s in F)){var L=Object.getOwnPropertyDescriptor(u,s);Object.defineProperty(F,s,L.get?L:{enumerable:!0,get:function(){return u[s]}})}})}),Object.freeze(F)}g(D,"_mergeNamespaces");var A={exports:{}};(function(F,P){(function(u){u(M.exports)})(function(u){var s=u.Pos;function L(t){var e=t.flags;return e??(t.ignoreCase?"i":"")+(t.global?"g":"")+(t.multiline?"m":"")}g(L,"regexpFlags");function O(t,e){for(var n=L(t),r=n,l=0;l<e.length;l++)r.indexOf(e.charAt(l))==-1&&(r+=e.charAt(l));return n==r?t:new RegExp(t.source,r)}g(O,"ensureFlags");function R(t){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source)}g(R,"maybeMultiline");function _(t,e,n){e=O(e,"g");for(var r=n.line,l=n.ch,a=t.lastLine();r<=a;r++,l=0){e.lastIndex=l;var i=t.getLine(r),f=e.exec(i);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}g(_,"searchRegexpForward");function z(t,e,n){if(!R(e))return _(t,e,n);e=O(e,"gm");for(var r,l=1,a=n.line,i=t.lastLine();a<=i;){for(var f=0;f<l&&!(a>i);f++){var d=t.getLine(a++);r=r==null?d:r+`
|
|
2
2
|
`+d}l=l*2,e.lastIndex=n.ch;var o=e.exec(r);if(o){var h=r.slice(0,o.index).split(`
|
|
3
3
|
`),c=o[0].split(`
|
|
4
4
|
`),v=n.line+h.length-1,m=h[h.length-1].length;return{from:s(v,m),to:s(v+c.length-1,c.length==1?m+c[0].length:c[c.length-1].length),match:o}}}}g(z,"searchRegexpForwardMultiline");function j(t,e,n){for(var r,l=0;l<=t.length;){e.lastIndex=l;var a=e.exec(t);if(!a)break;var i=a.index+a[0].length;if(i>t.length-n)break;(!r||i>r.index+r[0].length)&&(r=a),l=a.index+1}return r}g(j,"lastMatchIn");function k(t,e,n){e=O(e,"g");for(var r=n.line,l=n.ch,a=t.firstLine();r>=a;r--,l=-1){var i=t.getLine(r),f=j(i,e,l<0?0:i.length-l);if(f)return{from:s(r,f.index),to:s(r,f.index+f[0].length),match:f}}}g(k,"searchRegexpBackward");function B(t,e,n){if(!R(e))return k(t,e,n);e=O(e,"gm");for(var r,l=1,a=t.getLine(n.line).length-n.ch,i=n.line,f=t.firstLine();i>=f;){for(var d=0;d<l&&i>=f;d++){var o=t.getLine(i--);r=r==null?o:o+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,f as l,M as s,j as o,P as a}from"./index-Dpr1-GCJ.js";import{T as c,M as n,t as u}from"./table-icons-D4d7sHXC.js";import"./FilterList-BfkrQFl0.js";import"./Select-BioDM9Sd.js";import"./Delete-B0dIMgAO.js";import"./InputLabel-Dyg2n4KM.js";import"./TextField-BKw9m9nx.js";import"./LastPage-g6ViU_79.js";import"./slicedToArray-BXSVsBoG.js";import"./Search-rqHI-c1S.js";import"./actions-DMSeOF_9.js";import"./useLocalStorage-HB6kerLO.js";import"./MoreVert-BB46cKFe.js";import"./ButtonGroup-4dUIbekw.js";import"./getValidReactChildren-Bfzg_2yP.js";import"./url-evaluation-D7EkdGbI.js";import"./tag-DJbcwSVc.js";import"./ChevronLeft-BovE6bSi.js";import"./Edit-UiTtw7ED.js";import"./ChevronRight-COT0_GJ0.js";import"./DeleteOutline-BqV9pNFr.js";import"./redux-I4eB06Ek.js";import"./Skeleton-DZ26ugSB.js";import"./InputAdornment-xbC4GBmg.js";import"./index-C2qpMC0j.js";import"./memoize-one.esm-BdPwpGay.js";import"./Add-3VAJlzWu.js";import"./ArrowDropDown-DehQx6JH.js";function d({blocklet:i,...r}){const{t}=m.useContext(l),e=s.getBlockletServices(i);if(e.length===0)return o.jsx("div",{children:t("blocklet.noService")});const p=[{title:t("common.name"),field:"name"},{title:t("common.protocol"),field:"protocol"},{title:t("common.port"),field:"port"},{title:t("blocklet.upstreamPort"),field:"upstreamPort"}];return o.jsx(c,{...r,children:o.jsx(n,{columns:p,icons:{...u},options:{sorting:!1,emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",search:!1,pageSize:1e3,pageSizeOptions:[1e3]},localization:{body:{emptyDataSourceMessage:t("blocklet.noService")}},data:e})})}d.propTypes={blocklet:a.object.isRequired};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n,m as t,ax as a,P as i}from"./index-
|
|
1
|
+
import{j as n,m as t,ax as a,P as i}from"./index-Dpr1-GCJ.js";function s(e,o=10){return typeof e=="string"&&(e==null?void 0:e.length)>o?`${e.slice(0,o-1)}...${e.slice(-2)}`:e}function r({children:e,maxLength:o,sx:p,hiddenTip:u}){return(e==null?void 0:e.length)<=o?n.jsx(t,{sx:p,children:e}):u?n.jsx(t,{sx:p,children:s(e,o)}):n.jsx(a,{title:e,placement:"top",children:n.jsx(t,{sx:p,children:s(e,o)})})}r.propTypes={children:i.string.isRequired,maxLength:i.number,sx:i.object,hiddenTip:i.bool};r.defaultProps={maxLength:10,sx:null,hiddenTip:!1};export{r as S};
|