@billgangcom/theme-lib 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +5 -0
- package/dist/builder.cjs.js +3 -3
- package/dist/builder.es.js +6 -6
- package/dist/{index-2iAZ7WmX.js → index-D2fsOZUo.js} +1442 -1419
- package/dist/index-K_gSTxJk.cjs +39 -0
- package/dist/shared/ui/Icon/index.d.ts +1 -0
- package/dist/shared/ui/Input/index.d.ts +2 -0
- package/dist/store/useChooseImageStore.d.ts +3 -0
- package/dist/text-align-center-CBdXLnfL.js +5 -0
- package/dist/text-align-center-DSiXCwfH.cjs +1 -0
- package/dist/text-align-right-B1liYPsk.cjs +1 -0
- package/dist/text-align-right-CTznh4bt.js +5 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +1 -1
- package/dist/ui/ButtonsSettings/index.d.ts +3 -3
- package/dist/ui/ButtonsSettings/popup.d.ts +1 -1
- package/dist/ui/ChooseImage/index.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +18 -10
- package/dist/ui/ItemsSettings/popup.d.ts +46 -2
- package/dist/ui/LayoutSettings/index.d.ts +2 -2
- package/dist/ui/OtherSettings/index.d.ts +11 -0
- package/dist/ui/RangeSelector/index.d.ts +11 -0
- package/dist/ui/TextSettings/index.d.ts +5 -5
- package/dist/ui/TypeTexts/index.d.ts +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +681 -375
- package/package.json +1 -1
- package/dist/index-DSUcxVxJ.cjs +0 -39
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";const B=require("react");function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}},_e={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Jt;function vr(){if(Jt)return _e;Jt=1;var e=B,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(c,f,d){var l,h={},w=null,x=null;d!==void 0&&(w=""+d),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(x=f.ref);for(l in f)r.call(f,l)&&!o.hasOwnProperty(l)&&(h[l]=f[l]);if(c&&c.defaultProps)for(l in f=c.defaultProps,f)h[l]===void 0&&(h[l]=f[l]);return{$$typeof:t,type:c,key:w,ref:x,props:h,_owner:s.current}}return _e.Fragment=n,_e.jsx=i,_e.jsxs=i,_e}var we={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Kt;function br(){return Kt||(Kt=1,process.env.NODE_ENV!=="production"&&function(){var e=B,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function b(a){if(a===null||typeof a!="object")return null;var p=g&&a[g]||a[v];return typeof p=="function"?p:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(a){{for(var p=arguments.length,y=new Array(p>1?p-1:0),E=1;E<p;E++)y[E-1]=arguments[E];k("error",a,y)}}function k(a,p,y){{var E=S.ReactDebugCurrentFrame,O=E.getStackAddendum();O!==""&&(p+="%s",y=y.concat([O]));var T=y.map(function(C){return String(C)});T.unshift("Warning: "+p),Function.prototype.apply.call(console[a],console,T)}}var F=!1,q=!1,U=!1,K=!1,te=!1,se;se=Symbol.for("react.module.reference");function G(a){return!!(typeof a=="string"||typeof a=="function"||a===r||a===o||te||a===s||a===d||a===l||K||a===x||F||q||U||typeof a=="object"&&a!==null&&(a.$$typeof===w||a.$$typeof===h||a.$$typeof===i||a.$$typeof===c||a.$$typeof===f||a.$$typeof===se||a.getModuleId!==void 0))}function X(a,p,y){var E=a.displayName;if(E)return E;var O=p.displayName||p.name||"";return O!==""?y+"("+O+")":y}function Ve(a){return a.displayName||"Context"}function Z(a){if(a==null)return null;if(typeof a.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case l:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case c:var p=a;return Ve(p)+".Consumer";case i:var y=a;return Ve(y._context)+".Provider";case f:return X(a,a.render,"ForwardRef");case h:var E=a.displayName||null;return E!==null?E:Z(a.type)||"Memo";case w:{var O=a,T=O._payload,C=O._init;try{return Z(C(T))}catch{return null}}}return null}var oe=Object.assign,ve=0,Rt,kt,Pt,Ct,Ot,Tt,jt;function At(){}At.__reactDisabledLog=!0;function zn(){{if(ve===0){Rt=console.log,kt=console.info,Pt=console.warn,Ct=console.error,Ot=console.group,Tt=console.groupCollapsed,jt=console.groupEnd;var a={configurable:!0,enumerable:!0,value:At,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ve++}}function Vn(){{if(ve--,ve===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:oe({},a,{value:Rt}),info:oe({},a,{value:kt}),warn:oe({},a,{value:Pt}),error:oe({},a,{value:Ct}),group:oe({},a,{value:Ot}),groupCollapsed:oe({},a,{value:Tt}),groupEnd:oe({},a,{value:jt})})}ve<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var We=S.ReactCurrentDispatcher,Je;function Pe(a,p,y){{if(Je===void 0)try{throw Error()}catch(O){var E=O.stack.trim().match(/\n( *(at )?)/);Je=E&&E[1]||""}return`
|
|
18
|
+
`+Je+a}}var Ke=!1,Ce;{var Wn=typeof WeakMap=="function"?WeakMap:Map;Ce=new Wn}function Nt(a,p){if(!a||Ke)return"";{var y=Ce.get(a);if(y!==void 0)return y}var E;Ke=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var T;T=We.current,We.current=null,zn();try{if(p){var C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(M){E=M}Reflect.construct(a,[],C)}else{try{C.call()}catch(M){E=M}a.call(C.prototype)}}else{try{throw Error()}catch(M){E=M}a()}}catch(M){if(M&&E&&typeof M.stack=="string"){for(var P=M.stack.split(`
|
|
19
|
+
`),L=E.stack.split(`
|
|
20
|
+
`),N=P.length-1,I=L.length-1;N>=1&&I>=0&&P[N]!==L[I];)I--;for(;N>=1&&I>=0;N--,I--)if(P[N]!==L[I]){if(N!==1||I!==1)do if(N--,I--,I<0||P[N]!==L[I]){var J=`
|
|
21
|
+
`+P[N].replace(" at new "," at ");return a.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",a.displayName)),typeof a=="function"&&Ce.set(a,J),J}while(N>=1&&I>=0);break}}}finally{Ke=!1,We.current=T,Vn(),Error.prepareStackTrace=O}var pe=a?a.displayName||a.name:"",ie=pe?Pe(pe):"";return typeof a=="function"&&Ce.set(a,ie),ie}function Jn(a,p,y){return Nt(a,!1)}function Kn(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function Oe(a,p,y){if(a==null)return"";if(typeof a=="function")return Nt(a,Kn(a));if(typeof a=="string")return Pe(a);switch(a){case d:return Pe("Suspense");case l:return Pe("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case f:return Jn(a.render);case h:return Oe(a.type,p,y);case w:{var E=a,O=E._payload,T=E._init;try{return Oe(T(O),p,y)}catch{}}}return""}var be=Object.prototype.hasOwnProperty,Bt={},qt=S.ReactDebugCurrentFrame;function Te(a){if(a){var p=a._owner,y=Oe(a.type,a._source,p?p.type:null);qt.setExtraStackFrame(y)}else qt.setExtraStackFrame(null)}function Yn(a,p,y,E,O){{var T=Function.call.bind(be);for(var C in a)if(T(a,C)){var P=void 0;try{if(typeof a[C]!="function"){var L=Error((E||"React class")+": "+y+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}P=a[C](p,C,E,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(N){P=N}P&&!(P instanceof Error)&&(Te(O),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",y,C,typeof P),Te(null)),P instanceof Error&&!(P.message in Bt)&&(Bt[P.message]=!0,Te(O),_("Failed %s type: %s",y,P.message),Te(null))}}}var Gn=Array.isArray;function Ye(a){return Gn(a)}function Xn(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,y=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return y}}function Zn(a){try{return It(a),!1}catch{return!0}}function It(a){return""+a}function Ft(a){if(Zn(a))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xn(a)),It(a)}var ye=S.ReactCurrentOwner,Qn={key:!0,ref:!0,__self:!0,__source:!0},Dt,Lt,Ge;Ge={};function er(a){if(be.call(a,"ref")){var p=Object.getOwnPropertyDescriptor(a,"ref").get;if(p&&p.isReactWarning)return!1}return a.ref!==void 0}function tr(a){if(be.call(a,"key")){var p=Object.getOwnPropertyDescriptor(a,"key").get;if(p&&p.isReactWarning)return!1}return a.key!==void 0}function nr(a,p){if(typeof a.ref=="string"&&ye.current&&p&&ye.current.stateNode!==p){var y=Z(ye.current.type);Ge[y]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Z(ye.current.type),a.ref),Ge[y]=!0)}}function rr(a,p){{var y=function(){Dt||(Dt=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};y.isReactWarning=!0,Object.defineProperty(a,"key",{get:y,configurable:!0})}}function sr(a,p){{var y=function(){Lt||(Lt=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",p))};y.isReactWarning=!0,Object.defineProperty(a,"ref",{get:y,configurable:!0})}}var or=function(a,p,y,E,O,T,C){var P={$$typeof:t,type:a,key:p,ref:y,props:C,_owner:T};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function ir(a,p,y,E,O){{var T,C={},P=null,L=null;y!==void 0&&(Ft(y),P=""+y),tr(p)&&(Ft(p.key),P=""+p.key),er(p)&&(L=p.ref,nr(p,O));for(T in p)be.call(p,T)&&!Qn.hasOwnProperty(T)&&(C[T]=p[T]);if(a&&a.defaultProps){var N=a.defaultProps;for(T in N)C[T]===void 0&&(C[T]=N[T])}if(P||L){var I=typeof a=="function"?a.displayName||a.name||"Unknown":a;P&&rr(C,I),L&&sr(C,I)}return or(a,P,L,O,E,ye.current,C)}}var Xe=S.ReactCurrentOwner,Ut=S.ReactDebugCurrentFrame;function he(a){if(a){var p=a._owner,y=Oe(a.type,a._source,p?p.type:null);Ut.setExtraStackFrame(y)}else Ut.setExtraStackFrame(null)}var Ze;Ze=!1;function Qe(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function Mt(){{if(Xe.current){var a=Z(Xe.current.type);if(a)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function ar(a){return""}var $t={};function cr(a){{var p=Mt();if(!p){var y=typeof a=="string"?a:a.displayName||a.name;y&&(p=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+y+">.")}return p}}function Ht(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var y=cr(p);if($t[y])return;$t[y]=!0;var E="";a&&a._owner&&a._owner!==Xe.current&&(E=" It was passed a child from "+Z(a._owner.type)+"."),he(a),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,E),he(null)}}function zt(a,p){{if(typeof a!="object")return;if(Ye(a))for(var y=0;y<a.length;y++){var E=a[y];Qe(E)&&Ht(E,p)}else if(Qe(a))a._store&&(a._store.validated=!0);else if(a){var O=b(a);if(typeof O=="function"&&O!==a.entries)for(var T=O.call(a),C;!(C=T.next()).done;)Qe(C.value)&&Ht(C.value,p)}}}function lr(a){{var p=a.type;if(p==null||typeof p=="string")return;var y;if(typeof p=="function")y=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===h))y=p.propTypes;else return;if(y){var E=Z(p);Yn(y,a.props,"prop",E,a)}else if(p.PropTypes!==void 0&&!Ze){Ze=!0;var O=Z(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(a){{for(var p=Object.keys(a.props),y=0;y<p.length;y++){var E=p[y];if(E!=="children"&&E!=="key"){he(a),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),he(null);break}}a.ref!==null&&(he(a),_("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}var Vt={};function Wt(a,p,y,E,O,T){{var C=G(a);if(!C){var P="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var L=ar();L?P+=L:P+=Mt();var N;a===null?N="null":Ye(a)?N="array":a!==void 0&&a.$$typeof===t?(N="<"+(Z(a.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):N=typeof a,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,P)}var I=ir(a,p,y,O,T);if(I==null)return I;if(C){var J=p.children;if(J!==void 0)if(E)if(Ye(J)){for(var pe=0;pe<J.length;pe++)zt(J[pe],a);Object.freeze&&Object.freeze(J)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else zt(J,a)}if(be.call(p,"key")){var ie=Z(a),M=Object.keys(p).filter(function(gr){return gr!=="key"}),et=M.length>0?"{key: someKey, "+M.join(": ..., ")+": ...}":"{key: someKey}";if(!Vt[ie+et]){var mr=M.length>0?"{"+M.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,et,ie,mr,ie),Vt[ie+et]=!0}}return a===r?ur(I):lr(I),I}}function dr(a,p,y){return Wt(a,p,y,!0)}function fr(a,p,y){return Wt(a,p,y,!1)}var hr=fr,pr=dr;we.Fragment=r,we.jsx=hr,we.jsxs=pr}()),we}process.env.NODE_ENV==="production"?ct.exports=vr():ct.exports=br();var m=ct.exports;const Yt=e=>{let t;const n=new Set,r=(d,l)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const w=t;t=l??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(x=>x(t,w))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},yr=e=>e?Yt(e):Yt,_r=e=>e;function wr(e,t=_r){const n=B.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return B.useDebugValue(n),n}const Gt=e=>{const t=yr(e),n=r=>wr(t,r);return Object.assign(n,t),n},W=e=>e?Gt(e):Gt,Sr=W(e=>({blocks:{},setBlocks:t=>e(()=>({blocks:t})),activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t})),sourceBlocks:{},setSourceBlocks:t=>e(()=>({sourceBlocks:t}))})),xr=W(e=>({currentDevice:"desktop",setCurrentDevice:t=>e(()=>({currentDevice:t}))}));W(e=>({pageData:null,setPageData:t=>e(()=>({pageData:t}))}));const mn=[{icon:"layers",name:"Layers"},{icon:"plus",name:"Add"},{icon:"palette",name:"Theme"},{icon:"settings",name:"Settings"}],Er=Array.from({length:122/2+1},(e,t)=>String(6+t*2)),Rr=["100","200","300","400","500","600","700","800","900"],kr=["home","reviews","faqs","contact","product","ticket","login"],Pr={home:{path:"/",name:"home",icon:"house",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"squares",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"faqs",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"chat",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"user-circle-gear",seo:{description:"",title:""},visibility:"public"}},Cr=W(e=>({activeBlock:mn[0],setActiveBlock:t=>e(()=>({activeBlock:t}))}));function Or(e,t){let n;try{n=e()}catch{return}return{getItem:s=>{var o;const i=f=>f===null?null:JSON.parse(f,void 0),c=(o=n.getItem(s))!=null?o:null;return c instanceof Promise?c.then(i):i(c)},setItem:(s,o)=>n.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>n.removeItem(s)}}const lt=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lt(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lt(r)(n)}}}},Tr=(e,t)=>(n,r,s)=>{let o={storage:Or(()=>localStorage),partialize:v=>v,version:0,merge:(v,b)=>({...b,...v}),...t},i=!1;const c=new Set,f=new Set;let d=o.storage;if(!d)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...v)},r,s);const l=()=>{const v=o.partialize({...r()});return d.setItem(o.name,{state:v,version:o.version})},h=s.setState;s.setState=(v,b)=>{h(v,b),l()};const w=e((...v)=>{n(...v),l()},r,s);s.getInitialState=()=>w;let x;const g=()=>{var v,b;if(!d)return;i=!1,c.forEach(_=>{var k;return _((k=r())!=null?k:w)});const S=((b=o.onRehydrateStorage)==null?void 0:b.call(o,(v=r())!=null?v:w))||void 0;return lt(d.getItem.bind(d))(o.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==o.version){if(o.migrate)return[!0,o.migrate(_.state,_.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var k;const[F,q]=_;if(x=o.merge(q,(k=r())!=null?k:w),n(x,!0),F)return l()}).then(()=>{S==null||S(x,void 0),x=r(),i=!0,f.forEach(_=>_(x))}).catch(_=>{S==null||S(void 0,_)})};return s.persist={setOptions:v=>{o={...o,...v},v.storage&&(d=v.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:v=>(c.add(v),()=>{c.delete(v)}),onFinishHydration:v=>(f.add(v),()=>{f.delete(v)})},o.skipHydration||g(),x||w},Le=Tr,jr=W(Le(e=>({onPreview:!1,setOnPreview:t=>e(()=>({onPreview:t})),activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t}))}),{name:"preview-storage",partialize:e=>{const{onPreview:t}=e;return{onPreview:t}}}));var D=[];for(var tt=0;tt<256;++tt)D.push((tt+256).toString(16).slice(1));function Ar(e,t=0){return(D[e[t+0]]+D[e[t+1]]+D[e[t+2]]+D[e[t+3]]+"-"+D[e[t+4]]+D[e[t+5]]+"-"+D[e[t+6]]+D[e[t+7]]+"-"+D[e[t+8]]+D[e[t+9]]+"-"+D[e[t+10]]+D[e[t+11]]+D[e[t+12]]+D[e[t+13]]+D[e[t+14]]+D[e[t+15]]).toLowerCase()}var je,Nr=new Uint8Array(16);function Br(){if(!je&&(je=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!je))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return je(Nr)}var qr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Xt={randomUUID:qr};function Ie(e,t,n){if(Xt.randomUUID&&!t&&!e)return Xt.randomUUID();e=e||{};var r=e.random||(e.rng||Br)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ar(r)}const Ir=W(Le((e,t)=>({header:null,blocks:{home:{},contact:{},product:{},faqs:{},reviews:{},ticket:{},login:{}},footer:null,currentBlock:null,positionBlock:null,setHeader:n=>{e({header:n})},setFooter:n=>{e({footer:n})},createPage:n=>{const r=t().blocks;r[n]={},e({blocks:r})},deletePage:n=>{const r=t().blocks;delete r[n],e({blocks:r})},updatePage:(n,r)=>{const s=t().blocks;if(s[r])return;const o=s[n];delete s[n],s[r]=o,e({blocks:s})},setCurrentBlock:n=>{e({currentBlock:n})},setPositionBlock:n=>{e({positionBlock:n})},addBlock:(n,r)=>{const s=t().blocks,o=s[n]||{},i=t().positionBlock,c=Ie(),f=Object.keys(o);if(i===null||i>=f.length)o[c]={name:r.name,value:{...r.value}},e({blocks:{...s,[n]:o}});else{const d={name:r.name,value:{...r.value}},l=f.slice(0,i),h=f.slice(i),w={...l.reduce((x,g)=>(x[g]=o[g],x),{}),[c]:d,...h.reduce((x,g)=>(x[g]=o[g],x),{})};e({blocks:{...s,[n]:w}})}},editBlock:(n,r,s)=>{const o=t().blocks,i=o[n]||{};i[r]={name:s.name,value:{...s.value}},e({blocks:{...o,[n]:i}})},removeBlock:(n,r)=>{const s=t().blocks,o=s[n]||{};delete o[r],e({blocks:{...s,[n]:o}})},moveBlock:(n,r,s)=>e(o=>{const i={...o.blocks[n]},c=Object.keys(i),[f]=c.splice(r,1);c.splice(s,0,f);const d=c.reduce((l,h)=>(l[h]=i[h],l),{});return{blocks:{...o.blocks,[n]:d}}}),duplicateBlock:(n,r)=>{const{blocks:s}=t(),o=s[n],i=o[r],c=Ie(),f={name:i.name,value:{...i.value}},d=Object.keys(o),l=d.indexOf(r),h=d.slice(0,l+1),w=d.slice(l+1),x={...h.reduce((g,v)=>(g[v]=o[v],g),{}),[c]:f,...w.reduce((g,v)=>(g[v]=o[v],g),{})};e({blocks:{...s,[n]:x}})}}),{name:"layers-storage",partialize:e=>{const{blocks:t,header:n,footer:r}=e;return{blocks:t,header:n,footer:r}}})),gn=W((e,t)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,showModal:n=>{t().hideTimeout&&clearTimeout(t().hideTimeout),e({isModalVisible:!0,hoverBlockId:n})},hideModal:()=>{e({isModalVisible:!1,hoverBlockId:null})},startHideTimeout:()=>{if(!t().isMouseOverModal){const n=setTimeout(()=>{e({isModalVisible:!1,hoverBlockId:null})},500);e({hideTimeout:n})}},clearHideTimeout:()=>{t().hideTimeout&&(clearTimeout(t().hideTimeout),e({hideTimeout:null}))},setMouseOverModal:n=>{e({isMouseOverModal:n})},isPreviewVisible:!1,showPreview:n=>{e({isPreviewVisible:!0,hoverBlockId:n})},hidePreview:()=>{e({isPreviewVisible:!1,hoverBlockId:null})}})),Fr=W(e=>({activeBlock:null,setActiveBlock:t=>e(()=>({activeBlock:t})),activeFont:null,setActiveFont:t=>e(()=>({activeFont:t})),themeSettings:{colors:{brand:{primary:"#fefefe",secondary:"#fefefe",toner:"#ffffff"},background:{primary:"#fefefe",secondary:"#000000"},text_icons:{primary:"#000000",secondary:"#fefefe",tertiary:"#fefefe",disabled:"#ffffff"},lines:{divider:"#000000",border:"#fefefe"},others:{link:"#000000"}},fonts:{heading:{h1:{font:"Archivo",weight:"900",size:48},h2:{font:"Archivo",weight:"700",size:32},h3:{font:"Archivo",weight:"600",size:24},h4:{font:"Archivo",weight:"500",size:16},h5:{font:"Archivo",weight:"400",size:16},h6:{font:"Archivo",weight:"400",size:16}},paragraph:{text:{font:"Archivo",size:48,weight:"400"}}},borders:{radius:52,thickness:52},buttons:{size:26,alignment:"left",radius:32,height:40},inputs:{general:{height:48,name:"Style Name",size:48,color:"black"},field:{active:!0,color:"black",opacity:40},border:{active:!0,style:"solid",radius:0,thickness:0,color:"black"},label:{height:48,size:48,color:"black",alignment:"left"}}},updateColor:(t,n,r)=>e(s=>{const o={...s.themeSettings.colors,[t]:{...s.themeSettings.colors[t],[n]:r}};return{themeSettings:{...s.themeSettings,colors:o}}}),updateFont:(t,n,r,s)=>e(o=>{const i={...o.themeSettings.fonts,[t]:{...o.themeSettings.fonts[t],[n]:{...o.themeSettings.fonts[t][n],[r]:s}}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(t,n)=>e(r=>{const s={...r.themeSettings.borders,[t]:n};return{themeSettings:{...r.themeSettings,borders:s}}}),updateButton:(t,n)=>e(r=>{const s={...r.themeSettings.buttons,[t]:n};return{themeSettings:{...r.themeSettings,buttons:s}}}),updateInput:(t,n,r)=>e(s=>({themeSettings:{...s.themeSettings,inputs:{...s.themeSettings.inputs,[t]:{...s.themeSettings.inputs[t],[r]:n}}}}))})),Dr=W(Le(e=>({fonts:[],setFonts:t=>e(()=>({fonts:t}))}),{name:"fonts-storage"})),Lr=W(e=>({settings:null,setSettings:t=>e(()=>({settings:t}))})),vn=W()(e=>({color:"default",initialColor:"",setInitialColor:t=>e(()=>({initialColor:t})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,setModalPosition:t=>e(()=>({modalPosition:t})),setHue:t=>e(()=>({hue:t})),setSaturation:t=>e(()=>({saturation:t})),setBrightness:t=>e(()=>({brightness:t})),setShowModal:t=>e(()=>({showModal:t})),setDragging:t=>e(()=>({dragging:t})),setActiveLabel:t=>e(()=>({activeLabel:t})),setColor:t=>e(()=>({color:t})),setUpdate:t=>e(()=>({update:t})),setColorChange:t=>e(()=>({colorChange:t}))})),Ur=W(Le((e,t)=>({pages:Pr,currentPage:"home",pageContext:{listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:n=>e(()=>({editedPage:n})),setCurrentPage:n=>e(()=>({currentPage:n})),setPageContext:n=>e(()=>({pageContext:n})),setIsOpenModal:n=>e(()=>({isOpenModal:n})),setIsOpenSelectModal:n=>e(()=>({isOpenSelectModal:n})),setIsEdit:n=>e(()=>({isEdit:n})),createPage:n=>{const r=t().pages,s=Ie();r[s]=n,e({pages:r})},updatePage:(n,r)=>{const s=t().pages;s[n]={...r},e({pages:s})},deletePage:n=>{const r=t().pages;delete r[n],e({pages:r})}}),{name:"pages-storage",partialize:e=>{const{pages:t}=e;return{pages:t}}})),bt=W(e=>({openModal:!1,setOpenModal:t=>e(()=>({openModal:t})),onChange:null,setOnChange:t=>e(()=>({onChange:t}))})),Mr=(e,t,n)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},$r="_icon_bsuj2_1",Hr="_hoverable_bsuj2_5",zr="_rotated_bsuj2_9",nt={icon:$r,hoverable:Hr,rotated:zr};var bn={exports:{}};/*!
|
|
31
|
+
Copyright (c) 2018 Jed Watson.
|
|
32
|
+
Licensed under the MIT License (MIT), see
|
|
33
|
+
http://jedwatson.github.io/classnames
|
|
34
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(o=s(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var c in o)t.call(o,c)&&o[c]&&(i=s(i,c));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(bn);var Vr=bn.exports;const z=pn(Vr),ee=e=>{const{name:t,fill:n="currentColor",hoverable:r=!1,onClick:s,className:o,width:i,height:c,rotated:f=!1}=e,[d,l]=B.useState(null);return B.useEffect(()=>{(async()=>{try{const{default:w}=await Mr(Object.assign({"../../../assets/icons/align-bottom.svg":()=>Promise.resolve().then(()=>require("./align-bottom-BNcdAnw9.cjs")),"../../../assets/icons/align-center.svg":()=>Promise.resolve().then(()=>require("./align-center-DEANXdAS.cjs")),"../../../assets/icons/align-left.svg":()=>Promise.resolve().then(()=>require("./align-left-Cm-uab8B.cjs")),"../../../assets/icons/align-right.svg":()=>Promise.resolve().then(()=>require("./align-right-3l34PJVv.cjs")),"../../../assets/icons/align-top.svg":()=>Promise.resolve().then(()=>require("./align-top-BGk9vlUd.cjs")),"../../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>require("./arrow-down-BVZ1P_L9.cjs")),"../../../assets/icons/arrow-left.svg":()=>Promise.resolve().then(()=>require("./arrow-left-CXb5pfjn.cjs")),"../../../assets/icons/arrow-preview-down.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-down-DaEiSgZ5.cjs")),"../../../assets/icons/arrow-preview-up.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-up-DaNjYolK.cjs")),"../../../assets/icons/arrow-right.svg":()=>Promise.resolve().then(()=>require("./arrow-right-QxBPnNiY.cjs")),"../../../assets/icons/arrow-square.svg":()=>Promise.resolve().then(()=>require("./arrow-square-BQEpI5Xn.cjs")),"../../../assets/icons/arrow-up-right.svg":()=>Promise.resolve().then(()=>require("./arrow-up-right-BAHL0rjI.cjs")),"../../../assets/icons/border-dashed.svg":()=>Promise.resolve().then(()=>require("./border-dashed-hzn9HgjT.cjs")),"../../../assets/icons/border-solid.svg":()=>Promise.resolve().then(()=>require("./border-solid-7GLUyhD0.cjs")),"../../../assets/icons/cards.svg":()=>Promise.resolve().then(()=>require("./cards-DsOTH3J4.cjs")),"../../../assets/icons/chat.svg":()=>Promise.resolve().then(()=>require("./chat-B_av70HO.cjs")),"../../../assets/icons/check.svg":()=>Promise.resolve().then(()=>require("./check-b4m73KG0.cjs")),"../../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy-D4o494-8.cjs")),"../../../assets/icons/corners-out.svg":()=>Promise.resolve().then(()=>require("./corners-out-4-FEW-w_.cjs")),"../../../assets/icons/desktop.svg":()=>Promise.resolve().then(()=>require("./desktop-BaS7MtSb.cjs")),"../../../assets/icons/drag.svg":()=>Promise.resolve().then(()=>require("./drag-CRprmRb-.cjs")),"../../../assets/icons/faqs.svg":()=>Promise.resolve().then(()=>require("./faqs-BqOuvjUH.cjs")),"../../../assets/icons/file.svg":()=>Promise.resolve().then(()=>require("./file-8wBLPxbL.cjs")),"../../../assets/icons/font.svg":()=>Promise.resolve().then(()=>require("./font-DkMBoXe1.cjs")),"../../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>require("./globe-Dc76Xp4l.cjs")),"../../../assets/icons/heading.svg":()=>Promise.resolve().then(()=>require("./heading-CPq36T7M.cjs")),"../../../assets/icons/house.svg":()=>Promise.resolve().then(()=>require("./house-CZ2u4ZpK.cjs")),"../../../assets/icons/image.svg":()=>Promise.resolve().then(()=>require("./image-Bx3xvWOB.cjs")),"../../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>require("./info-circle-DxyEtmA8.cjs")),"../../../assets/icons/layers.svg":()=>Promise.resolve().then(()=>require("./layers-D-nS2yjm.cjs")),"../../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>require("./lock-BmgYa3ZA.cjs")),"../../../assets/icons/mobile.svg":()=>Promise.resolve().then(()=>require("./mobile-jT12AeF2.cjs")),"../../../assets/icons/paint.svg":()=>Promise.resolve().then(()=>require("./paint-onR-PyLb.cjs")),"../../../assets/icons/palette.svg":()=>Promise.resolve().then(()=>require("./palette-BOR3Eq6r.cjs")),"../../../assets/icons/paragraph.svg":()=>Promise.resolve().then(()=>require("./paragraph-BYRArpHX.cjs")),"../../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus-7zIw2qu6.cjs")),"../../../assets/icons/radius.svg":()=>Promise.resolve().then(()=>require("./radius-CRLmETG0.cjs")),"../../../assets/icons/redo.svg":()=>Promise.resolve().then(()=>require("./redo-C-M_xJyP.cjs")),"../../../assets/icons/search.svg":()=>Promise.resolve().then(()=>require("./search-kPFRd0TJ.cjs")),"../../../assets/icons/settings.svg":()=>Promise.resolve().then(()=>require("./settings-BqG-9m9d.cjs")),"../../../assets/icons/sign-out.svg":()=>Promise.resolve().then(()=>require("./sign-out-vR-y-Fk7.cjs")),"../../../assets/icons/sliders.svg":()=>Promise.resolve().then(()=>require("./sliders-CsvSCMlf.cjs")),"../../../assets/icons/squares.svg":()=>Promise.resolve().then(()=>require("./squares-BaUyzSBO.cjs")),"../../../assets/icons/star.svg":()=>Promise.resolve().then(()=>require("./star-DX6bHsl_.cjs")),"../../../assets/icons/tablet.svg":()=>Promise.resolve().then(()=>require("./tablet-BvEDp-eu.cjs")),"../../../assets/icons/text-align-center.svg":()=>Promise.resolve().then(()=>require("./text-align-center-DSiXCwfH.cjs")),"../../../assets/icons/text-align-left.svg":()=>Promise.resolve().then(()=>require("./text-align-left-BLq4Pvg1.cjs")),"../../../assets/icons/text-align-right.svg":()=>Promise.resolve().then(()=>require("./text-align-right-B1liYPsk.cjs")),"../../../assets/icons/text-bold.svg":()=>Promise.resolve().then(()=>require("./text-bold-BqCslwM8.cjs")),"../../../assets/icons/text-code.svg":()=>Promise.resolve().then(()=>require("./text-code-CdpLXZEo.cjs")),"../../../assets/icons/text-italic.svg":()=>Promise.resolve().then(()=>require("./text-italic-DgM86CDI.cjs")),"../../../assets/icons/text-strike-through.svg":()=>Promise.resolve().then(()=>require("./text-strike-through-DUrcRZUF.cjs")),"../../../assets/icons/text-underline.svg":()=>Promise.resolve().then(()=>require("./text-underline-CwR9adlS.cjs")),"../../../assets/icons/textbox.svg":()=>Promise.resolve().then(()=>require("./textbox-CeYJQP_1.cjs")),"../../../assets/icons/thickness.svg":()=>Promise.resolve().then(()=>require("./thickness-DSnQHY5N.cjs")),"../../../assets/icons/ticket.svg":()=>Promise.resolve().then(()=>require("./ticket-BFI6P_1c.cjs")),"../../../assets/icons/trash.svg":()=>Promise.resolve().then(()=>require("./trash-Cy0hsvys.cjs")),"../../../assets/icons/undo.svg":()=>Promise.resolve().then(()=>require("./undo-D2eH1UgJ.cjs")),"../../../assets/icons/user-circle-gear.svg":()=>Promise.resolve().then(()=>require("./user-circle-gear-DeMV7Apx.cjs")),"../../../assets/icons/x.svg":()=>Promise.resolve().then(()=>require("./x-DW1UBLIF.cjs")),"../../../assets/icons/zoom-minus.svg":()=>Promise.resolve().then(()=>require("./zoom-minus-TiFzxDhk.cjs"))}),`../../../assets/icons/${t}.svg`,6);l(()=>w)}catch{console.error(`Icon "${t}" not found in assets.`),l(null)}})()},[t]),d?m.jsx(d,{fill:n,style:{"--icon-fill":n},className:z(nt.icon,o,{[nt.hoverable]:r,[nt.rotated]:f}),onClick:s,width:i||"24",height:c||"24"}):null},Wr="_button_rcjso_1",Jr={button:Wr},ut=e=>{const{children:t,onClick:n,style:r,className:s,disabled:o=!1,size:i="m"}=e;return m.jsx("button",{className:z(Jr.button,s),onClick:n,style:{...r,fontSize:i==="m"?14:i==="s"?12:16},disabled:o,children:t})},Kr="_wrapper_wp7u5_1",Yr="_label_wp7u5_9",Gr="_input_wp7u5_17",Xr="_required_wp7u5_36",Zr="_paddingless_wp7u5_40",Qr="_content_wp7u5_44",es="_borderless_wp7u5_50",ae={wrapper:Kr,label:Yr,input:Gr,required:Xr,paddingless:Zr,content:Qr,borderless:es},ts=e=>{const{onChange:t,label:n,value:r,type:s,min:o,max:i,placeholder:c,disabled:f=!1,required:d=!1,regex:l,paddingless:h=!1,borderless:w=!1,editable:x=!1}=e,[g,v]=B.useState(!1);function b(_){return Number(_)<0?String(o):_}function S(_){return!d||!l?!0:new RegExp(l).test(_)}return m.jsxs("div",{className:ae.wrapper,children:[n&&m.jsx("label",{className:ae.label,htmlFor:n,children:n}),m.jsxs("div",{className:ae.content,children:[m.jsx("input",{id:n,type:s||"text",onChange:_=>{if(s==="text")t(_.target.value);else{const k=b(_.target.value);t(k)}},value:r,autoComplete:"off",placeholder:c,className:z(ae.input,{[ae.required]:g&&d&&!S(r),[ae.paddingless]:h,[ae.borderless]:w}),min:s==="number"?o:void 0,max:s==="number"?i:void 0,disabled:f,onFocus:()=>v(!0)}),x&&m.jsx("div",{children:m.jsx(ee,{name:"sliders",width:20,height:20,hoverable:!0})})]})]})},ns="_wrapper_1v1ye_1",rs="_label_1v1ye_9",ss="_select_1v1ye_17",os="_icon_1v1ye_30",is="_rotate_1v1ye_34",as="_content_1v1ye_38",cs="_options_1v1ye_42",ls="_option_1v1ye_42",us="_addon_1v1ye_66",ne={wrapper:ns,label:rs,select:ss,icon:os,rotate:is,content:as,options:cs,option:ls,addon:us},ds=e=>{const{leftAddon:t,onChange:n,label:r,value:s,options:o,style:i}=e,[c,f]=B.useState(!1);function d(l){n(l),f(!1)}return B.useEffect(()=>{const l=()=>{f(!1)};return l(),document.body.addEventListener("click",l),()=>{document.body.removeEventListener("click",l)}},[]),m.jsxs("div",{className:ne.wrapper,style:{...i},children:[r&&m.jsx("label",{className:ne.label,htmlFor:r,children:r}),m.jsxs("div",{className:ne.content,onClick:l=>l.stopPropagation(),children:[m.jsxs("div",{className:ne.select,onClick:()=>f(l=>!l),children:[m.jsxs("div",{className:ne.addon,children:[t,m.jsx("span",{children:s})]}),m.jsx(ee,{name:"arrow-down",className:z(ne.icon,{[ne.rotate]:c})})]}),c&&m.jsx("div",{className:ne.options,onClick:()=>f(!1),children:o.filter(l=>l!==s).map(l=>m.jsx("div",{className:ne.option,onClick:()=>d(l),children:l},l))})]})]})},fs="_wrapper_3w2ni_1",hs="_active_3w2ni_24",ps="_toggle_3w2ni_27",ms="_background_3w2ni_39",gs="_padding_3w2ni_43",Q={wrapper:fs,switch:"_switch_3w2ni_13",active:hs,toggle:ps,background:ms,padding:gs},vs=e=>{const{onChange:t,style:n,current:r,label:s,hasBackground:o=!1,paddingless:i=!0}=e,[c,f]=B.useState(r),d=()=>{f(l=>!l),t==null||t(!c)};return m.jsx(m.Fragment,{children:s?m.jsxs("div",{className:z(Q.wrapper,{[Q.background]:o,[Q.padding]:!i}),children:[m.jsx("div",{className:z(Q.switch,{[Q.active]:c}),onClick:d,style:n,children:m.jsx("div",{className:Q.toggle})}),m.jsx("span",{className:Q.value,children:s})]}):m.jsx("div",{className:z(Q.switch,{[Q.active]:c}),onClick:d,style:n,children:m.jsx("div",{className:Q.toggle})})})},bs="_wrapper_1inu5_1",ys={wrapper:bs},_s=({children:e})=>{const{hoverBlockId:t,startHideTimeout:n,clearHideTimeout:r,setMouseOverModal:s}=gn();return t?m.jsx("div",{className:ys.wrapper,onMouseEnter:()=>{r(),s(!0)},onMouseLeave:()=>{s(!1),n()},children:e}):null},ws="_blocks_1op3c_1",Ss="_block_1op3c_1",xs="_active_1op3c_18",rt={blocks:ws,block:Ss,active:xs},Es=e=>{const{items:t,selectedItem:n,onSelect:r,getIconName:s}=e;return m.jsx("div",{className:rt.blocks,children:t.map(o=>m.jsx("div",{className:z(rt.block,{[rt.active]:n===o}),onClick:()=>r(o),children:m.jsx(ee,{name:s(o),fill:n===o?"#252525":"#757575"})},String(o)))})},Rs="_applyButton_1cqw4_2",ks="_cancelButton_1cqw4_7",Ps="_content_1cqw4_12",Cs="_label_1cqw4_18",Os="_colorValue_1cqw4_30",Ts="_modal_1cqw4_37",js="_colorMap_1cqw4_56",As="_indicator_1cqw4_64",Ns="_hueSlider_1cqw4_73",Bs="_slider_1cqw4_102",qs="_buttons_1cqw4_107",Is="_name_1cqw4_113",Fs="_secondary_1cqw4_118",Ds="_input_1cqw4_126",le={applyButton:Rs,cancelButton:ks,content:Ps,label:Cs,colorValue:Os,modal:Ts,colorMap:js,indicator:As,hueSlider:Ns,slider:Bs,buttons:qs,name:Is,secondary:Fs,input:Ds},Ls=e=>{const{initialColor:t,onChange:n,title:r,labelStyle:s="primary"}=e,[o,i]=B.useState(t),{setActiveLabel:c,setModalPosition:f,setInitialColor:d,setShowModal:l,setUpdate:h,setColor:w,setColorChange:x,colorChange:g}=vn();B.useEffect(()=>{const b=()=>{l(!1),c(null),d(t),h(()=>{}),w(t),x(()=>{})};return document.body.addEventListener("click",b),()=>{document.body.removeEventListener("click",b)}},[]);const v=b=>{b.stopPropagation(),l(!0),x(i),h(n),d(t),w(o);const S=b.currentTarget.getBoundingClientRect(),_=400,k=288,F=10,q=20,U=window.innerHeight-S.bottom,K=S.top,te=window.innerWidth-S.right,se=S.left;let G,X;G=S.bottom+F+window.scrollY,X=S.left,(U<_||U<q)&&(K>=_?G=S.top-_-F+window.scrollY:G=window.scrollY+(window.innerHeight-_)/2),te<k&&(se>=k?X=S.right-k:X=(window.innerWidth-k)/2),X<S.right&&X+k>S.left&&G<S.bottom&&G+_>S.top&&(te>=k?X=S.right+F+100:U>=_?G=S.bottom+F+window.scrollY:(G=window.scrollY+(window.innerHeight-_)/2,X=(window.innerWidth-k)/2)),f({top:G,left:X})};return m.jsxs("div",{className:le.content,children:[m.jsx("span",{className:z(le.name,{[le.secondary]:s==="secondary"}),children:r}),m.jsxs("label",{htmlFor:"color",className:le.label,children:[m.jsx("div",{className:le.colorValue,style:{background:o},onClick:v}),m.jsx("input",{type:"text",defaultValue:o,value:o,onChange:b=>{const S=b.target.value;n(S),w(S),i(S),g(S)},className:le.input})]})]})},Us="_modal_1qb2a_1",Ms={modal:Us},$s=e=>{const{close:t,children:n}=e;return B.useEffect(()=>{const r=()=>{t(!1)};return document.body.addEventListener("click",r),()=>{document.body.removeEventListener("click",r)}},[]),m.jsx("div",{className:Ms.modal,children:n})},Hs="_wrapper_1qvfi_1",zs="_label_1qvfi_10",Vs="_textarea_1qvfi_18",Ws="_length_1qvfi_33",Ae={wrapper:Hs,label:zs,textarea:Vs,length:Ws},Js=e=>{const{onChange:t,label:n,value:r,maxLength:s,placeholder:o}=e,[i,c]=B.useState(r.length);return m.jsxs("div",{className:Ae.wrapper,children:[n&&m.jsx("label",{className:Ae.label,htmlFor:n,children:n}),m.jsx("textarea",{id:n,defaultValue:r,onChange:f=>{c(f.target.value.length),t(f.target.value)},placeholder:o,className:Ae.textarea,maxLength:s}),s&&m.jsxs("div",{className:Ae.length,children:[i,"/",s]})]})},Ks="_wrapper_1fcne_2",Ys="_label_1fcne_10",Gs="_options_1fcne_18",Xs="_radioLabel_1fcne_23",Zs="_radio_1fcne_23",Qs="_custom_1fcne_36",eo="_option_1fcne_18",ce={wrapper:Ks,label:Ys,options:Gs,radioLabel:Xs,radio:Zs,custom:Qs,option:eo},to=e=>{const{defaultValue:t,options:n,onChange:r,label:s}=e,[o,i]=B.useState(t),c=f=>{const d=f.target.value;i(d),r(d)};return m.jsxs("div",{className:ce.wrapper,children:[m.jsx("span",{className:ce.label,children:s}),m.jsx("div",{className:ce.options,children:n.map(f=>m.jsxs("label",{className:ce.radioLabel,children:[m.jsx("input",{type:"radio",value:f.value,checked:o===f.value,onChange:c,className:ce.radio}),m.jsx("span",{className:ce.custom}),m.jsx("span",{className:ce.option,children:f.label})]},f.value))})]})},no="_tip_pl6k0_1",ro="_text_pl6k0_9",so="_warning_pl6k0_15",oo="_error_pl6k0_20",io="_hide_pl6k0_25",Se={tip:no,text:ro,warning:so,error:oo,hide:io},ao=e=>{const{type:t,message:n,style:r}=e,[s,o]=B.useState(!1);return m.jsxs("div",{className:z(Se.tip,{[Se.warning]:t==="warning",[Se.error]:t==="error",[Se.hide]:s}),style:r,children:[m.jsx("div",{children:m.jsx(ee,{name:"info-circle",fill:t==="warning"?"#C1972A":"#FF3F19",width:20,height:20})}),m.jsx("div",{className:Se.text,children:n}),m.jsx("div",{children:m.jsx(ee,{name:"x",fill:t==="warning"?"#C1972A":"#FF3F19",width:20,height:20,hoverable:!0,onClick:()=>o(!0)})})]})},co="_customCheckbox_1b69m_1",lo="_checkboxBox_1b69m_7",uo="_checked_1b69m_16",fo="_icon_1b69m_21",Ne={customCheckbox:co,checkboxBox:lo,checked:uo,icon:fo},yn=e=>{const{value:t,onChange:n}=e,[r,s]=B.useState(t),o=()=>{s(!r),n(!r)};return m.jsxs("label",{className:Ne.customCheckbox,children:[m.jsx("input",{type:"checkbox",checked:r,onChange:o,style:{display:"none"}}),m.jsx("span",{className:z(Ne.checkboxBox,{[Ne.checked]:r})}),r&&m.jsx("div",{className:Ne.icon,children:m.jsx(ee,{name:"check",width:14,height:14,fill:"#ff3f19"})})]})};function _n(e,t){return function(){return e.apply(t,arguments)}}const{toString:ho}=Object.prototype,{getPrototypeOf:yt}=Object,Ue=(e=>t=>{const n=ho.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=e=>(e=e.toLowerCase(),t=>Ue(t)===e),Me=e=>t=>typeof t===e,{isArray:me}=Array,Ee=Me("undefined");function po(e){return e!==null&&!Ee(e)&&e.constructor!==null&&!Ee(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wn=Y("ArrayBuffer");function mo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wn(e.buffer),t}const go=Me("string"),V=Me("function"),Sn=Me("number"),$e=e=>e!==null&&typeof e=="object",vo=e=>e===!0||e===!1,Be=e=>{if(Ue(e)!=="object")return!1;const t=yt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},bo=Y("Date"),yo=Y("File"),_o=Y("Blob"),wo=Y("FileList"),So=e=>$e(e)&&V(e.pipe),xo=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||V(e.append)&&((t=Ue(e))==="formdata"||t==="object"&&V(e.toString)&&e.toString()==="[object FormData]"))},Eo=Y("URLSearchParams"),[Ro,ko,Po,Co]=["ReadableStream","Request","Response","Headers"].map(Y),Oo=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Re(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),me(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function xn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,En=e=>!Ee(e)&&e!==ue;function dt(){const{caseless:e}=En(this)&&this||{},t={},n=(r,s)=>{const o=e&&xn(t,s)||s;Be(t[o])&&Be(r)?t[o]=dt(t[o],r):Be(r)?t[o]=dt({},r):me(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Re(arguments[r],n);return t}const To=(e,t,n,{allOwnKeys:r}={})=>(Re(t,(s,o)=>{n&&V(s)?e[o]=_n(s,n):e[o]=s},{allOwnKeys:r}),e),jo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ao=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},No=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&yt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Bo=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qo=e=>{if(!e)return null;if(me(e))return e;let t=e.length;if(!Sn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Io=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yt(Uint8Array)),Fo=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Do=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Lo=Y("HTMLFormElement"),Uo=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Zt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Mo=Y("RegExp"),Rn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Re(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},$o=e=>{Rn(e,(t,n)=>{if(V(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(V(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ho=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return me(e)?r(e):r(String(e).split(t)),n},zo=()=>{},Vo=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,st="abcdefghijklmnopqrstuvwxyz",Qt="0123456789",kn={DIGIT:Qt,ALPHA:st,ALPHA_DIGIT:st+st.toUpperCase()+Qt},Wo=(e=16,t=kn.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Jo(e){return!!(e&&V(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ko=e=>{const t=new Array(10),n=(r,s)=>{if($e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=me(r)?[]:{};return Re(r,(i,c)=>{const f=n(i,s+1);!Ee(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},Yo=Y("AsyncFunction"),Go=e=>e&&($e(e)||V(e))&&V(e.then)&&V(e.catch),Pn=((e,t)=>e?setImmediate:t?((n,r)=>(ue.addEventListener("message",({source:s,data:o})=>{s===ue&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ue.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(ue.postMessage)),Xo=typeof queueMicrotask<"u"?queueMicrotask.bind(ue):typeof process<"u"&&process.nextTick||Pn,u={isArray:me,isArrayBuffer:wn,isBuffer:po,isFormData:xo,isArrayBufferView:mo,isString:go,isNumber:Sn,isBoolean:vo,isObject:$e,isPlainObject:Be,isReadableStream:Ro,isRequest:ko,isResponse:Po,isHeaders:Co,isUndefined:Ee,isDate:bo,isFile:yo,isBlob:_o,isRegExp:Mo,isFunction:V,isStream:So,isURLSearchParams:Eo,isTypedArray:Io,isFileList:wo,forEach:Re,merge:dt,extend:To,trim:Oo,stripBOM:jo,inherits:Ao,toFlatObject:No,kindOf:Ue,kindOfTest:Y,endsWith:Bo,toArray:qo,forEachEntry:Fo,matchAll:Do,isHTMLForm:Lo,hasOwnProperty:Zt,hasOwnProp:Zt,reduceDescriptors:Rn,freezeMethods:$o,toObjectSet:Ho,toCamelCase:Uo,noop:zo,toFiniteNumber:Vo,findKey:xn,global:ue,isContextDefined:En,ALPHABET:kn,generateString:Wo,isSpecCompliantForm:Jo,toJSONObject:Ko,isAsyncFn:Yo,isThenable:Go,setImmediate:Pn,asap:Xo};function R(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}u.inherits(R,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const Cn=R.prototype,On={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{On[e]={value:e}});Object.defineProperties(R,On);Object.defineProperty(Cn,"isAxiosError",{value:!0});R.from=(e,t,n,r,s,o)=>{const i=Object.create(Cn);return u.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),R.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Zo=null;function ft(e){return u.isPlainObject(e)||u.isArray(e)}function Tn(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function en(e,t,n){return e?e.concat(t).map(function(s,o){return s=Tn(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Qo(e){return u.isArray(e)&&!e.some(ft)}const ei=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function He(e,t,n){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=u.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!u.isUndefined(b[v])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(s))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(u.isDate(g))return g.toISOString();if(!f&&u.isBlob(g))throw new R("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(g)||u.isTypedArray(g)?f&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function l(g,v,b){let S=g;if(g&&!b&&typeof g=="object"){if(u.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(u.isArray(g)&&Qo(g)||(u.isFileList(g)||u.endsWith(v,"[]"))&&(S=u.toArray(g)))return v=Tn(v),S.forEach(function(k,F){!(u.isUndefined(k)||k===null)&&t.append(i===!0?en([v],F,o):i===null?v:v+"[]",d(k))}),!1}return ft(g)?!0:(t.append(en(b,v,o),d(g)),!1)}const h=[],w=Object.assign(ei,{defaultVisitor:l,convertValue:d,isVisitable:ft});function x(g,v){if(!u.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(g),u.forEach(g,function(S,_){(!(u.isUndefined(S)||S===null)&&s.call(t,S,u.isString(_)?_.trim():_,v,w))===!0&&x(S,v?v.concat(_):[_])}),h.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return x(e),t}function tn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _t(e,t){this._pairs=[],e&&He(e,this,t)}const jn=_t.prototype;jn.append=function(t,n){this._pairs.push([t,n])};jn.toString=function(t){const n=t?function(r){return t.call(this,r,tn)}:tn;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function ti(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function An(e,t,n){if(!t)return e;const r=n&&n.encode||ti,s=n&&n.serialize;let o;if(s?o=s(t,n):o=u.isURLSearchParams(t)?t.toString():new _t(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class nn{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ni=typeof URLSearchParams<"u"?URLSearchParams:_t,ri=typeof FormData<"u"?FormData:null,si=typeof Blob<"u"?Blob:null,oi={isBrowser:!0,classes:{URLSearchParams:ni,FormData:ri,Blob:si},protocols:["http","https","file","blob","url","data"]},wt=typeof window<"u"&&typeof document<"u",ht=typeof navigator=="object"&&navigator||void 0,ii=wt&&(!ht||["ReactNative","NativeScript","NS"].indexOf(ht.product)<0),ai=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ci=wt&&window.location.href||"http://localhost",li=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wt,hasStandardBrowserEnv:ii,hasStandardBrowserWebWorkerEnv:ai,navigator:ht,origin:ci},Symbol.toStringTag,{value:"Module"})),$={...li,...oi};function ui(e,t){return He(e,new $.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return $.isNode&&u.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function di(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fi(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Bn(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=o>=n.length;return i=!i&&u.isArray(s)?s.length:i,f?(u.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!u.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&u.isArray(s[i])&&(s[i]=fi(s[i])),!c)}if(u.isFormData(e)&&u.isFunction(e.entries)){const n={};return u.forEachEntry(e,(r,s)=>{t(di(r),s,n,0)}),n}return null}function hi(e,t,n){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ke={transitional:Nn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=u.isObject(t);if(o&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return s?JSON.stringify(Bn(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ui(t,this.formSerializer).toString();if((c=u.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return He(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),hi(t)):t}],transformResponse:[function(t){const n=this.transitional||ke.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?R.from(c,R.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{ke.headers[e]={}});const pi=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mi=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
35
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&pi[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rn=Symbol("internals");function xe(e){return e&&String(e).trim().toLowerCase()}function qe(e){return e===!1||e==null?e:u.isArray(e)?e.map(qe):String(e)}function gi(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const vi=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ot(e,t,n,r,s){if(u.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!u.isString(t)){if(u.isString(r))return t.indexOf(r)!==-1;if(u.isRegExp(r))return r.test(t)}}function bi(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function yi(e,t){const n=u.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class H{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,d){const l=xe(f);if(!l)throw new Error("header name must be a non-empty string");const h=u.findKey(s,l);(!h||s[h]===void 0||d===!0||d===void 0&&s[h]!==!1)&&(s[h||f]=qe(c))}const i=(c,f)=>u.forEach(c,(d,l)=>o(d,l,f));if(u.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(u.isString(t)&&(t=t.trim())&&!vi(t))i(mi(t),n);else if(u.isHeaders(t))for(const[c,f]of t.entries())o(f,c,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=xe(t),t){const r=u.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return gi(s);if(u.isFunction(n))return n.call(this,s,r);if(u.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=xe(t),t){const r=u.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ot(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=xe(i),i){const c=u.findKey(r,i);c&&(!n||ot(r,r[c],c,n))&&(delete r[c],s=!0)}}return u.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||ot(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return u.forEach(this,(s,o)=>{const i=u.findKey(r,o);if(i){n[i]=qe(s),delete n[o];return}const c=t?bi(o):String(o).trim();c!==o&&delete n[o],n[c]=qe(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return u.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&u.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
36
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[rn]=this[rn]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=xe(i);r[c]||(yi(s,i),r[c]=!0)}return u.isArray(t)?t.forEach(o):o(t),this}}H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(H.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});u.freezeMethods(H);function it(e,t){const n=this||ke,r=t||n,s=H.from(r.headers);let o=r.data;return u.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function qn(e){return!!(e&&e.__CANCEL__)}function ge(e,t,n){R.call(this,e??"canceled",R.ERR_CANCELED,t,n),this.name="CanceledError"}u.inherits(ge,R,{__CANCEL__:!0});function In(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new R("Request failed with status code "+n.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _i(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wi(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),l=r[o];i||(i=d),n[s]=f,r[s]=d;let h=o,w=0;for(;h!==s;)w+=n[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-i<t)return;const x=l&&d-l;return x?Math.round(w*1e3/x):void 0}}function Si(e,t){let n=0,r=1e3/t,s,o;const i=(d,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,d)};return[(...d)=>{const l=Date.now(),h=l-n;h>=r?i(d,l):(s=d,o||(o=setTimeout(()=>{o=null,i(s)},r-h)))},()=>s&&i(s)]}const Fe=(e,t,n=3)=>{let r=0;const s=wi(50,250);return Si(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,d=s(f),l=i<=c;r=i;const h={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:d||void 0,estimated:d&&c&&l?(c-i)/d:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},sn=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},on=e=>(...t)=>u.asap(()=>e(...t)),xi=$.hasStandardBrowserEnv?function(){const t=$.navigator&&/(msie|trident)/i.test($.navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=u.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Ei=$.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];u.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),u.isString(r)&&i.push("path="+r),u.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ri(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ki(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fn(e,t){return e&&!Ri(t)?ki(e,t):t}const an=e=>e instanceof H?{...e}:e;function fe(e,t){t=t||{};const n={};function r(d,l,h){return u.isPlainObject(d)&&u.isPlainObject(l)?u.merge.call({caseless:h},d,l):u.isPlainObject(l)?u.merge({},l):u.isArray(l)?l.slice():l}function s(d,l,h){if(u.isUndefined(l)){if(!u.isUndefined(d))return r(void 0,d,h)}else return r(d,l,h)}function o(d,l){if(!u.isUndefined(l))return r(void 0,l)}function i(d,l){if(u.isUndefined(l)){if(!u.isUndefined(d))return r(void 0,d)}else return r(void 0,l)}function c(d,l,h){if(h in t)return r(d,l);if(h in e)return r(void 0,d)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(d,l)=>s(an(d),an(l),!0)};return u.forEach(Object.keys(Object.assign({},e,t)),function(l){const h=f[l]||s,w=h(e[l],t[l],l);u.isUndefined(w)&&h!==c||(n[l]=w)}),n}const Dn=e=>{const t=fe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=H.from(i),t.url=An(Fn(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(u.isFormData(n)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...l]=f?f.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...l].join("; "))}}if($.hasStandardBrowserEnv&&(r&&u.isFunction(r)&&(r=r(t)),r||r!==!1&&xi(t.url))){const d=s&&o&&Ei.read(o);d&&i.set(s,d)}return t},Pi=typeof XMLHttpRequest<"u",Ci=Pi&&function(e){return new Promise(function(n,r){const s=Dn(e);let o=s.data;const i=H.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:d}=s,l,h,w,x,g;function v(){x&&x(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function S(){if(!b)return;const k=H.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),q={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:k,config:e,request:b};In(function(K){n(K),v()},function(K){r(K),v()},q),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new R("Request aborted",R.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new R("Network Error",R.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let F=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const q=s.transitional||Nn;s.timeoutErrorMessage&&(F=s.timeoutErrorMessage),r(new R(F,q.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&u.forEach(i.toJSON(),function(F,q){b.setRequestHeader(q,F)}),u.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),c&&c!=="json"&&(b.responseType=s.responseType),d&&([w,g]=Fe(d,!0),b.addEventListener("progress",w)),f&&b.upload&&([h,x]=Fe(f),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(l=k=>{b&&(r(!k||k.type?new ge(null,e,b):k),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const _=_i(s.url);if(_&&$.protocols.indexOf(_)===-1){r(new R("Unsupported protocol "+_+":",R.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Oi=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(d){if(!s){s=!0,c();const l=d instanceof Error?d:this.reason;r.abort(l instanceof R?l:new ge(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new R(`timeout ${t} of ms exceeded`,R.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>d.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>u.asap(c),f}},Ti=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},ji=async function*(e,t){for await(const n of Ai(e))yield*Ti(n,t)},Ai=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cn=(e,t,n,r)=>{const s=ji(e,t);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:l}=await s.next();if(d){c(),f.close();return}let h=l.byteLength;if(n){let w=o+=h;n(w)}f.enqueue(new Uint8Array(l))}catch(d){throw c(d),d}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ze=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ln=ze&&typeof ReadableStream=="function",Ni=ze&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Un=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Bi=Ln&&Un(()=>{let e=!1;const t=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ln=64*1024,pt=Ln&&Un(()=>u.isReadableStream(new Response("").body)),De={stream:pt&&(e=>e.body)};ze&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!De[t]&&(De[t]=u.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new R(`Response type '${t}' is not supported`,R.ERR_NOT_SUPPORT,r)})})})(new Response);const qi=async e=>{if(e==null)return 0;if(u.isBlob(e))return e.size;if(u.isSpecCompliantForm(e))return(await new Request($.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(u.isArrayBufferView(e)||u.isArrayBuffer(e))return e.byteLength;if(u.isURLSearchParams(e)&&(e=e+""),u.isString(e))return(await Ni(e)).byteLength},Ii=async(e,t)=>{const n=u.toFiniteNumber(e.getContentLength());return n??qi(t)},Fi=ze&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:d,headers:l,withCredentials:h="same-origin",fetchOptions:w}=Dn(e);d=d?(d+"").toLowerCase():"text";let x=Oi([s,o&&o.toAbortSignal()],i),g;const v=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let b;try{if(f&&Bi&&n!=="get"&&n!=="head"&&(b=await Ii(l,r))!==0){let q=new Request(t,{method:"POST",body:r,duplex:"half"}),U;if(u.isFormData(r)&&(U=q.headers.get("content-type"))&&l.setContentType(U),q.body){const[K,te]=sn(b,Fe(on(f)));r=cn(q.body,ln,K,te)}}u.isString(h)||(h=h?"include":"omit");const S="credentials"in Request.prototype;g=new Request(t,{...w,signal:x,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:S?h:void 0});let _=await fetch(g);const k=pt&&(d==="stream"||d==="response");if(pt&&(c||k&&v)){const q={};["status","statusText","headers"].forEach(se=>{q[se]=_[se]});const U=u.toFiniteNumber(_.headers.get("content-length")),[K,te]=c&&sn(U,Fe(on(c),!0))||[];_=new Response(cn(_.body,ln,K,()=>{te&&te(),v&&v()}),q)}d=d||"text";let F=await De[u.findKey(De,d)||"text"](_,e);return!k&&v&&v(),await new Promise((q,U)=>{In(q,U,{data:F,headers:H.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:g})})}catch(S){throw v&&v(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new R("Network Error",R.ERR_NETWORK,e,g),{cause:S.cause||S}):R.from(S,S&&S.code,e,g)}}),mt={http:Zo,xhr:Ci,fetch:Fi};u.forEach(mt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const un=e=>`- ${e}`,Di=e=>u.isFunction(e)||e===null||e===!1,Mn={getAdapter:e=>{e=u.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!Di(n)&&(r=mt[(i=String(n)).toLowerCase()],r===void 0))throw new R(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
37
|
+
`+o.map(un).join(`
|
|
38
|
+
`):" "+un(o[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:mt};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function dn(e){return at(e),e.headers=H.from(e.headers),e.data=it.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Mn.getAdapter(e.adapter||ke.adapter)(e).then(function(r){return at(e),r.data=it.call(e,e.transformResponse,r),r.headers=H.from(r.headers),r},function(r){return qn(r)||(at(e),r&&r.response&&(r.response.data=it.call(e,e.transformResponse,r.response),r.response.headers=H.from(r.response.headers))),Promise.reject(r)})}const $n="1.7.7",St={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{St[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const fn={};St.transitional=function(t,n,r){function s(o,i){return"[Axios v"+$n+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new R(s(i," has been removed"+(n?" in "+n:"")),R.ERR_DEPRECATED);return n&&!fn[i]&&(fn[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function Li(e,t,n){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new R("option "+o+" must be "+f,R.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const gt={assertOptions:Li,validators:St},re=gt.validators;class de{constructor(t){this.defaults=t,this.interceptors={request:new nn,response:new nn}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
39
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fe(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&>.assertOptions(r,{silentJSONParsing:re.transitional(re.boolean),forcedJSONParsing:re.transitional(re.boolean),clarifyTimeoutError:re.transitional(re.boolean)},!1),s!=null&&(u.isFunction(s)?n.paramsSerializer={serialize:s}:gt.assertOptions(s,{encode:re.function,serialize:re.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&u.merge(o.common,o[n.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=H.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(f=f&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const d=[];this.interceptors.response.forEach(function(v){d.push(v.fulfilled,v.rejected)});let l,h=0,w;if(!f){const g=[dn.bind(this),void 0];for(g.unshift.apply(g,c),g.push.apply(g,d),w=g.length,l=Promise.resolve(n);h<w;)l=l.then(g[h++],g[h++]);return l}w=c.length;let x=n;for(h=0;h<w;){const g=c[h++],v=c[h++];try{x=g(x)}catch(b){v.call(this,b);break}}try{l=dn.call(this,x)}catch(g){return Promise.reject(g)}for(h=0,w=d.length;h<w;)l=l.then(d[h++],d[h++]);return l}getUri(t){t=fe(this.defaults,t);const n=Fn(t.baseURL,t.url);return An(n,t.params,t.paramsSerializer)}}u.forEach(["delete","get","head","options"],function(t){de.prototype[t]=function(n,r){return this.request(fe(r||{},{method:t,url:n,data:(r||{}).data}))}});u.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(fe(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}de.prototype[t]=n(),de.prototype[t+"Form"]=n(!0)});class xt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new ge(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new xt(function(s){t=s}),cancel:t}}}function Ui(e){return function(n){return e.apply(null,n)}}function Mi(e){return u.isObject(e)&&e.isAxiosError===!0}const vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vt).forEach(([e,t])=>{vt[t]=e});function Hn(e){const t=new de(e),n=_n(de.prototype.request,t);return u.extend(n,de.prototype,t,{allOwnKeys:!0}),u.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Hn(fe(e,s))},n}const j=Hn(ke);j.Axios=de;j.CanceledError=ge;j.CancelToken=xt;j.isCancel=qn;j.VERSION=$n;j.toFormData=He;j.AxiosError=R;j.Cancel=j.CanceledError;j.all=function(t){return Promise.all(t)};j.spread=Ui;j.isAxiosError=Mi;j.mergeConfig=fe;j.AxiosHeaders=H;j.formToJSON=e=>Bn(u.isHTMLForm(e)?new FormData(e):e);j.getAdapter=Mn.getAdapter;j.HttpStatusCode=vt;j.default=j;const Et="https://g-api.billgang.com",$i=async(e="get",t,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${Et}/v2/builder/shops/${r}/${t}`,o=localStorage.getItem("accessToken")||void 0;if(e.toUpperCase()==="GET")return(await j.get(s,{headers:{Authorization:`Bearer ${o}`}})).data;e.toUpperCase()==="POST"&&await j.post(s,{...n},{headers:{Authorization:`Bearer ${o}`}}),e.toUpperCase()==="PUT"&&await j.put(s,{...n},{headers:{Authorization:`Bearer ${o}`}})},Hi=async()=>{const e=localStorage.getItem("shopId")||void 0,t=`${Et}/v1/dash/shops/${e}/images`,n=localStorage.getItem("accessToken")||void 0;return(await j.get(t,{headers:{Authorization:`Bearer ${n}`}})).data},zi=async e=>{const t=localStorage.getItem("shopId")||void 0,n=`${Et}/v1/dash/shops/${t}/images`,r=localStorage.getItem("accessToken")||void 0;return(await j.post(n,e,{headers:{Authorization:`Bearer ${r}`,"Content-Type":"multipart/form-data"}})).data},Vi="_wrapper_tm686_2",Wi="_label_tm686_9",Ji="_icon_tm686_16",Ki="_text_tm686_26",Yi="_content_tm686_33",Gi="_modal_tm686_43",Xi="_top_tm686_51",Zi="_title_tm686_58",Qi="_modalContent_tm686_65",ea="_images_tm686_74",ta="_add_tm686_83",na="_description_tm686_95",ra="_bottom_tm686_105",sa="_cancel_tm686_117",oa="_highlight_tm686_122",ia="_accent_tm686_127",aa="_image_tm686_74",ca="_selected_tm686_141",la="_checkbox_tm686_145",ua="_loading_tm686_151",da="_spinner_tm686_163",fa="_spin_tm686_163",A={wrapper:Vi,label:Wi,icon:Ji,text:Ki,content:Yi,modal:Gi,top:Xi,title:Zi,modalContent:Qi,images:ea,add:ta,description:na,bottom:ra,cancel:sa,highlight:oa,accent:ia,image:aa,selected:ca,checkbox:la,loading:ua,spinner:da,spin:fa},ha=e=>{const{label:t,onChange:n}=e,{setOpenModal:r,setOnChange:s}=bt();return m.jsx(m.Fragment,{children:m.jsxs("div",{className:A.wrapper,onClick:o=>o.stopPropagation(),children:[t&&m.jsx("h4",{className:A.label,children:t}),m.jsxs("div",{onClick:()=>{s(n),r(!0)},className:A.content,children:[m.jsx("div",{className:A.icon,children:m.jsx(ee,{name:"plus",width:20,height:20,fill:"#757575"})}),m.jsx("span",{className:A.text,children:"Choose image"})]})]})})},pa=()=>{const{setOpenModal:e,onChange:t}=bt(),n=()=>{var h;(h=r.current)==null||h.click()},r=B.useRef(null),[s,o]=B.useState([]),[i,c]=B.useState(!1),f=async h=>{var b;const w=((b=h.target.files)==null?void 0:b[0])||null;if(!w)return;const x=new FormData;x.append("file",w),c(!0);const{data:g}=await zi(x),v=[...s];v.unshift({...g,cfId:g.path}),o([...v]),c(!1)},d=h=>{const x=[...s].map(g=>g.id===h.id?{...h}:g);o([...x])};B.useEffect(()=>{(async()=>{const{data:w}=await Hi(),x=w.map(g=>({...g,isSelected:!1}));o(x)})()},[]);function l(){const h=s.filter(w=>w.isSelected).map(w=>w.cfId);t==null||t(h)}return m.jsxs("div",{onClick:h=>h.stopPropagation(),className:A.modal,children:[m.jsxs("div",{className:A.top,children:[m.jsx("h4",{className:A.title,children:"Select Image"}),m.jsx(ee,{name:"x",width:20,height:20,hoverable:!0,onClick:()=>e(!1)})]}),m.jsxs("div",{className:A.modalContent,children:[m.jsxs("div",{className:A.top,children:[m.jsx("div",{children:"Search"}),m.jsxs("div",{children:["Selected: ",s.filter(h=>h.isSelected).length," images"]})]}),m.jsxs("div",{className:A.images,children:[m.jsxs("div",{className:A.input,children:[m.jsxs("div",{onClick:n,className:A.add,children:[m.jsx("div",{className:A.icon,children:m.jsx(ee,{name:"plus",width:20,height:20,fill:"#757575"})}),m.jsxs("div",{className:A.description,children:[m.jsx("span",{children:"Drag and drop images here, or "}),m.jsx("span",{className:A.highlight,children:"click to browse"}),m.jsx("br",{}),m.jsx("span",{className:A.accent,children:"up to 10MB."})]})]}),m.jsx("input",{type:"file",ref:r,style:{display:"none"},onChange:f})]}),i&&m.jsx(hn,{}),s.map(h=>m.jsxs("div",{className:z(A.image,{[A.selected]:h.isSelected}),children:[m.jsx("div",{className:A.checkbox,children:m.jsx(yn,{value:h.isSelected,onChange:w=>{d({...h,isSelected:w})}})}),m.jsx("img",{src:`https://imagedelivery.net/${h.cfId}/w=500`,alt:"image",width:"100%",height:"100%"})]},h.id)),s.length===0&&[...new Array(5)].map(()=>m.jsx(hn,{}))]})]}),m.jsxs("div",{className:A.bottom,children:[m.jsx(ut,{className:A.cancel,onClick:()=>e(!1),children:"Cancel"}),m.jsx(ut,{onClick:()=>{e(!1),l()},children:"Select"})]})]})},hn=()=>m.jsx("div",{className:A.loading,children:m.jsx("div",{className:A.spinner})});exports.Button=ut;exports.Checkbox=yn;exports.ChooseImage=ha;exports.ChooseImageModal=pa;exports.ColorPicker=Ls;exports.Icon=ee;exports.Input=ts;exports.Modal=$s;exports.Picker=Es;exports.Radio=to;exports.Select=ds;exports.Submodal=_s;exports.Switch=vs;exports.Textarea=Js;exports.Tip=ao;exports.axios=j;exports.clx=z;exports.defaultPageNames=kr;exports.getDefaultExportFromCjs=pn;exports.jsxRuntimeExports=m;exports.navbarBlocks=mn;exports.sizeOptions=Er;exports.styles=le;exports.updateSettings=$i;exports.useBlocksStore=Sr;exports.useChooseImageStore=bt;exports.useColorPickerStore=vn;exports.useDeviceStore=xr;exports.useFontsStore=Dr;exports.useLayersStore=Ir;exports.useNavbarStore=Cr;exports.usePagesStore=Ur;exports.usePreviewStore=jr;exports.useSettingsStore=Lr;exports.useSubmodalStore=gn;exports.useThemeSettingsStore=Fr;exports.v4=Ie;exports.weightOptions=Rr;
|
|
@@ -7,10 +7,12 @@ interface Props {
|
|
|
7
7
|
value: string;
|
|
8
8
|
type?: 'text' | 'number';
|
|
9
9
|
min?: number;
|
|
10
|
+
max?: number;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
required?: boolean;
|
|
12
13
|
regex?: string;
|
|
13
14
|
paddingless?: boolean;
|
|
15
|
+
borderless?: boolean;
|
|
14
16
|
editable?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const Input: React.FC<Props>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
type OnChange = (images: string[]) => void;
|
|
1
2
|
interface Options {
|
|
2
3
|
openModal: boolean;
|
|
3
4
|
setOpenModal: (openModal: boolean) => void;
|
|
5
|
+
onChange: OnChange | null;
|
|
6
|
+
setOnChange: (onChange: OnChange) => void;
|
|
4
7
|
}
|
|
5
8
|
export declare const useChooseImageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
|
|
6
9
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const t = (e) => /* @__PURE__ */ C.createElement("svg", { width: 22, height: 22, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ C.createElement("path", { d: "M2.75 5.5C2.75 5.31766 2.82243 5.1428 2.95136 5.01386C3.0803 4.88493 3.25516 4.8125 3.4375 4.8125H18.5625C18.7448 4.8125 18.9197 4.88493 19.0486 5.01386C19.1776 5.1428 19.25 5.31766 19.25 5.5C19.25 5.68234 19.1776 5.8572 19.0486 5.98614C18.9197 6.11507 18.7448 6.1875 18.5625 6.1875H3.4375C3.25516 6.1875 3.0803 6.11507 2.95136 5.98614C2.82243 5.8572 2.75 5.68234 2.75 5.5ZM5.5 8.25C5.31766 8.25 5.1428 8.32243 5.01386 8.45136C4.88493 8.5803 4.8125 8.75516 4.8125 8.9375C4.8125 9.11984 4.88493 9.2947 5.01386 9.42364C5.1428 9.55257 5.31766 9.625 5.5 9.625H16.5C16.6823 9.625 16.8572 9.55257 16.9861 9.42364C17.1151 9.2947 17.1875 9.11984 17.1875 8.9375C17.1875 8.75516 17.1151 8.5803 16.9861 8.45136C16.8572 8.32243 16.6823 8.25 16.5 8.25H5.5ZM18.5625 11.6875H3.4375C3.25516 11.6875 3.0803 11.7599 2.95136 11.8889C2.82243 12.0178 2.75 12.1927 2.75 12.375C2.75 12.5573 2.82243 12.7322 2.95136 12.8611C3.0803 12.9901 3.25516 13.0625 3.4375 13.0625H18.5625C18.7448 13.0625 18.9197 12.9901 19.0486 12.8611C19.1776 12.7322 19.25 12.5573 19.25 12.375C19.25 12.1927 19.1776 12.0178 19.0486 11.8889C18.9197 11.7599 18.7448 11.6875 18.5625 11.6875ZM16.5 15.125H5.5C5.31766 15.125 5.1428 15.1974 5.01386 15.3264C4.88493 15.4553 4.8125 15.6302 4.8125 15.8125C4.8125 15.9948 4.88493 16.1697 5.01386 16.2986C5.1428 16.4276 5.31766 16.5 5.5 16.5H16.5C16.6823 16.5 16.8572 16.4276 16.9861 16.2986C17.1151 16.1697 17.1875 15.9948 17.1875 15.8125C17.1875 15.6302 17.1151 15.4553 16.9861 15.3264C16.8572 15.1974 16.6823 15.125 16.5 15.125Z", fill: "#FF3F19" }));
|
|
3
|
+
export {
|
|
4
|
+
t as default
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function c(e){const C=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(C,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return C.default=e,Object.freeze(C)}const r=c(o),l=e=>r.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},r.createElement("path",{d:"M2.75 5.5C2.75 5.31766 2.82243 5.1428 2.95136 5.01386C3.0803 4.88493 3.25516 4.8125 3.4375 4.8125H18.5625C18.7448 4.8125 18.9197 4.88493 19.0486 5.01386C19.1776 5.1428 19.25 5.31766 19.25 5.5C19.25 5.68234 19.1776 5.8572 19.0486 5.98614C18.9197 6.11507 18.7448 6.1875 18.5625 6.1875H3.4375C3.25516 6.1875 3.0803 6.11507 2.95136 5.98614C2.82243 5.8572 2.75 5.68234 2.75 5.5ZM5.5 8.25C5.31766 8.25 5.1428 8.32243 5.01386 8.45136C4.88493 8.5803 4.8125 8.75516 4.8125 8.9375C4.8125 9.11984 4.88493 9.2947 5.01386 9.42364C5.1428 9.55257 5.31766 9.625 5.5 9.625H16.5C16.6823 9.625 16.8572 9.55257 16.9861 9.42364C17.1151 9.2947 17.1875 9.11984 17.1875 8.9375C17.1875 8.75516 17.1151 8.5803 16.9861 8.45136C16.8572 8.32243 16.6823 8.25 16.5 8.25H5.5ZM18.5625 11.6875H3.4375C3.25516 11.6875 3.0803 11.7599 2.95136 11.8889C2.82243 12.0178 2.75 12.1927 2.75 12.375C2.75 12.5573 2.82243 12.7322 2.95136 12.8611C3.0803 12.9901 3.25516 13.0625 3.4375 13.0625H18.5625C18.7448 13.0625 18.9197 12.9901 19.0486 12.8611C19.1776 12.7322 19.25 12.5573 19.25 12.375C19.25 12.1927 19.1776 12.0178 19.0486 11.8889C18.9197 11.7599 18.7448 11.6875 18.5625 11.6875ZM16.5 15.125H5.5C5.31766 15.125 5.1428 15.1974 5.01386 15.3264C4.88493 15.4553 4.8125 15.6302 4.8125 15.8125C4.8125 15.9948 4.88493 16.1697 5.01386 16.2986C5.1428 16.4276 5.31766 16.5 5.5 16.5H16.5C16.6823 16.5 16.8572 16.4276 16.9861 16.2986C17.1151 16.1697 17.1875 15.9948 17.1875 15.8125C17.1875 15.6302 17.1151 15.4553 16.9861 15.3264C16.8572 15.1974 16.6823 15.125 16.5 15.125Z",fill:"#FF3F19"}));exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function c(e){const C=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(C,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return C.default=e,Object.freeze(C)}const r=c(o),l=e=>r.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},r.createElement("path",{d:"M2.75 5.5C2.75 5.31766 2.82243 5.1428 2.95136 5.01386C3.0803 4.88493 3.25516 4.8125 3.4375 4.8125H18.5625C18.7448 4.8125 18.9197 4.88493 19.0486 5.01386C19.1776 5.1428 19.25 5.31766 19.25 5.5C19.25 5.68234 19.1776 5.8572 19.0486 5.98614C18.9197 6.11507 18.7448 6.1875 18.5625 6.1875H3.4375C3.25516 6.1875 3.0803 6.11507 2.95136 5.98614C2.82243 5.8572 2.75 5.68234 2.75 5.5ZM18.5625 8.25H7.5625C7.38016 8.25 7.2053 8.32243 7.07636 8.45136C6.94743 8.5803 6.875 8.75516 6.875 8.9375C6.875 9.11984 6.94743 9.2947 7.07636 9.42364C7.2053 9.55257 7.38016 9.625 7.5625 9.625H18.5625C18.7448 9.625 18.9197 9.55257 19.0486 9.42364C19.1776 9.2947 19.25 9.11984 19.25 8.9375C19.25 8.75516 19.1776 8.5803 19.0486 8.45136C18.9197 8.32243 18.7448 8.25 18.5625 8.25ZM18.5625 11.6875H3.4375C3.25516 11.6875 3.0803 11.7599 2.95136 11.8889C2.82243 12.0178 2.75 12.1927 2.75 12.375C2.75 12.5573 2.82243 12.7322 2.95136 12.8611C3.0803 12.9901 3.25516 13.0625 3.4375 13.0625H18.5625C18.7448 13.0625 18.9197 12.9901 19.0486 12.8611C19.1776 12.7322 19.25 12.5573 19.25 12.375C19.25 12.1927 19.1776 12.0178 19.0486 11.8889C18.9197 11.7599 18.7448 11.6875 18.5625 11.6875ZM18.5625 15.125H7.5625C7.38016 15.125 7.2053 15.1974 7.07636 15.3264C6.94743 15.4553 6.875 15.6302 6.875 15.8125C6.875 15.9948 6.94743 16.1697 7.07636 16.2986C7.2053 16.4276 7.38016 16.5 7.5625 16.5H18.5625C18.7448 16.5 18.9197 16.4276 19.0486 16.2986C19.1776 16.1697 19.25 15.9948 19.25 15.8125C19.25 15.6302 19.1776 15.4553 19.0486 15.3264C18.9197 15.1974 18.7448 15.125 18.5625 15.125Z",fill:"#FF3F19"}));exports.default=l;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as C from "react";
|
|
2
|
+
const e = (t) => /* @__PURE__ */ C.createElement("svg", { width: 22, height: 22, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ C.createElement("path", { d: "M2.75 5.5C2.75 5.31766 2.82243 5.1428 2.95136 5.01386C3.0803 4.88493 3.25516 4.8125 3.4375 4.8125H18.5625C18.7448 4.8125 18.9197 4.88493 19.0486 5.01386C19.1776 5.1428 19.25 5.31766 19.25 5.5C19.25 5.68234 19.1776 5.8572 19.0486 5.98614C18.9197 6.11507 18.7448 6.1875 18.5625 6.1875H3.4375C3.25516 6.1875 3.0803 6.11507 2.95136 5.98614C2.82243 5.8572 2.75 5.68234 2.75 5.5ZM18.5625 8.25H7.5625C7.38016 8.25 7.2053 8.32243 7.07636 8.45136C6.94743 8.5803 6.875 8.75516 6.875 8.9375C6.875 9.11984 6.94743 9.2947 7.07636 9.42364C7.2053 9.55257 7.38016 9.625 7.5625 9.625H18.5625C18.7448 9.625 18.9197 9.55257 19.0486 9.42364C19.1776 9.2947 19.25 9.11984 19.25 8.9375C19.25 8.75516 19.1776 8.5803 19.0486 8.45136C18.9197 8.32243 18.7448 8.25 18.5625 8.25ZM18.5625 11.6875H3.4375C3.25516 11.6875 3.0803 11.7599 2.95136 11.8889C2.82243 12.0178 2.75 12.1927 2.75 12.375C2.75 12.5573 2.82243 12.7322 2.95136 12.8611C3.0803 12.9901 3.25516 13.0625 3.4375 13.0625H18.5625C18.7448 13.0625 18.9197 12.9901 19.0486 12.8611C19.1776 12.7322 19.25 12.5573 19.25 12.375C19.25 12.1927 19.1776 12.0178 19.0486 11.8889C18.9197 11.7599 18.7448 11.6875 18.5625 11.6875ZM18.5625 15.125H7.5625C7.38016 15.125 7.2053 15.1974 7.07636 15.3264C6.94743 15.4553 6.875 15.6302 6.875 15.8125C6.875 15.9948 6.94743 16.1697 7.07636 16.2986C7.2053 16.4276 7.38016 16.5 7.5625 16.5H18.5625C18.7448 16.5 18.9197 16.4276 19.0486 16.2986C19.1776 16.1697 19.25 15.9948 19.25 15.8125C19.25 15.6302 19.1776 15.4553 19.0486 15.3264C18.9197 15.1974 18.7448 15.125 18.5625 15.125Z", fill: "#FF3F19" }));
|
|
3
|
+
export {
|
|
4
|
+
e as default
|
|
5
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonType } from '../ButtonsSettings';
|
|
3
3
|
interface Props {
|
|
4
4
|
buttons: ButtonType[];
|
|
5
|
-
setButtons:
|
|
5
|
+
setButtons: (value: ButtonType[]) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const ButtonTypeSettings: React.FC<Props>;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextType } from '../TypeTexts';
|
|
3
|
-
export type TypeButton = 'Primary' | 'Secondary';
|
|
3
|
+
export type TypeButton = 'Primary' | 'Secondary' | 'Tertiary';
|
|
4
4
|
export type Destination = 'Open Link' | 'Go to Page';
|
|
5
5
|
export interface ButtonType {
|
|
6
6
|
image?: string;
|
|
@@ -12,9 +12,9 @@ export interface ButtonType {
|
|
|
12
12
|
}
|
|
13
13
|
interface Props {
|
|
14
14
|
isActiveButtons: boolean;
|
|
15
|
-
setIsActiveButtons:
|
|
15
|
+
setIsActiveButtons: (value: boolean) => void;
|
|
16
16
|
buttons: ButtonType[];
|
|
17
|
-
setButtons:
|
|
17
|
+
setButtons: (value: ButtonType[]) => void;
|
|
18
18
|
}
|
|
19
19
|
export declare const ButtonsSettings: React.FC<Props>;
|
|
20
20
|
export {};
|
|
@@ -2,7 +2,7 @@ import { ButtonType } from '.';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface Props {
|
|
4
4
|
activeButton: ButtonType;
|
|
5
|
-
setActiveButton:
|
|
5
|
+
setActiveButton: (value: ButtonType | null) => void;
|
|
6
6
|
popupPosition: {
|
|
7
7
|
top: number;
|
|
8
8
|
left: number;
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ModalOption } from './popup';
|
|
2
|
+
import { Other } from '../OtherSettings';
|
|
2
3
|
export interface ItemBase {
|
|
3
4
|
image?: string;
|
|
4
5
|
name: string;
|
|
5
6
|
id: string;
|
|
6
7
|
}
|
|
7
|
-
export interface Product extends ItemBase {
|
|
8
|
-
}
|
|
9
|
-
export interface Pages extends ItemBase {
|
|
10
|
-
}
|
|
11
8
|
interface CommomPropsBase<T extends ItemBase> {
|
|
12
|
-
isActiveItems
|
|
13
|
-
setIsActiveItems:
|
|
9
|
+
isActiveItems?: boolean;
|
|
10
|
+
setIsActiveItems?: (value: boolean) => void;
|
|
14
11
|
items: T[];
|
|
15
|
-
setItems:
|
|
16
|
-
isProductStats?: boolean;
|
|
17
|
-
setIsProductStats?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
+
setItems: (value: T[]) => void;
|
|
18
13
|
title?: string;
|
|
19
14
|
subtitle?: string;
|
|
20
15
|
editable?: boolean;
|
|
21
16
|
draggable?: boolean;
|
|
22
17
|
withImage?: boolean;
|
|
18
|
+
deletable?: boolean;
|
|
19
|
+
addable?: boolean;
|
|
20
|
+
other?: Other[];
|
|
21
|
+
hasRangeSelector?: boolean;
|
|
22
|
+
rangeSelectorOptions?: {
|
|
23
|
+
count: number;
|
|
24
|
+
setCount: (value: number) => void;
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
step?: number;
|
|
28
|
+
label?: string;
|
|
29
|
+
};
|
|
30
|
+
modalOptions?: ModalOption<T>[];
|
|
23
31
|
}
|
|
24
32
|
interface SelectProps<T extends ItemBase> extends CommomPropsBase<T> {
|
|
25
33
|
itemsType: 'select';
|
|
@@ -1,12 +1,56 @@
|
|
|
1
1
|
import { ItemBase } from '.';
|
|
2
|
-
|
|
2
|
+
interface ImageOption<T> {
|
|
3
|
+
type: 'image';
|
|
4
|
+
label?: string;
|
|
5
|
+
field: keyof T;
|
|
6
|
+
}
|
|
7
|
+
interface TextOption<T> {
|
|
8
|
+
type: 'text';
|
|
9
|
+
label?: string;
|
|
10
|
+
field: {
|
|
11
|
+
type: keyof T;
|
|
12
|
+
text: keyof T;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
interface InputOption<T> {
|
|
16
|
+
type: 'input';
|
|
17
|
+
label?: string;
|
|
18
|
+
field: keyof T;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
}
|
|
21
|
+
interface InputSwitchOption<T> {
|
|
22
|
+
type: 'inputSwitch';
|
|
23
|
+
inputLabel?: string;
|
|
24
|
+
switchLabel?: string;
|
|
25
|
+
field: {
|
|
26
|
+
text: keyof T;
|
|
27
|
+
switch: keyof T;
|
|
28
|
+
};
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
}
|
|
31
|
+
interface ListOption<T> {
|
|
32
|
+
type: 'list';
|
|
33
|
+
label?: string;
|
|
34
|
+
field: keyof T;
|
|
35
|
+
draggable?: boolean;
|
|
36
|
+
deletable?: boolean;
|
|
37
|
+
itemsOptions: string[];
|
|
38
|
+
}
|
|
39
|
+
interface SelectOption<T> {
|
|
40
|
+
type: 'select';
|
|
41
|
+
label?: string;
|
|
42
|
+
field: keyof T;
|
|
43
|
+
itemsOptions: string[];
|
|
44
|
+
}
|
|
45
|
+
export type ModalOption<T> = ImageOption<T> | TextOption<T> | InputOption<T> | InputSwitchOption<T> | ListOption<T> | SelectOption<T>;
|
|
3
46
|
interface Props<T extends ItemBase> {
|
|
4
47
|
activeItem: T;
|
|
5
|
-
setActiveItem:
|
|
48
|
+
setActiveItem: (value: T | null) => void;
|
|
6
49
|
popupPosition: {
|
|
7
50
|
top: number;
|
|
8
51
|
left: number;
|
|
9
52
|
};
|
|
53
|
+
modalOptions: ModalOption<T>[];
|
|
10
54
|
}
|
|
11
55
|
export declare const ProductPopup: <T extends ItemBase>(props: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
56
|
export {};
|
|
@@ -3,8 +3,8 @@ export type Padding = 'left' | 'top' | 'right' | 'bottom';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
alignment: string;
|
|
5
5
|
padding: Record<Padding, number>;
|
|
6
|
-
setAlignment:
|
|
7
|
-
setPadding:
|
|
6
|
+
setAlignment: (value: Alignment) => void;
|
|
7
|
+
setPadding: (value: Record<Padding, number>) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const LayoutSettings: React.FC<Props>;
|
|
10
10
|
export {};
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { TextType } from '../TypeTexts';
|
|
3
3
|
interface Props {
|
|
4
4
|
typeText: TextType;
|
|
5
|
-
setTypeText:
|
|
6
|
-
isActiveText
|
|
7
|
-
setIsActiveText:
|
|
5
|
+
setTypeText: (value: TextType) => void;
|
|
6
|
+
isActiveText?: boolean;
|
|
7
|
+
setIsActiveText?: (value: boolean) => void;
|
|
8
8
|
text: string;
|
|
9
|
-
setText:
|
|
10
|
-
title
|
|
9
|
+
setText: (value: string) => void;
|
|
10
|
+
title?: string;
|
|
11
11
|
subtitle?: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const TextSettings: React.FC<Props>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type TextType = 'bold' | 'italic' | 'underline' | 'strike-through' | 'code';
|
|
2
2
|
interface Props {
|
|
3
3
|
typeText: TextType;
|
|
4
|
-
setTypeText:
|
|
4
|
+
setTypeText: (value: TextType) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare const TypeTexts: React.FC<Props>;
|
|
7
7
|
export {};
|
package/dist/ui/index.d.ts
CHANGED