@abtnode/webapp 1.16.29-beta-1fedbcdd → 1.16.29-beta-8671c2cf
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-BHECDESg.js → Add-CVNsoK3Q.js} +1 -1
- package/dist/assets/{ArrowDropDown-BDtEjKYX.js → ArrowDropDown-BfO4dBTK.js} +1 -1
- package/dist/assets/{Autocomplete-DFC_FbfN.js → Autocomplete-BuV-jJWs.js} +1 -1
- package/dist/assets/{Breadcrumbs--tlhx_kY.js → Breadcrumbs-D-qFzMeY.js} +1 -1
- package/dist/assets/{ButtonGroup-BsGeyHPH.js → ButtonGroup-DI2J-6OG.js} +1 -1
- package/dist/assets/{CheckCircle-1AjtuJml.js → CheckCircle-ESEiLplI.js} +1 -1
- package/dist/assets/{ChevronLeft-DtF4yZw5.js → ChevronLeft-Bfi7NoHM.js} +1 -1
- package/dist/assets/{ChevronRight-Cg_Yljmq.js → ChevronRight-CviuIMvz.js} +1 -1
- package/dist/assets/{Close-Dh1S6C94.js → Close-NK6lKMNp.js} +1 -1
- package/dist/assets/{Delete-DrNN1_NC.js → Delete-D_zo8qNY.js} +1 -1
- package/dist/assets/DeleteOutline-Cxb7-O66.js +1 -0
- package/dist/assets/{Done-BQoc16v1.js → Done-D45xFqsP.js} +1 -1
- package/dist/assets/{Edit-CJIEc-k0.js → Edit-C2G3tqbR.js} +1 -1
- package/dist/assets/{EditIcon-BCZEwD1D.js → EditIcon-Ck6SNRkS.js} +1 -1
- package/dist/assets/{ExpandMore-DBZtVOu2.js → ExpandMore-CwHt_ZVc.js} +1 -1
- package/dist/assets/{FilterList-DFTqCvYV.js → FilterList-ryS3TXb6.js} +5 -5
- package/dist/assets/{Google-2ljVxqxA.js → Google-D1_AW-DT.js} +3 -3
- package/dist/assets/{Https-HIHB_mu-.js → Https-Dq8brLik.js} +1 -1
- package/dist/assets/{InputAdornment-7NSF5tvp.js → InputAdornment-vZb8BB84.js} +1 -1
- package/dist/assets/{InputLabel-BVacxmju.js → InputLabel-CFeFXjoo.js} +1 -1
- package/dist/assets/{LastPage-TCg78JGB.js → LastPage-qq7jFnRY.js} +1 -1
- package/dist/assets/{Launch-B7XdcudY.js → Launch-DM-OAIt1.js} +1 -1
- package/dist/assets/{Link-DEY_OBXK.js → Link-RUTdr8Sy.js} +1 -1
- package/dist/assets/{LoadingButton-DqL1fjxO.js → LoadingButton-CLB-X53C.js} +1 -1
- package/dist/assets/{LockIcon-C9kXDs34.js → LockIcon-PdwfNCrE.js} +1 -1
- package/dist/assets/{Loop-CU1cNNql.js → Loop-mB6aLQRu.js} +1 -1
- package/dist/assets/{MoreVert-Dt18zfj9.js → MoreVert-Cau6w3Nc.js} +1 -1
- package/dist/assets/{Pagination-BdwJr2l9.js → Pagination-BPEEzqVS.js} +1 -1
- package/dist/assets/{Public-xCpRfmFo.js → Public-RloFzq6s.js} +1 -1
- package/dist/assets/{SchemaReference.es-uz8Zc0eu.js → SchemaReference.es-Cy_VpEXU.js} +1 -1
- package/dist/assets/{Search-CDAInWfT.js → Search-BjnpBn7M.js} +1 -1
- package/dist/assets/{Select-DM4jz5L4.js → Select-DaMjgyJb.js} +2 -2
- package/dist/assets/{Skeleton-gv5XrTGj.js → Skeleton-rnv-ggbJ.js} +1 -1
- package/dist/assets/{Slider--a155kQq.js → Slider-BssF-rMN.js} +1 -1
- package/dist/assets/{Stepper-D4YMSiMG.js → Stepper-Dg253Q8k.js} +1 -1
- package/dist/assets/{TextField-Cb27WYFh.js → TextField-Csggaa8Q.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-zw2F4d4K.js → ToggleButtonGroup-BgYSvys-.js} +1 -1
- package/dist/assets/{ViewList-BN391huQ.js → ViewList-CkwZ1YpX.js} +1 -1
- package/dist/assets/{actions-Dt2hzsMg.js → actions-DDxj2Gro.js} +1 -1
- package/dist/assets/{actions-CqEyEGdi.js → actions-OnAy2baR.js} +1 -1
- package/dist/assets/{agreement-8wzPI5A2.js → agreement-BI9D0qcZ.js} +5 -5
- package/dist/assets/api-C5GhI8g0.js +1 -0
- package/dist/assets/{app-avatar-Ciqu7DzN.js → app-avatar-DxCIyKGs.js} +1 -1
- package/dist/assets/{audit-logs-DM5qrzhq.js → audit-logs-VjS1pNCu.js} +1 -1
- package/dist/assets/blocklet-xOWFDAq8.js +1 -0
- package/dist/assets/{brace-fold.es-CDyoGvqf.js → brace-fold.es-CRh3GTIu.js} +1 -1
- package/dist/assets/{bundle-avatar-DQouFsLp.js → bundle-avatar-aWqgzI5V.js} +1 -1
- package/dist/assets/{chart-CxTMvY28.js → chart-BQeVEXRi.js} +1 -1
- package/dist/assets/{click-to-copy-BWS50T1W.js → click-to-copy-DmXU88NO.js} +1 -1
- package/dist/assets/{closebrackets.es-C8aDSBEc.js → closebrackets.es-Bf8m-8Em.js} +1 -1
- package/dist/assets/{codemirror.es-DIkx1wNL.js → codemirror.es-BDjVt0Cm.js} +1 -1
- package/dist/assets/{comment.es-Bj4rfy15.js → comment.es-I8duadjp.js} +1 -1
- package/dist/assets/{config-navigation-DHVobtoo.js → config-navigation-BbCsdEr0.js} +5 -5
- package/dist/assets/{delete-confirm-COcoVEWd.js → delete-confirm-BmoetJSQ.js} +1 -1
- package/dist/assets/{detail-zEMR4hLv.js → detail-B5zaEe5r.js} +3 -3
- package/dist/assets/{dialog.es-5ELfbGGf.js → dialog.es-ld8i8Wew.js} +1 -1
- package/dist/assets/{download-CufT6M7y.js → download-DgflxEPA.js} +5 -5
- package/dist/assets/{foldgutter.es-BluK5_B7.js → foldgutter.es-BarMj_ub.js} +1 -1
- package/dist/assets/getValidReactChildren-BZgaSkVU.js +1 -0
- package/dist/assets/{hint.es-_r7Ti8Sm.js → hint.es-0PrTUWEC.js} +1 -1
- package/dist/assets/{hint.es2-0WBsR7fo.js → hint.es2-BnIe29Vj.js} +1 -1
- package/dist/assets/{iframe-D7XRwAcu.js → iframe-BR7thU6D.js} +1 -1
- package/dist/assets/{index-Dczcia8A.js → index-1o_Cpjju.js} +3 -3
- package/dist/assets/{index-BQHGajKV.js → index-2cPkOt-p.js} +1 -1
- package/dist/assets/{index-CskaRAHF.js → index-B1y0V6oI.js} +1 -1
- package/dist/assets/{index-CB-tsmEC.js → index-B2mhcMdY.js} +1 -1
- package/dist/assets/{index-LhVZUpfu.js → index-B49E46lJ.js} +1 -1
- package/dist/assets/{index-D4GRkcdU.js → index-B6AJoqpH.js} +1 -1
- package/dist/assets/{index-BdwqHkId.js → index-BZO6weCD.js} +2 -2
- package/dist/assets/{index-C8tv-5HO.js → index-B_SKfObh.js} +1 -1
- package/dist/assets/{index-D3a_ZvXr.js → index-B_X8Mnmw.js} +10 -10
- package/dist/assets/{index-CwegGsPe.js → index-B_whgYLG.js} +1 -1
- package/dist/assets/{index-DnntsDmR.js → index-Bd_QrAUa.js} +1 -1
- package/dist/assets/{index-D52n0VvB.js → index-BgORjHuZ.js} +8 -8
- package/dist/assets/{index-WqNucEB5.js → index-BoyusNjT.js} +9 -9
- package/dist/assets/{index-DCPwvqqA.js → index-BqLwmYDo.js} +1 -1
- package/dist/assets/{index-Db3MJtg9.js → index-C7EE4JGH.js} +1 -1
- package/dist/assets/{index-_k8oY6yd.js → index-CC6C3qvP.js} +1 -1
- package/dist/assets/{index-DmSo_rH-.js → index-CE9jkIu-.js} +7 -7
- package/dist/assets/{index-Ch7pvL8F.js → index-CWcagiwH.js} +1 -1
- package/dist/assets/{index-Ce_LNkxm.js → index-CYFjXOBq.js} +3 -3
- package/dist/assets/{index-DhMPr-Sf.js → index-CZVGhGxp.js} +1 -1
- package/dist/assets/{index-B8SfR5SO.js → index-Cakzfu7O.js} +5 -5
- package/dist/assets/{index-Bx-0NTkd.js → index-CbAhvH5X.js} +1 -1
- package/dist/assets/{index-DAHLtXpZ.js → index-CcAfTAex.js} +3 -3
- package/dist/assets/{index-PLNnQedK.js → index-CiYpieJi.js} +1 -1
- package/dist/assets/{index-4cUBvM9c.js → index-CnMRvtiH.js} +1 -1
- package/dist/assets/{index-Dl7kYtXZ.js → index-Cq4SZMN1.js} +1 -1
- package/dist/assets/{index-BwHAod4o.js → index-CqKpBuSh.js} +1 -1
- package/dist/assets/{index-CkgIO-Ei.js → index-Cwt3A7T1.js} +1 -1
- package/dist/assets/{index-CxOlUKp-.js → index-D-cZu7y9.js} +1 -1
- package/dist/assets/{index-BMpCIzIn.js → index-D07w-tKM.js} +1 -1
- package/dist/assets/{index-B_rtSE94.js → index-D2l1phOs.js} +10 -10
- package/dist/assets/{index-yTu8ymIr.js → index-D83fJ4ZZ.js} +24 -24
- package/dist/assets/{index-D40jtuqJ.js → index-DBffJePm.js} +1 -1
- package/dist/assets/index-DIQO71kA.js +1 -0
- package/dist/assets/index-DSdFsOP8.js +21 -0
- package/dist/assets/{index-BmgCwWx8.js → index-DUwL7XL8.js} +1 -1
- package/dist/assets/{index-_5qLstzu.js → index-DZ-9lK3d.js} +3 -3
- package/dist/assets/{index-opQnaV74.js → index-D_yahWUu.js} +1 -1
- package/dist/assets/{index-BlbV7Lbg.js → index-Df-DcHAh.js} +134 -134
- package/dist/assets/{index-BmZ7fxmH.js → index-DpBO7roy.js} +1 -1
- package/dist/assets/{index-D_4uGOGz.js → index-DwSKqGUi.js} +2 -2
- package/dist/assets/{index-D4-XA9ZN.js → index-ESizcsN5.js} +1 -1
- package/dist/assets/index-RWmdJzPs.js +54 -0
- package/dist/assets/index-n40q7b9N.js +150 -0
- package/dist/assets/{index-sv8YNhSG.js → index-r5OX1XAc.js} +1 -1
- package/dist/assets/{index.es-BYddSuDT.js → index.es-Fps_KP2M.js} +1 -1
- package/dist/assets/{index.esm-BD4d3uVr.js → index.esm-D0DYWJ0J.js} +1 -1
- package/dist/assets/{info-addon.es-BJJ5pk51.js → info-addon.es-BXSU_Qmj.js} +1 -1
- package/dist/assets/{info.es-BprPoOcs.js → info.es-HClq6Fw7.js} +1 -1
- package/dist/assets/install-from-url-Dr1wSd1A.js +1 -0
- package/dist/assets/{invitation-C4QKldyI.js → invitation-sWGyMElP.js} +7 -7
- package/dist/assets/is-path-prefix-equal-DCOkU50l.js +1 -0
- package/dist/assets/{isEqual-D_04lJVB.js → isEqual-CuSHEenP.js} +1 -1
- package/dist/assets/{item-ChafvRb9.js → item-BJWKiK8f.js} +1 -1
- package/dist/assets/{javascript.es-tZuBoyo_.js → javascript.es-B_IsyO6D.js} +1 -1
- package/dist/assets/{jump-to-line.es-DxxXKbig.js → jump-to-line.es-_IMKrBri.js} +1 -1
- package/dist/assets/{jump.es-UWy_0T4j.js → jump.es-CUOB8BsW.js} +1 -1
- package/dist/assets/{line-fPz-YMhM.js → line-ufiIkqQb.js} +4 -4
- package/dist/assets/{lint.es-Dh2OBAEf.js → lint.es-UKbO4MMD.js} +1 -1
- package/dist/assets/{lint.es2-_OaBpmrB.js → lint.es2-B11JVFra.js} +1 -1
- package/dist/assets/{lint.es3-CywO0hV7.js → lint.es3-CpxDSCc5.js} +1 -1
- package/dist/assets/{list-header-Dt_lAmlF.js → list-header-BoMAPPGv.js} +1 -1
- package/dist/assets/{log-KWjsxMN4.js → log-P6GhKjQ3.js} +1 -1
- package/dist/assets/{lottie-CdVErR-8.js → lottie-CWcrdn_r.js} +1 -1
- package/dist/assets/{matchbrackets.es-XbamjB0p.js → matchbrackets.es-BRGFHH5R.js} +1 -1
- package/dist/assets/{memory-iTIi7m4P.js → memory-r4YEj0vP.js} +1 -1
- package/dist/assets/{mode.es-CxfnkJk0.js → mode.es-BbxrAJ36.js} +1 -1
- package/dist/assets/{mode.es2-Dy3nODPA.js → mode.es2-CuBPrcRu.js} +1 -1
- package/dist/assets/{mode.es3-p9hzDihk.js → mode.es3-Bx9ZZNix.js} +1 -1
- package/dist/assets/{onlineParser.es-CpFSa7g2.js → onlineParser.es--mLtLOO_.js} +1 -1
- package/dist/assets/{overview-Cn3o0JSR.js → overview-BT359x8B.js} +2 -2
- package/dist/assets/{react-DOpT91Sx.js → react-CnToiOQq.js} +27 -27
- package/dist/assets/{redux-CrGkFo1C.js → redux-C8OOS_PY.js} +1 -1
- package/dist/assets/{runtime-DH27bqmv.js → runtime-Q3wyKIvm.js} +1 -1
- package/dist/assets/schema-B0MpML_w.js +28 -0
- package/dist/assets/{search.es-DU6gLcL9.js → search.es-CjDQ2Fhj.js} +1 -1
- package/dist/assets/{searchcursor.es-DYLQM5hy.js → searchcursor.es-kDqPKfxE.js} +1 -1
- package/dist/assets/service-DLGpb5Rp.js +1 -0
- package/dist/assets/{shorten-label-C8wzxApJ.js → shorten-label-Co8DUqmu.js} +1 -1
- package/dist/assets/{show-hint.es-aYSOCw1L.js → show-hint.es-Cbx3Ybfe.js} +1 -1
- package/dist/assets/{slicedToArray-CTprXHPZ.js → slicedToArray-C7xZ-QRT.js} +2 -2
- package/dist/assets/{spaces-a8m9RMdh.js → spaces-GvPakdRa.js} +1 -1
- package/dist/assets/{sublime.es-DWBRVmfV.js → sublime.es-C_G3_H-o.js} +1 -1
- package/dist/assets/{switch-control-DPEcexre.js → switch-control-DncyUIeb.js} +1 -1
- package/dist/assets/{table-icons-C4o-NnhS.js → table-icons-DUqTtklC.js} +2 -2
- package/dist/assets/{tag-Bdou5m1X.js → tag-gsV8sxA-.js} +1 -1
- package/dist/assets/{team-DHy_RyhB.js → team-bmjuXLbE.js} +1 -1
- package/dist/assets/toUpper-2qZllqOy.js +1 -0
- package/dist/assets/{traffic-DB2NxLKJ.js → traffic-DqNw6WbG.js} +5 -5
- package/dist/assets/{ua-parser-BSFgl4aM.js → ua-parser-Dzgi3kyq.js} +1 -1
- package/dist/assets/{url-evaluation-C3ISZkf1.js → url-evaluation-B1QGhHSk.js} +1 -1
- package/dist/assets/{url-join-DiQ25GxI.js → url-join-C9rCXo0P.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-D54Dv1sp.js → use-blocklet-info-for-connect-did-spaces-DNT7pV9H.js} +1 -1
- package/dist/assets/{useLocalStorage-DjVTK9Hv.js → useLocalStorage-DQQZU_hU.js} +1 -1
- package/dist/assets/{util-Cymy87Bf.js → util-CY7XCQ7b.js} +1 -1
- package/dist/assets/{wait-container-D3CNDB0j.js → wait-container-CRYt3bDb.js} +1 -1
- package/dist/assets/{withStyles-CeJ3MZXD.js → withStyles-B37CppbG.js} +1 -1
- package/dist/assets/{wrap-locale-OY8SqaYo.js → wrap-locale-D3aDFEon.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BbEJp5Yv.js +0 -1
- package/dist/assets/DeleteOutline-DcoGpr4d.js +0 -1
- package/dist/assets/api-BNsi_m3T.js +0 -1
- package/dist/assets/blocklet-B866XgcM.js +0 -1
- package/dist/assets/getValidReactChildren-C6TVYF1_.js +0 -1
- package/dist/assets/index-8Whrl_cz.js +0 -1
- package/dist/assets/index-BL91wUxY.js +0 -21
- package/dist/assets/index-CXHazti0.js +0 -54
- package/dist/assets/index-CuAczo7P.js +0 -177
- package/dist/assets/install-from-url-ZYnVPJZA.js +0 -1
- package/dist/assets/is-path-prefix-equal-BVP7ErMV.js +0 -1
- package/dist/assets/service-BE-W-CQl.js +0 -1
- package/dist/assets/toUpper-CAcCx7d-.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as D}from"./index-BlbV7Lbg.js";var fe=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var T=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>T(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return T(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||T(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var ce=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!T(e))return t;const u=ce(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},j=e=>typeof e=="boolean",Te=e=>/^\w*$/.test(e),st=e=>ce(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Te(s)?[s]:st(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=T(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}if(h==="__proto__")return;e[h]=m,e=e[h]}return e};const _e={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},W={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var it=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==W.all&&(s._proxyFormState[y]=!u||W.all),t&&(t[y]=!0),e[y]}});return n},B=e=>T(e)&&!Object.keys(e).length,ut=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||W.all))},he=e=>Array.isArray(e)?e:[e],lt=(e,s,t)=>!e||!s||e===s||he(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Ue(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Ue({disabled:u,next:v=>m.current&<(_.current,v.name,a)&&ut(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),it(y,t,S.current,!1)}var $=e=>typeof e=="string",at=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Ue({disabled:a,subject:t._subjects.values,next:_=>{lt(h.current,_.name,y)&&S(p(at(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}function Et(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...j(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,H)=>{const L=f(n._fields,N);L&&L._f&&(L._f.mount=H)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...j(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:_e.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:_e.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(Et(e));var St=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===W.onSubmit,isOnBlur:e===W.onBlur,isOnChange:e===W.onChange,isOnAll:e===W.all,isOnTouch:e===W.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const oe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;oe(h,s)}else T(h)&&oe(h,s)}}};var kt=(e,s,t)=>{const u=ce(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",be=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ve=e=>$(e),pe=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(ve(e)||Array.isArray(e)&&e.every(ve)||j(e)&&!e)return{type:t,message:ve(e)?e:"",ref:s}}var se=e=>T(e)&&!Ve(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:H,name:L,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,L);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(j(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=fe(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||be(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=St.bind(null,L,t,k),ye=(b,F,C,U=z.maxLength,q=z.minLength)=>{const I=b?F:C;k[L]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||j(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=ve(h)?{value:!!h,message:h}:se(h);if(b&&(k[L]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const C=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(C.value)||(b=q>C.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(C.value)&&V&&(b=ue?I(V)>I(C.value):le?V>C.value:q>new Date(C.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,C.message,U.message,z.max,z.min),!t))return G(k[L].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),C=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((C||U)&&(ye(C,b.message,F.message),!t))return G(k[L].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(Ve(b)&&!V.match(b)&&(k[L]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(H){if(X(H)){const b=await H(V,s),F=Xe(b,K);if(F&&(k[L]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(T(H)){let b={};for(const F in H){if(!B(b)&&!t)break;const C=Xe(await H[F](V,s),K,F);C&&(b={...C,...P(F,C.message)},G(C.message),t&&(k[L]=b))}if(!B(b)&&(k[L]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function R(e,s){const t=Array.isArray(s)?s:Te(s)?[s]:st(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(T(u)&&B(u)||Array.isArray(u)&&Rt(u))&&R(e,t.slice(0,-1)),e}var Se=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Fe=e=>O(e)||!et(e);function Z(e,s){if(Fe(e)||Fe(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||T(a)&&T(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Tt=e=>pe(e)||fe(e),ke=e=>be(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Ae(e,s={}){const t=Array.isArray(e);if(T(e)||t)for(const u in e)Array.isArray(e[u])||T(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Ae(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(T(e)||u)for(const n in e)Array.isArray(e[n])||T(e[n])&&!ct(e[n])?w(s)||Fe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Ae(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):fe(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Lt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:Ve(e)?e.source:T(e)?Ve(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Te(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!ce(f(e,s)).length&&R(e,s);const Mt={mode:W.onSubmit,reValidateMode:W.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=T(s.defaultValues)||T(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Se(),array:Se(),state:Se()},N=Ke(s.mode),H=Ke(s.reValidateMode),L=s.criteriaMode===W.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):R(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},E=!!(f(u,r)&&f(u,r)._f&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=E||Z(f(n,r),i);g=!!(!E&&f(t.dirtyFields,r)),M||E?R(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&j(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):R(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&j(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Lt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):R(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const E=await Ye(c,a,L,s.shouldUseNativeValidation&&!i,A);if(Q([d]),E[o.name]&&(l.valid=!1,i))break;!i&&(f(E,o.name)?A?kt(t.errors,E,o.name):x(t.errors,o.name,E[o.name]):R(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!ke(l)):!ke(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>at(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),C=r=>ce(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=be(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Fe(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,E;const M=o(),re=r.type===_e.BLUR||r.type===_e.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,H,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Ee=ee(l,M,re,!1),Vt=!B(Ee)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Ee});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,E=B(je)}}else Q([l],!0),A=(await Ye(c,a,L,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?E=!1:_.isValid&&(E=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,E,A,Ee))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=he(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&oe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),error:f((i||t).errors,r),isValidating:!!f(t.validatingFields,r),isTouched:!!f((i||t).touchedFields,r)}),gt=r=>{r&&he(r).forEach(i=>R(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref,c=f(t.errors,r)||{},{ref:o,message:g,type:A,...E}=c;x(t.errors,r,{...E,...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?he(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(R(u,l),R(a,l)),!i.keepError&&R(t.errors,l),!i.keepDirty&&R(t.dirtyFields,l),!i.keepTouched&&R(t.touchedFields,l),!i.keepIsValidating&&R(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&R(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(j(r)&&y.mount||r){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=j(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Tt(o),A=l._f.refs||[];if(g?A.find(E=>E===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(ke),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&oe(u,le,h.mount),vt=r=>{j(r)&&(v.state.next({disabled:r}),oe(u,(i,l)=>{const d=f(u,l);d&&(i.disabled=d._f.disabled||r,Array.isArray(d._f.refs)&&d._f.refs.forEach(c=>{c.disabled=d._f.disabled||r}))},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(R(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||R(t.touchedFields,r),i.keepDirty||(R(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(R(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const E=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(be(E)){const M=E.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?[]:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:C,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Ue({subject:a._subjects.state,next:y=>{ut(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=it(u,a),s.current}export{Wt as C,wt as a,Ht as u};
|
|
1
|
+
import{bb as D}from"./index-Df-DcHAh.js";var fe=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var T=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>T(e)&&e.target?fe(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return T(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||T(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var ce=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!T(e))return t;const u=ce(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},j=e=>typeof e=="boolean",Te=e=>/^\w*$/.test(e),st=e=>ce(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Te(s)?[s]:st(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=T(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}if(h==="__proto__")return;e[h]=m,e=e[h]}return e};const _e={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},W={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var it=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==W.all&&(s._proxyFormState[y]=!u||W.all),t&&(t[y]=!0),e[y]}});return n},B=e=>T(e)&&!Object.keys(e).length,ut=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||W.all))},he=e=>Array.isArray(e)?e:[e],lt=(e,s,t)=>!e||!s||e===s||he(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Ue(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Ue({disabled:u,next:v=>m.current&<(_.current,v.name,a)&&ut(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),it(y,t,S.current,!1)}var $=e=>typeof e=="string",at=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Ue({disabled:a,subject:t._subjects.values,next:_=>{lt(h.current,_.name,y)&&S(p(at(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}function Et(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...j(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,H)=>{const L=f(n._fields,N);L&&L._f&&(L._f.mount=H)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...j(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:_e.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:_e.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(Et(e));var St=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===W.onSubmit,isOnBlur:e===W.onBlur,isOnChange:e===W.onChange,isOnAll:e===W.all,isOnTouch:e===W.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const oe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;oe(h,s)}else T(h)&&oe(h,s)}}};var kt=(e,s,t)=>{const u=ce(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",be=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ve=e=>$(e),pe=e=>e.type==="radio",Ve=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(ve(e)||Array.isArray(e)&&e.every(ve)||j(e)&&!e)return{type:t,message:ve(e)?e:"",ref:s}}var se=e=>T(e)&&!Ve(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:H,name:L,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,L);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(j(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=fe(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||be(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=St.bind(null,L,t,k),ye=(b,F,C,U=z.maxLength,q=z.minLength)=>{const I=b?F:C;k[L]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||j(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=ve(h)?{value:!!h,message:h}:se(h);if(b&&(k[L]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const C=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(C.value)||(b=q>C.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(C.value)&&V&&(b=ue?I(V)>I(C.value):le?V>C.value:q>new Date(C.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,C.message,U.message,z.max,z.min),!t))return G(k[L].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),C=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((C||U)&&(ye(C,b.message,F.message),!t))return G(k[L].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(Ve(b)&&!V.match(b)&&(k[L]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(H){if(X(H)){const b=await H(V,s),F=Xe(b,K);if(F&&(k[L]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(T(H)){let b={};for(const F in H){if(!B(b)&&!t)break;const C=Xe(await H[F](V,s),K,F);C&&(b={...C,...P(F,C.message)},G(C.message),t&&(k[L]=b))}if(!B(b)&&(k[L]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function R(e,s){const t=Array.isArray(s)?s:Te(s)?[s]:st(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(T(u)&&B(u)||Array.isArray(u)&&Rt(u))&&R(e,t.slice(0,-1)),e}var Se=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Fe=e=>O(e)||!et(e);function Z(e,s){if(Fe(e)||Fe(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||T(a)&&T(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Tt=e=>pe(e)||fe(e),ke=e=>be(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Ae(e,s={}){const t=Array.isArray(e);if(T(e)||t)for(const u in e)Array.isArray(e[u])||T(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Ae(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(T(e)||u)for(const n in e)Array.isArray(e[n])||T(e[n])&&!ct(e[n])?w(s)||Fe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Ae(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):fe(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Lt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:Ve(e)?e.source:T(e)?Ve(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Te(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!ce(f(e,s)).length&&R(e,s);const Mt={mode:W.onSubmit,reValidateMode:W.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=T(s.defaultValues)||T(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Se(),array:Se(),state:Se()},N=Ke(s.mode),H=Ke(s.reValidateMode),L=s.criteriaMode===W.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):R(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},E=!!(f(u,r)&&f(u,r)._f&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=E||Z(f(n,r),i);g=!!(!E&&f(t.dirtyFields,r)),M||E?R(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&j(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):R(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&j(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Lt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):R(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const E=await Ye(c,a,L,s.shouldUseNativeValidation&&!i,A);if(Q([d]),E[o.name]&&(l.valid=!1,i))break;!i&&(f(E,o.name)?A?kt(t.errors,E,o.name):x(t.errors,o.name,E[o.name]):R(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!ke(l)):!ke(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>at(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),C=r=>ce(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=be(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?fe(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Fe(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,E;const M=o(),re=r.type===_e.BLUR||r.type===_e.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,H,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Ee=ee(l,M,re,!1),Vt=!B(Ee)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Ee});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,E=B(je)}}else Q([l],!0),A=(await Ye(c,a,L,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?E=!1:_.isValid&&(E=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,E,A,Ee))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=he(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&oe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),error:f((i||t).errors,r),isValidating:!!f(t.validatingFields,r),isTouched:!!f((i||t).touchedFields,r)}),gt=r=>{r&&he(r).forEach(i=>R(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref,c=f(t.errors,r)||{},{ref:o,message:g,type:A,...E}=c;x(t.errors,r,{...E,...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?he(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(R(u,l),R(a,l)),!i.keepError&&R(t.errors,l),!i.keepDirty&&R(t.dirtyFields,l),!i.keepTouched&&R(t.touchedFields,l),!i.keepIsValidating&&R(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&R(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(j(r)&&y.mount||r){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=j(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Tt(o),A=l._f.refs||[];if(g?A.find(E=>E===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(ke),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&oe(u,le,h.mount),vt=r=>{j(r)&&(v.state.next({disabled:r}),oe(u,(i,l)=>{const d=f(u,l);d&&(i.disabled=d._f.disabled||r,Array.isArray(d._f.refs)&&d._f.refs.forEach(c=>{c.disabled=d._f.disabled||r}))},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(R(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||R(t.touchedFields,r),i.keepDirty||(R(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(R(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const E=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(be(E)){const M=E.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?[]:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:C,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Ue({subject:a._subjects.state,next:y=>{ut(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=it(u,a),s.current}export{Wt as C,wt as a,Ht as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as i}from"./codemirror.es-
|
|
1
|
+
import{C as i}from"./codemirror.es-BDjVt0Cm.js";import"./index-Cakzfu7O.js";import"./index-Df-DcHAh.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as h}from"./codemirror.es-
|
|
1
|
+
import{C as h}from"./codemirror.es-BDjVt0Cm.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-Cy_VpEXU.js";import"./info-addon.es-BXSU_Qmj.js";import{Y as A,r as F}from"./index-Cakzfu7O.js";import"./index-Df-DcHAh.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as O,j as m,dE as Bt,cP as P,dF as Ht,F as Ft,dG as Gt,b as Wt,O as qt,dH as Kt,bm as Vt,t as zt,r as D,q as Yt,M as Xt,W as Jt,m as Qt,D as Zt,B as ft,C as pt,w as kt,J as te,x as ee,bn as ie,K as re}from"./index-Df-DcHAh.js";import{W as ne}from"./tag-gsV8sxA-.js";import{s as Et,n as se}from"./schema-B0MpML_w.js";import{I as mt}from"./index-B49E46lJ.js";import{T as oe}from"./TextField-Csggaa8Q.js";import{S as ae,a as le,b as he}from"./Stepper-Dg253Q8k.js";function ce({mode:t,...e}){return t==="development"?m.jsx(ne,{type:"primary",...e,children:"DEV"}):null}ce.propTypes={mode:O.string.isRequired};var _t={},ht={exports:{}},jt={exports:{}},X=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+St(t)}}},gt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:St};Object.keys(X).forEach(function(t){Object.keys(gt).forEach(function(e){X[t][e]||(X[t][e]=gt[e])}),X[t].protocols_re=RegExp("^("+X[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function St(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ct=jt.exports,dt=Ct,q=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},ue=j;function j(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(dt[t]).forEach(function(g){c[g]=dt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}j.prototype.hash=function(){return this.committish?"#"+this.committish:""};j.prototype._fill=function(t,e){if(t){var i=q({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=q(q({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};j.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};j.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};j.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,q({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};j.prototype.docs=function(t){return this._fill(this.docstemplate,t)};j.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};j.prototype.https=function(t){return this._fill(this.httpstemplate,t)};j.prototype.git=function(t){return this._fill(this.gittemplate,t)};j.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};j.prototype.path=function(t){return this._fill(this.pathtemplate,t)};j.prototype.tarball=function(t){var e=q({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};j.prototype.file=function(t,e){return this._fill(this.filetemplate,q({path:t},e))};j.prototype.getDefaultRepresentation=function(){return this.default};j.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var nt,vt;function fe(){return vt||(vt=1,nt=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),nt}var pe=l;l.Node=N;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ge(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)de(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=me(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function me(t,e,i){var r=e===t.head?new N(i,null,e,t):new N(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ge(t,e){t.tail=new N(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function de(t,e){t.head=new N(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function N(t,e,i,r){if(!(this instanceof N))return new N(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{fe()(l)}catch{}const ve=pe,M=Symbol("max"),U=Symbol("length"),G=Symbol("lengthCalculator"),Q=Symbol("allowStale"),$=Symbol("maxAge"),I=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),At=Symbol("updateAgeOnGet"),st=()=>1;class ye{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||st;if(this[G]=typeof i!="function"?st:i,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[I]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[At]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,J(this)}get max(){return this[M]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,J(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=st),e!==this[G]&&(this[G]=e,this[U]=0,this[b].forEach(i=>{i.length=this[G](i.value,i.key),this[U]+=i.length})),J(this)}get lengthCalculator(){return this[G]}get length(){return this[U]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;bt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;bt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new ve,this[U]=0}dump(){return this[b].map(e=>k(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[$],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[G](i,e);if(this[w].has(e)){if(a>this[M])return K(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[yt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[U]+=a-g.length,g.length=a,this.get(e),J(this),!0}const p=new be(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[U]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),J(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!k(this,i)}get(e){return ot(this,e,!0)}peek(e){return ot(this,e,!1)}pop(){const e=this[b].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>ot(this,i,!1))}}const ot=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(k(t,s)){if(K(t,r),!t[Q])return}else i&&(t[At]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},k=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[$]&&i>t[$]},J=t=>{if(t[U]>t[M])for(let e=t[b].tail;t[U]>t[M]&&e!==null;){const i=e.prev;K(t,e),e=i}},K=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[U]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class be{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const bt=(t,e,i,r)=>{let s=i.value;k(t,s)&&(K(t,i),t[Q]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var xe=ye,lt=Bt,xt=Ct,Ee=ht.exports=ue,_e=xe,at=new _e({max:1e3}),je={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Se(t){return je[t]||t.slice(0,-1)}var Ce={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};ht.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return at.has(i)||at.set(i,Ae(t,e)),at.get(i)}};function Ae(t,e){if(!(t==null||t==="")){var i=Re(we(t)?"github:"+t:t),r=Pe(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(p){try{var c=xt[p],g=null;r.auth&&Ce[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var H=c.pathmatch,C=r.path.match(H);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=Se(r.protocol)}return new Ee(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function we(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Re(t){var e=lt.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Pe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=lt.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new lt.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var Ie=ht.exports,B={},R={},wt=P&&P.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const Oe=wt(Ht),Ue=wt(Ft),Te=Et,{NODE_SERVICES:W}=Ue.default,Z={},ct=t=>{Z[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:Te.authConfigSchema,default:{}});Z[W.AUTH_SERVICE]={...Z[W.AUTH],meta:{...Z[W.AUTH].meta,name:W.AUTH_SERVICE}};const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=Z[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Pt=(t,e,{validate:i}={})=>{const r=Rt(t),s=(0,Oe.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};R.getServiceConfig=Pt;const It=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=It;const Ot=(t,e)=>{const i=[e];return e===W.AUTH&&i.push(W.AUTH_SERVICE),(t||[]).find(r=>i.includes(r.name))};R.findService=Ot;R.default={getServiceConfig:Pt,getDefaultServiceConfig:It,findService:Ot,setService:ct};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const De=Et,Le=R,Me=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,Le.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Me;const Ut=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,De.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=Ut;B.default=Ut;(function(t){var e=P&&P.__createBinding||(Object.create?function(n,o,d,_){_===void 0&&(_=d);var v=Object.getOwnPropertyDescriptor(o,d);(!v||("get"in v?!o.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return o[d]}}),Object.defineProperty(n,_,v)}:function(n,o,d,_){_===void 0&&(_=d),n[_]=o[d]}),i=P&&P.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=P&&P.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var d in n)d!=="default"&&Object.prototype.hasOwnProperty.call(n,d)&&e(o,n,d);return i(o,n),o},s=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Gt),p=r(Ie),c=Wt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=se,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const H=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=H;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(d=>{Array.isArray(n[d])&&(n[d]=n[d].map(o))}),n),V=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",d=n.url||n.web,_=d?` (${d})`:"",v=n.email||n.mail,y=v?` <${v}>`:"";return o+y+_};t.formatPerson=V;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),d=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),v={};return o&&o[0].trim()&&(v.name=o[0].trim()),_&&([,v.email]=_),d&&([,v.url]=d),v};t.parsePerson=T;const F=n=>(A(n,V),A(n,T),n);t.fixPerson=F;const E=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",v=({type:y="web",name:Y,path:tt="/",protocol:et="http",port:it=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:Y,path:tt,prefix:_,port:it,protocol:et})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&v({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{v({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=E;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:H,fixPerson:F,fixTags:C,fixName:z,formatPerson:V,parsePerson:T,fixInterfaces:E,fixService:g.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return m.jsxs(qt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:O.object.isRequired,locale:O.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Vt(),{api:c}=zt(),[g,x]=D.useState(!1),[f,S]=D.useState(""),{t:h,locale:H}=Yt(),C={dist:{}},[A,V]=D.useState(t),[T,F]=D.useState(t?1:0),[E,z]=D.useState(C),[n,o]=D.useState(!1),[d,_]=D.useState({}),v=s==="component",y=v?!0:!t,Y=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:$t,registryUrl:Nt}=await p.getBlockletMetaFromUrl({input:{url:u}});z(rt),_({inStore:$t,registryUrl:Nt,inputUrl:A.trim()})}catch(u){console.error(u);const rt=`Blocklet Install failed: ${re(u)}`;S(rt),r(u)}finally{x(!1)}},tt=()=>{if(v){i({meta:E,...d}),e();return}x(!0),o(!0)},et=()=>{x(!1),o(!1),i({meta:E,...d}),e()},it=()=>{x(!1),o(!1)};D.useEffect(()=>{t&&Y()},[t]);const Lt=[{name:h("common.name"),value:Xt.getDisplayName({meta:E},!0)},{name:h("common.version"),value:E.version},{name:h("common.did"),value:m.jsx(Jt,{did:E.did})},{name:h("common.author"),value:E.owner?m.jsx(Tt,{owner:E.owner,locale:H}):_t.formatPerson(E.author)},{name:h("blocklet.dist.downloadLink"),value:E.dist.tarball}],Mt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(pt,{})}):E.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Lt.map(u=>u.name===h("common.did")?m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ut=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Qt,{component:"div",children:m.jsx(oe,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),V(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),Y(),F(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{Y(),F(1)}},{label:h("blocklet.fromUrl.step1"),body:Mt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?F(u=>u-1):e()},onConfirm:()=>{tt()}}],L=ut[T];return m.jsxs(m.Fragment,{children:[m.jsxs(Zt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ft,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ft,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&T===0&&m.jsx(pt,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ae,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:u})=>m.jsx(le,{children:m.jsx(he,{children:u})},u))}),m.jsx(kt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),E&&n&&m.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:E.title,wt:ie(E),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:it})]})}Dt.propTypes={defaultUrl:O.string,onCancel:O.func.isRequired,onSuccess:O.func.isRequired,onError:O.func,mode:O.oneOf(["install","component"]),handleText:O.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,Dt as I,Tt as a,_t as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bK as T,j as i,P as r,n as f,r as m,f as $,D as
|
|
1
|
+
import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,aO as E,cB as M,ci as P,a1 as O,cC as B,cD as V,cE as K,cq as W,cF as I,cG as N,as as z,O as L,ch as X,C as G}from"./index-Df-DcHAh.js";import{R as J}from"./index-B_whgYLG.js";import{C as A}from"./index-Bd_QrAUa.js";import{d as Y}from"./CheckCircle-ESEiLplI.js";import{w as Q}from"./wrap-locale-D3aDFEon.js";const Z=T(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext($),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(F,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
max-width: 350px;
|
|
4
4
|
margin: 30px auto;
|
|
@@ -39,7 +39,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
39
39
|
line-height: 18px;
|
|
40
40
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
41
41
|
}
|
|
42
|
-
`,ie=new
|
|
42
|
+
`,ie=new H;function R({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var g;const{t,locale:l}=j(),{connectApi:u}=U(),{getPassportId:x}=W();let s;typeof window<"u"&&(s=(g=window==null?void 0:window.blocklet)==null?void 0:g.componentId);const n=E({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:s,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});M(async()=>{var v;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.id=e.inviteId),p&&((v=e==null?void 0:e.receiver)!=null&&v.did)){n.loading=!0;try{const y=await ie.user.getUserPublicInfo({did:e.receiver.did});y!=null&&y.sourceAppPid&&(n.extraParams.sourceAppPid=y.sourceAppPid)}finally{n.loading=!1}}});const _=P(()=>{u.close()}),h=P((...d)=>{u.close(),a(...d)}),w=P(()=>{var d,v;if(typeof c=="function"){c();return}p?u.openPopup({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:O(window.location.origin,V,B),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_},{locale:l}):u.open({action:o,className:"connect",forceConnected:((v=e==null?void 0:e.receiver)==null?void 0:v.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_})});return i.jsxs(se,{children:[i.jsx(A,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:w,children:t("invite.receive")}),i.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),K(e.expireDate,l)]})]})}R.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};R.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const se=f.div`
|
|
43
43
|
text-align: center;
|
|
44
44
|
.invite-receive__logo-wrapper {
|
|
45
45
|
display: inline-flex;
|
|
@@ -109,7 +109,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
109
109
|
.invite-receive__link {
|
|
110
110
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
111
111
|
}
|
|
112
|
-
`;function
|
|
112
|
+
`;function D({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=I(e.info.chainHost,e.inviter.did,"account"),t=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(te,{children:[i.jsx(z,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),i.jsx("div",{className:"invite-user__message",children:t})]})}D.propTypes={invitation:r.object.isRequired};const te=f.div`
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-direction: column;
|
|
115
115
|
justify-content: center;
|
|
@@ -132,7 +132,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
132
132
|
.invite-user__link {
|
|
133
133
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
134
134
|
}
|
|
135
|
-
`;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=
|
|
135
|
+
`;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=I(e.info.chainHost,e.inviter.did,"account"),t=a==="receiver"?e.receiver:e.inviter,l=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:t.fullName},"name"):t.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(ne,{children:[i.jsx(L,{pt:1,color:"success.main",children:i.jsx(Y,{style:{fontSize:80}})}),i.jsx("div",{className:"invite-user__message",children:l})]})}C.propTypes={invitation:r.object.isRequired,type:r.oneOf(["inviter","receiver"])};C.defaultProps={type:"inviter"};const ne=f.div`
|
|
136
136
|
display: flex;
|
|
137
137
|
flex-direction: column;
|
|
138
138
|
justify-content: center;
|
|
@@ -155,7 +155,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
155
155
|
.invite-user__link {
|
|
156
156
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
157
157
|
}
|
|
158
|
-
`;function
|
|
158
|
+
`;function q({invitation:e,...a}){return i.jsxs(oe,{...a,children:[i.jsx(z,{did:e.info.did,src:e.info.logo,style:{flexShrink:0}}),i.jsxs("div",{className:"invite-app__content",children:[i.jsx("div",{className:"invite-app__title",children:e.info.name}),i.jsx("div",{className:"invite-app__description",children:e.info.description})]})]})}q.propTypes={invitation:r.object.isRequired};const oe=f.div`
|
|
159
159
|
display: flex;
|
|
160
160
|
justify-content: space-between;
|
|
161
161
|
align-items: center;
|
|
@@ -179,7 +179,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
179
179
|
color: #999;
|
|
180
180
|
overflow: hidden;
|
|
181
181
|
}
|
|
182
|
-
`;function
|
|
182
|
+
`;function S({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var w,g,d;const s=X(e);if(s!=null&&s.loading)return i.jsx(G,{});if(s!=null&&s.error)return i.jsx(J,{status:"404",title:(g=(w=s==null?void 0:s.error)==null?void 0:w.response)==null?void 0:g.data,description:""});const n=x==="success"||((d=s==null?void 0:s.data)==null?void 0:d.status)==="success",_=n?C:D,h=n?k:R;return i.jsx(ae,{className:"page-invite__wrapper",children:s!=null&&s.data?i.jsxs(i.Fragment,{children:[i.jsx(q,{invitation:s.data}),i.jsxs(L,{className:"page-invite__card",children:[i.jsx(_,{invitation:s.data}),i.jsx(b,{invitation:s.data,action:u,createPassportSvg:c,passportColor:a}),i.jsx(h,{invitation:s.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]})]}):null})}S.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};S.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const ae=f.div`
|
|
183
183
|
max-width: 460px;
|
|
184
184
|
max-height: 650px;
|
|
185
185
|
min-height: 450px;
|
|
@@ -197,4 +197,4 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as H,cH as M,q as j,t as U,a
|
|
|
197
197
|
.page-invite__app {
|
|
198
198
|
margin-top: 20px;
|
|
199
199
|
}
|
|
200
|
-
`,me=Q(
|
|
200
|
+
`,me=Q(S);export{me as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aK as i,aL as s,j as o,g as u,fs as f}from"./index-Df-DcHAh.js";var e={},l=s;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=o;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 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 8"}),"InfoOutlined");const a=f;var x=(t,r)=>a(t)===a(r);const h=u(x);export{n as d,h as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r,
|
|
1
|
+
import{g as r,eV as t}from"./index-Df-DcHAh.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bN as ie,f4 as ci,f5 as ui,r as j,f6 as fi,f7 as pi,bP as nr,j as u,dL as di,bU as or,f8 as mi,bV as hi,bR as vi,bL as gi,bS as yi,ck as $e,ch as Un,b8 as bi,ci as Re,f9 as wi,fa as Si,fb as Oi,fc as Ot,b9 as Pi,bi as Pt,a4 as Ht,c$ as xi,aK as fe,aL as pe,g as Wn,fd as ji,fe as Ii,cO as Wr,P as y,s as Y,C as se,bc as bt,ar as Vn,an as Gn,av as _i,aO as Qn,dN as ce,dQ as $i,ff as Ci,H as wr,fg as Ei,cI as Ai,fh as ki,O as V,f1 as Vr,az as Ti,aA as Jn,aS as Ri,eA as Yn,m as J,Q as Di,eU as Mi,dR as Ni,dg as Bi,dO as Fi,dP as Li,S as ir,D as Xn,fi as qi,fj as zi,a1 as Ie,fk as Ki,cF as Hi,as as Ui,B as Mt,q as Le,a7 as Wi,a8 as Zn,aD as Vi,fl as Gr,a9 as Gi,bm as Sr,w as Qi,J as Ji,cC as Yi,K as Ue,A as Pe,b as Xi,t as Zi,a$ as ea,ad as ta,cv as eo,F as ra,ce as na,eN as oa,W as ia,ax as aa}from"./index-BlbV7Lbg.js";import{s as la}from"./index-Ce_LNkxm.js";import{E as sa}from"./index-CxOlUKp-.js";import{d as ca}from"./Search-CDAInWfT.js";import{S as ua}from"./index-8Whrl_cz.js";import{O as fa}from"./Select-DM4jz5L4.js";import{I as Qr}from"./InputAdornment-7NSF5tvp.js";import{y as pa,g as da,N as ma}from"./preact.module-B1z5cdvs.js";import{d as ha}from"./Add-BHECDESg.js";import{T as va}from"./TextField-Cb27WYFh.js";import{d as to}from"./Launch-B7XdcudY.js";import{d as ga}from"./Done-BQoc16v1.js";import{D as ro}from"./DeleteOutline-BbEJp5Yv.js";import{C as ya}from"./delete-confirm-COcoVEWd.js";import{u as ba}from"./blocklet-B866XgcM.js";import{d as wa}from"./MoreVert-Dt18zfj9.js";import{B as Jr}from"./ButtonGroup-BsGeyHPH.js";const Sa=(e,t)=>e.filter(r=>t.includes(r)),qe=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Sa(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const a=t[i];a!==void 0&&r((l,s)=>{n===i?Object.assign(l,s):l[e.up(i)]=s},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function ue(e){return e?`Level${e}`:""}function wt(e){return e.unstable_level>0&&e.container}function no(e){return function(r){return`var(--Grid-${r}Spacing${ue(e.unstable_level)})`}}function Or(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${ue(e.unstable_level-1)})`}}function Pr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${ue(e.unstable_level-1)})`}const Oa=({theme:e,ownerState:t})=>{const r=no(t),n={};return qe(e.breakpoints,t.gridSize,(o,i)=>{let a={};i===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / ${Pr(t)}${wt(t)?` + ${r("column")}`:""})`}),o(n,a)}),n},Pa=({theme:e,ownerState:t})=>{const r={};return qe(e.breakpoints,t.gridOffset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / ${Pr(t)})`}),n(r,i)}),r},xa=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=wt(t)?{[`--Grid-columns${ue(t.unstable_level)}`]:Pr(t)}:{"--Grid-columns":12};return qe(e.breakpoints,t.columns,(n,o)=>{n(r,{[`--Grid-columns${ue(t.unstable_level)}`]:o})}),r},ja=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:r("row")}:{};return qe(e.breakpoints,t.rowSpacing,(o,i)=>{var a;o(n,{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},Ia=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:r("column")}:{};return qe(e.breakpoints,t.columnSpacing,(o,i)=>{var a;o(n,{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},_a=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return qe(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},$a=({ownerState:e})=>{const t=no(e),r=Or(e);return ie({minWidth:0,boxSizing:"border-box"},e.container&&ie({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||wt(e))&&ie({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ca=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},Ea=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},Aa=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],ka=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Ta=ci(),Ra=ui("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Da(e){return mi({props:e,name:"MuiGrid",defaultTheme:Ta})}function Ma(e={}){const{createStyledComponent:t=Ra,useThemeProps:r=Da,componentName:n="MuiGrid"}=e,o=j.createContext(void 0),i=(s,c)=>{const{container:p,direction:f,spacing:d,wrap:v,gridSize:m}=s,h={root:["root",p&&"container",v!=="wrap"&&`wrap-xs-${String(v)}`,...Aa(f),...Ca(m),...p?Ea(d,c.breakpoints.keys[0]):[]]};return hi(h,w=>vi(n,w),{})},a=t(xa,Ia,ja,Oa,_a,$a,Pa),l=j.forwardRef(function(c,p){var f,d,v,m,h,w,b,g;const S=fi(),O=r(c),P=pi(O),C=j.useContext(o),{className:$,children:E,columns:A=12,container:x=!1,component:k="div",direction:M="row",wrap:q="wrap",spacing:G=0,rowSpacing:T=G,columnSpacing:N=G,disableEqualOverflow:Q,unstable_level:I=0}=P,D=nr(P,ka);let F=Q;I&&Q!==void 0&&(F=c.disableEqualOverflow);const X={},ye={},Hr={};Object.entries(D).forEach(([ne,_e])=>{S.breakpoints.values[ne]!==void 0?X[ne]=_e:S.breakpoints.values[ne.replace("Offset","")]!==void 0?ye[ne.replace("Offset","")]=_e:Hr[ne]=_e});const oi=(f=c.columns)!=null?f:I?void 0:A,ii=(d=c.spacing)!=null?d:I?void 0:G,ai=(v=(m=c.rowSpacing)!=null?m:c.spacing)!=null?v:I?void 0:T,li=(h=(w=c.columnSpacing)!=null?w:c.spacing)!=null?h:I?void 0:N,Ur=ie({},P,{level:I,columns:oi,container:x,direction:M,wrap:q,spacing:ii,rowSpacing:ai,columnSpacing:li,gridSize:X,gridOffset:ye,disableEqualOverflow:(b=(g=F)!=null?g:C)!=null?b:!1,parentDisableEqualOverflow:C}),si=i(Ur,S);let Vt=u.jsx(a,ie({ref:p,as:k,ownerState:Ur,className:or(si.root,$)},Hr,{children:j.Children.map(E,ne=>{if(j.isValidElement(ne)&&di(ne,["Grid"])){var _e;return j.cloneElement(ne,{unstable_level:(_e=ne.props.unstable_level)!=null?_e:I+1})}return ne})}));return F!==void 0&&F!==(C??!1)&&(Vt=u.jsx(o.Provider,{value:F,children:Vt})),Vt});return l.muiName="Grid",l}const Na=Ma({createStyledComponent:gi("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>yi({props:e,name:"MuiGrid2"})}),Gt=Na;var Ba=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Fa=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},La=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},qa=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,o=t.threshold,i=o===void 0?100:o,a=t.reloadDeps,l=a===void 0?[]:a,s=t.manual,c=t.onBefore,p=t.onSuccess,f=t.onError,d=t.onFinally,v=$e(j.useState(),2),m=v[0],h=v[1],w=$e(j.useState(!1),2),b=w[0],g=w[1],S=j.useMemo(function(){return n?n(m):!1},[m]),O=Un(function(T){return bi(void 0,void 0,void 0,function(){var N,Q,I;return Pi(this,function(D){switch(D.label){case 0:return[4,e(T)];case 1:return N=D.sent(),h(T?Pt(Pt({},N),{list:Ot(Ot([],$e((I=T.list)!==null&&I!==void 0?I:[]),!1),$e(N.list),!1)}):Pt(Pt({},N),{list:Ot([],$e((Q=N.list)!==null&&Q!==void 0?Q:[]),!1)})),[2,N]}})})},{manual:s,onFinally:function(T,N,Q){g(!1),d==null||d(N,Q)},onBefore:function(){return c==null?void 0:c()},onSuccess:function(T){setTimeout(function(){G()}),p==null||p(T)},onError:function(T){return f==null?void 0:f(T)}}),P=O.loading,C=O.error,$=O.run,E=O.runAsync,A=O.cancel,x=Re(function(){S||(g(!0),$(m))}),k=Re(function(){return S?Promise.reject():(g(!0),E(m))}),M=function(){return g(!1),$()},q=function(){return g(!1),E()},G=function(){var T=wi(r);if(T){T=T===document?document.documentElement:T;var N=Ba(T),Q=Fa(T),I=La(T);Q-N<=I+i&&x()}};return Si("scroll",function(){P||b||G()},{target:r}),Oi(function(){$()},Ot([],$e(l),!1)),{data:m,loading:!b&&P,error:C,loadingMore:b,noMore:S,loadMore:x,loadMoreAsync:k,reload:Re(M),reloadAsync:Re(q),mutate:h,cancel:A}};const za=qa,Ka=["name"],Ha=["children","className","clone","component"];function Ua(e,t){const r={};return Object.keys(e).forEach(n=>{t.indexOf(n)===-1&&(r[n]=e[n])}),r}function Wa(e){return(r,n={})=>{const{name:o}=n,i=nr(n,Ka);let a=o;const s=Ht(typeof r=="function"?f=>({root:d=>r(ie({theme:f},d))}):{root:r},ie({Component:e,name:o||e.displayName,classNamePrefix:a},i));let c;r.filterProps&&(c=r.filterProps,delete r.filterProps),r.propTypes&&(r.propTypes,delete r.propTypes);const p=j.forwardRef(function(d,v){const{children:m,className:h,clone:w,component:b}=d,g=nr(d,Ha),S=s(d),O=or(S.root,h);let P=g;if(c&&(P=Ua(P,c)),w)return j.cloneElement(m,ie({className:or(m.props.className,O)},P));if(typeof m=="function")return m(ie({className:O},P));const C=b||e;return u.jsx(C,ie({ref:v,className:O},P,{children:m}))});return xi(p,e),p}}const ed="blocklet-add-component-registry",td="server-add-registry";var xr={},Va=pe;Object.defineProperty(xr,"__esModule",{value:!0});var oo=xr.default=void 0,Ga=Va(fe()),Qa=u;oo=xr.default=(0,Ga.default)((0,Qa.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort");var jr={},Ja=pe;Object.defineProperty(jr,"__esModule",{value:!0});var io=jr.default=void 0,Ya=Ja(fe()),Xa=u;io=jr.default=(0,Ya.default)((0,Xa.jsx)("path",{d:"M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25m6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8"}),"Face");var Za=ji,Yr=Ii;function el(e,t,r,n){return e==null?[]:(Yr(t)||(t=t==null?[]:[t]),r=n?void 0:r,Yr(r)||(r=r==null?[]:[r]),Za(e,t,r))}var tl=el;const rl=Wn(tl);var ao={exports:{}},lo={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},so={exports:{}},nl=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},ol=nl,il=Array.prototype.concat,al=Array.prototype.slice,Xr=so.exports=function(t){for(var r=[],n=0,o=t.length;n<o;n++){var i=t[n];ol(i)?r=il.call(r,al.call(i)):r.push(i)}return r};Xr.wrap=function(e){return function(){return e(Xr(arguments))}};var ll=so.exports,We=lo,St=ll,co=Object.hasOwnProperty,uo=Object.create(null);for(var Qt in We)co.call(We,Qt)&&(uo[We[Qt]]=Qt);var ee=ao.exports={to:{},get:{}};ee.get=function(e){var t=e.substring(0,3).toLowerCase(),r,n;switch(t){case"hsl":r=ee.get.hsl(e),n="hsl";break;case"hwb":r=ee.get.hwb(e),n="hwb";break;default:r=ee.get.rgb(e),n="rgb";break}return r?{model:n,value:r}:null};ee.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^(\w+)$/,a=[0,0,0,1],l,s,c;if(l=e.match(r)){for(c=l[2],l=l[1],s=0;s<3;s++){var p=s*2;a[s]=parseInt(l.slice(p,p+2),16)}c&&(a[3]=parseInt(c,16)/255)}else if(l=e.match(t)){for(l=l[1],c=l[3],s=0;s<3;s++)a[s]=parseInt(l[s]+l[s],16);c&&(a[3]=parseInt(c+c,16)/255)}else if(l=e.match(n)){for(s=0;s<3;s++)a[s]=parseInt(l[s+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(s=0;s<3;s++)a[s]=Math.round(parseFloat(l[s+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(i))?l[1]==="transparent"?[0,0,0,0]:co.call(We,l[1])?(a=We[l[1]],a[3]=1,a):null:null;for(s=0;s<3;s++)a[s]=ve(a[s],0,255);return a[3]=ve(a[3],0,1),a};ee.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.to.hex=function(){var e=St(arguments);return"#"+xt(e[0])+xt(e[1])+xt(e[2])+(e[3]<1?xt(Math.round(e[3]*255)):"")};ee.to.rgb=function(){var e=St(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ee.to.rgb.percent=function(){var e=St(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};ee.to.hsl=function(){var e=St(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ee.to.hwb=function(){var e=St(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ee.to.keyword=function(e){return uo[e.slice(0,3)]};function ve(e,t,r){return Math.min(Math.max(t,e),r)}function xt(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var sl=ao.exports;const Ge=lo,fo={};for(const e of Object.keys(Ge))fo[Ge[e]]=e;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var po=_;for(const e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:t}),Object.defineProperty(_[e],"labels",{value:r})}_.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=i-o;let l,s;i===o?l=0:t===i?l=(r-n)/a:r===i?l=2+(n-t)/a:n===i&&(l=4+(t-r)/a),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+i)/2;return i===o?s=0:c<=.5?s=a/(i+o):s=a/(2-i-o),[l,s*100,c*100]};_.rgb.hsv=function(e){let t,r,n,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),p=c-Math.min(a,l,s),f=function(d){return(c-d)/6/p+1/2};return p===0?(o=0,i=0):(i=p/c,t=f(a),r=f(l),n=f(s),a===c?o=n-r:l===c?o=1/3+t-n:s===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,c*100]};_.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=_.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};_.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,a=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[i*100,a*100,l*100,o*100]};function cl(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}_.rgb.keyword=function(e){const t=fo[e];if(t)return t;let r=1/0,n;for(const o of Object.keys(Ge)){const i=Ge[o],a=cl(e,i);a<r&&(r=a,n=o)}return n};_.keyword.rgb=function(e){return Ge[e]};_.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,a=t*.0193+r*.1192+n*.9505;return[o*100,i*100,a*100]};_.rgb.lab=function(e){const t=_.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*n-16,a=500*(r-n),l=200*(n-o);return[i,a,l]};_.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,a;if(r===0)return a=n*255,[a,a,a];n<.5?o=n*(1+r):o=n+r-n*r;const l=2*n-o,s=[0,0,0];for(let c=0;c<3;c++)i=t+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?a=l+(o-l)*6*i:2*i<1?a=o:3*i<2?a=l+(o-l)*(2/3-i)*6:a=l,s[c]=a*255;return s};_.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;const a=(n+r)/2,l=n===0?2*o/(i+o):2*r/(n+r);return[t,l*100,a*100]};_.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),l=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,s,a];case 1:return[l,n,a];case 2:return[a,n,s];case 3:return[a,l,n];case 4:return[s,a,n];case 5:return[n,a,l]}};_.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,a;a=(2-r)*n;const l=(2-r)*o;return i=r*o,i/=l<=1?l:2-l,i=i||0,a/=2,[t,i*100,a*100]};_.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const a=Math.floor(6*t),l=1-n;i=6*t-a,a&1&&(i=1-i);const s=r+i*(l-r);let c,p,f;switch(a){default:case 6:case 0:c=l,p=s,f=r;break;case 1:c=s,p=l,f=r;break;case 2:c=r,p=l,f=s;break;case 3:c=r,p=s,f=l;break;case 4:c=s,p=r,f=l;break;case 5:c=l,p=r,f=s;break}return[c*255,p*255,f*255]};_.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),a=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[i*255,a*255,l*255]};_.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,a;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,a=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[o*255,i*255,a*255]};_.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const o=116*r-16,i=500*(t-r),a=200*(r-n);return[o,i,a]};_.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let o,i,a;i=(t+16)/116,o=r/500+i,a=i-n/200;const l=i**3,s=o**3,c=a**3;return i=l>.008856?l:(i-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,o*=95.047,i*=100,a*=108.883,[o,i,a]};_.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);const a=Math.sqrt(r*r+n*n);return[t,a,o]};_.lch.lab=function(e){const t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),a=r*Math.sin(o);return[t,i,a]};_.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let i=t===null?_.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(a+=60),a};_.hsv.ansi16=function(e){return _.rgb.ansi16(_.hsv.rgb(e),e[2])};_.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};_.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};_.ansi256.rgb=function(e){if(e>=232){const i=(e-232)*10+8;return[i,i,i]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};_.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};_.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));const n=parseInt(r,16),o=n>>16&255,i=n>>8&255,a=n&255;return[o,i,a]};_.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),a=o-i;let l,s;return a<1?l=i/(1-a):l=0,a<=0?s=0:o===t?s=(r-n)/a%6:o===r?s=2+(n-t)/a:s=4+(t-r)/a,s/=6,s%=1,[s*360,a*100,l*100]};_.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};_.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};_.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const o=[0,0,0],i=t%1*6,a=i%1,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-r)*n,[(r*o[0]+s)*255,(r*o[1]+s)*255,(r*o[2]+s)*255]};_.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};_.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};_.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};_.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,o=n-t;let i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};_.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};_.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};_.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};_.gray.hsl=function(e){return[0,0,e[0]]};_.gray.hsv=_.gray.hsl;_.gray.hwb=function(e){return[0,100,e[0]]};_.gray.cmyk=function(e){return[0,0,0,e[0]]};_.gray.lab=function(e){return[e[0],0,0]};_.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};_.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Nt=po;function ul(){const e={},t=Object.keys(Nt);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function fl(e){const t=ul(),r=[e];for(t[e].distance=0;r.length;){const n=r.pop(),o=Object.keys(Nt[n]);for(let i=o.length,a=0;a<i;a++){const l=o[a],s=t[l];s.distance===-1&&(s.distance=t[n].distance+1,s.parent=n,r.unshift(l))}}return t}function pl(e,t){return function(r){return t(e(r))}}function dl(e,t){const r=[t[e].parent,e];let n=Nt[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=pl(Nt[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var ml=function(e){const t=fl(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){const a=n[i];t[a].parent!==null&&(r[a]=dl(a,t))}return r};const ar=po,hl=ml,ke={},vl=Object.keys(ar);function gl(e){const t=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function yl(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const o=e(r);if(typeof o=="object")for(let i=o.length,a=0;a<i;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}vl.forEach(e=>{ke[e]={},Object.defineProperty(ke[e],"channels",{value:ar[e].channels}),Object.defineProperty(ke[e],"labels",{value:ar[e].labels});const t=hl(e);Object.keys(t).forEach(n=>{const o=t[n];ke[e][n]=yl(o),ke[e][n].raw=gl(o)})});var bl=ke;const Te=sl,Z=bl,mo=["keyword","gray","hex"],lr={};for(const e of Object.keys(Z))lr[[...Z[e].labels].sort().join("")]=e;const Bt={};function H(e,t){if(!(this instanceof H))return new H(e,t);if(t&&t in mo&&(t=null),t&&!(t in Z))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof H)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const o=Te.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,n=Z[this.model].channels,this.color=o.value.slice(0,n),this.valpha=typeof o.value[n]=="number"?o.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Z[this.model].channels;const o=Array.prototype.slice.call(e,0,n);this.color=sr(o,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const i=o.sort().join("");if(!(i in lr))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=lr[i];const{labels:a}=Z[this.model],l=[];for(r=0;r<a.length;r++)l.push(e[a[r]]);this.color=sr(l)}if(Bt[this.model])for(n=Z[this.model].channels,r=0;r<n;r++){const o=Bt[this.model][r];o&&(this.color[r]=o(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}H.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Te.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to[t.model](r)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Z[this.model],{labels:r}=Z[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new H([...this.color.map(Sl(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new H([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:L("rgb",0,K(255)),green:L("rgb",1,K(255)),blue:L("rgb",2,K(255)),hue:L(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:L("hsl",1,K(100)),lightness:L("hsl",2,K(100)),saturationv:L("hsv",1,K(100)),value:L("hsv",2,K(100)),chroma:L("hcg",1,K(100)),gray:L("hcg",2,K(100)),white:L("hwb",1,K(100)),wblack:L("hwb",2,K(100)),cyan:L("cmyk",0,K(100)),magenta:L("cmyk",1,K(100)),yellow:L("cmyk",2,K(100)),black:L("cmyk",3,K(100)),x:L("xyz",0,K(95.047)),y:L("xyz",1,K(100)),z:L("xyz",2,K(108.833)),l:L("lab",0,K(100)),a:L("lab",1),b:L("lab",2),keyword(e){return e!==void 0?new H(e):Z[this.model].keyword(this.color)},hex(e){return e!==void 0?new H(e):Te.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new H(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Te.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const o=n/255;t[r]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return H.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),o=t===void 0?.5:t,i=2*o-1,a=r.alpha()-n.alpha(),l=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return H.rgb(l*r.red()+s*n.red(),l*r.green()+s*n.green(),l*r.blue()+s*n.blue(),r.alpha()*o+n.alpha()*(1-o))}};for(const e of Object.keys(Z)){if(mo.includes(e))continue;const{channels:t}=Z[e];H.prototype[e]=function(...r){return this.model===e?new H(this):r.length>0?new H(r,e):new H([...Ol(Z[this.model][e].raw(this.color)),this.valpha],e)},H[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=sr(r,t)),new H(n,e)}}function wl(e,t){return Number(e.toFixed(t))}function Sl(e){return function(t){return wl(t,e)}}function L(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(Bt[n]||(Bt[n]=[]))[t]=r;return e=e[0],function(n){let o;return n!==void 0?(r&&(n=r(n)),o=this[e](),o.color[t]=n,o):(o=this[e]().color[t],r&&(o=r(o)),o)}}function K(e){return function(t){return Math.max(0,Math.min(e,t))}}function Ol(e){return Array.isArray(e)?e:[e]}function sr(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}var Pl=H;const xl=Wn(Pl);var Ir={},jl=pe;Object.defineProperty(Ir,"__esModule",{value:!0});var ho=Ir.default=void 0,Il=jl(fe()),_l=u;ho=Ir.default=(0,Il.default)((0,_l.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var _r={},$l=pe;Object.defineProperty(_r,"__esModule",{value:!0});var vo=_r.default=void 0,Cl=$l(fe()),El=u;vo=_r.default=(0,Cl.default)((0,El.jsx)("path",{d:"M7 6h10l-5.01 6.3zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltOutlined");function Al(){var e=new Map;function t(r){var n=r.root,o=r.rootMargin,i=r.threshold,a=e.get(n);a||(a=new Map,e.set(n,a));var l=JSON.stringify({rootMargin:o,threshold:i}),s=a.get(l);if(!s){var c=new Map,p=new IntersectionObserver(function(f){f.forEach(function(d){var v=c.get(d.target);v==null||v(d)})},{root:n,rootMargin:o,threshold:i});s={observer:p,entryCallbacks:c},a.set(l,s)}return{observe:function(d,v){var m,h;(m=s)==null||m.entryCallbacks.set(d,v),(h=s)==null||h.observer.observe(d)},unobserve:function(d){var v,m;(v=s)==null||v.entryCallbacks.delete(d),(m=s)==null||m.observer.unobserve(d)}}}return{getObserver:t}}var kl="0px",Tl=[0],Rl=Al();function Dl(e){var t,r,n=(t=e==null?void 0:e.rootMargin)!=null?t:kl,o=(r=e==null?void 0:e.threshold)!=null?r:Tl,i=j.useRef(null),a=j.useRef(null),l=j.useRef(null),s=j.useState(),c=s[0],p=s[1],f=j.useCallback(function(){var h=i.current;if(!h){p(void 0);return}var w=Rl.getObserver({root:a.current,rootMargin:n,threshold:o});w.observe(h,function(b){p(b)}),l.current=w},[n,o]),d=j.useCallback(function(){var h=l.current,w=i.current;w&&(h==null||h.unobserve(w)),l.current=null},[]),v=j.useCallback(function(h){d(),i.current=h,f()},[f,d]),m=j.useCallback(function(h){d(),a.current=h,f()},[f,d]);return[v,{entry:c,rootRef:m}]}function cr(){return cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cr.apply(this,arguments)}function Ml(e){var t,r=Dl(e),n=r[0],o=r[1],i=!!((t=o.entry)!=null&&t.isIntersecting),a=j.useState(i),l=a[0],s=a[1];return i&&!l&&s(!0),[n,cr({},o,{isVisible:i,wasEverVisible:l})]}var Nl=100;function Bl(e){var t=e.loading,r=e.hasNextPage,n=e.onLoadMore,o=e.rootMargin,i=e.disabled,a=e.delayInMs,l=a===void 0?Nl:a,s=Ml({rootMargin:o}),c=s[0],p=s[1],f=p.rootRef,d=p.isVisible,v=!i&&!t&&d&&r;return j.useEffect(function(){if(v){var m=setTimeout(function(){n()},l);return function(){clearTimeout(m)}}},[n,v,l]),[c,{rootRef:f}]}function He(e){return{current:e}}function Ft(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r&&clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,o)},t)}}function Qe(e){return e.reduce(function(t,r){return t.concat(r)},[])}var Fl=0;function go(){return"autocomplete-".concat(Fl++)}function Lt(e,t){return t.reduce(function(r,n){return r&&r[n]},e)}function Je(e){return e.collections.length===0?0:e.collections.reduce(function(t,r){return t+r.items.length},0)}function Zr(e){return e!==Object(e)}function yo(e,t){if(e===t)return!0;if(Zr(e)||Zr(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(!(o in t)||!yo(e[o],t[o]))return!1}return!0}var qt=function(){};function Ll(e){if(typeof window<"u")return e({window})}var bo="1.17.0",ql=[{segment:"autocomplete-core",version:bo}];function en(e){var t=e.item,r=e.items,n=r===void 0?[]:r;return{index:t.__autocomplete_indexName,items:[t],positions:[1+n.findIndex(function(o){return o.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function zl(e,t){return Wl(e)||Ul(e,t)||Hl(e,t)||Kl()}function Kl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{bN as ie,f7 as ci,f8 as ui,r as j,f9 as fi,fa as pi,bP as nr,j as u,dN as di,bU as or,fb as mi,bV as hi,bR as vi,bL as gi,bS as yi,ck as $e,ch as Un,b8 as bi,ci as Re,fc as wi,fd as Si,fe as Oi,ff as Ot,b9 as Pi,bi as Pt,a4 as Ht,cW as xi,aK as fe,aL as pe,g as Wn,fg as ji,fh as Ii,cH as Wr,P as y,s as Y,C as se,bc as bt,ar as Vn,an as Gn,av as _i,aO as Qn,dP as ce,dS as $i,fi as Ci,H as wr,fj as Ei,cB as Ai,fk as ki,O as V,f4 as Vr,az as Ti,aA as Jn,aS as Ri,eC as Yn,m as J,Q as Di,eW as Mi,dT as Ni,db as Bi,dQ as Fi,dR as Li,S as ir,D as Xn,fl as qi,fm as zi,a1 as Ie,fn as Ki,cy as Hi,as as Ui,B as Mt,q as Le,a7 as Wi,a8 as Zn,aD as Vi,fo as Gr,a9 as Gi,bm as Sr,w as Qi,J as Ji,cv as Yi,K as Ue,A as Pe,b as Xi,t as Zi,a$ as ea,ad as ta,dz as eo,F as ra,ce as na,eP as oa,W as ia,ax as aa}from"./index-Df-DcHAh.js";import{s as la}from"./index-CYFjXOBq.js";import{E as sa}from"./index-D-cZu7y9.js";import{d as ca}from"./Search-BjnpBn7M.js";import{S as ua}from"./index-DIQO71kA.js";import{O as fa}from"./Select-DaMjgyJb.js";import{I as Qr}from"./InputAdornment-vZb8BB84.js";import{y as pa,g as da,N as ma}from"./preact.module-B1z5cdvs.js";import{d as ha}from"./Add-CVNsoK3Q.js";import{T as va}from"./TextField-Csggaa8Q.js";import{d as to}from"./Launch-DM-OAIt1.js";import{d as ga}from"./Done-D45xFqsP.js";import{d as ro}from"./DeleteOutline-Cxb7-O66.js";import{C as ya}from"./delete-confirm-BmoetJSQ.js";import{u as ba}from"./blocklet-xOWFDAq8.js";import{d as wa}from"./MoreVert-Cau6w3Nc.js";import{B as Jr}from"./ButtonGroup-DI2J-6OG.js";const Sa=(e,t)=>e.filter(r=>t.includes(r)),qe=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,l)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,l):a[e.up(e.keys[i])]=l)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Sa(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const a=t[i];a!==void 0&&r((l,s)=>{n===i?Object.assign(l,s):l[e.up(i)]=s},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function ue(e){return e?`Level${e}`:""}function wt(e){return e.unstable_level>0&&e.container}function no(e){return function(r){return`var(--Grid-${r}Spacing${ue(e.unstable_level)})`}}function Or(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${ue(e.unstable_level-1)})`}}function Pr(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${ue(e.unstable_level-1)})`}const Oa=({theme:e,ownerState:t})=>{const r=no(t),n={};return qe(e.breakpoints,t.gridSize,(o,i)=>{let a={};i===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / ${Pr(t)}${wt(t)?` + ${r("column")}`:""})`}),o(n,a)}),n},Pa=({theme:e,ownerState:t})=>{const r={};return qe(e.breakpoints,t.gridOffset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / ${Pr(t)})`}),n(r,i)}),r},xa=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=wt(t)?{[`--Grid-columns${ue(t.unstable_level)}`]:Pr(t)}:{"--Grid-columns":12};return qe(e.breakpoints,t.columns,(n,o)=>{n(r,{[`--Grid-columns${ue(t.unstable_level)}`]:o})}),r},ja=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:r("row")}:{};return qe(e.breakpoints,t.rowSpacing,(o,i)=>{var a;o(n,{[`--Grid-rowSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},Ia=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=Or(t),n=wt(t)?{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:r("column")}:{};return qe(e.breakpoints,t.columnSpacing,(o,i)=>{var a;o(n,{[`--Grid-columnSpacing${ue(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},_a=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return qe(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},$a=({ownerState:e})=>{const t=no(e),r=Or(e);return ie({minWidth:0,boxSizing:"border-box"},e.container&&ie({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||wt(e))&&ie({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ca=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},Ea=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},Aa=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],ka=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Ta=ci(),Ra=ui("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Da(e){return mi({props:e,name:"MuiGrid",defaultTheme:Ta})}function Ma(e={}){const{createStyledComponent:t=Ra,useThemeProps:r=Da,componentName:n="MuiGrid"}=e,o=j.createContext(void 0),i=(s,c)=>{const{container:p,direction:f,spacing:d,wrap:v,gridSize:m}=s,h={root:["root",p&&"container",v!=="wrap"&&`wrap-xs-${String(v)}`,...Aa(f),...Ca(m),...p?Ea(d,c.breakpoints.keys[0]):[]]};return hi(h,w=>vi(n,w),{})},a=t(xa,Ia,ja,Oa,_a,$a,Pa),l=j.forwardRef(function(c,p){var f,d,v,m,h,w,b,g;const S=fi(),O=r(c),P=pi(O),C=j.useContext(o),{className:$,children:E,columns:A=12,container:x=!1,component:k="div",direction:M="row",wrap:q="wrap",spacing:G=0,rowSpacing:T=G,columnSpacing:N=G,disableEqualOverflow:Q,unstable_level:I=0}=P,D=nr(P,ka);let F=Q;I&&Q!==void 0&&(F=c.disableEqualOverflow);const X={},ye={},Hr={};Object.entries(D).forEach(([ne,_e])=>{S.breakpoints.values[ne]!==void 0?X[ne]=_e:S.breakpoints.values[ne.replace("Offset","")]!==void 0?ye[ne.replace("Offset","")]=_e:Hr[ne]=_e});const oi=(f=c.columns)!=null?f:I?void 0:A,ii=(d=c.spacing)!=null?d:I?void 0:G,ai=(v=(m=c.rowSpacing)!=null?m:c.spacing)!=null?v:I?void 0:T,li=(h=(w=c.columnSpacing)!=null?w:c.spacing)!=null?h:I?void 0:N,Ur=ie({},P,{level:I,columns:oi,container:x,direction:M,wrap:q,spacing:ii,rowSpacing:ai,columnSpacing:li,gridSize:X,gridOffset:ye,disableEqualOverflow:(b=(g=F)!=null?g:C)!=null?b:!1,parentDisableEqualOverflow:C}),si=i(Ur,S);let Vt=u.jsx(a,ie({ref:p,as:k,ownerState:Ur,className:or(si.root,$)},Hr,{children:j.Children.map(E,ne=>{if(j.isValidElement(ne)&&di(ne,["Grid"])){var _e;return j.cloneElement(ne,{unstable_level:(_e=ne.props.unstable_level)!=null?_e:I+1})}return ne})}));return F!==void 0&&F!==(C??!1)&&(Vt=u.jsx(o.Provider,{value:F,children:Vt})),Vt});return l.muiName="Grid",l}const Na=Ma({createStyledComponent:gi("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>yi({props:e,name:"MuiGrid2"})}),Gt=Na;var Ba=function(e){return e===document||e===document.documentElement||e===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):e.scrollTop},Fa=function(e){return e.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},La=function(e){return e.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},qa=function(e,t){t===void 0&&(t={});var r=t.target,n=t.isNoMore,o=t.threshold,i=o===void 0?100:o,a=t.reloadDeps,l=a===void 0?[]:a,s=t.manual,c=t.onBefore,p=t.onSuccess,f=t.onError,d=t.onFinally,v=$e(j.useState(),2),m=v[0],h=v[1],w=$e(j.useState(!1),2),b=w[0],g=w[1],S=j.useMemo(function(){return n?n(m):!1},[m]),O=Un(function(T){return bi(void 0,void 0,void 0,function(){var N,Q,I;return Pi(this,function(D){switch(D.label){case 0:return[4,e(T)];case 1:return N=D.sent(),h(T?Pt(Pt({},N),{list:Ot(Ot([],$e((I=T.list)!==null&&I!==void 0?I:[]),!1),$e(N.list),!1)}):Pt(Pt({},N),{list:Ot([],$e((Q=N.list)!==null&&Q!==void 0?Q:[]),!1)})),[2,N]}})})},{manual:s,onFinally:function(T,N,Q){g(!1),d==null||d(N,Q)},onBefore:function(){return c==null?void 0:c()},onSuccess:function(T){setTimeout(function(){G()}),p==null||p(T)},onError:function(T){return f==null?void 0:f(T)}}),P=O.loading,C=O.error,$=O.run,E=O.runAsync,A=O.cancel,x=Re(function(){S||(g(!0),$(m))}),k=Re(function(){return S?Promise.reject():(g(!0),E(m))}),M=function(){return g(!1),$()},q=function(){return g(!1),E()},G=function(){var T=wi(r);if(T){T=T===document?document.documentElement:T;var N=Ba(T),Q=Fa(T),I=La(T);Q-N<=I+i&&x()}};return Si("scroll",function(){P||b||G()},{target:r}),Oi(function(){$()},Ot([],$e(l),!1)),{data:m,loading:!b&&P,error:C,loadingMore:b,noMore:S,loadMore:x,loadMoreAsync:k,reload:Re(M),reloadAsync:Re(q),mutate:h,cancel:A}};const za=qa,Ka=["name"],Ha=["children","className","clone","component"];function Ua(e,t){const r={};return Object.keys(e).forEach(n=>{t.indexOf(n)===-1&&(r[n]=e[n])}),r}function Wa(e){return(r,n={})=>{const{name:o}=n,i=nr(n,Ka);let a=o;const s=Ht(typeof r=="function"?f=>({root:d=>r(ie({theme:f},d))}):{root:r},ie({Component:e,name:o||e.displayName,classNamePrefix:a},i));let c;r.filterProps&&(c=r.filterProps,delete r.filterProps),r.propTypes&&(r.propTypes,delete r.propTypes);const p=j.forwardRef(function(d,v){const{children:m,className:h,clone:w,component:b}=d,g=nr(d,Ha),S=s(d),O=or(S.root,h);let P=g;if(c&&(P=Ua(P,c)),w)return j.cloneElement(m,ie({className:or(m.props.className,O)},P));if(typeof m=="function")return m(ie({className:O},P));const C=b||e;return u.jsx(C,ie({ref:v,className:O},P,{children:m}))});return xi(p,e),p}}const ed="blocklet-add-component-registry",td="server-add-registry";var xr={},Va=pe;Object.defineProperty(xr,"__esModule",{value:!0});var oo=xr.default=void 0,Ga=Va(fe()),Qa=u;oo=xr.default=(0,Ga.default)((0,Qa.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort");var jr={},Ja=pe;Object.defineProperty(jr,"__esModule",{value:!0});var io=jr.default=void 0,Ya=Ja(fe()),Xa=u;io=jr.default=(0,Ya.default)((0,Xa.jsx)("path",{d:"M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25m6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8"}),"Face");var Za=ji,Yr=Ii;function el(e,t,r,n){return e==null?[]:(Yr(t)||(t=t==null?[]:[t]),r=n?void 0:r,Yr(r)||(r=r==null?[]:[r]),Za(e,t,r))}var tl=el;const rl=Wn(tl);var ao={exports:{}},lo={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},so={exports:{}},nl=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},ol=nl,il=Array.prototype.concat,al=Array.prototype.slice,Xr=so.exports=function(t){for(var r=[],n=0,o=t.length;n<o;n++){var i=t[n];ol(i)?r=il.call(r,al.call(i)):r.push(i)}return r};Xr.wrap=function(e){return function(){return e(Xr(arguments))}};var ll=so.exports,We=lo,St=ll,co=Object.hasOwnProperty,uo=Object.create(null);for(var Qt in We)co.call(We,Qt)&&(uo[We[Qt]]=Qt);var ee=ao.exports={to:{},get:{}};ee.get=function(e){var t=e.substring(0,3).toLowerCase(),r,n;switch(t){case"hsl":r=ee.get.hsl(e),n="hsl";break;case"hwb":r=ee.get.hwb(e),n="hwb";break;default:r=ee.get.rgb(e),n="rgb";break}return r?{model:n,value:r}:null};ee.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^(\w+)$/,a=[0,0,0,1],l,s,c;if(l=e.match(r)){for(c=l[2],l=l[1],s=0;s<3;s++){var p=s*2;a[s]=parseInt(l.slice(p,p+2),16)}c&&(a[3]=parseInt(c,16)/255)}else if(l=e.match(t)){for(l=l[1],c=l[3],s=0;s<3;s++)a[s]=parseInt(l[s]+l[s],16);c&&(a[3]=parseInt(c+c,16)/255)}else if(l=e.match(n)){for(s=0;s<3;s++)a[s]=parseInt(l[s+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(s=0;s<3;s++)a[s]=Math.round(parseFloat(l[s+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(i))?l[1]==="transparent"?[0,0,0,0]:co.call(We,l[1])?(a=We[l[1]],a[3]=1,a):null:null;for(s=0;s<3;s++)a[s]=ve(a[s],0,255);return a[3]=ve(a[3],0,1),a};ee.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var n=parseFloat(r[4]),o=(parseFloat(r[1])%360+360)%360,i=ve(parseFloat(r[2]),0,100),a=ve(parseFloat(r[3]),0,100),l=ve(isNaN(n)?1:n,0,1);return[o,i,a,l]}return null};ee.to.hex=function(){var e=St(arguments);return"#"+xt(e[0])+xt(e[1])+xt(e[2])+(e[3]<1?xt(Math.round(e[3]*255)):"")};ee.to.rgb=function(){var e=St(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};ee.to.rgb.percent=function(){var e=St(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};ee.to.hsl=function(){var e=St(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};ee.to.hwb=function(){var e=St(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};ee.to.keyword=function(e){return uo[e.slice(0,3)]};function ve(e,t,r){return Math.min(Math.max(t,e),r)}function xt(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var sl=ao.exports;const Ge=lo,fo={};for(const e of Object.keys(Ge))fo[Ge[e]]=e;const _={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var po=_;for(const e of Object.keys(_)){if(!("channels"in _[e]))throw new Error("missing channels property: "+e);if(!("labels"in _[e]))throw new Error("missing channel labels property: "+e);if(_[e].labels.length!==_[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=_[e];delete _[e].channels,delete _[e].labels,Object.defineProperty(_[e],"channels",{value:t}),Object.defineProperty(_[e],"labels",{value:r})}_.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=i-o;let l,s;i===o?l=0:t===i?l=(r-n)/a:r===i?l=2+(n-t)/a:n===i&&(l=4+(t-r)/a),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+i)/2;return i===o?s=0:c<=.5?s=a/(i+o):s=a/(2-i-o),[l,s*100,c*100]};_.rgb.hsv=function(e){let t,r,n,o,i;const a=e[0]/255,l=e[1]/255,s=e[2]/255,c=Math.max(a,l,s),p=c-Math.min(a,l,s),f=function(d){return(c-d)/6/p+1/2};return p===0?(o=0,i=0):(i=p/c,t=f(a),r=f(l),n=f(s),a===c?o=n-r:l===c?o=1/3+t-n:s===c&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,c*100]};_.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=_.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,i*100,n*100]};_.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n),i=(1-t-o)/(1-o)||0,a=(1-r-o)/(1-o)||0,l=(1-n-o)/(1-o)||0;return[i*100,a*100,l*100,o*100]};function cl(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}_.rgb.keyword=function(e){const t=fo[e];if(t)return t;let r=1/0,n;for(const o of Object.keys(Ge)){const i=Ge[o],a=cl(e,i);a<r&&(r=a,n=o)}return n};_.keyword.rgb=function(e){return Ge[e]};_.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const o=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,a=t*.0193+r*.1192+n*.9505;return[o*100,i*100,a*100]};_.rgb.lab=function(e){const t=_.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const i=116*n-16,a=500*(r-n),l=200*(n-o);return[i,a,l]};_.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,a;if(r===0)return a=n*255,[a,a,a];n<.5?o=n*(1+r):o=n+r-n*r;const l=2*n-o,s=[0,0,0];for(let c=0;c<3;c++)i=t+1/3*-(c-1),i<0&&i++,i>1&&i--,6*i<1?a=l+(o-l)*6*i:2*i<1?a=o:3*i<2?a=l+(o-l)*(2/3-i)*6:a=l,s[c]=a*255;return s};_.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;const a=(n+r)/2,l=n===0?2*o/(i+o):2*r/(n+r);return[t,l*100,a*100]};_.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),l=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,s,a];case 1:return[l,n,a];case 2:return[a,n,s];case 3:return[a,l,n];case 4:return[s,a,n];case 5:return[n,a,l]}};_.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,a;a=(2-r)*n;const l=(2-r)*o;return i=r*o,i/=l<=1?l:2-l,i=i||0,a/=2,[t,i*100,a*100]};_.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const a=Math.floor(6*t),l=1-n;i=6*t-a,a&1&&(i=1-i);const s=r+i*(l-r);let c,p,f;switch(a){default:case 6:case 0:c=l,p=s,f=r;break;case 1:c=s,p=l,f=r;break;case 2:c=r,p=l,f=s;break;case 3:c=r,p=s,f=l;break;case 4:c=s,p=r,f=l;break;case 5:c=l,p=r,f=s;break}return[c*255,p*255,f*255]};_.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100,i=1-Math.min(1,t*(1-o)+o),a=1-Math.min(1,r*(1-o)+o),l=1-Math.min(1,n*(1-o)+o);return[i*255,a*255,l*255]};_.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,a;return o=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,a=t*.0557+r*-.204+n*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[o*255,i*255,a*255]};_.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const o=116*r-16,i=500*(t-r),a=200*(r-n);return[o,i,a]};_.lab.xyz=function(e){const t=e[0],r=e[1],n=e[2];let o,i,a;i=(t+16)/116,o=r/500+i,a=i-n/200;const l=i**3,s=o**3,c=a**3;return i=l>.008856?l:(i-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,o*=95.047,i*=100,a*=108.883,[o,i,a]};_.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=Math.atan2(n,r)*360/2/Math.PI,o<0&&(o+=360);const a=Math.sqrt(r*r+n*n);return[t,a,o]};_.lch.lab=function(e){const t=e[0],r=e[1],o=e[2]/360*2*Math.PI,i=r*Math.cos(o),a=r*Math.sin(o);return[t,i,a]};_.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let i=t===null?_.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(a+=60),a};_.hsv.ansi16=function(e){return _.rgb.ansi16(_.hsv.rgb(e),e[2])};_.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};_.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=(~~(e>50)+1)*.5,n=(t&1)*r*255,o=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,o,i]};_.ansi256.rgb=function(e){if(e>=232){const i=(e-232)*10+8;return[i,i,i]}e-=16;let t;const r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[r,n,o]};_.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};_.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(l=>l+l).join(""));const n=parseInt(r,16),o=n>>16&255,i=n>>8&255,a=n&255;return[o,i,a]};_.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),a=o-i;let l,s;return a<1?l=i/(1-a):l=0,a<=0?s=0:o===t?s=(r-n)/a%6:o===r?s=2+(n-t)/a:s=4+(t-r)/a,s/=6,s%=1,[s*360,a*100,l*100]};_.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],n*100,o*100]};_.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],n*100,o*100]};_.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const o=[0,0,0],i=t%1*6,a=i%1,l=1-a;let s=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-r)*n,[(r*o[0]+s)*255,(r*o[1]+s)*255,(r*o[2]+s)*255]};_.hcg.hsv=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);let o=0;return n>0&&(o=t/n),[e[0],o*100,n*100]};_.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let o=0;return n>0&&n<.5?o=t/(2*n):n>=.5&&n<1&&(o=t/(2*(1-n))),[e[0],o*100,n*100]};_.hcg.hwb=function(e){const t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};_.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,o=n-t;let i=0;return o<1&&(i=(n-o)/(1-o)),[e[0],o*100,i*100]};_.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};_.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};_.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};_.gray.hsl=function(e){return[0,0,e[0]]};_.gray.hsv=_.gray.hsl;_.gray.hwb=function(e){return[0,100,e[0]]};_.gray.cmyk=function(e){return[0,0,0,e[0]]};_.gray.lab=function(e){return[e[0],0,0]};_.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};_.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Nt=po;function ul(){const e={},t=Object.keys(Nt);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function fl(e){const t=ul(),r=[e];for(t[e].distance=0;r.length;){const n=r.pop(),o=Object.keys(Nt[n]);for(let i=o.length,a=0;a<i;a++){const l=o[a],s=t[l];s.distance===-1&&(s.distance=t[n].distance+1,s.parent=n,r.unshift(l))}}return t}function pl(e,t){return function(r){return t(e(r))}}function dl(e,t){const r=[t[e].parent,e];let n=Nt[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)r.unshift(t[o].parent),n=pl(Nt[t[o].parent][o],n),o=t[o].parent;return n.conversion=r,n}var ml=function(e){const t=fl(e),r={},n=Object.keys(t);for(let o=n.length,i=0;i<o;i++){const a=n[i];t[a].parent!==null&&(r[a]=dl(a,t))}return r};const ar=po,hl=ml,ke={},vl=Object.keys(ar);function gl(e){const t=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function yl(e){const t=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const o=e(r);if(typeof o=="object")for(let i=o.length,a=0;a<i;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(t.conversion=e.conversion),t}vl.forEach(e=>{ke[e]={},Object.defineProperty(ke[e],"channels",{value:ar[e].channels}),Object.defineProperty(ke[e],"labels",{value:ar[e].labels});const t=hl(e);Object.keys(t).forEach(n=>{const o=t[n];ke[e][n]=yl(o),ke[e][n].raw=gl(o)})});var bl=ke;const Te=sl,Z=bl,mo=["keyword","gray","hex"],lr={};for(const e of Object.keys(Z))lr[[...Z[e].labels].sort().join("")]=e;const Bt={};function H(e,t){if(!(this instanceof H))return new H(e,t);if(t&&t in mo&&(t=null),t&&!(t in Z))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof H)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const o=Te.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,n=Z[this.model].channels,this.color=o.value.slice(0,n),this.valpha=typeof o.value[n]=="number"?o.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Z[this.model].channels;const o=Array.prototype.slice.call(e,0,n);this.color=sr(o,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const i=o.sort().join("");if(!(i in lr))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=lr[i];const{labels:a}=Z[this.model],l=[];for(r=0;r<a.length;r++)l.push(e[a[r]]);this.color=sr(l)}if(Bt[this.model])for(n=Z[this.model].channels,r=0;r<n;r++){const o=Bt[this.model][r];o&&(this.color[r]=o(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}H.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Te.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to[t.model](r)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Te.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Z[this.model],{labels:r}=Z[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new H([...this.color.map(Sl(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new H([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:L("rgb",0,K(255)),green:L("rgb",1,K(255)),blue:L("rgb",2,K(255)),hue:L(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:L("hsl",1,K(100)),lightness:L("hsl",2,K(100)),saturationv:L("hsv",1,K(100)),value:L("hsv",2,K(100)),chroma:L("hcg",1,K(100)),gray:L("hcg",2,K(100)),white:L("hwb",1,K(100)),wblack:L("hwb",2,K(100)),cyan:L("cmyk",0,K(100)),magenta:L("cmyk",1,K(100)),yellow:L("cmyk",2,K(100)),black:L("cmyk",3,K(100)),x:L("xyz",0,K(95.047)),y:L("xyz",1,K(100)),z:L("xyz",2,K(108.833)),l:L("lab",0,K(100)),a:L("lab",1),b:L("lab",2),keyword(e){return e!==void 0?new H(e):Z[this.model].keyword(this.color)},hex(e){return e!==void 0?new H(e):Te.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new H(e);const t=this.rgb().round().color;let r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Te.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const o=n/255;t[r]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return H.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),o=t===void 0?.5:t,i=2*o-1,a=r.alpha()-n.alpha(),l=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,s=1-l;return H.rgb(l*r.red()+s*n.red(),l*r.green()+s*n.green(),l*r.blue()+s*n.blue(),r.alpha()*o+n.alpha()*(1-o))}};for(const e of Object.keys(Z)){if(mo.includes(e))continue;const{channels:t}=Z[e];H.prototype[e]=function(...r){return this.model===e?new H(this):r.length>0?new H(r,e):new H([...Ol(Z[this.model][e].raw(this.color)),this.valpha],e)},H[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=sr(r,t)),new H(n,e)}}function wl(e,t){return Number(e.toFixed(t))}function Sl(e){return function(t){return wl(t,e)}}function L(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(Bt[n]||(Bt[n]=[]))[t]=r;return e=e[0],function(n){let o;return n!==void 0?(r&&(n=r(n)),o=this[e](),o.color[t]=n,o):(o=this[e]().color[t],r&&(o=r(o)),o)}}function K(e){return function(t){return Math.max(0,Math.min(e,t))}}function Ol(e){return Array.isArray(e)?e:[e]}function sr(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}var Pl=H;const xl=Wn(Pl);var Ir={},jl=pe;Object.defineProperty(Ir,"__esModule",{value:!0});var ho=Ir.default=void 0,Il=jl(fe()),_l=u;ho=Ir.default=(0,Il.default)((0,_l.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var _r={},$l=pe;Object.defineProperty(_r,"__esModule",{value:!0});var vo=_r.default=void 0,Cl=$l(fe()),El=u;vo=_r.default=(0,Cl.default)((0,El.jsx)("path",{d:"M7 6h10l-5.01 6.3zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAltOutlined");function Al(){var e=new Map;function t(r){var n=r.root,o=r.rootMargin,i=r.threshold,a=e.get(n);a||(a=new Map,e.set(n,a));var l=JSON.stringify({rootMargin:o,threshold:i}),s=a.get(l);if(!s){var c=new Map,p=new IntersectionObserver(function(f){f.forEach(function(d){var v=c.get(d.target);v==null||v(d)})},{root:n,rootMargin:o,threshold:i});s={observer:p,entryCallbacks:c},a.set(l,s)}return{observe:function(d,v){var m,h;(m=s)==null||m.entryCallbacks.set(d,v),(h=s)==null||h.observer.observe(d)},unobserve:function(d){var v,m;(v=s)==null||v.entryCallbacks.delete(d),(m=s)==null||m.observer.unobserve(d)}}}return{getObserver:t}}var kl="0px",Tl=[0],Rl=Al();function Dl(e){var t,r,n=(t=e==null?void 0:e.rootMargin)!=null?t:kl,o=(r=e==null?void 0:e.threshold)!=null?r:Tl,i=j.useRef(null),a=j.useRef(null),l=j.useRef(null),s=j.useState(),c=s[0],p=s[1],f=j.useCallback(function(){var h=i.current;if(!h){p(void 0);return}var w=Rl.getObserver({root:a.current,rootMargin:n,threshold:o});w.observe(h,function(b){p(b)}),l.current=w},[n,o]),d=j.useCallback(function(){var h=l.current,w=i.current;w&&(h==null||h.unobserve(w)),l.current=null},[]),v=j.useCallback(function(h){d(),i.current=h,f()},[f,d]),m=j.useCallback(function(h){d(),a.current=h,f()},[f,d]);return[v,{entry:c,rootRef:m}]}function cr(){return cr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cr.apply(this,arguments)}function Ml(e){var t,r=Dl(e),n=r[0],o=r[1],i=!!((t=o.entry)!=null&&t.isIntersecting),a=j.useState(i),l=a[0],s=a[1];return i&&!l&&s(!0),[n,cr({},o,{isVisible:i,wasEverVisible:l})]}var Nl=100;function Bl(e){var t=e.loading,r=e.hasNextPage,n=e.onLoadMore,o=e.rootMargin,i=e.disabled,a=e.delayInMs,l=a===void 0?Nl:a,s=Ml({rootMargin:o}),c=s[0],p=s[1],f=p.rootRef,d=p.isVisible,v=!i&&!t&&d&&r;return j.useEffect(function(){if(v){var m=setTimeout(function(){n()},l);return function(){clearTimeout(m)}}},[n,v,l]),[c,{rootRef:f}]}function He(e){return{current:e}}function Ft(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];r&&clearTimeout(r),r=setTimeout(function(){return e.apply(void 0,o)},t)}}function Qe(e){return e.reduce(function(t,r){return t.concat(r)},[])}var Fl=0;function go(){return"autocomplete-".concat(Fl++)}function Lt(e,t){return t.reduce(function(r,n){return r&&r[n]},e)}function Je(e){return e.collections.length===0?0:e.collections.reduce(function(t,r){return t+r.items.length},0)}function Zr(e){return e!==Object(e)}function yo(e,t){if(e===t)return!0;if(Zr(e)||Zr(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(!(o in t)||!yo(e[o],t[o]))return!1}return!0}var qt=function(){};function Ll(e){if(typeof window<"u")return e({window})}var bo="1.17.0",ql=[{segment:"autocomplete-core",version:bo}];function en(e){var t=e.item,r=e.items,n=r===void 0?[]:r;return{index:t.__autocomplete_indexName,items:[t],positions:[1+n.findIndex(function(o){return o.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function zl(e,t){return Wl(e)||Ul(e,t)||Hl(e,t)||Kl()}function Kl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hl(e,t){if(e){if(typeof e=="string")return tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tn(e,t)}}function tn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ul(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(p){c=!0,o=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}function Wl(e){if(Array.isArray(e))return e}function Vl(e){var t=(e.version||"").split(".").map(Number),r=zl(t,2),n=r[0],o=r[1],i=n>=3,a=n===2&&o>=4,l=n===1&&o>=10;return i||a||l}var Gl=["items"],Ql=["items"];function Ye(e){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(e)}function jt(e){return Zl(e)||Xl(e)||Yl(e)||Jl()}function Jl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yl(e,t){if(e){if(typeof e=="string")return ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ur(e,t)}}function Xl(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Zl(e){if(Array.isArray(e))return ur(e)}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wo(e,t){if(e==null)return{};var r=es(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function es(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(r),!0).forEach(function(n){ts(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ts(e,t,r){return t=rs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rs(e){var t=ns(e,"string");return Ye(t)==="symbol"?t:String(t)}function ns(e,t){if(Ye(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ye(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function os(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<e.objectIDs.length;n+=t)r.push(Ne(Ne({},e),{},{objectIDs:e.objectIDs.slice(n,n+t)}));return r}function It(e){return e.map(function(t){var r=t.items,n=wo(t,Gl);return Ne(Ne({},n),{},{objectIDs:(r==null?void 0:r.map(function(o){var i=o.objectID;return i}))||n.objectIDs})})}function is(e){var t=Vl(e);function r(n,o,i){if(t&&typeof i<"u"){var a=i[0].__autocomplete_algoliaCredentials,l=a.appId,s=a.apiKey,c={"X-Algolia-Application-Id":l,"X-Algolia-API-Key":s};e.apply(void 0,[n].concat(jt(o),[{headers:c}]))}else e.apply(void 0,[n].concat(jt(o)))}return{init:function(o,i){e("init",{appId:o,apiKey:i})},setAuthenticatedUserToken:function(o){e("setAuthenticatedUserToken",o)},setUserToken:function(o){e("setUserToken",o)},clickedObjectIDsAfterSearch:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("clickedObjectIDsAfterSearch",It(i),i[0].items)},clickedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("clickedObjectIDs",It(i),i[0].items)},clickedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["clickedFilters"].concat(i))},convertedObjectIDsAfterSearch:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("convertedObjectIDsAfterSearch",It(i),i[0].items)},convertedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&r("convertedObjectIDs",It(i),i[0].items)},convertedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["convertedFilters"].concat(i))},viewedObjectIDs:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&i.reduce(function(l,s){var c=s.items,p=wo(s,Ql);return[].concat(jt(l),jt(os(Ne(Ne({},p),{},{objectIDs:(c==null?void 0:c.map(function(f){var d=f.objectID;return d}))||p.objectIDs})).map(function(f){return{items:c,payload:f}})))},[]).forEach(function(l){var s=l.items,c=l.payload;return r("viewedObjectIDs",[c],s)})},viewedFilters:function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];i.length>0&&e.apply(void 0,["viewedFilters"].concat(i))}}}function as(e){var t=e.items,r=t.reduce(function(n,o){var i;return n[o.__autocomplete_indexName]=((i=n[o.__autocomplete_indexName])!==null&&i!==void 0?i:[]).concat(o),n},{});return Object.keys(r).map(function(n){var o=r[n];return{index:n,items:o,algoliaSource:["autocomplete"]}})}function ze(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Xe(e){"@babel/helpers - typeof";return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xe(e)}function Be(e){return us(e)||cs(e)||ss(e)||ls()}function ls(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ss(e,t){if(e){if(typeof e=="string")return fr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fr(e,t)}}function cs(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function us(e){if(Array.isArray(e))return fr(e)}function fr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nn(Object(r),!0).forEach(function(n){fs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fs(e,t,r){return t=ps(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ps(e){var t=ds(e,"string");return Xe(t)==="symbol"?t:String(t)}function ds(e,t){if(Xe(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ms=400,So="2.13.0",hs="https://cdn.jsdelivr.net/npm/search-insights@".concat(So,"/dist/search-insights.min.js"),vs=Ft(function(e){var t=e.onItemsChange,r=e.items,n=e.insights,o=e.state;t({insights:n,insightsEvents:as({items:r}).map(function(i){return oe({eventName:"Items Viewed"},i)}),state:o})},ms);function on(e){var t=gs(e),r=t.insightsClient,n=t.insightsInitParams,o=t.onItemsChange,i=t.onSelect,a=t.onActive,l=t.__autocomplete_clickAnalytics,s=r;if(r||Ll(function(d){var v=d.window,m=v.AlgoliaAnalyticsObject||"aa";typeof m=="string"&&(s=v[m]),s||(v.AlgoliaAnalyticsObject=m,v[m]||(v[m]=function(){v[m].queue||(v[m].queue=[]);for(var h=arguments.length,w=new Array(h),b=0;b<h;b++)w[b]=arguments[b];v[m].queue.push(w)}),v[m].version=So,s=v[m],ys(v))}),!s)return{};n&&s("init",oe({partial:!0},n));var c=is(s),p=He([]),f=Ft(function(d){var v=d.state;if(v.isOpen){var m=v.collections.reduce(function(h,w){return[].concat(Be(h),Be(w.items))},[]).filter(ze);yo(p.current.map(function(h){return h.objectID}),m.map(function(h){return h.objectID}))||(p.current=m,m.length>0&&vs({onItemsChange:o,items:m,insights:c,state:v}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(v){var m=v.setContext,h=v.onSelect,w=v.onActive,b=!1;function g(S){m({algoliaInsightsPlugin:{__algoliaSearchParameters:oe(oe({},l?{clickAnalytics:!0}:{}),S?{userToken:bs(S)}:{}),insights:c}})}s("addAlgoliaAgent","insights-plugin"),g(),s("onUserTokenChange",function(S){b||g(S)}),s("getUserToken",null,function(S,O){b||g(O)}),s("onAuthenticatedUserTokenChange",function(S){S?(b=!0,g(S)):(b=!1,s("getUserToken",null,function(O,P){return g(P)}))}),s("getAuthenticatedUserToken",null,function(S,O){O&&(b=!0,g(O))}),h(function(S){var O=S.item,P=S.state,C=S.event,$=S.source;ze(O)&&i({state:P,event:C,insights:c,item:O,insightsEvents:[oe({eventName:"Item Selected"},en({item:O,items:$.getItems().filter(ze)}))]})}),w(function(S){var O=S.item,P=S.source,C=S.state,$=S.event;ze(O)&&a({state:C,event:$,insights:c,item:O,insightsEvents:[oe({eventName:"Item Active"},en({item:O,items:P.getItems().filter(ze)}))]})})},onStateChange:function(v){var m=v.state;f({state:m})},__autocomplete_pluginOptions:e}}function an(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;return[].concat(Be(t),["autocomplete-internal"],Be((e=r.algoliaInsightsPlugin)!==null&&e!==void 0&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function gs(e){return oe({onItemsChange:function(r){var n=r.insights,o=r.insightsEvents,i=r.state;n.viewedObjectIDs.apply(n,Be(o.map(function(a){return oe(oe({},a),{},{algoliaSource:an(a.algoliaSource,i.context)})})))},onSelect:function(r){var n=r.insights,o=r.insightsEvents,i=r.state;n.clickedObjectIDsAfterSearch.apply(n,Be(o.map(function(a){return oe(oe({},a),{},{algoliaSource:an(a.algoliaSource,i.context)})})))},onActive:qt,__autocomplete_clickAnalytics:!0},e)}function ys(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var r=e.document.createElement("script");r.async=!0,r.src=hs,r.onerror=function(){console.error(t)},document.body.appendChild(r)}catch{console.error(t)}}function bs(e){return typeof e=="number"?e.toString():e}function Rt(e,t){var r=t;return{then:function(o,i){return Rt(e.then(_t(o,r,e),_t(i,r,e)),r)},catch:function(o){return Rt(e.catch(_t(o,r,e)),r)},finally:function(o){return o&&r.onCancelList.push(o),Rt(e.finally(_t(o&&function(){return r.onCancelList=[],o()},r,e)),r)},cancel:function(){r.isCanceled=!0;var o=r.onCancelList;r.onCancelList=[],o.forEach(function(i){i()})},isCanceled:function(){return r.isCanceled===!0}}}function ln(e){return Rt(e,{isCanceled:!1,onCancelList:[]})}function _t(e,t,r){return e?function(o){return t.isCanceled?o:e(o)}:r}function ws(){var e=[];return{add:function(r){return e.push(r),r.finally(function(){e=e.filter(function(n){return n!==r})})},cancelAll:function(){e.forEach(function(r){return r.cancel()})},isEmpty:function(){return e.length===0}}}function Ss(){var e=-1,t=-1,r=void 0;return function(o){e++;var i=e;return Promise.resolve(o).then(function(a){return r&&i<t?r:(t=i,r=a,a)})}}function sn(e,t,r,n){if(!r)return null;if(e<0&&(t===null||n!==null&&t===0))return r+e;var o=(t===null?-1:t)+e;return o<=-1||o>=r?n===null?null:0:o}function cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cn(Object(r),!0).forEach(function(n){Os(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Os(e,t,r){return t=Ps(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ps(e){var t=xs(e,"string");return Ze(t)==="symbol"?t:String(t)}function xs(e,t){if(Ze(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ze(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function js(e,t){var r=[];return Promise.resolve(e(t)).then(function(n){return Promise.all(n.filter(function(o){return!!o}).map(function(o){if(o.sourceId,r.includes(o.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(o.sourceId)," is not unique."));r.push(o.sourceId);var i={getItemInputValue:function(s){var c=s.state;return c.query},getItemUrl:function(){},onSelect:function(s){var c=s.setIsOpen;c(!1)},onActive:qt,onResolve:qt};Object.keys(i).forEach(function(l){i[l].__default=!0});var a=un(un({},i),o);return Promise.resolve(a)}))})}function Is(e){var t=e.collections.map(function(n){return n.items.length}).reduce(function(n,o,i){var a=n[i-1]||0,l=a+o;return n.push(l),n},[]),r=t.reduce(function(n,o){return o<=e.activeItemId?n+1:n},0);return e.collections[r]}function _s(e){for(var t=e.state,r=e.collection,n=!1,o=0,i=0;n===!1;){var a=t.collections[o];if(a===r){n=!0;break}i+=a.items.length,o++}return t.activeItemId-i}function je(e){var t=Is(e);if(!t)return null;var r=t.items[_s({state:e,collection:t})],n=t.source,o=n.getItemInputValue({item:r,state:e}),i=n.getItemUrl({item:r,state:e});return{item:r,itemInputValue:o,itemUrl:i,source:n}}function re(e,t,r){return[e,r==null?void 0:r.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}function $s(e,t){return e===t||e.contains(t)}var Cs=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Es(e){return!!(e&&e.match(Cs))}function As(e){return{results:e,hits:e.map(function(t){return t.hits}).filter(Boolean),facetHits:e.map(function(t){var r;return(r=t.facetHits)===null||r===void 0?void 0:r.map(function(n){return{label:n.value,count:n.count,_highlightResult:{label:{value:n.highlighted}}}})}).filter(Boolean)}}function fn(e){return e.nativeEvent||e}function et(e){"@babel/helpers - typeof";return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(e)}function pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ks(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(r),!0).forEach(function(n){Ts(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ts(e,t,r){return t=Rs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rs(e){var t=Ds(e,"string");return et(t)==="symbol"?t:String(t)}function Ds(e,t){if(et(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(et(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ms(e,t,r){var n=t.initialState;return{getState:function(){return n},dispatch:function(i,a){var l=ks({},n);n=e(n,{type:i,props:t,payload:a}),r({state:n,prevState:l})},pendingRequests:ws()}}function tt(e){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(e)}function dn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dn(Object(r),!0).forEach(function(n){Ns(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ns(e,t,r){return t=Bs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bs(e){var t=Fs(e,"string");return tt(t)==="symbol"?t:String(t)}function Fs(e,t){if(tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ls(e){var t=e.store,r=function(c){t.dispatch("setActiveItemId",c)},n=function(c){t.dispatch("setQuery",c)},o=function(c){var p=0,f=c.map(function(d){return $t($t({},d),{},{items:Qe(d.items).map(function(v){return $t($t({},v),{},{__autocomplete_id:p++})})})});t.dispatch("setCollections",f)},i=function(c){t.dispatch("setIsOpen",c)},a=function(c){t.dispatch("setStatus",c)},l=function(c){t.dispatch("setContext",c)};return{setActiveItemId:r,setQuery:n,setCollections:o,setIsOpen:i,setStatus:a,setContext:l}}function rt(e){"@babel/helpers - typeof";return rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(e)}function qs(e){return Us(e)||Hs(e)||Ks(e)||zs()}function zs(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|