@storecraft/dashboard 1.0.6 → 1.0.8
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/lib/index.cjs +27 -26
- package/dist/lib/index.js +43 -38
- package/dist/lib/index.umd.cjs +27 -26
- package/dist/lib/src/comps/table-schema-view.d.ts +1 -1
- package/dist/website/assets/{index-C7Q7dM9P.js → index-BBYA20Z2.js} +26 -25
- package/dist/website/assets/{style-CWN3iS8N.css → style-DiY8UMjb.css} +1 -1
- package/dist/website/index.html +3 -3
- package/package.json +2 -2
@@ -140,7 +140,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
|
|
140
140
|
text-gray-600 dark:text-gray-400
|
141
141
|
text-base font-semibold tracking-tight`,loading:c,onClick:d,...l})}):null},Gn=({from:t,to:e,rounded:n="rounded-lg",stroke:r="border-2",children:i,text:s="what",className:a="h-10",btnClassName:o="",...l})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:a,children:f.jsx("button",{className:`h-full w-full align-middle text-center px-3
|
142
142
|
rounded-md shelf-button-color-soft
|
143
|
-
whitespace-nowrap ${o}`,children:i??s,...l})}),PR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(OR,{...i})}),hf=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},iT="3.7.7",IR=iT,pu=typeof Buffer=="function",g8=typeof TextDecoder=="function"?new TextDecoder:void 0,v8=typeof TextEncoder=="function"?new TextEncoder:void 0,LR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h1=Array.prototype.slice.call(LR),rh=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(h1),RR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,wn=String.fromCharCode.bind(String),y8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),sT=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),aT=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),oT=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=h1[e>>18&63]+h1[e>>12&63]+h1[e>>6&63]+h1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},uy=typeof btoa=="function"?t=>btoa(t):pu?t=>Buffer.from(t,"binary").toString("base64"):oT,C4=pu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(wn.apply(null,t.subarray(r,r+4096)));return uy(n.join(""))},fp=(t,e=!1)=>e?sT(C4(t)):C4(t),jR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?wn(192|e>>>6)+wn(128|e&63):wn(224|e>>>12&15)+wn(128|e>>>6&63)+wn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return wn(240|e>>>18&7)+wn(128|e>>>12&63)+wn(128|e>>>6&63)+wn(128|e&63)}},FR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,lT=t=>t.replace(FR,jR),x8=pu?t=>Buffer.from(t,"utf8").toString("base64"):v8?t=>C4(v8.encode(t)):t=>uy(lT(t)),Mc=(t,e=!1)=>e?sT(x8(t)):x8(t),_8=t=>Mc(t,!0),BR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,HR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return wn((n>>>10)+55296)+wn((n&1023)+56320);case 3:return wn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return wn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},cT=t=>t.replace(BR,HR),uT=t=>{if(t=t.replace(/\s+/g,""),!RR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=rh[t.charAt(s++)]<<18|rh[t.charAt(s++)]<<12|(r=rh[t.charAt(s++)])<<6|(i=rh[t.charAt(s++)]),n+=r===64?wn(e>>16&255):i===64?wn(e>>16&255,e>>8&255):wn(e>>16&255,e>>8&255,e&255);return n},dy=typeof atob=="function"?t=>atob(aT(t)):pu?t=>Buffer.from(t,"base64").toString("binary"):uT,dT=pu?t=>y8(Buffer.from(t,"base64")):t=>y8(dy(t).split("").map(e=>e.charCodeAt(0))),fT=t=>dT(hT(t)),zR=pu?t=>Buffer.from(t,"base64").toString("utf8"):g8?t=>g8.decode(dT(t)):t=>cT(dy(t)),hT=t=>aT(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),T4=t=>zR(hT(t)),UR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},pT=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),mT=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,pT(n));t("fromBase64",function(){return T4(this)}),t("toBase64",function(e){return Mc(this,e)}),t("toBase64URI",function(){return Mc(this,!0)}),t("toBase64URL",function(){return Mc(this,!0)}),t("toUint8Array",function(){return fT(this)})},gT=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,pT(n));t("toBase64",function(e){return fp(this,e)}),t("toBase64URI",function(){return fp(this,!0)}),t("toBase64URL",function(){return fp(this,!0)})},$R=()=>{mT(),gT()},VR={version:iT,VERSION:IR,atob:dy,atobPolyfill:uT,btoa:uy,btoaPolyfill:oT,fromBase64:T4,toBase64:Mc,encode:Mc,encodeURI:_8,encodeURL:_8,utob:lT,btou:cT,decode:T4,isValid:UR,fromUint8Array:fp,toUint8Array:fT,extendString:mT,extendUint8Array:gT,extendBuiltins:$R},b8=t=>t.toLowerCase().split(" ").join("-"),S4=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},N4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},vT=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,WR=t=>JSON.parse(VR.decode(decodeURIComponent(t)));var N0=Nn.GenIcon,YR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},GR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},KR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},qR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8ZM5 10V20H19V10H5ZM11 14H13V16H11V14ZM7 14H9V16H7V14ZM15 14H17V16H15V14ZM16 8V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8H16Z"}}]})(e)},A0=Nn.GenIcon,QR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},ZR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},XR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},JR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const ej="@storecraft/dashboard",tj="1.0.6",nj="Storecraft Official Dashboard",rj="MIT",ij="Tomer Shalev (https://github.com/store-craft)",sj="https://github.com/store-craft/storecraft",aj={type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},oj=["commerce","dashboard","react","storecraft"],lj="module",cj="./src/index.jsx",uj={".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},dj={start:"npm run dashboard:dev","dashboard:dev":"vite","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:publish":"npm publish --access public","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build"},fj={"@storecraft/core":"^1.0.0","@storecraft/sdk":"^0.1.0","@storecraft/sdk-react-hooks":"^0.1.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},hj={"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},pj=["dist"],mj={name:ej,version:tj,description:nj,license:rj,author:ij,homepage:sj,repository:aj,keywords:oj,type:lj,module:cj,exports:uj,scripts:dj,dependencies:fj,devDependencies:hj,files:pj},gj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA9CAYAAAD1VdrqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAGJhJREFUeJzlOwmYXEWZf9V7r+/p6ZmeycxkkplJyIRcJCbhygFyHyqnsKgICyYgsIKurqirn4uCH3gsuwt8uPst64qfLrriwSEYXYEoIkeQKxByTJK5JzM9ffe7X9X+Ve+9np4k4OfuurrZ6unp1/XqVdV/H/W3CkG79sxPX8+rymZFU5KEEIUAvgihgJ8A/hf/AhuXf/71zF1S7yLhHS6bnIeTcCyQYBbO5VzMf4QQxpjHPO64jmtP6Ptr03yIEaqomqpGxJ7EOEVRIpRSRUxBcV4xB6HiM5hNzo7X4gFKVXkfb3jYEk2pN3+w5TvvEvOo4d6ppS2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Izz8QqaElMtF6OOJ3K0xGY8VGoP1nOKhP3Tr6/bG9uThv5ZCJNX//wys+aY0M1tqYWYHEfotBcj6VVRfoLjJLg1p2IXioYVpbRR0aorm3B7LtS+AG5wxIxZqhDKj9jzsWlqNSOyFj4yYtaNbiEMM5unuWQMY5DSUnClUHpZxod26/1R5jNUf3uPuAKD3Zcs0+RCBTaYTEUe03OS/n2qhdwGAjLrWxJ/JUwQ92aODwSFlGJWghoJk4Ir1LFAtFwGmPIy0Wn3bJoueeKzhlQFuzzOYO2NubH1AVph7dFmuP+HUpzipRU6bSOOTyiJgSShZJypoxHrz9ZBQG81NCqLXgl1AJ6YFMWwFWFXxGTULNFpkRVBgeC4ri8UPoAdxwXJO5slbTqbUyNQyQmEwbSVHEZ4lDJBdFZA7NBZ+p/F8f0eDkJ+Qmsbco9kSE64p7YcixLu7Pcu0O0zU7gIpyMRRbooKtux3/CRMitNFcerR3AAAAAElFTkSuQmCC",vj=({children:t,...e})=>f.jsxs("svg",{viewBox:"0 0 302 53",...e,children:[t,f.jsxs("g",{className:"",children:[f.jsx("path",{d:"M 29.756 18.948 C 29.962 17.646 29.691 16.631 28.944 15.903 C 28.196 15.175 26.964 14.811 25.248 14.811 C 24.111 14.811 23.127 14.959 22.296 15.255 C 21.465 15.551 20.795 15.956 20.288 16.471 C 19.781 16.986 19.439 17.575 19.262 18.238 C 19.103 18.783 19.093 19.262 19.232 19.676 C 19.371 20.091 19.636 20.455 20.025 20.768 C 20.414 21.082 20.911 21.357 21.515 21.594 C 21.883 21.738 22.285 21.872 22.72 21.994 L 9.695 21.994 C 9.62 21.043 9.728 19.992 10.02 18.842 C 10.569 16.593 11.665 14.622 13.306 12.929 C 14.947 11.236 16.963 9.917 19.353 8.97 C 21.744 8.023 24.318 7.549 27.076 7.549 C 29.893 7.549 32.222 8.026 34.062 8.979 C 35.901 9.932 37.181 11.266 37.902 12.982 C 38.622 14.699 38.712 16.687 38.172 18.948 Z M 30.923 24.488 C 32.14 25.139 33.106 25.915 33.823 26.814 C 34.346 27.47 34.729 28.199 34.974 29 L 18.016 29 L 17.649 28.909 C 14.68 28.187 12.492 27.018 11.084 25.403 C 10.7 24.963 10.395 24.48 10.167 23.955 L 29.804 23.955 C 30.197 24.122 30.57 24.299 30.923 24.488 Z M 34.951 33.863 C 34.761 34.61 34.519 35.322 34.226 36 L 24.639 36 C 24.716 35.935 24.79 35.867 24.862 35.798 C 25.453 35.23 25.847 34.579 26.042 33.845 C 26.201 33.159 26.135 32.57 25.843 32.079 C 25.593 31.659 25.169 31.286 24.572 30.961 L 35.287 30.961 C 35.313 31.856 35.201 32.823 34.951 33.863 Z M 31.736 39.776 C 30.178 41.421 28.216 42.682 25.849 43.558 C 23.482 44.434 20.783 44.872 17.753 44.872 C 14.711 44.872 12.173 44.416 10.139 43.504 C 8.106 42.593 6.693 41.208 5.902 39.35 C 5.716 38.914 5.571 38.451 5.466 37.961 L 33.173 37.961 C 32.751 38.605 32.273 39.21 31.736 39.776 Z M 5.724 32.301 L 14.14 32.301 C 13.919 33.472 13.989 34.449 14.351 35.23 C 14.481 35.511 14.644 35.768 14.841 36 L 5.261 36 C 5.252 34.877 5.406 33.644 5.724 32.301 Z M 38.769 15.184 L 40.549 8.046 L 71.284 8.046 L 69.504 15.184 L 58.478 15.184 L 56.78 21.994 L 48.115 21.994 L 49.813 15.184 Z M 51.191 44.41 L 42.526 44.41 L 44.134 37.961 L 52.799 37.961 Z M 99.63 26.228 C 99.391 27.187 99.116 28.111 98.806 29 L 89.779 29 C 90.11 28.14 90.399 27.216 90.645 26.228 C 90.844 25.428 90.995 24.671 91.098 23.955 L 100.109 23.955 C 99.984 24.689 99.825 25.447 99.63 26.228 Z M 86.963 42.741 C 83.981 44.185 80.862 44.907 77.607 44.907 C 74.34 44.907 71.58 44.179 69.327 42.723 C 67.525 41.558 66.174 39.971 65.276 37.961 L 93.429 37.961 C 91.516 39.987 89.36 41.58 86.963 42.741 Z M 64.917 26.228 C 65.112 25.447 65.33 24.689 65.572 23.955 L 74.565 23.955 C 74.31 24.671 74.083 25.428 73.884 26.228 C 73.638 27.216 73.466 28.14 73.368 29 L 64.359 29 C 64.492 28.111 64.678 27.187 64.917 26.228 Z M 69.753 16.054 C 71.98 13.273 74.581 11.16 77.557 9.715 C 80.533 8.271 83.655 7.549 86.922 7.549 C 90.177 7.549 92.936 8.271 95.197 9.715 C 97.459 11.16 99.013 13.273 99.858 16.054 C 100.387 17.795 100.555 19.775 100.362 21.994 L 91.258 21.994 C 91.266 21.364 91.226 20.775 91.138 20.227 C 90.877 18.593 90.226 17.356 89.187 16.516 C 88.148 15.675 86.752 15.255 85 15.255 C 83.26 15.255 81.658 15.675 80.194 16.516 C 78.73 17.356 77.46 18.593 76.383 20.227 C 76.022 20.775 75.689 21.364 75.382 21.994 L 66.295 21.994 C 67.207 19.775 68.36 17.795 69.753 16.054 Z M 73.391 32.23 C 73.652 33.863 74.306 35.1 75.351 35.941 C 75.376 35.961 75.401 35.981 75.426 36 L 64.58 36 C 64.175 34.492 64.031 32.813 64.148 30.961 L 73.276 30.961 C 73.288 31.406 73.327 31.829 73.391 32.23 Z M 84.344 35.941 C 85.803 35.1 87.07 33.863 88.146 32.23 C 88.41 31.829 88.659 31.406 88.894 30.961 L 98.04 30.961 C 97.234 32.813 96.254 34.492 95.1 36 L 84.24 36 C 84.275 35.981 84.309 35.961 84.344 35.941 Z M 96.11 44.41 L 97.718 37.961 L 106.507 37.961 L 104.899 44.41 Z M 105.177 8.046 L 120.198 8.046 C 122.921 8.046 125.152 8.534 126.891 9.511 C 128.63 10.488 129.811 11.885 130.436 13.702 C 131.06 15.519 131.062 17.67 130.442 20.156 C 130.283 20.793 130.095 21.406 129.878 21.994 L 120.615 21.994 C 120.922 21.458 121.162 20.845 121.334 20.156 C 121.614 19.031 121.615 18.099 121.338 17.359 C 121.061 16.619 120.52 16.063 119.713 15.69 C 118.906 15.317 117.846 15.131 116.532 15.131 L 112.199 15.131 L 110.488 21.994 L 101.699 21.994 Z M 127.191 26.574 C 126.381 27.499 125.472 28.308 124.465 29 L 99.952 29 L 101.21 23.955 L 109.999 23.955 L 109.729 25.039 L 114.061 25.039 C 115.387 25.039 116.54 24.864 117.521 24.515 C 117.948 24.363 118.342 24.176 118.704 23.955 L 129 23.955 C 128.49 24.906 127.887 25.779 127.191 26.574 Z M 125.347 43.426 L 126.71 37.961 L 152.065 37.961 L 150.457 44.41 L 125.102 44.41 L 125.347 43.426 L 125.638 44.41 L 116.05 44.41 L 114.213 37.961 L 123.732 37.961 Z M 134.168 8.046 L 159.523 8.046 L 157.744 15.184 L 141.178 15.184 L 139.48 21.994 L 130.691 21.994 Z M 112.504 31.963 L 108.002 31.963 L 106.996 36 L 98.207 36 L 99.463 30.961 L 121.663 30.961 L 123.152 36 L 113.654 36 Z M 56.291 23.955 L 55.033 29 L 46.368 29 L 47.626 23.955 Z M 54.544 30.961 L 53.288 36 L 44.623 36 L 45.879 30.961 Z M 127.199 36 L 128.455 30.961 L 137.244 30.961 L 135.987 36 Z M 128.944 29 L 130.202 23.955 L 154.261 23.955 L 153.003 29 Z",sstyle:"fill: rgb(51, 51, 51);"}),f.jsx("path",{d:"M 188.795 19.736 L 185.933 19.736 Q 185.571 17.852 184.575 16.15 Q 183.579 14.448 182.058 13.135 Q 180.536 11.822 178.562 11.061 Q 176.588 10.3 174.234 10.3 Q 170.648 10.3 167.668 12.193 Q 164.689 14.085 162.905 17.744 Q 161.121 21.402 161.121 26.691 Q 161.121 32.015 162.905 35.664 Q 164.689 39.314 167.668 41.197 Q 170.648 43.081 174.234 43.081 Q 176.588 43.081 178.562 42.329 Q 180.536 41.578 182.058 40.265 Q 183.579 38.952 184.575 37.24 Q 185.571 35.529 185.933 33.645 L 188.795 33.645 Q 188.36 36.036 187.174 38.218 Q 185.988 40.4 184.122 42.094 Q 182.257 43.787 179.766 44.765 Q 177.276 45.743 174.234 45.743 Q 169.579 45.743 166.002 43.389 Q 162.425 41.034 160.397 36.751 Q 158.369 32.468 158.369 26.691 Q 158.369 20.913 160.397 16.63 Q 162.425 12.347 166.002 9.992 Q 169.579 7.638 174.234 7.638 Q 177.276 7.638 179.766 8.607 Q 182.257 9.576 184.122 11.269 Q 185.988 12.963 187.174 15.136 Q 188.36 17.309 188.795 19.736 Z M 192.123 45.236 L 192.123 8.145 L 203.823 8.145 Q 207.554 8.145 210.143 9.54 Q 212.733 10.934 214.092 13.406 Q 215.45 15.878 215.45 19.12 Q 215.45 22.326 214.092 24.78 Q 212.733 27.234 210.152 28.61 Q 207.572 29.987 203.859 29.987 L 193.644 29.987 L 193.644 27.379 L 203.787 27.379 Q 206.666 27.379 208.649 26.365 Q 210.632 25.35 211.647 23.494 Q 212.661 21.638 212.661 19.12 Q 212.661 16.585 211.638 14.692 Q 210.614 12.8 208.631 11.749 Q 206.648 10.699 203.75 10.699 L 194.948 10.699 L 194.948 45.236 Z M 207.916 28.465 L 217.044 45.236 L 213.784 45.236 L 204.728 28.465 Z M 218.397 45.236 L 215.445 45.236 L 228.883 8.145 L 231.98 8.145 L 245.418 45.236 L 242.466 45.236 L 230.549 11.785 L 230.332 11.785 Z M 221.385 31.146 L 239.496 31.146 L 239.496 33.718 L 221.385 33.718 Z M 247.05 45.236 L 247.05 8.145 L 268.131 8.145 L 268.131 10.699 L 249.876 10.699 L 249.876 25.387 L 266.429 25.387 L 266.429 27.958 L 249.876 27.958 L 249.876 45.236 Z M 269.583 10.699 L 269.583 8.145 L 296.024 8.145 L 296.024 10.699 L 284.216 10.699 L 284.216 45.236 L 281.391 45.236 L 281.391 10.699 Z",transform:"matrix(0.998892068862915, 0, 0, 1, 0.17177101969718933, 0)",sstyle:"fill: rgb(51, 51, 51);"})]})]}),yT=({className:t})=>f.jsx(vj,{className:"fill-[url(#a)] text-pink-500 "+t,children:f.jsx("defs",{children:f.jsxs("linearGradient",{id:"a",children:[f.jsx("stop",{offset:"0%","stop-color":"rgb(236 72 153)"}),f.jsx("stop",{offset:"100%","stop-color":"rgb(151 60 255)"})]})})}),yj=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
|
143
|
+
whitespace-nowrap ${o}`,children:i??s,...l})}),PR=({from:t,to:e,rounded:n="rounded-lg",stroke:r,...i})=>f.jsx(lt,{from:t,to:e,rounded:n,stroke:r,className:"w-fit h-fit",children:f.jsx(OR,{...i})}),hf=({Icon:t,from:e="#973cff",to:n="rgb(236 72 153)",...r})=>{const i=btoa(`gradient_${e}_${n}`);return f.jsxs(f.Fragment,{children:[f.jsx("svg",{width:"0",height:"0",className:"absolute",children:f.jsxs("linearGradient",{id:i,x1:"100%",y1:"100%",x2:"0%",y2:"0%",children:[f.jsx("stop",{stopColor:e,offset:"0%"}),f.jsx("stop",{stopColor:n,offset:"100%"})]})}),f.jsx(t,{style:{fill:`url(#${i})`},...r})]})},iT="3.7.7",IR=iT,pu=typeof Buffer=="function",g8=typeof TextDecoder=="function"?new TextDecoder:void 0,v8=typeof TextEncoder=="function"?new TextEncoder:void 0,LR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h1=Array.prototype.slice.call(LR),rh=(t=>{let e={};return t.forEach((n,r)=>e[n]=r),e})(h1),RR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,wn=String.fromCharCode.bind(String),y8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),sT=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),aT=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),oT=t=>{let e,n,r,i,s="";const a=t.length%3;for(let o=0;o<t.length;){if((n=t.charCodeAt(o++))>255||(r=t.charCodeAt(o++))>255||(i=t.charCodeAt(o++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,s+=h1[e>>18&63]+h1[e>>12&63]+h1[e>>6&63]+h1[e&63]}return a?s.slice(0,a-3)+"===".substring(a):s},uy=typeof btoa=="function"?t=>btoa(t):pu?t=>Buffer.from(t,"binary").toString("base64"):oT,C4=pu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let r=0,i=t.length;r<i;r+=4096)n.push(wn.apply(null,t.subarray(r,r+4096)));return uy(n.join(""))},fp=(t,e=!1)=>e?sT(C4(t)):C4(t),jR=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?wn(192|e>>>6)+wn(128|e&63):wn(224|e>>>12&15)+wn(128|e>>>6&63)+wn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return wn(240|e>>>18&7)+wn(128|e>>>12&63)+wn(128|e>>>6&63)+wn(128|e&63)}},FR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,lT=t=>t.replace(FR,jR),x8=pu?t=>Buffer.from(t,"utf8").toString("base64"):v8?t=>C4(v8.encode(t)):t=>uy(lT(t)),Mc=(t,e=!1)=>e?sT(x8(t)):x8(t),_8=t=>Mc(t,!0),BR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,HR=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return wn((n>>>10)+55296)+wn((n&1023)+56320);case 3:return wn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return wn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},cT=t=>t.replace(BR,HR),uT=t=>{if(t=t.replace(/\s+/g,""),!RR.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,n="",r,i;for(let s=0;s<t.length;)e=rh[t.charAt(s++)]<<18|rh[t.charAt(s++)]<<12|(r=rh[t.charAt(s++)])<<6|(i=rh[t.charAt(s++)]),n+=r===64?wn(e>>16&255):i===64?wn(e>>16&255,e>>8&255):wn(e>>16&255,e>>8&255,e&255);return n},dy=typeof atob=="function"?t=>atob(aT(t)):pu?t=>Buffer.from(t,"base64").toString("binary"):uT,dT=pu?t=>y8(Buffer.from(t,"base64")):t=>y8(dy(t).split("").map(e=>e.charCodeAt(0))),fT=t=>dT(hT(t)),zR=pu?t=>Buffer.from(t,"base64").toString("utf8"):g8?t=>g8.decode(dT(t)):t=>cT(dy(t)),hT=t=>aT(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),T4=t=>zR(hT(t)),UR=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},pT=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),mT=function(){const t=(e,n)=>Object.defineProperty(String.prototype,e,pT(n));t("fromBase64",function(){return T4(this)}),t("toBase64",function(e){return Mc(this,e)}),t("toBase64URI",function(){return Mc(this,!0)}),t("toBase64URL",function(){return Mc(this,!0)}),t("toUint8Array",function(){return fT(this)})},gT=function(){const t=(e,n)=>Object.defineProperty(Uint8Array.prototype,e,pT(n));t("toBase64",function(e){return fp(this,e)}),t("toBase64URI",function(){return fp(this,!0)}),t("toBase64URL",function(){return fp(this,!0)})},$R=()=>{mT(),gT()},VR={version:iT,VERSION:IR,atob:dy,atobPolyfill:uT,btoa:uy,btoaPolyfill:oT,fromBase64:T4,toBase64:Mc,encode:Mc,encodeURI:_8,encodeURL:_8,utob:lT,btou:cT,decode:T4,isValid:UR,fromUint8Array:fp,toUint8Array:fT,extendString:mT,extendUint8Array:gT,extendBuiltins:$R},b8=t=>t.toLowerCase().split(" ").join("-"),S4=async()=>{let t;try{t=await navigator.clipboard.readText(),console.log("Content read from clipboard: ",t)}catch(e){console.error("Failed to read: ",e)}return t},N4=async t=>{try{await navigator.clipboard.writeText(t),console.log("Content copied to clipboard")}catch(e){console.error("Failed to copy: ",e)}},vT=()=>"maxTouchPoints"in navigator?navigator.maxTouchPoints>0:!1,WR=t=>JSON.parse(VR.decode(decodeURIComponent(t)));var N0=Nn.GenIcon,YR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M2.00488 4C2.00488 3.44772 2.4526 3 3.00488 3H21.0049C21.5572 3 22.0049 3.44772 22.0049 4V9.5C20.6242 9.5 19.5049 10.6193 19.5049 12C19.5049 13.3807 20.6242 14.5 22.0049 14.5V20C22.0049 20.5523 21.5572 21 21.0049 21H3.00488C2.4526 21 2.00488 20.5523 2.00488 20V4ZM8.09024 19C8.29615 18.4174 8.85177 18 9.50488 18C10.158 18 10.7136 18.4174 10.9195 19H20.0049V16.0322C18.5232 15.2959 17.5049 13.7669 17.5049 12C17.5049 10.2331 18.5232 8.70411 20.0049 7.96776V5H10.9195C10.7136 5.5826 10.158 6 9.50488 6C8.85177 6 8.29615 5.5826 8.09024 5H4.00488V19H8.09024ZM9.50488 11C8.67646 11 8.00488 10.3284 8.00488 9.5C8.00488 8.67157 8.67646 8 9.50488 8C10.3333 8 11.0049 8.67157 11.0049 9.5C11.0049 10.3284 10.3333 11 9.50488 11ZM9.50488 16C8.67646 16 8.00488 15.3284 8.00488 14.5C8.00488 13.6716 8.67646 13 9.50488 13C10.3333 13 11.0049 13.6716 11.0049 14.5C11.0049 15.3284 10.3333 16 9.50488 16Z"}}]})(e)},GR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 13C18.3221 13 16.7514 13.4592 15.4068 14.2587C16.5908 15.6438 17.5269 17.2471 18.1465 19H20V13ZM16.0037 19C14.0446 14.3021 9.4079 11 4 11V19H16.0037ZM4 9C7.82914 9 11.3232 10.4348 13.9738 12.7961C15.7047 11.6605 17.7752 11 20 11V3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H6V1H8V5H4V9ZM18 1V5H10V3H16V1H18ZM16.5 10C15.6716 10 15 9.32843 15 8.5C15 7.67157 15.6716 7 16.5 7C17.3284 7 18 7.67157 18 8.5C18 9.32843 17.3284 10 16.5 10Z"}}]})(e)},KR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13H11V3H3V13ZM3 21H11V15H3V21ZM13 21H21V11H13V21ZM13 3V9H21V3H13Z"}}]})(e)},qR=function(e){return N0({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8ZM5 10V20H19V10H5ZM11 14H13V16H11V14ZM7 14H9V16H7V14ZM15 14H17V16H15V14ZM16 8V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8H16Z"}}]})(e)},A0=Nn.GenIcon,QR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},ZR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"}},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"16"}},{tag:"line",attr:{x1:"8",y1:"12",x2:"16",y2:"12"}}]})(e)},XR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"}},{tag:"polyline",attr:{points:"7 3 7 8 15 8"}}]})(e)},JR=function(e){return A0({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"}},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"}}]})(e)};const ej="@storecraft/dashboard",tj="1.0.8",nj="Storecraft Official Dashboard",rj="MIT",ij="Tomer Shalev (https://github.com/store-craft)",sj="https://github.com/store-craft/storecraft",aj={type:"git",url:"https://github.com/store-craft/storecraft.git",directory:"packages/dashboard"},oj=["commerce","dashboard","react","storecraft"],lj="module",cj="./src/index.jsx",uj={".":{import:"./dist/lib/index.js",require:"./dist/lib/index.umd.cjs",types:"./dist/lib/src/index.d.ts"}},dj={start:"npm run dashboard:dev","dashboard:dev":"vite --host","dashboard:build":"vite build && npm run dashboard:lib:build","dashboard:lib:build":"vite build -c vite.lib.config.js","dashboard:lint":"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0","dashboard:preview":"vite preview","dashboard:publish":"npm publish --access public","dashboard:analyze":"npx vite-bundle-visualizer -c vite.lib.config.js",prepublishOnly:"npm run dashboard:build"},fj={"@storecraft/core":"^1.0.0","@storecraft/sdk":"^0.1.0","@storecraft/sdk-react-hooks":"^0.1.0","@uiw/react-md-editor":"^3.18.1","@monaco-editor/react":"^4.6.0","monaco-editor":"^0.48.0","chart.js":"^4.2.0",handlebars:"^4.7.8","js-base64":"^3.7.5",marked:"^5.0.2",react:"18.2.0","react-datepicker":"^4.10.0","react-dom":"18.2.0","react-drag-drop-container":"^6.1.1","react-icons":"^4.9.0","react-image-crop":"^10.0.7","react-inspector":"^6.0.1","react-router-dom":"^6.14.1"},hj={"@types/react":"^18.2.66","@types/react-datepicker":"^6.2.0","@types/react-dom":"^18.2.22","@types/react-image-crop":"^8.1.6","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.19",eslint:"^8.57.0","eslint-plugin-react":"^7.34.1","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.4.6",postcss:"^8.4.38","postcss-flexbugs-fixes":"^5.0.2","postcss-import":"^14.1.0","postcss-preset-env":"^7.7.2",sass:"^1.58.3","tailwind-scrollbar":"^2.1.0",tailwindcss:"^3.4.3",vite:"^5.2.0","vite-plugin-css-injected-by-js":"^3.5.1","vite-plugin-dts":"^3.9.1"},pj=["dist"],mj={name:ej,version:tj,description:nj,license:rj,author:ij,homepage:sj,repository:aj,keywords:oj,type:lj,module:cj,exports:uj,scripts:dj,dependencies:fj,devDependencies:hj,files:pj},gj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA9CAYAAAD1VdrqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAGJhJREFUeJzlOwmYXEWZf9V7r+/p6ZmeycxkkplJyIRcJCbhygFyHyqnsKgICyYgsIKurqirn4uCH3gsuwt8uPst64qfLrriwSEYXYEoIkeQKxByTJK5JzM9ffe7X9X+Ve+9np4k4OfuurrZ6unp1/XqVdV/H/W3CkG79sxPX8+rymZFU5KEEIUAvgihgJ8A/hf/AhuXf/71zF1S7yLhHS6bnIeTcCyQYBbO5VzMf4QQxpjHPO64jmtP6Ptr03yIEaqomqpGxJ7EOEVRIpRSRUxBcV4xB6HiM5hNzo7X4gFKVXkfb3jYEk2pN3+w5TvvEvOo4d6ppS2tTjtrOLjhxoK9Ewnk4dvh75BZd3kjsA13yaFP8fA5DgnohIJXhCrP4x3zkKGk4Uvj9eH2xoPLdqJ4YV8dcMIQiRz7SUDOw059MKAHb76x8ZD8DY/VGac+HZ+5U39KXCn4mqsshRG2HXReBNI4mB+0LmmY8G0aAVq/loDfcOqX/tqteuf5myQN25i9ydkXhwOaH/SNNwwNGbyR4nw2tXhdVuQrgsDPpysl8DVegNm8d9DeyEF9hxlZLVXnnrHmwrvuuu+rN0nArZJztV12+sIF3xqwxoXIQYvOAHPI1mZRaAY0fsga5JD/Go9CF10Go952MElpZsGQKw+7zcNzhFEzE6bu3IgdN6lbPz/+0W3Pb+vU46bUM+Il5+ShhB7MPnwWtHVEvR3Xv8XGZuGrzuqhoAdEIET29ZGjIO8NQb425Q8lwciZf7NXaOAsMZLXGZXAQ3/3wudUtRa9fnXHhhTrwJvUxTssGNQwWaCcOOGS0CSYgNTFdwZqKaOS8A0b440o4nVA6/AGEiaHisW5v1GhD3gApK+oObw28goYni6JJA0C5zPzcAiADN9IR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xs("g",{className:"",children:[f.jsx("path",{d:"M 29.756 18.948 C 29.962 17.646 29.691 16.631 28.944 15.903 C 28.196 15.175 26.964 14.811 25.248 14.811 C 24.111 14.811 23.127 14.959 22.296 15.255 C 21.465 15.551 20.795 15.956 20.288 16.471 C 19.781 16.986 19.439 17.575 19.262 18.238 C 19.103 18.783 19.093 19.262 19.232 19.676 C 19.371 20.091 19.636 20.455 20.025 20.768 C 20.414 21.082 20.911 21.357 21.515 21.594 C 21.883 21.738 22.285 21.872 22.72 21.994 L 9.695 21.994 C 9.62 21.043 9.728 19.992 10.02 18.842 C 10.569 16.593 11.665 14.622 13.306 12.929 C 14.947 11.236 16.963 9.917 19.353 8.97 C 21.744 8.023 24.318 7.549 27.076 7.549 C 29.893 7.549 32.222 8.026 34.062 8.979 C 35.901 9.932 37.181 11.266 37.902 12.982 C 38.622 14.699 38.712 16.687 38.172 18.948 Z M 30.923 24.488 C 32.14 25.139 33.106 25.915 33.823 26.814 C 34.346 27.47 34.729 28.199 34.974 29 L 18.016 29 L 17.649 28.909 C 14.68 28.187 12.492 27.018 11.084 25.403 C 10.7 24.963 10.395 24.48 10.167 23.955 L 29.804 23.955 C 30.197 24.122 30.57 24.299 30.923 24.488 Z M 34.951 33.863 C 34.761 34.61 34.519 35.322 34.226 36 L 24.639 36 C 24.716 35.935 24.79 35.867 24.862 35.798 C 25.453 35.23 25.847 34.579 26.042 33.845 C 26.201 33.159 26.135 32.57 25.843 32.079 C 25.593 31.659 25.169 31.286 24.572 30.961 L 35.287 30.961 C 35.313 31.856 35.201 32.823 34.951 33.863 Z M 31.736 39.776 C 30.178 41.421 28.216 42.682 25.849 43.558 C 23.482 44.434 20.783 44.872 17.753 44.872 C 14.711 44.872 12.173 44.416 10.139 43.504 C 8.106 42.593 6.693 41.208 5.902 39.35 C 5.716 38.914 5.571 38.451 5.466 37.961 L 33.173 37.961 C 32.751 38.605 32.273 39.21 31.736 39.776 Z M 5.724 32.301 L 14.14 32.301 C 13.919 33.472 13.989 34.449 14.351 35.23 C 14.481 35.511 14.644 35.768 14.841 36 L 5.261 36 C 5.252 34.877 5.406 33.644 5.724 32.301 Z M 38.769 15.184 L 40.549 8.046 L 71.284 8.046 L 69.504 15.184 L 58.478 15.184 L 56.78 21.994 L 48.115 21.994 L 49.813 15.184 Z M 51.191 44.41 L 42.526 44.41 L 44.134 37.961 L 52.799 37.961 Z M 99.63 26.228 C 99.391 27.187 99.116 28.111 98.806 29 L 89.779 29 C 90.11 28.14 90.399 27.216 90.645 26.228 C 90.844 25.428 90.995 24.671 91.098 23.955 L 100.109 23.955 C 99.984 24.689 99.825 25.447 99.63 26.228 Z M 86.963 42.741 C 83.981 44.185 80.862 44.907 77.607 44.907 C 74.34 44.907 71.58 44.179 69.327 42.723 C 67.525 41.558 66.174 39.971 65.276 37.961 L 93.429 37.961 C 91.516 39.987 89.36 41.58 86.963 42.741 Z M 64.917 26.228 C 65.112 25.447 65.33 24.689 65.572 23.955 L 74.565 23.955 C 74.31 24.671 74.083 25.428 73.884 26.228 C 73.638 27.216 73.466 28.14 73.368 29 L 64.359 29 C 64.492 28.111 64.678 27.187 64.917 26.228 Z M 69.753 16.054 C 71.98 13.273 74.581 11.16 77.557 9.715 C 80.533 8.271 83.655 7.549 86.922 7.549 C 90.177 7.549 92.936 8.271 95.197 9.715 C 97.459 11.16 99.013 13.273 99.858 16.054 C 100.387 17.795 100.555 19.775 100.362 21.994 L 91.258 21.994 C 91.266 21.364 91.226 20.775 91.138 20.227 C 90.877 18.593 90.226 17.356 89.187 16.516 C 88.148 15.675 86.752 15.255 85 15.255 C 83.26 15.255 81.658 15.675 80.194 16.516 C 78.73 17.356 77.46 18.593 76.383 20.227 C 76.022 20.775 75.689 21.364 75.382 21.994 L 66.295 21.994 C 67.207 19.775 68.36 17.795 69.753 16.054 Z M 73.391 32.23 C 73.652 33.863 74.306 35.1 75.351 35.941 C 75.376 35.961 75.401 35.981 75.426 36 L 64.58 36 C 64.175 34.492 64.031 32.813 64.148 30.961 L 73.276 30.961 C 73.288 31.406 73.327 31.829 73.391 32.23 Z M 84.344 35.941 C 85.803 35.1 87.07 33.863 88.146 32.23 C 88.41 31.829 88.659 31.406 88.894 30.961 L 98.04 30.961 C 97.234 32.813 96.254 34.492 95.1 36 L 84.24 36 C 84.275 35.981 84.309 35.961 84.344 35.941 Z M 96.11 44.41 L 97.718 37.961 L 106.507 37.961 L 104.899 44.41 Z M 105.177 8.046 L 120.198 8.046 C 122.921 8.046 125.152 8.534 126.891 9.511 C 128.63 10.488 129.811 11.885 130.436 13.702 C 131.06 15.519 131.062 17.67 130.442 20.156 C 130.283 20.793 130.095 21.406 129.878 21.994 L 120.615 21.994 C 120.922 21.458 121.162 20.845 121.334 20.156 C 121.614 19.031 121.615 18.099 121.338 17.359 C 121.061 16.619 120.52 16.063 119.713 15.69 C 118.906 15.317 117.846 15.131 116.532 15.131 L 112.199 15.131 L 110.488 21.994 L 101.699 21.994 Z M 127.191 26.574 C 126.381 27.499 125.472 28.308 124.465 29 L 99.952 29 L 101.21 23.955 L 109.999 23.955 L 109.729 25.039 L 114.061 25.039 C 115.387 25.039 116.54 24.864 117.521 24.515 C 117.948 24.363 118.342 24.176 118.704 23.955 L 129 23.955 C 128.49 24.906 127.887 25.779 127.191 26.574 Z M 125.347 43.426 L 126.71 37.961 L 152.065 37.961 L 150.457 44.41 L 125.102 44.41 L 125.347 43.426 L 125.638 44.41 L 116.05 44.41 L 114.213 37.961 L 123.732 37.961 Z M 134.168 8.046 L 159.523 8.046 L 157.744 15.184 L 141.178 15.184 L 139.48 21.994 L 130.691 21.994 Z M 112.504 31.963 L 108.002 31.963 L 106.996 36 L 98.207 36 L 99.463 30.961 L 121.663 30.961 L 123.152 36 L 113.654 36 Z M 56.291 23.955 L 55.033 29 L 46.368 29 L 47.626 23.955 Z M 54.544 30.961 L 53.288 36 L 44.623 36 L 45.879 30.961 Z M 127.199 36 L 128.455 30.961 L 137.244 30.961 L 135.987 36 Z M 128.944 29 L 130.202 23.955 L 154.261 23.955 L 153.003 29 Z",sstyle:"fill: rgb(51, 51, 51);"}),f.jsx("path",{d:"M 188.795 19.736 L 185.933 19.736 Q 185.571 17.852 184.575 16.15 Q 183.579 14.448 182.058 13.135 Q 180.536 11.822 178.562 11.061 Q 176.588 10.3 174.234 10.3 Q 170.648 10.3 167.668 12.193 Q 164.689 14.085 162.905 17.744 Q 161.121 21.402 161.121 26.691 Q 161.121 32.015 162.905 35.664 Q 164.689 39.314 167.668 41.197 Q 170.648 43.081 174.234 43.081 Q 176.588 43.081 178.562 42.329 Q 180.536 41.578 182.058 40.265 Q 183.579 38.952 184.575 37.24 Q 185.571 35.529 185.933 33.645 L 188.795 33.645 Q 188.36 36.036 187.174 38.218 Q 185.988 40.4 184.122 42.094 Q 182.257 43.787 179.766 44.765 Q 177.276 45.743 174.234 45.743 Q 169.579 45.743 166.002 43.389 Q 162.425 41.034 160.397 36.751 Q 158.369 32.468 158.369 26.691 Q 158.369 20.913 160.397 16.63 Q 162.425 12.347 166.002 9.992 Q 169.579 7.638 174.234 7.638 Q 177.276 7.638 179.766 8.607 Q 182.257 9.576 184.122 11.269 Q 185.988 12.963 187.174 15.136 Q 188.36 17.309 188.795 19.736 Z M 192.123 45.236 L 192.123 8.145 L 203.823 8.145 Q 207.554 8.145 210.143 9.54 Q 212.733 10.934 214.092 13.406 Q 215.45 15.878 215.45 19.12 Q 215.45 22.326 214.092 24.78 Q 212.733 27.234 210.152 28.61 Q 207.572 29.987 203.859 29.987 L 193.644 29.987 L 193.644 27.379 L 203.787 27.379 Q 206.666 27.379 208.649 26.365 Q 210.632 25.35 211.647 23.494 Q 212.661 21.638 212.661 19.12 Q 212.661 16.585 211.638 14.692 Q 210.614 12.8 208.631 11.749 Q 206.648 10.699 203.75 10.699 L 194.948 10.699 L 194.948 45.236 Z M 207.916 28.465 L 217.044 45.236 L 213.784 45.236 L 204.728 28.465 Z M 218.397 45.236 L 215.445 45.236 L 228.883 8.145 L 231.98 8.145 L 245.418 45.236 L 242.466 45.236 L 230.549 11.785 L 230.332 11.785 Z M 221.385 31.146 L 239.496 31.146 L 239.496 33.718 L 221.385 33.718 Z M 247.05 45.236 L 247.05 8.145 L 268.131 8.145 L 268.131 10.699 L 249.876 10.699 L 249.876 25.387 L 266.429 25.387 L 266.429 27.958 L 249.876 27.958 L 249.876 45.236 Z M 269.583 10.699 L 269.583 8.145 L 296.024 8.145 L 296.024 10.699 L 284.216 10.699 L 284.216 45.236 L 281.391 45.236 L 281.391 10.699 Z",transform:"matrix(0.998892068862915, 0, 0, 1, 0.17177101969718933, 0)",sstyle:"fill: rgb(51, 51, 51);"})]})]}),yT=({className:t})=>f.jsx(vj,{className:"fill-[url(#a)] text-pink-500 "+t,children:f.jsx("defs",{children:f.jsxs("linearGradient",{id:"a",children:[f.jsx("stop",{offset:"0%","stop-color":"rgb(236 72 153)"}),f.jsx("stop",{offset:"100%","stop-color":"rgb(151 60 255)"})]})})}),yj=({...t})=>{const e=({})=>f.jsxs("div",{className:`rounded-lg my-auto b
|
144
144
|
bg-pink-50 dark:bg-pink-50/10 w-fit text-sm
|
145
145
|
text-pink-500 -tracking-wideset
|
146
146
|
py-0 px-1 --border font-semibold`,children:[f.jsx("div",{children:"docs",className:"inline-block -translate-y-px --inline"}),f.jsx("span",{children:" 📖"})]});return f.jsxs("div",{className:`relative w-full h-16 flex flex-row
|
@@ -149,13 +149,13 @@ Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An err
|
|
149
149
|
shelf-logo
|
150
150
|
text-xl font-bold
|
151
151
|
--pr-3 overflow-x-clip shadow-md`,...t,children:[f.jsx(xj,{className:`h-full object-contain rounded-xl bg-teal-400
|
152
|
-
scale-90 border-kf-600 --shadow-lg opacity-80`}),f.jsxs("div",{className:"flex flex-col justify-between h-full p-0.5",children:[f.jsx(yT,{className:"h-[27px]"}),f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx("span",{children:`v${mj.version}`,className:"tracking-wider text-sm font-light font-mono"}),f.jsx("a",{href:"https://storecraft.app/docs",target:"_blank",children:f.jsx(e,{})})]})]})]})},xj=({className:t="w-[512px] h-[512px] bg-slate-100 p-3",...e})=>f.jsx("div",{className:t,...e,children:f.jsx(lt,{className:"w-full h-full",stroke:"border-[2px]",from:"from-pink-600 dark:from-pink-500",to:"to-kf-600 dark:to-kf-500",children:f.jsx("div",{className:`w-full h-full bg-slate-100 rounded-3xl shadow-xl
|
152
|
+
scale-90 border-kf-600 --shadow-lg opacity-80`}),f.jsxs("div",{className:"flex flex-col justify-between h-full p-0.5",children:[f.jsx(yT,{className:"h-[27px]"}),f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx("span",{children:`v${mj.version}`,className:"tracking-wider text-sm font-light font-mono"}),f.jsx("a",{href:"https://storecraft.app/docs",target:"_blank",className:"mr-1",children:f.jsx(e,{})})]})]})]})},xj=({className:t="w-[512px] h-[512px] bg-slate-100 p-3",...e})=>f.jsx("div",{className:t,...e,children:f.jsx(lt,{className:"w-full h-full",stroke:"border-[2px]",from:"from-pink-600 dark:from-pink-500",to:"to-kf-600 dark:to-kf-500",children:f.jsx("div",{className:`w-full h-full bg-slate-100 rounded-3xl shadow-xl
|
153
153
|
flex flex-row items-center justify-center rotate-6 scale-[1.0]`,children:f.jsx("div",{className:`w-full h-full rounded-lg shadow-xl
|
154
154
|
flex flex-row items-center justify-center --opacity-80
|
155
155
|
--scale-[3.0] -rotate-`,children:f.jsx("div",{className:"w-full h-full overflow-clip rounded-xl",children:f.jsx("img",{src:gj,className:`w-full h-full object-cover scale-[1.05]
|
156
156
|
bg-teal-100 --bg-slate-300`})})})})})}),_j={xs:"480px",sm:"580px",md:"768px","md-lg":"914px",lg:"1024px",xl:"1280px","2xl":"1536px"},bj=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),w8=!bj;function wj(t){if(!t)throw new Error("Failed to create breakpoint hooks, given `screens` value is invalid.");function e(i,s=!1){const[a,o]=M.useState(s),l=M.useRef(s);return b.useEffect(()=>{if(!(w8&&"matchMedia"in window))return;function c(u){const d=t[i]??"999999px",h=window.matchMedia(`(min-width: ${d})`);l.current=h.matches,l.current!=a&&o(l.current)}return window.addEventListener("resize",c,!1),window.addEventListener("load",c,!1),window.dispatchEvent(new Event("load")),()=>{window.removeEventListener("resize",c),window.removeEventListener("load",c)}},[window,t,i,s,w8,a]),a}function n(i,s){const a=e(i);return M.useEffect(()=>s(a)),null}function r(i,s,a){const o=e(i);return M.useMemo(()=>o?s:a,[a,o,s])}return{useBreakpoint:e,useBreakpointEffect:n,useBreakpointValue:r}}const{useBreakpoint:jme,useBreakpointEffect:Fme,useBreakpointValue:kj}=wj(_j),Ej=({className:t,onCloseClick:e,menu:{items:n,info:r}})=>{const i=kj("md",!0,!1);let s=Il();const a=da(),o=b.useCallback((u,d)=>{const h=s.pathname.includes(u),p=(d==null?void 0:d.extra)??{active:"bg-pink-600"};return h?`${p==null?void 0:p.active} text-white`:"shelf-side-hover "},[s]),l=b.useCallback(u=>{u.preventDefault(),u.stopPropagation(),a("/settings")},[a]),c=b.useCallback(u=>{u.preventDefault(),!i&&e(),a("/home")},[a,i,e]);return f.jsxs("div",{className:`relative w-64 --scrollbar-none overflow-clip
|
157
157
|
flex flex-col
|
158
|
-
${t}`,children:[f.jsx(yj,{}),f.jsx(IL,{className:`absolute bg-kf-500 text-
|
158
|
+
${t}`,children:[f.jsx(yj,{}),f.jsx(IL,{className:`absolute bg-kf-500 text-3xl top-4 right-2
|
159
159
|
cursor-pointer transition-all duration-300 rounded-full
|
160
160
|
hover:bg-pink-400 text-white
|
161
161
|
p-1.5 hover:p-1 md:hidden`,onClick:e}),f.jsx("div",{className:"w-full flex-1 overflow-y-auto max-h-full",children:f.jsxs("div",{className:"mt-3 pl-5 pr-1 w-full h-fit",children:[f.jsx(m8,{icon:f.jsx(KR,{className:"text-xl ml-0 --text-pink-600"}),text:"Dashboard",className:`w-full my-2 py-2 pr-3 text-base
|
@@ -221,7 +221,7 @@ line items and shipping method`),jB=LB.extend(Hi.shape).extend({status:EB.descri
|
|
221
221
|
overflow-y-auto flex flex-col gap-5`,children:[f.jsx(PH,{}),f.jsx(OH,{notis:y,selected:n,onChange:r}),f.jsx(MH,{notis:x,onLoadMore:d})]})});var gu=Nn.GenIcon,P8=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M348.3 216.4c-5 5.1-13.3 5.1-18.4.1L269 155.8v231.3c0 7.1-5.8 12.9-13 12.9s-13-5.8-13-12.9V155.8l-60.9 60.8c-5.1 5-13.3 4.9-18.4-.1-5-5.1-5-13.2.1-18.3l83-82.4c1.2-1.1 2.5-2 4.1-2.7 1.6-.7 3.3-1 5-1 3.4 0 6.6 1.3 9.1 3.7l83 82.4c5.2 4.9 5.3 13.1.3 18.2z"}}]})(e)},LH=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M112.4 92h77.7c7.7 0 13.9-6.2 13.9-13.9v-.2c0-7.7-6.2-13.9-13.9-13.9H77.9C70.2 64 64 70.2 64 77.9v112.2c0 7.7 6.2 13.9 13.9 13.9h.2c7.7 0 13.9-6.2 13.9-13.9v-77.7l117.1 116.3c2.6 2.6 6.1 4 9.8 4 3.7 0 7.2-1.4 9.8-4.1 5.4-5.4 5.4-14.2 0-19.6L112.4 92zM434.1 64H321.9c-7.7 0-13.9 6.2-13.9 13.9v.2c0 7.7 6.2 13.9 13.9 13.9h77.7L283.3 209.1c-5.4 5.4-5.4 14.2 0 19.6 2.6 2.6 6.1 4.1 9.8 4.1 3.7 0 7.2-1.4 9.8-4L420 112.4v77.7c0 7.7 6.2 13.9 13.9 13.9h.2c7.7 0 13.9-6.2 13.9-13.9V77.9c0-7.7-6.2-13.9-13.9-13.9zM218.9 279.2c-3.7 0-7.2 1.4-9.8 4L92 399.6v-77.7c0-7.7-6.2-13.9-13.9-13.9h-.2c-7.7 0-13.9 6.2-13.9 13.9v112.2c0 7.7 6.2 13.9 13.9 13.9h112.2c7.7 0 13.9-6.2 13.9-13.9v-.2c0-7.7-6.2-13.9-13.9-13.9h-77.7l116.3-117.1c5.4-5.4 5.4-14.2 0-19.6-2.6-2.6-6.1-4.1-9.8-4.1zM434.1 308h-.2c-7.7 0-13.9 6.2-13.9 13.9v77.7L302.9 283.3c-2.6-2.6-6.1-4-9.8-4-3.7 0-7.2 1.4-9.8 4.1-5.4 5.4-5.4 14.2 0 19.6l116.3 117h-77.7c-7.7 0-13.9 6.2-13.9 13.9v.2c0 7.7 6.2 13.9 13.9 13.9h112.2c7.7 0 13.9-6.2 13.9-13.9V321.9c0-7.7-6.2-13.9-13.9-13.9z"}}]})(e)},RH=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M255.9 456c31.1 0 48.1-22 48.1-53h-96.3c0 31 17 53 48.2 53zM412 352.2c-15.4-20.3-45.7-32.2-45.7-123.1 0-93.3-41.2-130.8-79.6-139.8-3.6-.9-6.2-2.1-6.2-5.9v-2.9c0-13.4-11-24.7-24.4-24.6-13.4-.2-24.4 11.2-24.4 24.6v2.9c0 3.7-2.6 5-6.2 5.9-38.5 9.1-79.6 46.5-79.6 139.8 0 90.9-30.3 102.7-45.7 123.1-9.9 13.1-.5 31.8 15.9 31.8h280.1c16.3 0 25.7-18.8 15.8-31.8z"}}]})(e)},jH=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 277.333H277.333V416h-42.666V277.333H96v-42.666h138.667V96h42.666v138.667H416v42.666z"}}]})(e)},FH=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"}}]})(e)},BH=function(e){return gu({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 368v80h80l235.727-235.729-79.999-79.998L64 368zm377.602-217.602c8.531-8.531 8.531-21.334 0-29.865l-50.135-50.135c-8.531-8.531-21.334-8.531-29.865 0l-39.468 39.469 79.999 79.998 39.469-39.467z"}}]})(e)};const HH=({outerClass:t="bg-white animate-bounce",innerClass:e="bg-red-500",...n})=>f.jsx("div",{...n,children:f.jsx("div",{className:`w-full h-full rounded-full p-0.5 ${t}`,children:f.jsx("div",{className:`w-full h-full rounded-full ${e}`})})}),zH=({isOpen:t=!1,onClick:e,...n})=>{const[r,i]=b.useState(!1),{actions:{poll:s}}=So("notifications",{limit:1}),a=b.useCallback(async()=>{const c=await s();i(c)},[s]),{stop:o,start:l}=XT(a,R0*10,!1);return b.useEffect(()=>{t?(o(),i(!1)):l()},[t,l,o]),f.jsxs("div",{className:"relative",onClick:e,children:[f.jsx(hf,{Icon:RH,className:"h-6 w-6 cursor-pointer",...n}),f.jsx(de,{show:r,children:f.jsx(HH,{className:"absolute w-3 h-3 top-px right-0"})})]})},UH={darkMode:!0},$H="storecraft_dashboard_preferences",VH=EH($H,UH);function Ll(){const{state:t,setState:e}=VH(),n=b.useCallback(()=>{e({...t,darkMode:!t.darkMode})},[t]);return{darkMode:t.darkMode,toggle:n}}const WH=({...t})=>{const{darkMode:e,toggle:n}=Ll();return f.jsx("div",{className:"relative",children:f.jsx(hf,{Icon:e?ZL:XL,className:"cursor-pointer "+(e?"h-6 w-6":"h-5 w-5"),onClick:n})})},YH=t=>{const e=b.useRef();return b.useEffect(()=>{const n=i=>{!e.current||e.current.contains(i.target)||t(i)},r=i=>{i.key==="Escape"&&t(i)};return document.addEventListener("click",n),document.addEventListener("keydown",r),()=>{document.removeEventListener("click",n),document.removeEventListener("keydown",r)}},[t]),e};var JT=Nn.GenIcon,GH=function(e){return JT({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Bookmark_Remove"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M17.6,21.938a1.482,1.482,0,0,1-1.011-.4l-4.251-3.9a.5.5,0,0,0-.678,0L7.41,21.538a1.5,1.5,0,0,1-2.517-1.1V4.563a2.5,2.5,0,0,1,2.5-2.5h9.214a2.5,2.5,0,0,1,2.5,2.5V20.435a1.483,1.483,0,0,1-.9,1.375A1.526,1.526,0,0,1,17.6,21.938ZM12,16.5a1.5,1.5,0,0,1,1.018.395L17.269,20.8a.5.5,0,0,0,.838-.368V4.563a1.5,1.5,0,0,0-1.5-1.5H7.393a1.5,1.5,0,0,0-1.5,1.5V20.435a.5.5,0,0,0,.839.368L10.983,16.9A1.5,1.5,0,0,1,12,16.5Z"}},{tag:"path",attr:{d:"M10.23,10.84a.5.5,0,0,0,.71.71L12,10.491,13.06,11.55a.523.523,0,0,0,.71,0,.513.513,0,0,0,0-.71L12.709,9.779,13.77,8.72a.5.5,0,0,0-.71-.71c-.35.35-.7.71-1.06,1.06L10.94,8.01a.5.5,0,0,0-.71,0,.524.524,0,0,0,0,.71c.35.35.71.7,1.06,1.06Z"}}]}]}]})(e)},KH=function(e){return JT({tag:"svg",attr:{version:"1.1",id:"search",x:"0px",y:"0px",viewBox:"0 0 24 24",style:"enable-background:new 0 0 24 24;"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:`M20.031,20.79c0.46,0.46,1.17-0.25,0.71-0.7l-3.75-3.76c1.27-1.41,2.04-3.27,2.04-5.31
|
222
222
|
c0-4.39-3.57-7.96-7.96-7.96s-7.96,3.57-7.96,7.96c0,4.39,3.57,7.96,7.96,7.96c1.98,0,3.81-0.73,5.21-1.94L20.031,20.79z
|
223
223
|
M4.11,11.02c0-3.84,3.13-6.96,6.96-6.96c3.84,0,6.96,3.12,6.96,6.96c0,3.84-3.12,6.96-6.96,6.96C7.24,17.98,4.11,14.86,4.11,11.02
|
224
|
-
z`}}]}]})(e)};const eS=(...t)=>e=>{b.useEffect(()=>{let n={};const r=()=>{const a=t.find(o=>o.every(l=>!!(n!=null&&n[l])));a&&(n={},e&&e(a))},i=a=>{n[a.key]=!0,r()},s=a=>{n[a.key]=!1};return document.addEventListener("keydown",i),document.addEventListener("keyup",s),()=>{n={},document.removeEventListener("keydown",i),document.removeEventListener("keyup",s)}},[t,e])},qH=({show:t,duration:e,unMountOnExit:n,enter:r,enterFrom:i,enterTo:s,leave:a,leaveFrom:o,leaveTo:l,children:c,className:u,...d})=>{const[h,p]=b.useState(!1),[m,g]=b.useState("hidden"),v=b.useRef({});b.useEffect(()=>(v.current.timer&&clearTimeout(v.current.timer),t?(g(`${r} block ${i}`),p(!0),setTimeout(()=>g(`${r} block ${s}`),0)):h?(g(`${a} ${o}`),setTimeout(()=>g(`${a} ${l}`),0),v.current.timer=setTimeout(()=>{p(!1),g(x=>`${x} hidden`)},e)):g("hidden"),()=>clearTimeout(v.current.timer)),[t,e]);const y=h||!n;return f.jsx(f.Fragment,{children:y&&f.jsx("div",{children:c,className:`${m} ${u}`,...d})})},ha=M.forwardRef(({children:t,...e},n)=>{const[r,i]=b.useState(!1);b.useImperativeHandle(n,()=>({show:()=>i(!0),hide:()=>i(!1),isShown:()=>r}),[r,n]);const s=b.useCallback(l=>{l.key==="Escape"&&i(!1)},[]),a=b.useRef(()=>{}),o=b.useCallback(l=>{l.preventDefault(),history.back(),i(!1)},[history]);return b.useEffect(()=>{a.current&&a.current();const l=c=>{c.stopPropagation(),c.preventDefault(),i(!1)};return a.current=()=>{window.removeEventListener("popstate",l)},r&&(history.pushState(null,document.title,location.href),window.addEventListener("popstate",l)),a.current},[r,window]),f.jsx(qH,{unMountOnExit:!0,show:r,duration:400,onKeyDown:s,enter:"transition-all duration-300 ease-in-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-all duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:`z-[100] w-
|
224
|
+
z`}}]}]})(e)};const eS=(...t)=>e=>{b.useEffect(()=>{let n={};const r=()=>{const a=t.find(o=>o.every(l=>!!(n!=null&&n[l])));a&&(n={},e&&e(a))},i=a=>{n[a.key]=!0,r()},s=a=>{n[a.key]=!1};return document.addEventListener("keydown",i),document.addEventListener("keyup",s),()=>{n={},document.removeEventListener("keydown",i),document.removeEventListener("keyup",s)}},[t,e])},qH=({show:t,duration:e,unMountOnExit:n,enter:r,enterFrom:i,enterTo:s,leave:a,leaveFrom:o,leaveTo:l,children:c,className:u,...d})=>{const[h,p]=b.useState(!1),[m,g]=b.useState("hidden"),v=b.useRef({});b.useEffect(()=>(v.current.timer&&clearTimeout(v.current.timer),t?(g(`${r} block ${i}`),p(!0),setTimeout(()=>g(`${r} block ${s}`),0)):h?(g(`${a} ${o}`),setTimeout(()=>g(`${a} ${l}`),0),v.current.timer=setTimeout(()=>{p(!1),g(x=>`${x} hidden`)},e)):g("hidden"),()=>clearTimeout(v.current.timer)),[t,e]);const y=h||!n;return f.jsx(f.Fragment,{children:y&&f.jsx("div",{children:c,className:`${m} ${u}`,...d})})},ha=M.forwardRef(({children:t,...e},n)=>{const[r,i]=b.useState(!1);b.useImperativeHandle(n,()=>({show:()=>i(!0),hide:()=>i(!1),isShown:()=>r}),[r,n]);const s=b.useCallback(l=>{l.key==="Escape"&&i(!1)},[]),a=b.useRef(()=>{}),o=b.useCallback(l=>{l.preventDefault(),history.back(),i(!1)},[history]);return b.useEffect(()=>{a.current&&a.current();const l=c=>{c.stopPropagation(),c.preventDefault(),i(!1)};return a.current=()=>{window.removeEventListener("popstate",l)},r&&(history.pushState(null,document.title,location.href),window.addEventListener("popstate",l)),a.current},[r,window]),f.jsx(qH,{unMountOnExit:!0,show:r,duration:400,onKeyDown:s,enter:"transition-all duration-300 ease-in-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-all duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:`z-[100] w-full h-full
|
225
225
|
bg-teal-900/20 dark:bg-teal-900/10 backdrop-blur-sm fixed inset-0
|
226
226
|
flex flex-row justify-center items-center`,onClick:o,children:t})});var vu=Nn.GenIcon,tS=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M14.5 1.5a.5.5 0 0 1 .5.5v4.8a2.5 2.5 0 0 1-2.5 2.5H2.707l3.347 3.346a.5.5 0 0 1-.708.708l-4.2-4.2a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 8.3H12.5A1.5 1.5 0 0 0 14 6.8V2a.5.5 0 0 1 .5-.5z"}}]})(e)},QH=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 7a.5.5 0 0 1 .5.5V9H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V10H6a.5.5 0 0 1 0-1h1.5V7.5A.5.5 0 0 1 8 7z"}},{tag:"path",attr:{d:"M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"}},{tag:"path",attr:{d:"M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"}}]})(e)},ZH=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.406 1.342A5.53 5.53 0 0 1 8 0c2.69 0 4.923 2 5.166 4.579C14.758 4.804 16 6.137 16 7.773 16 9.569 14.502 11 12.687 11H10a.5.5 0 0 1 0-1h2.688C13.979 10 15 8.988 15 7.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 2.825 10.328 1 8 1a4.53 4.53 0 0 0-2.941 1.1c-.757.652-1.153 1.438-1.153 2.055v.448l-.445.049C2.064 4.805 1 5.952 1 7.318 1 8.785 2.23 10 3.781 10H6a.5.5 0 0 1 0 1H3.781C1.708 11 0 9.366 0 7.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383z"}},{tag:"path",attr:{fillRule:"evenodd",d:"M7.646 4.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V14.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3z"}}]})(e)},XH=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"}}]})(e)},JH=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"}}]})(e)},ez=function(e){return vu({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z"}}]})(e)},tz=Nn.GenIcon,nz=function(e){return tz({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m13.5 8.5-5 5"}},{tag:"path",attr:{d:"m8.5 8.5 5 5"}},{tag:"circle",attr:{cx:"11",cy:"11",r:"8"}},{tag:"path",attr:{d:"m21 21-4.3-4.3"}}]})(e)};const rz=eS(["Meta","K"],["Meta","k"]),iz=eS(["ArrowUp"],["ArrowDown"],["Enter"],["Escape"]),sz={collections:"/pages/collections",customers:"/pages/customers",discounts:"/pages/discounts",orders:"/pages/orders",products:"/pages/products",shipping_methods:"/pages/shipping-methods",storefronts:"/pages/storefronts",tags:"/pages/tags",posts:"/pages/posts",templates:"/apps/templates",images:"/apps/gallery/img"},az=({onClick:t,...e})=>{const n=da();rz(s=>{r.current.show()});const r=b.useRef(),i=b.useCallback((s,a)=>{const o=sz[s]+"/"+(a.handle??(a==null?void 0:a.id));r.current.hide(),n(o)},[n]);return f.jsxs("div",{onClick:()=>{r.current.show()},...e,children:[f.jsxs("div",{className:`rounded-md flex flex-row gap-2 p-1 items-center
|
227
227
|
border shelf-card shelf-text-minor text-sm
|
@@ -237,7 +237,7 @@ line items and shipping method`),jB=LB.extend(Hi.shape).extend({status:EB.descri
|
|
237
237
|
font-medium text-sm flex flex-row items-center
|
238
238
|
justify-between cursor-pointer
|
239
239
|
${r==c?"bg-kf-400 dark:bg-kf-400 text-white":"bg-slate-100 dark:bg-[rgb(41,52,69)]"}
|
240
|
-
`,onClick:u=>{s&&s(n,c)},onMouseMove:u=>{u.preventDefault(),i&&i(n,c)},children:[f.jsx("span",{children:(l==null?void 0:l.title)??(l==null?void 0:l.handle)??(l==null?void 0:l.id)??"nooop"}),f.jsx(tS,{className:"text-xl "+(r==c?"inline":"hidden")})]},l.id))})]})},dz=({onCancel:t,onSelect:e})=>{const{result:n,loading:r,error:i,actions:{query:s}}=TH(),a=b.useMemo(()=>Object.entries(n??{}).map(v=>({group:v[1],name:v[0]})),[n]),[o,l]=b.useState({groupIndex:0,itemIndex:0}),[c,u]=b.useState(!1),d=b.useCallback(()=>{e&&e(a[o.groupIndex].name,a[o.groupIndex].group[o.itemIndex])},[e,a,o]);iz(v=>{if(a.length==0)return;const y={...o},x=v[0];x=="ArrowDown"&&(y.itemIndex+1>=a[y.groupIndex].group.length?(y.itemIndex=0,y.groupIndex+=1,y.groupIndex%=a.length):y.itemIndex+=1,l(y),u(!0)),x=="ArrowUp"&&(y.itemIndex-1<0?(y.groupIndex-=1-a.length,y.groupIndex%=a.length,y.itemIndex=a[y.groupIndex].group.length-1):y.itemIndex-=1,l(y),u(!0)),x==="Escape"&&t&&t(),x==="Enter"&&d()});const h=b.useCallback((v,y)=>{l({groupIndex:v,itemIndex:y}),u(!1)},[]),p=b.useCallback((v,y)=>{l({groupIndex:v,itemIndex:y}),
|
240
|
+
`,onClick:u=>{s&&s(n,c)},onMouseMove:u=>{u.preventDefault(),i&&i(n,c)},children:[f.jsx("span",{children:(l==null?void 0:l.title)??(l==null?void 0:l.handle)??(l==null?void 0:l.id)??"nooop"}),f.jsx(tS,{className:"text-xl "+(r==c?"inline":"hidden")})]},l.id))})]})},dz=({onCancel:t,onSelect:e})=>{const{result:n,loading:r,error:i,actions:{query:s}}=TH(),a=b.useMemo(()=>Object.entries(n??{}).map(v=>({group:v[1],name:v[0]})),[n]),[o,l]=b.useState({groupIndex:0,itemIndex:0}),[c,u]=b.useState(!1),d=b.useCallback(()=>{e&&e(a[o.groupIndex].name,a[o.groupIndex].group[o.itemIndex])},[e,a,o]);iz(v=>{if(a.length==0)return;const y={...o},x=v[0];x=="ArrowDown"&&(y.itemIndex+1>=a[y.groupIndex].group.length?(y.itemIndex=0,y.groupIndex+=1,y.groupIndex%=a.length):y.itemIndex+=1,l(y),u(!0)),x=="ArrowUp"&&(y.itemIndex-1<0?(y.groupIndex-=1-a.length,y.groupIndex%=a.length,y.itemIndex=a[y.groupIndex].group.length-1):y.itemIndex-=1,l(y),u(!0)),x==="Escape"&&t&&t(),x==="Enter"&&d()});const h=b.useCallback((v,y)=>{l({groupIndex:v,itemIndex:y}),u(!1)},[]),p=b.useCallback((v,y)=>{l({groupIndex:v,itemIndex:y}),e&&e(a[v].name,a[v].group[y])},[e,a]),m=b.useRef(),g=b.useCallback(v=>{v==null||v.preventDefault();const y=m.current.value;s({limit:5,vql:y})},[s]);return f.jsx("div",{className:"w-full h-full relative",children:f.jsxs("div",{onClick:v=>v.stopPropagation(),className:`w-full --m-3 md:w-[35rem] --h-4/5 h-fit
|
241
241
|
shelf-plain-card-soft absolute top-20 left-1/2 -translate-x-1/2
|
242
242
|
rounded-xl --p-3 --sm:p-5 border shadow-lg --gap-5
|
243
243
|
text-base flex flex-col --overflow-hidden`,children:[f.jsxs("div",{className:"w-full h-fit flex flex-col gap-5 px-3 pt-3",children:[f.jsx("form",{autoFocus:!0,className:"w-full h-fit",tabIndex:4344,children:f.jsx(lt,{rounded:"rounded-xl",stroke:"border",children:f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx("input",{onChange:g,autoFocus:!0,ref:m,type:"search",placeholder:"search",className:`w-full h-12 border shelf-input-color
|
@@ -250,10 +250,10 @@ line items and shipping method`),jB=LB.extend(Hi.shape).extend({status:EB.descri
|
|
250
250
|
hover:bg-pink-400
|
251
251
|
hover:text-white dark:hover:text-white
|
252
252
|
p-1.5 hover:p-1
|
253
|
-
${t?"rotate-0":"rotate-180"}`,onClick:n}),f.jsxs("div",{children:[f.jsx("span",{children:"Hi"}),f.jsx("span",{children:d,className:"font-semibold "})]}),f.jsxs("div",{className:"flex flex-row gap-3 items-center",children:[f.jsx(az,{}),f.jsx(hf,{Icon:qL,onClick:l,className:"text-2xl cursor-pointer"}),f.jsx(zH,{isOpen:i,onClick:u}),f.jsx(WH,{})]}),f.jsx(de,{show:i,children:f.jsx(IH,{ref:c})})]})})},hz=(t=100,e=!0)=>{const n=b.useRef(),r=b.useRef({}),[i,s]=b.useState(e);return b.useEffect(()=>{n.current.scrollTo({top:0,left:0,behavior:"smooth"})},[]),b.useEffect(()=>(r.current.state=0,r.current.latestPos=void 0,r.current.latestTurn=void 0,n.current.onscroll=function(c){var u=n.current.scrollTop;const d=r.current;if(d.latestPos===void 0&&(d.latestPos=u),d.latestTurn===void 0&&(d.latestTurn=u),u==0){s(!0);return}u-d.latestPos>0?(d.state!=0&&(d.latestTurn=u,d.state=0),u-d.latestTurn>=100&&s(!1)):(d.state!=1&&(d.latestTurn=u,d.state=1),u-d.latestTurn<=-100&&s(!0)),d.latestPos=u},()=>{n.current&&(n.current.onscroll=void 0)}),[]),{ref_scroll_element:n,open:i}};var nS=Nn.GenIcon,pz=function(e){return nS({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3C8.86384 3 10.4299 4.27477 10.874 6H19V8H10.874C10.4299 9.72523 8.86384 11 7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3ZM7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M17 20C15.1362 20 13.5701 18.7252 13.126 17H5V15H13.126C13.5701 13.2748 15.1362 12 17 12C19.2091 12 21 13.7909 21 16C21 18.2091 19.2091 20 17 20ZM17 18C18.1046 18 19 17.1046 19 16C19 14.8954 18.1046 14 17 14C15.8954 14 15 14.8954 15 16C15 17.1046 15.8954 18 17 18Z",fill:"currentColor"}}]})(e)},mz=function(e){return nS({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3V9H21V3H3ZM19 5H5V7H19V5Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M3 11V21H11V11H3ZM9 13H5V19H9V13Z",fill:"currentColor"}},{tag:"path",attr:{d:"M21 11H13V13H21V11Z",fill:"currentColor"}},{tag:"path",attr:{d:"M13 15H21V17H13V15Z",fill:"currentColor"}},{tag:"path",attr:{d:"M21 19H13V21H21V19Z",fill:"currentColor"}}]})(e)};const gz=()=>{const t=new Set;return{Portal:()=>{const[r,i]=b.useState(void 0);return b.useEffect(()=>(t.add(i),()=>{t.delete(i)}),[]),r},PortalChild:({children:r})=>{r&&t.forEach(i=>{i(r)})}}},vz={info:{name:"Storecraft",icon:f.jsx($L,{className:"inline"})},items:[{name:"pages",items:[{name:"Storefronts",icon:f.jsx(VC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-cyan-400"}},{name:"Customers",icon:f.jsx(FC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-cyan-400"}},{name:"Tags",icon:f.jsx(RC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-pink-400"}},{name:"Products",icon:f.jsx(Ci,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-400"}},{name:"Collections",icon:f.jsx(WC,{}),extra:{active:"bg-pink-600",hover:"hover:bg-kf-400"}},{name:"Orders",icon:f.jsx(IC,{}),extra:{active:"bg-pink-600 dark:bg-pink-600/90",hover:"hover:bg-amber-200"}},{name:"Payment Gateways",icon:f.jsx(QL,{}),extra:{active:"bg-pink-600",hover:"hover:bg-amber-200"}},{name:"Discounts",icon:f.jsx(BC,{className:"--text-lg"}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-200"}},{name:"Shipping Methods",icon:f.jsx(YC,{className:"--text-lg"}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-200"}},{name:"Blog",slug:"posts",icon:f.jsx(TL,{}),extra:{active:"bg-orange-400 dark:bg-orange-400/70",hover:"hover:bg-teal-200"}}]},{name:"apps",items:[{name:"Gallery",icon:f.jsx(VL,{className:"--scale-125"}),extra:{active:"bg-yellow-400 dark:bg-yellow-400/80",hover:"hover:bg-teal-200"}},{name:"Templates",icon:f.jsx(mz,{className:"--scale-125"}),extra:{active:"bg-red-400 dark:bg-red-400/80",hover:"hover:bg-teal-200"}},{name:"Extensions",icon:f.jsx(ML,{className:"--scale-125"}),extra:{active:"bg-teal-400 dark:bg-teal-400/80",hover:"hover:bg-teal-200"}}]}]},rS=gz(),ch=({children:t=void 0,className:e,...n})=>{const{open:r,ref_scroll_element:i}=hz(100,!0),[s,a]=b.useState(!0),{darkMode:o}=Ll(),l=b.useCallback(()=>{a(d=>!d)},[]),c=b.useCallback(()=>{a(!1)},[]),u=r?"translate-y-0":"-translate-y-full";return f.jsx("div",{className
|
253
|
+
${t?"rotate-0":"rotate-180"}`,onClick:n}),f.jsxs("div",{children:[f.jsx("span",{children:"Hi"}),f.jsx("span",{children:d,className:"font-semibold "})]}),f.jsxs("div",{className:"flex flex-row gap-3 items-center",children:[f.jsx(az,{}),f.jsx(hf,{Icon:qL,onClick:l,className:"text-2xl cursor-pointer"}),f.jsx(zH,{isOpen:i,onClick:u}),f.jsx(WH,{})]}),f.jsx(de,{show:i,children:f.jsx(IH,{ref:c})})]})})},hz=(t=100,e=!0)=>{const n=b.useRef(),r=b.useRef({}),[i,s]=b.useState(e);return b.useEffect(()=>{n.current.scrollTo({top:0,left:0,behavior:"smooth"})},[]),b.useEffect(()=>(r.current.state=0,r.current.latestPos=void 0,r.current.latestTurn=void 0,n.current.onscroll=function(c){var u=n.current.scrollTop;const d=r.current;if(d.latestPos===void 0&&(d.latestPos=u),d.latestTurn===void 0&&(d.latestTurn=u),u==0){s(!0);return}u-d.latestPos>0?(d.state!=0&&(d.latestTurn=u,d.state=0),u-d.latestTurn>=100&&s(!1)):(d.state!=1&&(d.latestTurn=u,d.state=1),u-d.latestTurn<=-100&&s(!0)),d.latestPos=u},()=>{n.current&&(n.current.onscroll=void 0)}),[]),{ref_scroll_element:n,open:i}};var nS=Nn.GenIcon,pz=function(e){return nS({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3C8.86384 3 10.4299 4.27477 10.874 6H19V8H10.874C10.4299 9.72523 8.86384 11 7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3ZM7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M17 20C15.1362 20 13.5701 18.7252 13.126 17H5V15H13.126C13.5701 13.2748 15.1362 12 17 12C19.2091 12 21 13.7909 21 16C21 18.2091 19.2091 20 17 20ZM17 18C18.1046 18 19 17.1046 19 16C19 14.8954 18.1046 14 17 14C15.8954 14 15 14.8954 15 16C15 17.1046 15.8954 18 17 18Z",fill:"currentColor"}}]})(e)},mz=function(e){return nS({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3V9H21V3H3ZM19 5H5V7H19V5Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M3 11V21H11V11H3ZM9 13H5V19H9V13Z",fill:"currentColor"}},{tag:"path",attr:{d:"M21 11H13V13H21V11Z",fill:"currentColor"}},{tag:"path",attr:{d:"M13 15H21V17H13V15Z",fill:"currentColor"}},{tag:"path",attr:{d:"M21 19H13V21H21V19Z",fill:"currentColor"}}]})(e)};const gz=()=>{const t=new Set;return{Portal:()=>{const[r,i]=b.useState(void 0);return b.useEffect(()=>(t.add(i),()=>{t.delete(i)}),[]),r},PortalChild:({children:r})=>{r&&t.forEach(i=>{i(r)})}}},vz={info:{name:"Storecraft",icon:f.jsx($L,{className:"inline"})},items:[{name:"pages",items:[{name:"Storefronts",icon:f.jsx(VC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-cyan-400"}},{name:"Customers",icon:f.jsx(FC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-cyan-400"}},{name:"Tags",icon:f.jsx(RC,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-pink-400"}},{name:"Products",icon:f.jsx(Ci,{className:""}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-400"}},{name:"Collections",icon:f.jsx(WC,{}),extra:{active:"bg-pink-600",hover:"hover:bg-kf-400"}},{name:"Orders",icon:f.jsx(IC,{}),extra:{active:"bg-pink-600 dark:bg-pink-600/90",hover:"hover:bg-amber-200"}},{name:"Payment Gateways",icon:f.jsx(QL,{}),extra:{active:"bg-pink-600",hover:"hover:bg-amber-200"}},{name:"Discounts",icon:f.jsx(BC,{className:"--text-lg"}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-200"}},{name:"Shipping Methods",icon:f.jsx(YC,{className:"--text-lg"}),extra:{active:"bg-pink-600",hover:"hover:bg-teal-200"}},{name:"Blog",slug:"posts",icon:f.jsx(TL,{}),extra:{active:"bg-orange-400 dark:bg-orange-400/70",hover:"hover:bg-teal-200"}}]},{name:"apps",items:[{name:"Gallery",icon:f.jsx(VL,{className:"--scale-125"}),extra:{active:"bg-yellow-400 dark:bg-yellow-400/80",hover:"hover:bg-teal-200"}},{name:"Templates",icon:f.jsx(mz,{className:"--scale-125"}),extra:{active:"bg-red-400 dark:bg-red-400/80",hover:"hover:bg-teal-200"}},{name:"Extensions",icon:f.jsx(ML,{className:"--scale-125"}),extra:{active:"bg-teal-400 dark:bg-teal-400/80",hover:"hover:bg-teal-200"}}]}]},rS=gz(),ch=({children:t=void 0,className:e,...n})=>{const{open:r,ref_scroll_element:i}=hz(100,!0),[s,a]=b.useState(!0),{darkMode:o}=Ll(),l=b.useCallback(()=>{a(d=>!d)},[]),c=b.useCallback(()=>{a(!1)},[]),u=r?"translate-y-0":"-translate-y-full";return f.jsx("div",{className:`w-full h-full ${o?"dark":""}`,"data-color-mode":o?"dark":"light",children:f.jsxs("div",{className:`relative flex flex-row font-inter
|
254
254
|
shelf-body-bg
|
255
|
-
w-full sm:h-full ${e}
|
256
|
-
`,...n,
|
255
|
+
w-full h-full sm:h-full ${e}
|
256
|
+
`,...n,ssstyle:{height:"100dvh"},children:[f.jsx(rS.Portal,{}),f.jsx("div",{className:`fixed left-0 top-0 w-full h-full bg-teal-900/10
|
257
257
|
z-50 transition-all md:hidden
|
258
258
|
${s?"block backdrop-blur-sm":"hidden backdrop-blur-0"}`,onClick:c}),f.jsx("div",{className:`absolute left-0 top-0 md:relative flex flex-shrink-0
|
259
259
|
w-fit h-full overflow-x-clip overflow-hidden
|
@@ -348,7 +348,7 @@ data
|
|
348
348
|
flex-row justify-between items-center px-3
|
349
349
|
${i}`,children:[f.jsx(_s,{Icon:f.jsx(hm,{className:"rotate-180"}),text:"",className:"text-lg",onClick:e}),f.jsxs("select",{name:"limit",onChange:s,value:n,className:`m-1 h-8 px-4 rounded-md text-sm
|
350
350
|
bg-slate-50 dark:bg-slate-800
|
351
|
-
--border focus:outline-none`,children:[f.jsx("option",{value:"5",children:"5"}),f.jsx("option",{value:"10",children:"10"}),f.jsx("option",{value:"15",children:"15"}),f.jsx("option",{value:"20",children:"20"})]}),f.jsx(_s,{Icon:f.jsx(hm,{}),text:"",className:"text-lg ",onClick:t})]})},Fy=b.forwardRef(({title:t=f.jsx("p",{children:"NA",className:"text-gray-500"}),onApprove:e,...n},r)=>{const[i,s]=b.useState({data:void 0,message:"NA"}),a=b.useRef();b.useImperativeHandle(r,()=>({hide:()=>a.current.hide(),show:()=>a.current.show(),setDataAndMessage:(l,c,u)=>{s({data:l,message:c}),u&&a.current.show()}}),[]);const o=b.useCallback((l,c)=>{e!==void 0&&(l.preventDefault(),l.stopPropagation(),r.current.hide(),e(i.data,c))},[i,e]);return f.jsx(ha,{ref:a,children:f.jsxs(fa,{name:t,cardClass:"shelf-card-light",className:"max-w-96 w-full",onClick:l=>l.stopPropagation(),children:[f.jsx("p",{children:i.message,className:"text-red-500 text-lg break-words w-full whitespace-pre-wrap"}),f.jsxs("div",{className:"flex flex-row justify-between mt-10 text-base",children:[f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var XW=Nn.GenIcon,WS=function(e){return XW({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:"currentColor"}}]})(e)};const _f=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=zi(),a=b.useCallback(o=>{e=typeof e=="function"?e():e,n=typeof n=="function"?n():n,s(t,e,n),r&&r(),o.preventDefault()},[t,r,s,e,n]);return f.jsx(ln,{to:t,onClick:a,...i})},zi=()=>{const t=Il(),e=da(),n=b.useCallback((r,i,s)=>{i=typeof i=="function"?i():i,s=typeof s=="function"?s():s,i!==void 0&&e(t,{replace:!0,state:i}),e(r,{state:s})},[e,t]);return{nav:e,navWithState:n,location:t,state:t.state}},xp=(t,e=0)=>({field:r,value:i,onChange:s})=>{const{key:a,name:o,comp_params:l}=r,[c,u]=b.useState(i??t[e]),d=b.useCallback(g=>{const v=t.find(y=>y.id==parseInt(g.target.value).toString());u(v),s&&s(v)},[t]),{className:h,...p}=l,m="h-10 px-1 w-full shelf-input-color rounded-md text-sm focus:outline-none "+h;return f.jsx("select",{name:"limit",onChange:d,value:c.id,className:m,...p,children:t.map((g,v)=>f.jsx("option",{value:g.id,children:g.name},v))})},JW="pr-3 py-2 max-w-[18rem] overflow-x-auto inline-block whitespace-nowrap",$t=({value:t,children:e,className:n,extra:r="max-w-[8rem] md:max-w-[18rem]",...i})=>{const a=`overflow-x-auto inline-block whitespace-nowrap ${n} ${r}`;return f.jsx("div",{className:a,...i,children:f.jsx("div",{children:t??e})})},YS=({field:t,value:e,className:n,name_fn:r=o=>o,classNameDelimiter:i="text-pink-600 font-bold text-lg",delimiter:s=" / ",...a})=>{const o=e==null?void 0:e.map((l,c)=>f.jsxs("span",{children:[f.jsx("span",{children:r(l)}),c<(e==null?void 0:e.length)-1&&f.jsx("span",{children:s,className:i})]},c));return f.jsx("p",{className:`${JW} ${n}`,children:o,...a})},Ss=({field:t,value:e,...n})=>{const{key:r,name:i,comp_params:s}=t;return f.jsx("p",{children:new Date(e).toLocaleDateString(),...s,...n})},Le=({field:t,value:e,onChange:n,type:r="text",...i})=>{const{key:s,name:a,comp_params:o}=t,l={...o,...i},{className:c,setError:u,error:d,...h}=l,p=b.useCallback(m=>{let g=m.currentTarget.value;r==="number"&&(g=parseFloat(g)),n(g)},[n,r]);return f.jsx(rT,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},X6=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=b.useCallback(async()=>{const a=await S4();console.log(a),a&&n(a)},[n,S4]);return f.jsxs("div",{...i,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"From Clipboard",className:`w-fit underline cursor-pointer
|
351
|
+
--border focus:outline-none`,children:[f.jsx("option",{value:"5",children:"5"}),f.jsx("option",{value:"10",children:"10"}),f.jsx("option",{value:"15",children:"15"}),f.jsx("option",{value:"20",children:"20"})]}),f.jsx(_s,{Icon:f.jsx(hm,{}),text:"",className:"text-lg ",onClick:t})]})},Fy=b.forwardRef(({title:t=f.jsx("p",{children:"NA",className:"text-gray-500"}),onApprove:e,...n},r)=>{const[i,s]=b.useState({data:void 0,message:"NA"}),a=b.useRef();b.useImperativeHandle(r,()=>({hide:()=>a.current.hide(),show:()=>a.current.show(),setDataAndMessage:(l,c,u)=>{s({data:l,message:c}),u&&a.current.show()}}),[]);const o=b.useCallback((l,c)=>{e!==void 0&&(l.preventDefault(),l.stopPropagation(),r.current.hide(),e(i.data,c))},[i,e]);return f.jsx(ha,{ref:a,children:f.jsxs(fa,{name:t,cardClass:"shelf-card-light",className:"max-w-96 w-full",onClick:l=>l.stopPropagation(),children:[f.jsx("p",{children:i.message,className:"text-red-500 text-lg break-words w-full whitespace-pre-wrap"}),f.jsxs("div",{className:"flex flex-row justify-between mt-10 text-base",children:[f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"No",onClick:()=>r.current.hide()}),f.jsx(Gn,{stroke:"border-b-2",btnClassName:"rounded-none",rounded:"rounded-none",children:"Yes",onClick:l=>o(l)})]})]})})});var XW=Nn.GenIcon,WS=function(e){return XW({tag:"svg",attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:"currentColor"}}]})(e)};const _f=({to:t,current_state:e,next_state:n,onClick:r,...i})=>{const{navWithState:s}=zi(),a=b.useCallback(o=>{e=typeof e=="function"?e():e,n=typeof n=="function"?n():n,s(t,e,n),r&&r(),o.preventDefault()},[t,r,s,e,n]);return f.jsx(ln,{to:t,onClick:a,...i})},zi=()=>{const t=Il(),e=da(),n=b.useCallback((r,i,s)=>{i=typeof i=="function"?i():i,s=typeof s=="function"?s():s,i!==void 0&&e(t,{replace:!0,state:i}),e(r,{state:s})},[e,t]);return{nav:e,navWithState:n,location:t,state:t.state}},xp=(t,e=0)=>({field:r,value:i,onChange:s})=>{const{key:a,name:o,comp_params:l}=r,[c,u]=b.useState(i??t[e]),d=b.useCallback(g=>{const v=t.find(y=>y.id==parseInt(g.target.value).toString());u(v),s&&s(v)},[t]),{className:h,...p}=l,m="h-10 px-1 w-full shelf-input-color rounded-md text-sm focus:outline-none "+h;return f.jsx("select",{name:"limit",onChange:d,value:c.id,className:m,...p,children:t.map((g,v)=>f.jsx("option",{value:g.id,children:g.name},v))})},JW="pr-3 py-2 max-w-[18rem] overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap",$t=({value:t,children:e,className:n,extra:r="max-w-[8rem] md:max-w-[18rem]",...i})=>{const a=`overflow-clip hover:overflow-x-auto inline-block whitespace-nowrap ${n} ${r}`;return f.jsx("div",{className:a,...i,children:f.jsx("div",{children:t??e})})},YS=({field:t,value:e,className:n,name_fn:r=o=>o,classNameDelimiter:i="text-pink-600 font-bold text-lg",delimiter:s=" / ",...a})=>{const o=e==null?void 0:e.map((l,c)=>f.jsxs("span",{children:[f.jsx("span",{children:r(l)}),c<(e==null?void 0:e.length)-1&&f.jsx("span",{children:s,className:i})]},c));return f.jsx("p",{className:`${JW} ${n}`,children:o,...a})},Ss=({field:t,value:e,...n})=>{const{key:r,name:i,comp_params:s}=t;return f.jsx("p",{children:new Date(e).toLocaleDateString(),...s,...n})},Le=({field:t,value:e,onChange:n,type:r="text",...i})=>{const{key:s,name:a,comp_params:o}=t,l={...o,...i},{className:c,setError:u,error:d,...h}=l,p=b.useCallback(m=>{let g=m.currentTarget.value;r==="number"&&(g=parseFloat(g)),n(g)},[n,r]);return f.jsx(rT,{type:t.type,onWheel:m=>m.target.blur(),className:c,value:e??"",onChange:p,...h})},X6=({value:t,field:e,onChange:n,setError:r,...i})=>{const s=b.useCallback(async()=>{const a=await S4();console.log(a),a&&n(a)},[n,S4]);return f.jsxs("div",{...i,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"From Clipboard",className:`w-fit underline cursor-pointer
|
352
352
|
shelf-text-label-color
|
353
353
|
dark:bg-kf-50/10 p-1 rounded-md
|
354
354
|
text-sm font-medium tracking-wider`,onClick:s})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Le,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},H0=({value:t,field:e,onChange:n,context:r,setError:i,...s})=>{const a=b.useCallback(async()=>{const o=r.query.title.get(),l=E8(t)??E8(o);n&&n(l)},[n,r,t]);return f.jsxs("div",{...s,children:[f.jsx("div",{className:"w-full flex flex-row justify-end",children:f.jsx("p",{children:"Auto Suggest",className:`w-fit underline cursor-pointer
|
@@ -356,14 +356,14 @@ data
|
|
356
356
|
dark:bg-kf-50/10 p-1 rounded-md
|
357
357
|
text-sm font-medium tracking-wider`,onClick:a})}),f.jsx(lt,{className:"w-full h-fit mt-2",children:f.jsx(Le,{field:e,value:t,onChange:n,className:"w-full h-10"})})]})},bf=({field:t,value:e=!0,onChange:n,...r})=>{const{key:i,name:s,comp_params:a}=t;({...a,...r});const[o,l]=b.useState(e),c=b.useCallback(()=>{const g=!o;l(g),n(g)},[o,n]);let u=`relative transition-all duration-300 --border
|
358
358
|
rounded-3xl cursor-pointer w-16 h-8 flex flex-row`;u+=o?" bg-teal-500 ":" bg-red-400 ";const d="absolute rounded-full w-1/2 h-full bg-white border shadow-md",h="transition-all duration-300",p=o?"top-0 left-1/2":"top-0 left-0",m=d+" "+p+" "+h;return f.jsx("div",{className:u,onClick:c,children:f.jsx("div",{className:m})})},By=({value:t,config:e=1,process_before_copy:n=r=>r})=>{const[r,i]=b.useState(!1),s=b.useCallback(()=>{i(!0),N4(n(t)),setTimeout(()=>i(!1),2e3)},[t,n]);return f.jsxs("div",{className:`flex ${e==0?"flex-row":"flex-row-reverse"} gap-1`,children:[f.jsx(WS,{className:`text-lg cursor-pointer text-gray-500
|
359
|
-
hover:text-gray-800 dark:hover:text-gray-400 inline`,onClick:s}),r&&f.jsx("span",{children:"(copied)",className:"text-xs"})]})},Q=(t,e={},n=!0,r=!1)=>({field:i,value:s,disabled:a,onChange:o,children:l,error:c=void 0,setError:u,context:d,...h})=>{const{key:p,desc:m,name:g,comp_params:v}=i,y={...i,comp_params:e},x=b.useMemo(()=>r?f.jsx(By,{value:JSON.stringify(s)}):null,[r,s]);return f.jsx(fa,{id:"card",name:g,error:c,...v,border:n,desc:m,rightView:x,setError:u,children:f.jsx(t,{field:y,value:s,onChange:o,disabled:a,children:l,error:c,setError:u,context:d,...e})})},Fr=({context:t,field:e,value:n,...r})=>{const i=b.useRef(),[s,a]=b.useState(!1),o=t.item.handle??t.item.id,l=b.useCallback(()=>{i.current.setDataAndMessage(o,`Are you sure you want to remove ${o} ?`),i.current.show()},[t]),c=b.useCallback(u=>{console.log("data_id",u),a(!0),t.deleteDocument(u).finally(()=>a(!1))},[t]);return f.jsxs("div",{className:`flex flex-row items-center text-center
|
360
|
-
justify-end text-
|
359
|
+
hover:text-gray-800 dark:hover:text-gray-400 inline`,onClick:s}),r&&f.jsx("span",{children:"(copied)",className:"text-xs"})]})},Q=(t,e={},n=!0,r=!1)=>({field:i,value:s,disabled:a,onChange:o,children:l,error:c=void 0,setError:u,context:d,...h})=>{const{key:p,desc:m,name:g,comp_params:v}=i,y={...i,comp_params:e},x=b.useMemo(()=>r?f.jsx(By,{value:JSON.stringify(s)}):null,[r,s]);return f.jsx(fa,{id:"card",name:g,error:c,...v,border:n,desc:m,rightView:x,setError:u,children:f.jsx(t,{field:y,value:s,onChange:o,disabled:a,children:l,error:c,setError:u,context:d,...e})})},Fr=({context:t,field:e,value:n,...r})=>{const i=b.useRef(),[s,a]=b.useState(!1),o=t.item.handle??t.item.id,l=b.useCallback(()=>{i.current.setDataAndMessage(o,`Are you sure you want to remove ${o} ?`),i.current.show()},[t]),c=b.useCallback(u=>{console.log("data_id",u),a(!0),t.deleteDocument(u).finally(()=>a(!1))},[t]);return f.jsxs("div",{className:`flex flex-row items-center text-center flex-shrink-0
|
360
|
+
justify-end text-base overflow-clip w-fit mx-auto `,children:[!(t!=null&&t.editDocumentUrl)&&(t==null?void 0:t.viewDocumentUrl)&&f.jsx(ln,{to:t.viewDocumentUrl(o),children:f.jsx(GL,{className:" text-xl text-teal-600 stroke-[0.5px] hover:stroke-[1px]"})}),(t==null?void 0:t.editDocumentUrl)&&f.jsx(_f,{to:t.editDocumentUrl(o),draggable:"false",current_state:()=>(t==null?void 0:t.getState)&&(t==null?void 0:t.getState()),children:f.jsx(UL,{className:`ml-3 text-2xl text-pink-500
|
361
361
|
stroke-0 hover:stroke-1`})}),(t==null?void 0:t.deleteDocument)&&f.jsx(ff,{Icon:f.jsx(ny,{className:"text-xl scale-125 text-kf-500 outline-8"}),loading:s,className:"ml-3 px-0 py-0 border-0 ",onClick:l}),f.jsx(Fy,{ref:i,onApprove:c,title:f.jsxs("p",{className:` text-xl flex
|
362
362
|
flex-row items-center gap-3`,children:[f.jsx(ry,{className:"text-2xl"}),"Warning"]})})]})},qa=({value:t,className:e="",label:n=t,bgColor:r="bg-pink-400",...i})=>{const s=typeof r=="function"?r(t):r,a=typeof n=="function"?n(t):typeof n=="string"?n:typeof t=="string"?t:"missing";return f.jsx("div",{className:`font-medium cursor-pointer text-white w-fit
|
363
363
|
py-0 border shelf-border-color-blend px-2 rounded-full whitespace-nowrap
|
364
364
|
hover:scale-105 transition-transform inline-block
|
365
|
-
${e} ${s}`,children:a,...i})},GS=t=>{switch(t){case 0:return"bg-gray-400 dark:bg-gray-400/40";case 1:return"bg-red-500 dark:bg-red-500/40";case 2:return"bg-green-600 dark:bg-green-600/40";case 3:return"bg-black dark:bg-black/40";default:return"bg-pink-400 dark:bg-pink-400/40"}},eY=t=>{switch(t){case 0:return"bg-gray-400 dark:bg-gray-400/40";case 1:return"bg-green-500 dark:bg-green-500/40";case 2:return"bg-green-600 dark:bg-green-600/40";case 3:return"bg-kf-400 dark:bg-kf-400/40";case 4:return"bg-malibu-500 dark:bg-malibu-500/40";case 5:return"bg-red-400 dark:bg-red-400/40";case 6:return"bg-cyan-400 dark:bg-cyan-400/40";case 7:return"bg-teal-500 dark:bg-teal-500/40";case 8:return"bg-teal-400 dark:bg-teal-400/40";default:return"bg-pink-400 dark:bg-pink-400/40"}},tY=({...t})=>f.jsx("div",{...t,children:f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(ln,{to:"/pages/orders",draggable:"false",children:f.jsx(qa,{value:"all",className:"border shelf-border-color",bgColor:"bg-pink-400 dark:bg-pink-400/40"})}),Object.values(j4).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/orders/q/vql=fulfill:${e.id}`,children:f.jsx(qa,{value:e.name2,className:"border shelf-border-color",bgColor:GS(e.id)})},e.id)),Object.values(F4).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/orders/q/vql=payment:${e.id}`,children:f.jsx(qa,{value:e.name,className:"border shelf-border-color",bgColor:eY(e.id)})},e.id))]})}),Br=(t,e=t,n=!1,r=Cl)=>{const{query_params:i}=hr(),s=b.useMemo(()=>Pj(i),[i]),a=da(),o=b.useRef(),l=b.useRef(!0),{pages:c,page:u,loading:d,hasLoaded:h,error:p,sdk:m,queryCount:g,resource_is_probably_empty:v,actions:{removeDocument:y,query:x}}=So(t,r,n);b.useEffect(()=>{var N;(N=o.current)==null||N.setSearch(s.vql),x(s,l.current)},[s,x]);const _=b.useCallback(async(N=!0)=>{const{endBefore:D,endAt:A,startAfter:I,startAt:$,limitToLast:K,...X}=s,H=o.current.getSearch();l.current=!1;const U={...X,limit:5,vql:H};return N?a(`${e}/q/${cs(U).toString()}`,{replace:!0}):await x(U),U},[a,x,e,s]),w=b.useCallback((N,D=!0)=>{const{limit:A,limitToLast:I,...$}=s,K={...s,limit:A?N:void 0,limitToLast:I?N:void 0};return D?a(`${e}/q/${cs(K).toString()}`):x(K),K},[a,x,e,s,u]),C=b.useCallback(async(N=!0)=>{const D=u==null?void 0:u.at(-1),{endBefore:A,endAt:I,startAfter:$,startAt:K,limit:X,limitToLast:H,...U}=s,G={...U,startAfter:[["updated_at",D.updated_at],["id",D.id]],limit:X||H};return N?a(`${e}/q/${cs(G).toString()}`):await x(G),G},[a,x,u,s,e]),S=b.useCallback(async(N=!0)=>{const D=u==null?void 0:u.at(0),{endBefore:A,endAt:I,startAfter:$,startAt:K,limit:X,limitToLast:H,...U}=s,G={...U,endBefore:[["updated_at",D.updated_at],["id",D.id]],limitToLast:H||X};return N?a(`${e}/q/${cs(G).toString()}`):await x(G),G},[a,x,u,s,e]),k=b.useMemo(()=>({viewDocumentUrl:N=>`${e}/${N}/view`,editDocumentUrl:N=>`${e}/${N}`,deleteDocument:y}),[y,e]);return{resource:t,query_api:s,ref_actions:o,context:k,pages:c,page:u,loading:d,hasLoaded:h,resource_is_probably_empty:v,error:p,queryCount:g,actions:{onLimitChange:w,onReload:_,prev:S,next:C}}},nY=(t,e,n=r=>r)=>{if(t===void 0)return n(e);const r=t?t.split("."):[];return n(r.reduce((i,s)=>i==null?void 0:i[s],e))},rY=({context:t,fields:e,data:n,recordClassName:r,className:i,...s})=>{const a=({item:o,className:l,...c})=>f.jsx("tr",{className:r,...c,children:e.map((u,d)=>f.jsx("td",{className:d==0?"text-start pl-3 overflow-x-scroll":d<e.length-1?"text-center px-3 overflow-x-clip ":"text-end pr-3 right-0 bg-white/60 dark:bg-transparent
|
366
|
-
h-10 text-xs font-medium text-gray-400`,children:e.map((o,l)=>f.jsx("th",{className:l==0?"text-left pl-3":l<e.length-1?"text-center":"text-end pr-3
|
365
|
+
${e} ${s}`,children:a,...i})},GS=t=>{switch(t){case 0:return"bg-gray-400 dark:bg-gray-400/40";case 1:return"bg-red-500 dark:bg-red-500/40";case 2:return"bg-green-600 dark:bg-green-600/40";case 3:return"bg-black dark:bg-black/40";default:return"bg-pink-400 dark:bg-pink-400/40"}},eY=t=>{switch(t){case 0:return"bg-gray-400 dark:bg-gray-400/40";case 1:return"bg-green-500 dark:bg-green-500/40";case 2:return"bg-green-600 dark:bg-green-600/40";case 3:return"bg-kf-400 dark:bg-kf-400/40";case 4:return"bg-malibu-500 dark:bg-malibu-500/40";case 5:return"bg-red-400 dark:bg-red-400/40";case 6:return"bg-cyan-400 dark:bg-cyan-400/40";case 7:return"bg-teal-500 dark:bg-teal-500/40";case 8:return"bg-teal-400 dark:bg-teal-400/40";default:return"bg-pink-400 dark:bg-pink-400/40"}},tY=({...t})=>f.jsx("div",{...t,children:f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(ln,{to:"/pages/orders",draggable:"false",children:f.jsx(qa,{value:"all",className:"border shelf-border-color",bgColor:"bg-pink-400 dark:bg-pink-400/40"})}),Object.values(j4).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/orders/q/vql=fulfill:${e.id}`,children:f.jsx(qa,{value:e.name2,className:"border shelf-border-color",bgColor:GS(e.id)})},e.id)),Object.values(F4).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/orders/q/vql=payment:${e.id}`,children:f.jsx(qa,{value:e.name,className:"border shelf-border-color",bgColor:eY(e.id)})},e.id))]})}),Br=(t,e=t,n=!1,r=Cl)=>{const{query_params:i}=hr(),s=b.useMemo(()=>Pj(i),[i]),a=da(),o=b.useRef(),l=b.useRef(!0),{pages:c,page:u,loading:d,hasLoaded:h,error:p,sdk:m,queryCount:g,resource_is_probably_empty:v,actions:{removeDocument:y,query:x}}=So(t,r,n);b.useEffect(()=>{var N;(N=o.current)==null||N.setSearch(s.vql),x(s,l.current)},[s,x]);const _=b.useCallback(async(N=!0)=>{const{endBefore:D,endAt:A,startAfter:I,startAt:$,limitToLast:K,...X}=s,H=o.current.getSearch();l.current=!1;const U={...X,limit:5,vql:H};return N?a(`${e}/q/${cs(U).toString()}`,{replace:!0}):await x(U),U},[a,x,e,s]),w=b.useCallback((N,D=!0)=>{const{limit:A,limitToLast:I,...$}=s,K={...s,limit:A?N:void 0,limitToLast:I?N:void 0};return D?a(`${e}/q/${cs(K).toString()}`):x(K),K},[a,x,e,s,u]),C=b.useCallback(async(N=!0)=>{const D=u==null?void 0:u.at(-1),{endBefore:A,endAt:I,startAfter:$,startAt:K,limit:X,limitToLast:H,...U}=s,G={...U,startAfter:[["updated_at",D.updated_at],["id",D.id]],limit:X||H};return N?a(`${e}/q/${cs(G).toString()}`):await x(G),G},[a,x,u,s,e]),S=b.useCallback(async(N=!0)=>{const D=u==null?void 0:u.at(0),{endBefore:A,endAt:I,startAfter:$,startAt:K,limit:X,limitToLast:H,...U}=s,G={...U,endBefore:[["updated_at",D.updated_at],["id",D.id]],limitToLast:H||X};return N?a(`${e}/q/${cs(G).toString()}`):await x(G),G},[a,x,u,s,e]),k=b.useMemo(()=>({viewDocumentUrl:N=>`${e}/${N}/view`,editDocumentUrl:N=>`${e}/${N}`,deleteDocument:y}),[y,e]);return{resource:t,query_api:s,ref_actions:o,context:k,pages:c,page:u,loading:d,hasLoaded:h,resource_is_probably_empty:v,error:p,queryCount:g,actions:{onLimitChange:w,onReload:_,prev:S,next:C}}},nY=(t,e,n=r=>r)=>{if(t===void 0)return n(e);const r=t?t.split("."):[];return n(r.reduce((i,s)=>i==null?void 0:i[s],e))},rY=({context:t,fields:e,data:n,recordClassName:r,className:i,...s})=>{const a=({item:o,className:l,...c})=>f.jsx("tr",{className:r,...c,children:e.map((u,d)=>f.jsx("td",{className:d==0?"text-start pl-3 overflow-x-scroll":d<e.length-1?"text-center px-3 overflow-x-clip ":"text-end pr-3 right-0 bg-white/60 dark:bg-transparent sticky z-0 --border-l-2 overflow-clip shelf-body-bg opacity-80",children:f.jsx(f.Fragment,{children:f.jsx(u.comp,{context:{item:o,...t},field:u,value:nY(String(u.key),o,u.transform),...u.comp_params})})},d))});return f.jsxs("table",{className:i,children:[f.jsx("thead",{children:f.jsx("tr",{className:`border-b border-b-gray-300 dark:border-gray-300/25
|
366
|
+
h-10 text-xs font-medium text-gray-400`,children:e.map((o,l)=>f.jsx("th",{className:l==0?"text-left pl-3":l<e.length-1?"text-center":"text-end pr-3 sticky right-0 bg-white/60 dark:bg-transparent --border-l-2 shelf-body-bg ",children:o.name},l))})}),f.jsx("tbody",{children:n.map((o,l)=>f.jsx(a,{item:o},l))})]})},pr=({context:t,fields:e,data:n,recordClassName:r=`bg-white dark:bg-white/5
|
367
367
|
dark:border-gray-300/25 border-b
|
368
368
|
--border-gray-300 h-14`,className:i=" "})=>f.jsx("div",{className:`w-full ${i}`,children:f.jsx("div",{className:"w-full overflow-auto",children:f.jsx(rY,{context:t,fields:e,data:n,recordClassName:r,className:"w-full table-fixed2 whitespace-nowrap"})})}),iY=t=>f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",id:"Layer_1",x:0,y:0,className:"illustrations_image w-[100px]","data-imageid":"astronaut-52",style:{},viewBox:"0 0 500 500",...t,children:[f.jsx("style",{children:".st0_astronaut-52{fill:#68e1fd}.st1_astronaut-52{fill:#093f68}.st2_astronaut-52{fill:#fff}.st4_astronaut-52{fill:none}.st5_astronaut-52{fill:#dfeaef}"}),f.jsxs("g",{id:"character_astronaut-52",children:[f.jsx("path",{d:"M196.1 120.1h1.5c6.6 0 12 5.4 12 12v10.7c0 6.6-5.4 12-12 12h-1.5c-6.6 0-12-5.4-12-12v-10.7c0-6.6 5.3-12 12-12z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M196.8 156.6c-8.1 0-14.6-6.5-14.6-14.6v-9.2c.2-8 6.9-14.4 15-14.2 7.8.2 14 6.4 14.2 14.2v9.2c0 8.1-6.5 14.6-14.6 14.6zm0-34.7c-6 0-10.9 4.9-10.9 10.9v9.2c.2 6 5.2 10.7 11.2 10.6 5.8-.2 10.4-4.8 10.6-10.6v-9.2c0-6-4.9-10.9-10.9-10.9z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M314.7 120.1h1.4c6.6 0 12 5.4 12 12v10.7c0 6.6-5.4 12-12 12h-1.4c-6.6 0-12-5.4-12-12v-10.7c0-6.6 5.3-12 12-12z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M315.4 156.6c-8.1 0-14.6-6.5-14.6-14.6v-9.2c.2-8 6.9-14.4 15-14.2 7.8.2 14 6.4 14.2 14.2v9.2c0 8.1-6.5 14.6-14.6 14.6zm0-34.7c-6 0-10.9 4.9-10.9 10.9v9.2c.2 6 5.2 10.7 11.2 10.6 5.8-.2 10.4-4.8 10.6-10.6v-9.2c0-6-4.9-10.9-10.9-10.9z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M207.2 176.4h97c11.8 0 21.5 9.6 21.5 21.4v97c0 11.8-9.6 21.5-21.5 21.5h-97c-11.8 0-21.4-9.6-21.4-21.5v-97c0-11.8 9.6-21.4 21.4-21.4z",className:"st2_astronaut-52"}),f.jsx("path",{d:"M304.6 318.1h-97.8c-12.6 0-22.9-10.3-22.9-22.9v-97.8c0-12.6 10.3-22.9 22.9-22.9h97.8c12.6 0 22.9 10.3 22.9 22.9v97.8c0 12.7-10.3 22.9-22.9 22.9zm-97.8-139.9c-10.6 0-19.2 8.6-19.2 19.2v97.8c0 10.6 8.6 19.2 19.2 19.2h97.8c10.6 0 19.2-8.6 19.2-19.2v-97.8c0-10.6-8.6-19.2-19.2-19.2h-97.8z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M339.1 228.9c-17.3-23.8-30.2-31.4-43.6-33.5-2.6-.4-10-1.2-11.2-1.2h-52c-14.9 0-23.8 3.6-33.9 13.4-15.3 14.8-25.7 45.5-31.8 48.3-1.2 0-2.3-.5-3.1-1.5-6.1-6.6-7.8-26.5-7-37.9.7-8.9-6-16.7-14.9-17.4s-16.7 6-17.4 14.9c-.5 7-2.3 43.1 15.5 62.3 7 7.7 17 12 27.4 11.9 15.3 0 28.3-10.9 39.7-33.1v146h-5c-5.5-.1-10.1 4.2-10.5 9.7-.2 5.5 4.1 10.1 9.7 10.3h45.9V309.9c.2-4.8 4.2-8.5 9-8.4 4.6.2 8.2 3.8 8.4 8.4v111.3h45.6c5.5 0 10-4.5 10-10v-.3c-.3-5.5-4.9-9.8-10.5-9.7h-5V238.6c3.2 2.8 6 6 8.5 9.4 4.6 6.3 11.7 31.8 14.1 69.7-2.8 5.3-6 12.8-4.1 16.5 1.5 3 4.7 1.5 7.6-.8 3 4.1 7.9 6.6 13 6.6h.8c8.9-.4 15.9-8 15.5-16.9-.6-11.8-4.1-71.3-20.7-94.2z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M309.8 423h-45.6c-1 0-1.8-.8-1.8-1.8V309.9c0-3.8-3.1-6.8-6.8-6.8s-6.8 3.1-6.8 6.8v111.3c0 1-.8 1.8-1.8 1.8h-45.6c-6.5 0-11.9-5.3-11.9-11.8v-.4c.4-6.5 5.8-11.6 12.3-11.5h3.2V262.4c-11 18.6-23.4 27.7-38 27.7-10.9.1-21.3-4.4-28.7-12.5-18.3-19.8-16.5-56.6-16-63.7.8-9.9 9.4-17.4 19.4-16.6 9.9.8 17.4 9.4 16.6 19.4-.8 11.5 1 30.5 6.5 36.5.3.4.8.7 1.4.8 2.2-1.6 5.8-8.5 9.4-15.1 5.7-10.7 12.8-24.1 21.6-32.6 10.5-10.1 20-13.9 35.2-13.9h52c1.4 0 9 .8 11.5 1.2 16 2.6 29 12.5 44.8 34.3 16.9 23.3 20.5 83.3 21 95.1.5 9.9-7.1 18.4-17 18.9-5.5.3-10.7-1.9-14.4-6-2.3 1.5-4.2 2-5.8 1.6-1.4-.3-2.5-1.3-3.1-2.6-1.7-3.4-.4-9.4 3.9-17.7-2.4-37.3-9.5-62.3-13.7-68.2-1.6-2.2-3.3-4.2-5.2-6.2v156.4h3.2c6.5-.1 11.9 5 12.3 11.5.2 6.6-5 12-11.5 12.2-.3.1-.4.2-.6.1zm-43.8-3.6h43.8c4.5 0 8.2-3.7 8.2-8.2v-.3c-.3-4.5-4.1-8-8.6-7.9h-5c-1 0-1.8-.8-1.8-1.8V238.6c0-1 .8-1.8 1.8-1.8.5 0 .9.2 1.3.5 3.3 2.9 6.2 6.2 8.8 9.7 5.3 7.3 12.2 34.5 14.5 70.6 0 .3 0 .7-.2 1-3.7 7-5.2 12.5-4.1 14.8.3.5.5.6.6.6.6.1 2-.3 4.2-2 .4-.3.9-.4 1.4-.4.5.1.9.3 1.2.7 4.7 6.4 13.7 7.8 20.1 3.1 3.9-2.8 6.1-7.5 5.9-12.3-.5-11.6-4-70.7-20.3-93.1-18.8-25.9-31.5-31-42.4-32.8-2.7-.4-9.9-1.1-10.9-1.1h-52c-14.3 0-22.8 3.4-32.6 12.8-8.4 8.1-15.3 21.2-20.9 31.7-5.4 10.2-8.4 15.6-11.5 17-.3.1-.6.2-.9.2-1.7 0-3.3-.8-4.4-2.1-6.6-7.1-8.3-27.2-7.5-39.2.6-7.9-5.3-14.8-13.2-15.5-7.9-.6-14.8 5.3-15.4 13.2-.5 6.9-2.3 42.3 15 60.9 6.7 7.3 16.1 11.4 26 11.3 14.6 0 27-10.5 38.1-32.1.4-.8 1.2-1.2 2.1-.9.8.2 1.4.9 1.4 1.8v146c0 1-.8 1.8-1.8 1.8h-5c-4.5-.1-8.3 3.4-8.6 7.9-.1 4.5 3.4 8.3 7.9 8.5H245V309.9c.3-5.8 5.2-10.3 11-10 5.4.2 9.8 4.6 10 10v109.5z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M313.8 136.5c-.4 31.9-26.6 57.4-58.5 57-31.3-.4-56.5-25.7-57-57 0-2.8.2-5.6.6-8.4 4.6-31.5 33.9-53.4 65.5-48.8a57.7 57.7 0 0 1 48.8 48.8c.4 2.8.6 5.6.6 8.4z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M256.1 196.1c-32.9 0-59.5-26.7-59.5-59.6 0-2.9.2-5.8.6-8.6 4.8-32.5 35-55.1 67.5-50.3 26.1 3.8 46.5 24.3 50.3 50.3.4 2.9.6 5.7.6 8.6 0 32.9-26.6 59.5-59.5 59.6zm0-115.5c-27.7.1-51.2 20.4-55.3 47.8-.4 2.7-.6 5.4-.6 8.1.4 30.9 25.8 55.5 56.6 55.1 30.3-.4 54.7-24.9 55.1-55.1 0-2.7-.2-5.4-.6-8.1-4-27.4-27.5-47.7-55.2-47.8z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M313.8 136.5c-.4 31.9-26.6 57.4-58.5 57-31.3-.4-56.5-25.7-57-57 0-2.8.2-5.6.6-8.4 13.9-12 34.3-19.6 57.1-19.6s43.2 7.6 57.1 19.6c.5 2.8.7 5.6.7 8.4z",className:"st2_astronaut-52"}),f.jsx("path",{d:"M256.1 196.1c-32.9 0-59.5-26.7-59.5-59.6 0-2.9.2-5.8.6-8.6.1-.4.3-.8.6-1.1 14.8-12.7 36-20 58.3-20s43.6 7.3 58.3 20c.3.3.6.7.6 1.1.4 2.8.6 5.7.6 8.6 0 32.9-26.6 59.5-59.5 59.6zm-55.4-67c-.3 2.5-.5 4.9-.5 7.4 0 30.9 25 55.9 55.8 55.9s55.9-25 55.9-55.8c0-2.5-.2-5-.5-7.5-14.1-11.9-34.2-18.7-55.4-18.7s-41.2 6.8-55.3 18.7zM304.4 291.5h-97.6c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h97.6c1 0 1.8.8 1.8 1.8s-.8 1.8-1.8 1.8zM246.9 388.8h-40.1c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h40.1c1 0 1.8.8 1.8 1.8s-.8 1.8-1.8 1.8zM304.4 388.8h-40.1c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h40.1c1 0 1.8.8 1.8 1.8s-.8 1.8-1.8 1.8zM304.4 356.7h-40.1c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h40.1c1 0 1.8.8 1.8 1.8 0 .9-.8 1.8-1.8 1.8zM246.9 356.7h-38.3c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h38.3c1 0 1.8.8 1.8 1.8 0 .9-.8 1.8-1.8 1.8z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M225.7 216.2h56.8c3.3 0 5.9 2.7 5.9 5.9v44c0 3.3-2.7 5.9-5.9 5.9h-56.8c-3.3 0-5.9-2.7-5.9-5.9v-44c0-3.3 2.7-5.9 5.9-5.9z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M277.6 273.9h-46.9c-7 0-12.7-5.7-12.7-12.8V227c0-7 5.7-12.7 12.8-12.8h46.9c7 0 12.7 5.7 12.8 12.8v34.1c-.1 7.1-5.8 12.8-12.9 12.8zM230.7 218c-5 0-9.1 4.1-9.1 9.1v34.1c0 5 4.1 9.1 9.1 9.1h46.9c5 0 9.1-4.1 9.1-9.1v-34c0-5-4.1-9.1-9.1-9.1l-46.9-.1z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M276.1 227.8h-20.5c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8h20.5c1 0 1.8.8 1.8 1.8s-.8 1.8-1.8 1.8z",className:"st1_astronaut-52"}),f.jsx("circle",{cx:235,cy:228.3,r:4.6,style:{fill:"#ffbc0e"}}),f.jsx("path",{d:"M235 234.7c-3.5 0-6.4-2.9-6.4-6.4s2.9-6.4 6.4-6.4 6.4 2.9 6.4 6.4c0 3.5-2.9 6.4-6.4 6.4zm0-9.2c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7c0-1.4-1.2-2.7-2.7-2.7zM304.4 240.4c-1 0-1.8-.8-1.8-1.8v-19.4c0-1 .8-1.8 1.8-1.8s1.8.8 1.8 1.8v19.4c0 1-.8 1.8-1.8 1.8z",className:"st1_astronaut-52"}),f.jsx("path",{d:"m325.7 301.8 31.8-6.1",className:"st4_astronaut-52"}),f.jsx("path",{d:"M325.7 303.7c-1 0-1.8-.8-1.9-1.8 0-.9.6-1.7 1.5-1.8l31.9-6.1c1-.2 2 .4 2.2 1.4s-.4 2-1.4 2.2h-.2l-31.9 6.1c0-.1-.1 0-.2 0z",className:"st1_astronaut-52"}),f.jsx("path",{d:"m126.5 248.9 29.9-12.1",className:"st4_astronaut-52"}),f.jsx("path",{d:"M126.5 250.7c-1 0-1.8-.8-1.9-1.8 0-.8.5-1.4 1.2-1.7l29.8-12.1c.9-.4 2 .1 2.4 1 .4.9-.1 2-1 2.4l-29.8 12.1c-.2.1-.4.1-.7.1zM230.4 156.6c-1 0-1.8-.8-1.8-1.8 0-.6.3-1.1.7-1.4l35.4-28.2c.8-.6 2-.5 2.6.3.6.8.5 2-.3 2.6l-35.4 28.2c-.3.2-.7.3-1.2.3zM246.9 177.6c-1 0-1.8-.8-1.8-1.8 0-.6.3-1.1.7-1.4l37.4-29.6c.8-.6 1.9-.5 2.6.3.6.8.5 1.9-.3 2.6L248 177.2c-.3.2-.7.4-1.1.4z",className:"st1_astronaut-52"})]}),f.jsx("g",{id:"lines_astronaut-52",children:f.jsx("path",{d:"M386.4 232.9c-1 0-1.8-.8-1.8-1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st5_astronaut-52"})}),f.jsxs("g",{id:"flag_astronaut-52",children:[f.jsx("path",{d:"m134.5 108.6-51.8 52.3 56.7-1.4z",style:{fill:"#f56132"}}),f.jsx("path",{d:"M82.7 162.7c-1 0-1.8-.8-1.8-1.8 0-.5.2-1 .5-1.3l51.8-52.3c.7-.7 1.9-.7 2.6 0 .3.3.5.7.5 1.1l4.9 51c.1.5-.1 1-.4 1.4-.3.4-.8.6-1.3.6l-56.8 1.3zm50.4-50L87.2 159l50.2-1.2-4.3-45.1z",className:"st1_astronaut-52"}),f.jsx("path",{d:"m163.9 417.5-30.2-317",className:"st4_astronaut-52"}),f.jsx("path",{d:"M163.9 421.1c-1.9 0-3.5-1.4-3.7-3.3L130 100.9c-.2-2 1.3-3.8 3.3-4 2-.2 3.8 1.3 4 3.3l30.2 316.9c.2 2-1.3 3.8-3.3 4h-.3z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M127.9 196.8h22.8c3.1 0 5.6 2.5 5.6 5.6v22.8c0 3.1-2.5 5.6-5.6 5.6h-22.8c-3.1 0-5.6-2.5-5.6-5.6v-22.8c.1-3.1 2.6-5.6 5.6-5.6z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M146.1 232.6h-13.5c-6.7 0-12.1-5.4-12.1-12.1V207c.1-6.6 5.5-12 12.1-12h13.5c6.6 0 12 5.4 12.1 12v13.5c0 6.7-5.4 12.1-12.1 12.1zm-13.5-34c-4.6 0-8.4 3.8-8.4 8.4v13.5c0 4.6 3.8 8.4 8.4 8.4h13.5c4.6 0 8.4-3.8 8.4-8.4V207c0-4.6-3.8-8.4-8.4-8.4h-13.5z",className:"st1_astronaut-52"}),f.jsx("path",{d:"M156.8 198.4h5c1.6 0 3 1.3 3 3v11.8c0 1.6-1.3 3-3 3h-5c-1.6 0-3-1.3-3-3v-11.8c0-1.7 1.3-3 3-3z",className:"st0_astronaut-52 targetColor",style:{fill:"#68e1fd"}}),f.jsx("path",{d:"M159.3 218c-4 0-7.3-3.3-7.3-7.3v-6.8c0-4 3.3-7.3 7.3-7.3s7.3 3.3 7.3 7.3v6.8c0 4-3.3 7.3-7.3 7.3zm0-17.8c-2 0-3.6 1.6-3.6 3.6v6.8c.1 2 1.8 3.5 3.8 3.4 1.9-.1 3.3-1.6 3.4-3.4v-6.8c0-1.9-1.6-3.6-3.6-3.6z",className:"st1_astronaut-52"})]})]}),mr=({resource:t,should_onboard:e=!1,hasLoaded:n=!0,overallColelctionCount:r})=>f.jsxs("div",{className:"",children:[f.jsx(de,{show:e,children:f.jsxs("div",{className:"flex flex-row items-center justify-between relative",children:[f.jsxs("div",{className:"flex flex-col flex-wrap items-baseline gap-3 --w-3/4",children:[f.jsxs("div",{className:"flex flex-row gap-3 flex-wrap items-baseline",children:[f.jsx(Hu,{children:"Welcome"}),f.jsx(Hu,{children:"👋",className:"animate-waving-hand"}),f.jsx(Hu,{children:"to your empty"})]}),f.jsx(L1,{children:t,className:`bg-gradient-to-r from-kf-500 to-pink-500
|
369
369
|
dark:from-kf-600 dark:to-pink-500
|
@@ -416,14 +416,15 @@ data
|
|
416
416
|
cursor-pointer`,onClick:()=>_(N),children:f.jsx(n,{data:N})},`sr_${N.id}`)),f.jsx(_s,{text:"Load more",onClick:()=>y().catch(N=>{}),keep_text_on_load:!0,className:`w-fit mx-auto h-12 p-3 border-b cursor-pointer
|
417
417
|
shelf-border-color-soft
|
418
418
|
text-center text-pink-500 font-medium text-base`})]})})]})]})]})},uY=({data:t})=>f.jsxs("div",{className:`w-full h-full flex flex-row justify-between
|
419
|
-
items-center text-sm gap-3`,children:[f.jsx("span",{className:`text-base overflow-
|
419
|
+
items-center text-sm gap-3`,children:[f.jsx("span",{className:`text-base overflow-hidden hover:overflow-auto
|
420
420
|
whitespace-nowrap h-full
|
421
421
|
flex flex-row items-center pr-3 flex-1`,children:`${t.firstname} ${t.lastname}`}),f.jsx("span",{className:`text-gray-500 max-w-[8rem] sm:max-w-none
|
422
422
|
overflow-x-auto whitespace-normal h-full
|
423
423
|
flex flex-row items-center`,children:`(${t.auth_id})`})]}),dY=({data:t})=>f.jsxs("div",{className:`w-full h-full flex flex-row justify-between
|
424
|
-
items-center text-sm `,children:[f.jsx("span",{className:`
|
425
|
-
|
426
|
-
|
424
|
+
items-center gap-3 text-sm `,children:[f.jsx("span",{className:`overflow-hidden hover:overflow-auto
|
425
|
+
text-sm whitespace-nowrap h-full
|
426
|
+
flex flex-row items-center
|
427
|
+
pr-1`,children:t.title}),f.jsx("span",{className:"text-gray-500 whitespace-nowrap flex-shrink-0",children:`(${t.qty} In stock)`})]}),fY=({onSave:t,onCancel:e})=>f.jsx(QS,{resource:"customers",Comp:uY,onSave:t,onCancel:e,title:"Browse Customers"}),kf=({onSave:t,onCancel:e})=>f.jsx(QS,{resource:"products",Comp:dY,onSave:t,onCancel:e,title:"Browse Products"}),hY=({items:t,context:e,onChangeItem:n,onRemoveItem:r})=>{const i=s=>s.stock_reserved?`(${s.stock_reserved} stock reserved, return stock)`:`(reduce ${s.qty} stock units)`;return f.jsx("div",{className:"w-full flex flex-row mt-3",children:f.jsxs("table",{className:"w-full border-collapse text-left",children:[f.jsx("thead",{className:"w-full",children:f.jsxs("tr",{className:"w-full",children:[f.jsx("th",{children:"Product"}),f.jsx("th",{children:"Price"}),f.jsx("th",{children:"Quantity"}),f.jsx("th",{children:"",className:"text-right"})]})}),f.jsx("tbody",{className:"w-full text-sm",children:t.map((s,a)=>{var o,l;return f.jsxs("tr",{className:"--text-gray-500 border w-full border-pink-500",children:[f.jsx("td",{className:"pl-1 max-w-[100px] sm:max-w-[200px] pr-5",children:f.jsxs("div",{className:`overflow-x-auto --text-black whitespace-nowrap
|
427
428
|
scrollbar-thin`,children:[f.jsx(_f,{to:`/pages/products/${s.id}`,current_state:()=>(e==null?void 0:e.getState)&&(e==null?void 0:e.getState()),draggable:"false",children:f.jsx("span",{children:(o=s.data)==null?void 0:o.title,className:"underline"})}),f.jsx("br",{}),f.jsx("span",{children:i(s),className:`underline shelf-text-label-color text-sm
|
428
429
|
font-medium cursor-pointer text-left`,onClick:c=>n(a,"stock-change")})]})}),f.jsx("td",{children:s.price,className:"py-2 w-14 pr-3"}),f.jsx("td",{className:"py-2 w-14 pr-3",children:f.jsx(lt,{stroke:"border-b-2",className:"w-full ",children:f.jsx("input",{placeholder:"",value:s.qty,type:"number",onWheel:c=>c.target.blur(),min:(s==null?void 0:s.stock_reserved)>0?s.stock_reserved:1,max:((l=s==null?void 0:s.data)==null?void 0:l.qty)??s.qty??0,step:"1",onChange:c=>n(a,"change-qty",c.currentTarget.value),className:"h-9 w-full px-1 shelf-input-color"})})}),f.jsx("td",{className:"py-2 w-12 text-right items-center",children:f.jsx(pm,{onClick:c=>r(a,s),className:`h-6 w-9 pl-3 border-l shelf-border-color
|
429
430
|
cursor-pointer`})})]},a)})})]})})},pY=({field:t,value:e,onChange:n,context:r,error:i,setError:s,...a})=>{const{sdk:o}=sn(),l=b.useRef(),c=b.useRef(),u=b.useRef(),[d,h]=b.useState(e),p=b.useRef(),m=b.useCallback(()=>{const _=l.current.value,w=parseFloat(c.current.value),C=parseInt(u.current.value);_&&w&&C&&h(S=>[...S,{id:_,title:_,price:w,qty:C,source:"manual",data:void 0}])},[]),g=b.useCallback(_=>{const w=_.map(C=>({id:C.handle,price:C.price,qty:1,title:C.title,data:C,stock_reserved:0}));h(C=>[...w.filter(S=>C.find(k=>k.id===S.id)===void 0),...C]),p.current.hide()},[]),v=b.useCallback((_,w)=>{if(w.stock_reserved&&w.qty>0){s(`${w.id} has reserved ${w.stock_reserved} items,
|
@@ -580,9 +581,9 @@ Expecting `+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":$="Parse error on
|
|
580
581
|
bg-gray-500 cursor-col-resize`,ref:i,children:f.jsx("span",{className:"w-1 h-10 bg-black/80"})}),f.jsx("div",{children:o[1],className:"w-1/2 "+(n?"pointer-events-none":""),ref:a})]})})},oce=({mode:t=0,onChange:e})=>{const n=b.useCallback(r=>{e&&e(r)},[e]);return f.jsxs("div",{className:`flex flex-row gap-3 items-center p-2
|
581
582
|
rounded-md border w-fit shelf-border-color
|
582
583
|
relative text-base`,children:[f.jsx(a7,{title:"Show Preview to the right",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==0?"scale-150":""),onClick:()=>n(0)}),f.jsx(a7,{title:"Show Preview to the bottom",className:"cursor-pointer rotate-90 z-10 transition-transform duration-100 "+(t==1?"scale-150":""),onClick:()=>n(1)}),f.jsx(LH,{title:"Enter Fullscreen",className:"cursor-pointer z-10 transition-transform duration-100 "+(t==2?"scale-150":""),onClick:()=>n(2)})]})},o7=({field:t,context:e,setError:n,value:r,onChange:i,...s})=>{const{isHtml:a=!0}=t.comp_params,o=SD(),[l,c]=b.useState(0),[u,d]=b.useState({}),[h,p]=b.useState(r),{darkMode:m}=Ll(),g=b.useCallback(x=>{p(x),i(x)},[i]),v=b.useCallback(x=>{c(x)},[]),y=b.useMemo(()=>{try{let _=ice.compile(h)(u??{});return a||(_=`<pre>${_}</pre>`),_}catch(x){return x}},[h,u,a]);return b.useEffect(()=>e.pubsub.add_sub((x,_)=>{x==="reference_example_input"&&d(_)}),[e]),b.useEffect(()=>{o&&o.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[o]),b.useEffect(()=>{const x=_=>{l==2&&_.key==="Escape"&&c(0)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[l]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx(oce,{onChange:v,mode:l}),l<2&&f.jsxs("div",{className:"w-full flex flex-col gap-5 relative",children:[f.jsx(m9,{options:{tabSize:2},width:"100%",height:"500px",className:"rounded-md border shelf-border-color overflow-clip",onChange:g,value:h,theme:m?"coblat":"light",defaultLanguage:"handlebars"}),f.jsx("iframe",{srcDoc:y,className:`${l==0?"absolute translate-x-10 left-full top-0 w-full ":""}
|
583
|
-
rounded-md border shelf-border-color resize overflow-auto bg-white`,height:"500px"})]}),l==2&&f.jsxs(ace,{className:"z-[100] fixed left-0 top-0 w-
|
584
|
-
shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(AL,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:y,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},l7={general_store_name:"Wush Wush Games",general_store_website:"https://wush.games/",general_store_logo_url:void 0,general_store_description:"We sell retro video games",general_confirm_email_base_url:"https://wush.games/confirm-email",general_store_support_email:"support@wush.games"},lce={contact:{email:"john@doe.com",firstname:"John",phone_number:"000-000-000",customer_id:"cus_65f2ae6e8bf30e6cd0ca95fa"},address:{},status:{checkout:{id:0,name2:"created",name:"Created"},payment:{id:1,name:"Authorized",name2:"authorized"},fulfillment:{id:0,name2:"draft",name:"Draft"}},pricing:{evo:[{quantity_discounted:0,quantity_undiscounted:11,subtotal:1100,total:1150},{quantity_discounted:2,total_discount:100,quantity_undiscounted:9,discount:{active:!0,handle:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",title:"50% OFF Bundle: robot arms and legs (not recursive)",priority:0,application:{id:0,name:"Automatic",name2:"automatic"},info:{details:{meta:{id:4,type:"bundle",name:"Bundle Discount"},extra:{fixed:0,percent:50,recursive:!1}},filters:[{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_arm"]},{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_leg"]}]}},discount_code:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",subtotal:1e3,total:1050}],uid:void 0,shipping_method:{title:"",handle:"",price:50},subtotal_discount:100,subtotal_undiscounted:1100,subtotal:1e3,total:1050,quantity_total:11,quantity_discounted:2,errors:[]},line_items:[{id:"robot-leg-white",qty:3,data:{tags:["robot_leg"],qty:100,active:!0,title:"Robot Leg White",price:100}},{id:"battery",qty:5,data:{tags:["would-not-be-discounted"],qty:100,active:!0,title:"Battery",price:100}},{id:"robot-arm-red",qty:2,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Red",price:100}},{id:"robot-arm-green",qty:1,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Green",price:100}}],shipping_method:{handle:"ship-fast",title:"ship fast",price:50},id:"order_65d774c6445e4581b9e34c11",created_at:"2024-02-22T16:22:30.095Z",updated_at:"2024-02-22T16:22:30.095Z"},cce={email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},uce=[{name:"customer",example:JSON.stringify({customer:cce,info:l7})},{name:"order",example:JSON.stringify({order:lce,info:l7})}],dce=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=SD(),[o,l]=b.useState(r),{darkMode:c}=Ll(),u=b.useCallback((h,p)=>{n(void 0);try{let m=JSON.parse(h);l(m),i(m)}catch(m){n((m==null?void 0:m.message)??"JSON Error")}},[i]),d=b.useMemo(()=>{try{return JSON.stringify(o,null,2)}catch(h){return h}},[o]);return b.useEffect(()=>{a&&a.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[a]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx("div",{className:"flex flex-row flex-wrap gap-3",children:f.jsx(Ui,{tags:uce,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(m9,{options:{tabSize:2},width:"100%",height:"200px",className:"rounded-md border shelf-border-color overflow-clip",onChange:u,value:d,theme:c?"coblat":"light",defaultLanguage:"json"})]})})},fce={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"title",name:"Title",type:"text",validate:!0,comp:Q(Pe(Le,{}),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"template_html",name:"HTML Template",defaultValue:"<html></html>",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(o7,{isHtml:!0}),comp_params:{className:"w-full"}},{key:"template_text",name:"Text Template",defaultValue:"Hello",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(o7,{isHtml:!1}),comp_params:{className:"w-full"}},{key:"reference_example_input",name:"Example input for template",defaultValue:{},desc:"Play with various inputs for your `Handlebars` template",comp:Q(dce),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(va),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(Ds,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},r5=({mode:t,...e})=>{const{id:n,base:r}=hr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:v,error:y,ref_head:x,ref_root:_}=mi("templates",n,"/apps/templates",t,r),w=b.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["templates",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:u.handle,onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDuplicate:d?void 0:w,onClickReload:d?void 0:async()=>a(!1),onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:v&&h||d,children:[f.jsx(Hr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:_,field:fce,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},hce=[{key:"title",name:"Title",comp:$t,comp_params:{className:"font-semibold max-w-[8rem]
|
585
|
-
|
584
|
+
rounded-md border shelf-border-color resize overflow-auto bg-white`,height:"500px"})]}),l==2&&f.jsxs(ace,{className:"z-[100] fixed left-0 top-0 w-full h-full",children:[f.jsx(m9,{options:{tabSize:2},width:"100%",height:"100%",className:"--overflow-auto",onChange:g,value:h,theme:m?"coblat":"light",defaultLanguage:"handlebars"}),f.jsxs("div",{className:"w-full h-full flex-col items-center",children:[f.jsxs("div",{className:`flex flex-row items-center text-2xl
|
585
|
+
shelf-plain-card-soft justify-between w-full p-3`,children:[f.jsx("span",{children:"Preview"}),f.jsx(AL,{onClick:()=>c(0),className:"cursor-pointer"})]}),f.jsx("iframe",{width:"100%",srcDoc:y,className:" border shelf-border-color bg-white",height:"100%"})]})]})]})})},l7={general_store_name:"Wush Wush Games",general_store_website:"https://wush.games/",general_store_logo_url:void 0,general_store_description:"We sell retro video games",general_confirm_email_base_url:"https://wush.games/confirm-email",general_store_support_email:"support@wush.games"},lce={contact:{email:"john@doe.com",firstname:"John",phone_number:"000-000-000",customer_id:"cus_65f2ae6e8bf30e6cd0ca95fa"},address:{},status:{checkout:{id:0,name2:"created",name:"Created"},payment:{id:1,name:"Authorized",name2:"authorized"},fulfillment:{id:0,name2:"draft",name:"Draft"}},pricing:{evo:[{quantity_discounted:0,quantity_undiscounted:11,subtotal:1100,total:1150},{quantity_discounted:2,total_discount:100,quantity_undiscounted:9,discount:{active:!0,handle:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",title:"50% OFF Bundle: robot arms and legs (not recursive)",priority:0,application:{id:0,name:"Automatic",name2:"automatic"},info:{details:{meta:{id:4,type:"bundle",name:"Bundle Discount"},extra:{fixed:0,percent:50,recursive:!1}},filters:[{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_arm"]},{meta:{id:4,type:"product",op:"p-in-tags",name:"Product has Tag"},value:["robot_leg"]}]}},discount_code:"discount-bundle-50-off-robot-arms-and-legs-not-recursive",subtotal:1e3,total:1050}],uid:void 0,shipping_method:{title:"",handle:"",price:50},subtotal_discount:100,subtotal_undiscounted:1100,subtotal:1e3,total:1050,quantity_total:11,quantity_discounted:2,errors:[]},line_items:[{id:"robot-leg-white",qty:3,data:{tags:["robot_leg"],qty:100,active:!0,title:"Robot Leg White",price:100}},{id:"battery",qty:5,data:{tags:["would-not-be-discounted"],qty:100,active:!0,title:"Battery",price:100}},{id:"robot-arm-red",qty:2,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Red",price:100}},{id:"robot-arm-green",qty:1,data:{tags:["robot_arm"],qty:100,active:!0,title:"Robot Arm Green",price:100}}],shipping_method:{handle:"ship-fast",title:"ship fast",price:50},id:"order_65d774c6445e4581b9e34c11",created_at:"2024-02-22T16:22:30.095Z",updated_at:"2024-02-22T16:22:30.095Z"},cce={email:"john@dow.com",firstname:"John",lastname:"Dow",id:"cus_65f2ae6e8bf30e6cd0ca95fa"},uce=[{name:"customer",example:JSON.stringify({customer:cce,info:l7})},{name:"order",example:JSON.stringify({order:lce,info:l7})}],dce=({field:t,context:e,setError:n,value:r={},onChange:i,...s})=>{const a=SD(),[o,l]=b.useState(r),{darkMode:c}=Ll(),u=b.useCallback((h,p)=>{n(void 0);try{let m=JSON.parse(h);l(m),i(m)}catch(m){n((m==null?void 0:m.message)??"JSON Error")}},[i]),d=b.useMemo(()=>{try{return JSON.stringify(o,null,2)}catch(h){return h}},[o]);return b.useEffect(()=>{a&&a.editor.defineTheme("coblat",{base:"vs-dark",inherit:!0,rules:[{background:"002240",token:""},{foreground:"e1efff",token:"punctuation - (punctuation.definition.string || punctuation.definition.comment)"},{foreground:"ff628c",token:"constant"},{foreground:"ffdd00",token:"entity"},{foreground:"ff9d00",token:"keyword"},{foreground:"ffee80",token:"storage"},{foreground:"3ad900",token:"string -string.unquoted.old-plist -string.unquoted.heredoc"},{foreground:"3ad900",token:"string.unquoted.heredoc string"},{foreground:"0088ff",fontStyle:"italic",token:"comment"},{foreground:"80ffbb",token:"support"},{foreground:"cccccc",token:"variable"},{foreground:"ff80e1",token:"variable.language"},{foreground:"ffee80",token:"meta.function-call"},{foreground:"f8f8f8",background:"800f00",token:"invalid"},{foreground:"ffffff",background:"223545",token:"text source"},{foreground:"ffffff",background:"223545",token:"string.unquoted.heredoc"},{foreground:"ffffff",background:"223545",token:"source source"},{foreground:"80fcff",fontStyle:"italic",token:"entity.other.inherited-class"},{foreground:"9eff80",token:"string.quoted source"},{foreground:"80ff82",token:"string constant"},{foreground:"80ffc2",token:"string.regexp"},{foreground:"edef7d",token:"string variable"},{foreground:"ffb054",token:"support.function"},{foreground:"eb939a",token:"support.constant"},{foreground:"ff1e00",token:"support.type.exception"},{foreground:"8996a8",token:"meta.preprocessor.c"},{foreground:"afc4db",token:"meta.preprocessor.c keyword"},{foreground:"73817d",token:"meta.sgml.html meta.doctype"},{foreground:"73817d",token:"meta.sgml.html meta.doctype entity"},{foreground:"73817d",token:"meta.sgml.html meta.doctype string"},{foreground:"73817d",token:"meta.xml-processing"},{foreground:"73817d",token:"meta.xml-processing entity"},{foreground:"73817d",token:"meta.xml-processing string"},{foreground:"9effff",token:"meta.tag"},{foreground:"9effff",token:"meta.tag entity"},{foreground:"9effff",token:"meta.selector.css entity.name.tag"},{foreground:"ffb454",token:"meta.selector.css entity.other.attribute-name.id"},{foreground:"5fe461",token:"meta.selector.css entity.other.attribute-name.class"},{foreground:"9df39f",token:"support.type.property-name.css"},{foreground:"f6f080",token:"meta.property-group support.constant.property-value.css"},{foreground:"f6f080",token:"meta.property-value support.constant.property-value.css"},{foreground:"f6aa11",token:"meta.preprocessor.at-rule keyword.control.at-rule"},{foreground:"edf080",token:"meta.property-value support.constant.named-color.css"},{foreground:"edf080",token:"meta.property-value constant"},{foreground:"eb939a",token:"meta.constructor.argument.css"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff"},{foreground:"f8f8f8",background:"000e1a",token:"meta.diff.header"},{foreground:"f8f8f8",background:"4c0900",token:"markup.deleted"},{foreground:"f8f8f8",background:"806f00",token:"markup.changed"},{foreground:"f8f8f8",background:"154f00",token:"markup.inserted"},{background:"8fddf630",token:"markup.raw"},{background:"004480",token:"markup.quote"},{background:"130d26",token:"markup.list"},{foreground:"c1afff",fontStyle:"bold",token:"markup.bold"},{foreground:"b8ffd9",fontStyle:"italic",token:"markup.italic"},{foreground:"c8e4fd",background:"001221",fontStyle:"bold",token:"markup.heading"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#1e293b","editor.selectionBackground":"#B36539BF","editor.lineHighlightBackground":"#00000059","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#FFFFFF26"}})},[a]),f.jsx("div",{...s,children:f.jsxs("div",{className:"flex flex-col w-full gap-5",children:[f.jsx("div",{className:"flex flex-row flex-wrap gap-3",children:f.jsx(Ui,{tags:uce,name_fn:h=>h.name,onClick:h=>{u(h.example,null)}})}),f.jsx(m9,{options:{tabSize:2},width:"100%",height:"200px",className:"rounded-md border shelf-border-color overflow-clip",onChange:u,value:d,theme:c?"coblat":"light",defaultLanguage:"json"})]})})},fce={name:"Root",comp:He,comp_params:{className:"flex flex-col gap-5 w-full max-w-[35rem]"},fields:[{key:"title",name:"Title",type:"text",validate:!0,comp:Q(Pe(Le,{}),{className:"h-9",placeholder:"enter the key / name of the tag"}),comp_params:{className:"w-full "}},{key:"template_html",name:"HTML Template",defaultValue:"<html></html>",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(o7,{isHtml:!0}),comp_params:{className:"w-full"}},{key:"template_text",name:"Text Template",defaultValue:"Hello",desc:"Use [Handlebars](https://handlebarsjs.com/) syntax to create a fabulous `email` template",comp:Q(o7,{isHtml:!1}),comp_params:{className:"w-full"}},{key:"reference_example_input",name:"Example input for template",defaultValue:{},desc:"Play with various inputs for your `Handlebars` template",comp:Q(dce),comp_params:{className:"w-full"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the purpose of this tag",comp:Q(va),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:({value:t})=>f.jsx(Ds,{value:{...t,template_html:"...",template_text:"..."}}),comp_params:{className:"w-full"}}]},r5=({mode:t,...e})=>{const{id:n,base:r}=hr(),{actions:{savePromise:i,deletePromise:s,reload:a,duplicate:o},context:l,key:c,doc:u,isCreateMode:d,isEditMode:h,isViewMode:p,loading:m,hasChanged:g,hasLoaded:v,error:y,ref_head:x,ref_root:_}=mi("templates",n,"/apps/templates",t,r),w=b.useCallback(()=>o({title:(u==null?void 0:u.title)+" duplicate"}),[u,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["templates",n??"create"],className:""}),f.jsx(As,{doc:u,className:"mt-5",collectionId:"tags"}),f.jsx(Ns,{id:u.handle,onClickSave:h?i:void 0,onClickCreate:d?i:void 0,onClickDuplicate:d?void 0:w,onClickReload:d?void 0:async()=>a(!1),onClickDelete:d?void 0:s,className:"mt-5"}),f.jsx(Cs,{ref:x,time:u==null?void 0:u.created_at,className:"mt-8",changes_made:g},u==null?void 0:u.updated_at),f.jsxs(de,{show:v&&h||d,children:[f.jsx(Hr,{error:y,className:"w-full max-w-[35rem] mx-auto"}),f.jsx(ci,{ref:_,field:fce,value:u??{},context:l,isViewMode:p,className:"mx-auto"},c)]})]})},hce=[{key:"title",name:"Title",comp:$t,comp_params:{className:"font-semibold max-w-[8rem] "}},{key:"price",name:"Price",comp:$t},{key:"collections",name:"Collections",comp:YS,comp_params:{className:`p-3 font-bold max-w-[8rem] sm:max-w-[12rem] xl:max-w-[24rem]
|
586
|
+
inline-block whitespace-nowrap`,name_fn:t=>t.handle}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],c7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("products","/pages/products");return f.jsx("div",{className:"w-full h-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(mr,{should_onboard:c,overallColelctionCount:a,hasLoaded:o,resource:l}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
|
586
587
|
shelf-border-color shadow-md mt-5
|
587
588
|
dark:shadow-slate-900 `,children:[f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsx(Ts,{isCollectionEmpty:c,ref:n,reload:d,createLink:"/pages/products/create",searchTitle:"Search by Name, Handle, Tag values, Collections...",isLoading:i}),f.jsxs(de,{show:!s&&(r==null?void 0:r.length),children:[f.jsx(pr,{context:e,data:r,fields:hce}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Km={x:0,y:0,width:0,height:0,unit:"px"},Ql=(t,e,n)=>Math.min(Math.max(t,e),n),pce=(...t)=>t.filter(e=>e&&typeof e=="string").join(" "),u7=(t,e)=>t===e||t.width===e.width&&t.height===e.height&&t.x===e.x&&t.y===e.y&&t.unit===e.unit;function Zl(t,e,n){return t.unit==="%"?{...Km,...t,unit:"%"}:{unit:"%",x:t.x?t.x/e*100:0,y:t.y?t.y/n*100:0,width:t.width?t.width/e*100:0,height:t.height?t.height/n*100:0}}function Sa(t,e,n){return t.unit?t.unit==="px"?{...Km,...t,unit:"px"}:{unit:"px",x:t.x?t.x*e/100:0,y:t.y?t.y*n/100:0,width:t.width?t.width*e/100:0,height:t.height?t.height*n/100:0}:{...Km,...t,unit:"px"}}function d7(t,e,n,r,i,s=0,a=0,o=r,l=i){const c={...t};let u=Math.min(s,r),d=Math.min(a,i),h=Math.min(o,r),p=Math.min(l,i);e&&(e>1?(u=a?a*e:u,d=u/e,h=o*e):(d=s?s/e:d,u=d*e,p=l/e)),c.y<0&&(c.height=Math.max(c.height+c.y,d),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,u),c.x=0);const m=r-(c.x+c.width);m<0&&(c.x=Math.min(c.x,r-u),c.width+=m);const g=i-(c.y+c.height);if(g<0&&(c.y=Math.min(c.y,i-d),c.height+=g),c.width<u&&((n==="sw"||n=="nw")&&(c.x-=u-c.width),c.width=u),c.height<d&&((n==="nw"||n=="ne")&&(c.y-=d-c.height),c.height=d),c.width>h&&((n==="sw"||n=="nw")&&(c.x-=h-c.width),c.width=h),c.height>p&&((n==="nw"||n=="ne")&&(c.y-=p-c.height),c.height=p),e){const v=c.width/c.height;if(v<e){const y=Math.max(c.width/e,d);(n==="nw"||n=="ne")&&(c.y-=y-c.height),c.height=y}else if(v>e){const y=Math.max(c.height*e,u);(n==="sw"||n=="nw")&&(c.x-=y-c.width),c.width=y}}return c}function mce(t,e,n,r){const i={...t};return e==="ArrowLeft"?r==="nw"?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r==="w"?(i.x-=n,i.width+=n):r==="sw"?(i.x-=n,i.width+=n,i.height+=n):r==="ne"?(i.y+=n,i.width-=n,i.height-=n):r==="e"?i.width-=n:r==="se"&&(i.width-=n,i.height-=n):e==="ArrowRight"&&(r==="nw"?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r==="w"?(i.x+=n,i.width-=n):r==="sw"?(i.x+=n,i.width-=n,i.height-=n):r==="ne"?(i.y-=n,i.width+=n,i.height+=n):r==="e"?i.width+=n:r==="se"&&(i.width+=n,i.height+=n)),e==="ArrowUp"?r==="nw"?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r==="n"?(i.y-=n,i.height+=n):r==="ne"?(i.y-=n,i.width+=n,i.height+=n):r==="sw"?(i.x+=n,i.width-=n,i.height-=n):r==="s"?i.height-=n:r==="se"&&(i.width-=n,i.height-=n):e==="ArrowDown"&&(r==="nw"?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r==="n"?(i.y+=n,i.height-=n):r==="ne"?(i.y+=n,i.width-=n,i.height-=n):r==="sw"?(i.x-=n,i.width+=n,i.height+=n):r==="s"?i.height+=n:r==="se"&&(i.width+=n,i.height+=n)),i}const Xl={capture:!0,passive:!1},Po=class Ei extends b.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=b.createRef(),this.mediaRef=b.createRef(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{const{crop:n,disabled:r}=this.props,i=this.getBox();if(!n)return;const s=Sa(n,i.width,i.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const a=e.target.dataset.ord,o=!!a;let l=e.clientX,c=e.clientY,u=s.x,d=s.y;if(a){const h=e.clientX-i.x,p=e.clientY-i.y;let m=0,g=0;a==="ne"||a=="e"?(m=h-(s.x+s.width),g=p-s.y,u=s.x,d=s.y+s.height):a==="se"||a==="s"?(m=h-(s.x+s.width),g=p-(s.y+s.height),u=s.x,d=s.y):a==="sw"||a=="w"?(m=h-s.x,g=p-(s.y+s.height),u=s.x+s.width,d=s.y):(a==="nw"||a=="n")&&(m=h-s.x,g=p-s.y,u=s.x+s.width,d=s.y+s.height),l=u+i.x+m,c=d+i.y+g}this.evData={startClientX:l,startClientY:c,startCropX:u,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{const{crop:n,disabled:r,locked:i,keepSelection:s,onChange:a}=this.props,o=this.getBox();if(r||i||s&&n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const l=e.clientX-o.x,c=e.clientY-o.y,u={unit:"px",x:l,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:l,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Sa(u,o.width,o.height),Zl(u,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{const{crop:n,disabled:r,onChange:i,onDragStart:s}=this.props,a=this.getBox();if(r||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));const{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let l;o.isResize?l=this.resizeCrop():l=this.dragCrop(),u7(n,l)||i(Sa(l,a.width,a.height),Zl(l,a.width,a.height))},this.onComponentKeyDown=e=>{const{crop:n,disabled:r,onChange:i,onComplete:s}=this.props;if(r)return;const a=e.key;let o=!1;if(!n)return;const l=this.getBox(),c=this.makePixelCrop(l),u=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?Ei.nudgeStepLarge:e.shiftKey?Ei.nudgeStepMedium:Ei.nudgeStep;if(a==="ArrowLeft"?(c.x-=u,o=!0):a==="ArrowRight"?(c.x+=u,o=!0):a==="ArrowUp"?(c.y-=u,o=!0):a==="ArrowDown"&&(c.y+=u,o=!0),o){e.cancelable&&e.preventDefault(),c.x=Ql(c.x,0,l.width-c.width),c.y=Ql(c.y,0,l.height-c.height);const d=Sa(c,l.width,l.height),h=Zl(c,l.width,l.height);i(d,h),s&&s(d,h)}},this.onHandlerKeyDown=(e,n)=>{const{aspect:r=0,crop:i,disabled:s,minWidth:a=0,minHeight:o=0,maxWidth:l,maxHeight:c,onChange:u,onComplete:d}=this.props,h=this.getBox();if(s||!i)return;if(e.key==="ArrowUp"||e.key==="ArrowDown"||e.key==="ArrowLeft"||e.key==="ArrowRight")e.stopPropagation(),e.preventDefault();else return;const p=(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)?Ei.nudgeStepLarge:e.shiftKey?Ei.nudgeStepMedium:Ei.nudgeStep,m=Sa(i,h.width,h.height),g=mce(m,e.key,p,n),v=d7(g,r,n,h.width,h.height,a,o,l,c);if(!u7(i,v)){const y=Zl(v,h.width,h.height);u(v,y),d&&d(v,y)}},this.onDocPointerDone=e=>{const{crop:n,disabled:r,onComplete:i,onDragEnd:s}=this.props,a=this.getBox();this.unbindDocMove(),!(r||!n)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,s&&s(e),i&&i(Sa(n,a.width,a.height),Zl(n,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var n;(n=this.componentRef.current)==null||n.scrollTo(0,0)}}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:n,y:r,width:i,height:s}=e.getBoundingClientRect();return{x:n,y:r,width:i,height:s}}componentDidUpdate(e){const{crop:n,onComplete:r}=this.props;if(r&&!e.crop&&n){const{width:i,height:s}=this.getBox();i&&s&&r(Sa(n,i,s),Zl(n,i,s))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Xl),this.document.addEventListener("pointerup",this.onDocPointerDone,Xl),this.document.addEventListener("pointercancel",this.onDocPointerDone,Xl),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Xl),this.document.removeEventListener("pointerup",this.onDocPointerDone,Xl),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Xl),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){const{evData:e}=this,n=this.getBox(),r=this.makePixelCrop(n),i=e.clientX-e.startClientX,s=e.clientY-e.startClientY;return r.x=Ql(e.startCropX+i,0,n.width-r.width),r.y=Ql(e.startCropY+s,0,n.height-r.height),r}getPointRegion(e,n,r,i){const{evData:s}=this,a=s.clientX-e.x,o=s.clientY-e.y;let l;i&&n?l=n==="nw"||n==="n"||n==="ne":l=o<s.startCropY;let c;return r&&n?c=n==="nw"||n==="w"||n==="sw":c=a<s.startCropX,c?l?"nw":"sw":l?"ne":"se"}resolveMinDimensions(e,n,r=0,i=0){let s=Math.min(r,e.width),a=Math.min(i,e.height);return!n||!s&&!a?[s,a]:n>1?s?[s,s/n]:[a*n,a]:a?[a*n,a]:[s,s/n]}resizeCrop(){const{evData:e}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,s=this.getBox(),[a,o]=this.resolveMinDimensions(s,n,this.props.minWidth,this.props.minHeight);let l=this.makePixelCrop(s),c=this.getPointRegion(s,e.ord,a,o);const u=e.ord||c;let d=e.clientX-e.startClientX,h=e.clientY-e.startClientY;(a&&u==="nw"||u==="w"||u==="sw")&&(d=Math.min(d,-a)),(o&&u==="nw"||u==="n"||u==="ne")&&(h=Math.min(h,-o));const p={unit:"px",x:0,y:0,width:0,height:0};c==="ne"?(p.x=e.startCropX,p.width=d,n?(p.height=p.width/n,p.y=e.startCropY-p.height):(p.height=Math.abs(h),p.y=e.startCropY-p.height)):c==="se"?(p.x=e.startCropX,p.y=e.startCropY,p.width=d,n?p.height=p.width/n:p.height=h):c==="sw"?(p.x=e.startCropX+d,p.y=e.startCropY,p.width=Math.abs(d),n?p.height=p.width/n:p.height=h):c==="nw"&&(p.x=e.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=e.startCropY-p.height):(p.height=Math.abs(h),p.y=e.startCropY+h));const m=d7(p,n,c,s.width,s.height,a,o,r,i);return n||Ei.xyOrds.indexOf(u)>-1?l=m:Ei.xOrds.indexOf(u)>-1?(l.x=m.x,l.width=m.width):Ei.yOrds.indexOf(u)>-1&&(l.y=m.y,l.height=m.height),l.x=Ql(l.x,0,s.width-l.width),l.y=Ql(l.y,0,s.height-l.height),l}createCropSelection(){const{ariaLabels:e=Ei.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:s,crop:a}=this.props,o=this.getCropStyle();if(a)return M.createElement("div",{style:o,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":e.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&M.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},M.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),M.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":e.nwDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"nw"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":e.nDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"n"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":e.neDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"ne"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":e.eDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"e"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":e.seDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"se"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":e.sDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"s"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":e.swDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"sw"),role:"button"}),M.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":e.wDragHandle,onKeyDown:l=>this.onHandlerKeyDown(l,"w"),role:"button"})),i&&M.createElement("div",{className:"ReactCrop__selection-addon",onMouseDown:l=>l.stopPropagation()},i(this.state)),s&&M.createElement(M.Fragment,null,M.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),M.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){const n={...Km,...this.props.crop||{}};return Sa(n,e.width,e.height)}render(){const{aspect:e,children:n,circularCrop:r,className:i,crop:s,disabled:a,locked:o,style:l,ruleOfThirds:c}=this.props,{cropIsActive:u,newCropIsBeingDrawn:d}=this.state,h=s?this.createCropSelection():null,p=pce("ReactCrop",i,u&&"ReactCrop--active",a&&"ReactCrop--disabled",o&&"ReactCrop--locked",d&&"ReactCrop--new-crop",s&&e&&"ReactCrop--fixed-aspect",s&&r&&"ReactCrop--circular-crop",s&&c&&"ReactCrop--rule-of-thirds",!this.dragStarted&&s&&!s.width&&!s.height&&"ReactCrop--invisible-crop",r&&"ReactCrop--no-animate");return M.createElement("div",{ref:this.componentRef,className:p,style:l},M.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),h)}};Po.xOrds=["e","w"];Po.yOrds=["n","s"];Po.xyOrds=["nw","ne","se","sw"];Po.nudgeStep=1;Po.nudgeStepMedium=10;Po.nudgeStepLarge=100;Po.defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};let gce=Po;const vce=(t=!1)=>{const[e,n]=b.useState(t),r=b.useCallback(()=>{n(i=>!i)},[]);return[e,r]};var VD={exports:{}};/*!
|
588
589
|
Copyright (c) 2018 Jed Watson.
|
@@ -653,7 +654,7 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ve=Ne(V,_e,Z,P,ie+".
|
|
653
654
|
flex-shrink-0`,onClick:n})]})},Pce=({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const[a,o]=b.useState(n??[]),l=b.useRef(),c=b.useCallback(d=>{const h=[...d.filter(p=>a.find(m=>m.handle===p.handle)===void 0),...a];o(h),console.log("pra",h),r&&r(h),l.current.hide()},[a,r]),u=b.useCallback(d=>{const h=a.filter(p=>p.handle!==d);o(h),r&&r(h)},[a,r]);return f.jsxs("div",{...s,children:[f.jsx(Gn,{children:"Browse products",stroke:"border-2",className:"w-40 h-10 mx-auto",onClick:()=>l.current.show()}),f.jsx(ha,{ref:l,children:f.jsx(kf,{onSave:c,onCancel:()=>l.current.hide()})}),(a==null?void 0:a.length)>0&&f.jsx(Tt,{className:"mt-5"}),a.map(d=>f.jsx(Mce,{product:d,context:e,onRemove:()=>u(d.handle)},d.handle))]})};var Kh,Ice=new Uint8Array(16);function Lce(){if(!Kh&&(Kh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Kh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kh(Ice)}const Rce=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function jce(t){return typeof t=="string"&&Rce.test(t)}var xn=[];for(var s5=0;s5<256;++s5)xn.push((s5+256).toString(16).substr(1));function Fce(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(xn[t[e+0]]+xn[t[e+1]]+xn[t[e+2]]+xn[t[e+3]]+"-"+xn[t[e+4]]+xn[t[e+5]]+"-"+xn[t[e+6]]+xn[t[e+7]]+"-"+xn[t[e+8]]+xn[t[e+9]]+"-"+xn[t[e+10]]+xn[t[e+11]]+xn[t[e+12]]+xn[t[e+13]]+xn[t[e+14]]+xn[t[e+15]]).toLowerCase();if(!jce(n))throw TypeError("Stringified UUID is invalid");return n}function H9(t,e,n){t=t||{};var r=t.random||(t.rng||Lce)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return Fce(r)}const Bce=({option:t,onRemove:e,onChange:n})=>{var u;const[r,i]=b.useState(t),s=b.useRef(),a=b.useCallback(d=>{i(d),n&&n(d)},[n]),o=b.useCallback(d=>{var p;const h={...r,values:[...(p=r==null?void 0:r.values)==null?void 0:p.filter(m=>(m==null?void 0:m.id)!==(d==null?void 0:d.id))]};a(h)},[r,a]),l=b.useCallback(d=>{const h=d.currentTarget.value;console.log("name",h);const p={...r,name:h};a(p)},[r,a]),c=b.useCallback(d=>{var v;const h=String(s.current.value);if((h==null?void 0:h.trim())==="")return;const p={id:H9(),value:h};if((v=r==null?void 0:r.values)==null?void 0:v.some(y=>y.value===p.value))return;const g={...r,values:[p,...(r==null?void 0:r.values)??[]]};a(g)},[r,H9,a]);return f.jsxs("div",{className:"relative w-full shadow-md",children:[f.jsxs("fieldset",{className:"border shelf-border-color p-5 ",children:[f.jsx("legend",{className:"text-base",children:f.jsx(qe,{ref:s,placeholder:"Option Name",from:"from-kf-400",to:"to-pink-400/25",inputClsName:" text-base px-1 shelf-input-color hover:ring-pink-400 hover:ring-2 rounded-md h-10",overrideClass:!0,onChange:l,value:r==null?void 0:r.name,type:"text",rounded:"rounded-md"})}),f.jsx(de,{show:(((u=r==null?void 0:r.values)==null?void 0:u.length)??0)>0,children:f.jsx(Ui,{tags:r==null?void 0:r.values,name_fn:d=>d==null?void 0:d.value,onRemove:o,onClick:o})}),f.jsxs("div",{className:"flex flex-row items-center h-fit w-full mt-5 gap-3",children:[f.jsx(qe,{ref:s,placeholder:"Add new option",inputClsName:"text-base px-1 shelf-card w-full rounded-md h-10 hover:ring-pink-400 hover:ring-2",overrideClass:!0,type:"text",className:"mt-1 flex-1",rounded:"rounded-md",stroke:"border-b"}),f.jsx(Gn,{children:"add",className:"h-10 ",onClick:c})]})]}),f.jsx($C,{className:"absolute right-0 top-0 cursor-pointer text-xl",onClick:d=>e(r)})]})},Hce=({options:t=[],onChange:e})=>{const[n,r]=b.useState(t),i=b.useCallback(o=>{const l=n==null?void 0:n.findIndex(u=>u.id===o.id);if(l<0)return;let c=[...n];c[l]=o,r(c),e&&e(c)},[n,e]),s=b.useCallback(o=>{let l=[...n.filter(c=>c.id!==o.id)];r(l),e&&e(l)},[n,e]),a=b.useCallback(()=>{const o={id:H9(),name:"",values:[]},l=[...n,o];r(l),e&&e(l)},[n,e]);return f.jsxs("div",{className:"w-full flex flex-col gap-5 items-center",children:[t.map(o=>f.jsx(Bce,{option:o,onRemove:s,onChange:i},o==null?void 0:o.id)),f.jsx(hf,{onClick:a,Icon:UC,className:`cursor-pointer text-6xl hover:scale-110
|
654
655
|
transition-transform`})]})},KD=(t,e=[])=>{let n=[];if(t==e.length)return[];if(t==e.length-1)return e[t].map(i=>[i]);let r=KD(t+1,e)??[[]];for(let i=0;i<e[t].length;i++)for(let s=0;s<r.length;s++){const a=[e[t][i],...r[s]];n.push(a)}return n},zce=(t,e)=>t.every(n=>e.some(r=>r.option_id===n.option_id&&r.value_id===n.value_id)),Uce=({combination:t,options:e,context:n,setError:r})=>{var d,h;b.useEffect(()=>{n==null||n.query.all.get()},[n]);const i=b.useMemo(()=>t.map(p=>e.find(m=>m.id===p.option_id).values.find(m=>m.id==p.value_id).value).join(" / "),[t,e]),s=(h=(d=n==null?void 0:n.data)==null?void 0:d.variants)==null?void 0:h.reduce((p,m)=>(p[m.handle]={product:m,selection:m.variant_hint},p),{}),a=b.useMemo(()=>{var p,m;return s&&((m=(p=Object.values(s).find(g=>zce(t,g.selection)))==null?void 0:p.product)==null?void 0:m.handle)},[s,t]),{navWithState:o}=zi(),l=b.useCallback(async()=>{const p=(n==null?void 0:n.getState)&&(n==null?void 0:n.getState()),m=`/pages/products/${a}`;o(m,p)},[a,o,n]),c=b.useCallback(async()=>{try{n!=null&&n.removeVariant&&await n.removeVariant(a)}catch(p){console.log(p),r("There was a problem removing the variant 😔")}},[a,o,n]),u=b.useCallback(async()=>{try{await(n==null?void 0:n.preCreateVariant());const p=n==null?void 0:n.getState(),m={...n==null?void 0:n.data,...p==null?void 0:p.data},g={data:{...m,handle:void 0,id:void 0,parent_handle:m.handle,parent_id:m.id,variant_hint:t,title:`${m.title} ${i}`},hasChanged:!0};o("/pages/products/create",p,g)}catch(p){r("Unable to save this parent document 😔"),console.error(p)}},[n,o,t,i]);return f.jsxs("div",{className:`w-full flex flex-row justify-between
|
655
656
|
shelf-border-color border-b pb-3`,children:[f.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[f.jsx(de,{show:!!a,children:f.jsx(LC,{className:"text-lg text-green-500"})}),f.jsx("p",{children:i,className:"text-base font-medium flex-1"})]}),f.jsxs(ay,{toggle:!!a,children:[f.jsxs("div",{className:"flex flex-row gap-3 flex-shrink-0 items-center",children:[f.jsx(Oc,{children:f.jsx(_s,{Icon:void 0,text:"remove",show:!0,onClick:c,keep_text_on_load:!0,classNameLoading:"text-xs",className:"w-fit underline "})}),f.jsx("span",{children:"/",className:"font-normal text-xl"}),f.jsx(Oc,{children:f.jsx("span",{children:"view",className:"cursor-pointer",onClick:l})})]}),f.jsx(Oc,{children:f.jsx(_s,{Icon:void 0,text:"create",show:!0,onClick:u,keep_text_on_load:!0,classNameLoading:"text-xs",className:"w-fit underline "})})]})]})},$ce=({options:t,context:e,setError:n})=>{const r=b.useMemo(()=>{const i=t==null?void 0:t.map(a=>a.values.map(o=>({option_id:a.id,value_id:o.id}))).filter(a=>a.length>=2);return KD(0,i)},[t]);return f.jsx("div",{className:"w-full flex flex-col gap-2",children:r.map(i=>f.jsx(Uce,{combination:i,context:e,options:t,setError:n},i==null?void 0:i.map(s=>s.value_id).join("_")))})},Vce="‼️ Create at least ONE Option with two values",Wce=({context:t,...e})=>{const n=t==null?void 0:t.data;return f.jsxs("div",{className:"text-base",children:[f.jsx("span",{children:"This product is a variant of "}),f.jsx(_f,{to:`/pages/products/${n==null?void 0:n.parent_handle}`,current_state:t==null?void 0:t.getState,children:f.jsx(Oc,{children:n==null?void 0:n.parent_handle})})]})},Yce=({value:t,onChange:e,context:n,setError:r,...i})=>{var l,c;const[s,a]=b.useState(t),o=b.useCallback(u=>{a(u),e&&e(u)},[s,e]);return(l=n==null?void 0:n.data)!=null&&l.parent_handle?f.jsx(Wce,{context:n}):(c=n==null?void 0:n.data)!=null&&c.handle?f.jsx("div",{...i,children:f.jsxs("div",{className:"flex flex-col gap-5 w-full items-center",children:[f.jsx("p",{children:"Product Options",className:"text-xl w-full font-semibold"}),f.jsx(Hce,{options:s,onChange:o}),f.jsx(Tt,{className:"w-full ",dashed:!0}),f.jsxs("div",{className:"flex flex-row w-full items-center gap-1",children:[f.jsx(tR,{className:"text-xl "}),f.jsx("p",{children:"Variants",className:"text-xl w-full font-semibold"})]}),f.jsxs(ay,{toggle:(s==null?void 0:s.length)??!1,className:"w-full",children:[f.jsx($ce,{options:s,context:n,setError:r}),f.jsx("div",{className:"w-full shelf-text-minor-light text-base",children:Vce})]})]})}):"You have to create the product before you add variants"},Gce=({value:t,onClick:e})=>f.jsxs("div",{className:`w-full flex flex-col gap-2
|
656
|
-
py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(Oc,{children:f.jsx("a",{onClick:()=>e(t),className:"cursor-pointer",children:f.jsx("span",{children:t==null?void 0:t.title})})}),f.jsx(Jt,{value:`**\`${t.info.details.meta.name}
|
657
|
+
py-3 border-b shelf-border-color`,children:[f.jsxs("div",{className:"flex flex-row justify-between items-center",children:[f.jsx(Oc,{children:f.jsx("a",{onClick:()=>e(t),className:"cursor-pointer",children:f.jsx("span",{children:t==null?void 0:t.title})})}),f.jsx(Jt,{value:`**\`${t.info.details.meta.name}\`**`,className:"text-right"})]}),f.jsx(Jt,{value:(t==null?void 0:t.description)??"Discount does not have `description`"})]}),Kce=({field:t,context:e,value:n=[],onChange:r,setError:i,...s})=>{const a=n.length>0,{navWithState:o}=zi(),l=b.useCallback(c=>{const u=e==null?void 0:e.getState();o(`/pages/discounts/${c.handle}`,u)},[o,e]);return f.jsxs("div",{...s,children:[f.jsx(de,{show:!a,children:f.jsx(Jt,{value:"This `product` is not **eligible** for `discounts`"})}),f.jsx(de,{show:a,children:f.jsx("div",{className:"flex flex-col max-h-52 overflow-y-scroll",children:n.map(c=>f.jsx(Gce,{value:c,onClick:l},c.id))})})]})},qce={name:"Root",comp:He,comp_params:{className:"w-full lg:w-[35rem] flex flex-col gap-5"},fields:[{key:"discounts",name:"🎁 Eligible Discounts",desc:"The following discounts may be applied to this product",comp:Q(Kce,{className:""},!0,!1),comp_params:{className:"w-full h-fit"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an accurate title of the product",comp:Q(Pe(Le),{className:"h-10"},!0,!0),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,comp:Q(H0,{className:"w-full h-fit"}),desc:`Product handle uniquely identifies the product.
|
657
658
|
Will be computed automatically if not filled by the product title`,comp_params:{className:"w-full h-fit"}},{key:"isbn",name:"ISBN 𝄃𝄃𝄂𝄂𝄀𝄁𝄃𝄂𝄂𝄃",type:"text",validate:!1,editable:!0,comp:Q(X6),desc:"Set ISBN identifier",comp_params:{className:"w-full h-fit"}},{key:"variants_options",name:"Product Variants",validate:!1,editable:!0,comp:Q(Yce,{className:"w-full h-fit"}),desc:"Product variants represent children product, that varies with options, such as SIZE / COLOR for a shirt",comp_params:{className:"w-full h-fit"}},{key:"description",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Further describe the product you are selling",comp:Q(va),comp_params:{className:"w-full"}},{key:"media",name:"📀 Media",type:"text",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"video",name:"🎥 Video",type:"text",validate:!1,editable:!0,comp:Q(X6),desc:"Add a video, that demonstrates the product",comp_params:{className:"w-full h-fit"}},{key:"price",name:"🏷️ Price",type:"number",validate:!0,editable:!0,comp:Q(Pe(Le),{className:"h-10",type:"number"}),desc:"How much will you sell the product for ?",comp_params:{className:"w-full"}},{key:"compare_at_price",name:"Compare At Price",type:"number",validate:!1,editable:!0,desc:"Compare at price reveals the competitiveness of your price",comp:Q(Pe(Le),{className:"h-10",type:"number"}),comp_params:{className:"w-full"}},{key:"qty",name:"📦 Quantity",type:"number",validate:!0,editable:!0,desc:"How many units you have in stock for that product",comp:Q(Pe(Le),{className:"h-10",type:"number",min:"0",step:"1"}),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(Ao),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},Qce={name:"Root2",comp:He,comp_params:{className:"w-full lg:w-[19rem] flex flex-col gap-5"},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the product (It won't be published in a collection)",editable:!0,defaultValue:!0,comp:Q(bf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"related_products",name:"Related Products",type:"compund",validate:!1,editable:!0,desc:"Which other products are similar ? Offer your customers similar products",comp:Q(Pce)},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Tags help you attach attributes to products",comp:Q(pa)},{key:"collections",name:"🗂️ Collections",type:"compund",validate:!1,editable:!0,desc:"Which collections does this product belong to ?",comp:Q(b1,{resource:"collections",slug:"/pages/collections"})}]},Zce={name:"Root",comp:He,comp_params:{className:"w-full --max-w-[35rem] --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row gap-5 mx-auto"},fields:[qce,Qce]},a5=({mode:t,...e})=>{const{id:n,base:r}=hr(),{actions:{savePromise:i,deletePromise:s,duplicate:a,reload:o},context:l,key:c,sdk:u,doc:d,isCreateMode:h,isEditMode:p,isViewMode:m,loading:g,hasChanged:v,hasLoaded:y,error:x,ref_head:_,ref_root:w}=mi("products",n,"/pages/products",t,r),C=b.useCallback(()=>a({discounts:void 0,title:(d==null?void 0:d.title)+" duplicate"}),[d,a]),S=b.useMemo(()=>({...l,getState:()=>{const D=l.getState();return console.log("state",D),D==null||delete D.variants,{data:D.data,hasChanged:D.hasChanged}},removeVariant:async D=>{await u.products.remove(D),await o()},preCreateVariant:async()=>{var A,I;const D=(I=(A=w.current.get(!1))==null?void 0:A.data)==null?void 0:I.variants_options;await u.products.upsert({...d,variants_options:D})}}),[d,o,l]),k=!!(d!=null&&d.parent_handle);let N=[n??"create"];return k&&(N=[d==null?void 0:d.parent_handle,"variants",...N]),f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["products",...N],className:""}),f.jsx(As,{doc:d,className:"mt-5",collectionId:"products"}),f.jsx(Ns,{onClickSave:p?i:void 0,onClickCreate:h?i:void 0,onClickDelete:h?void 0:s,onClickDuplicate:h?void 0:C,onClickReload:h?void 0:()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{ref:_,time:d==null?void 0:d.created_at,className:"mt-8",changes_made:v},d==null?void 0:d.updated_at),f.jsx(de,{show:y&&p||h,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:x,className:"w-full"}),f.jsx(ci,{ref:w,context:S,field:Zce,value:d??{},isViewMode:m,className:"mt-8"},c)]})})]})},Xce=[{key:"title",name:"Title",comp:$t,comp_params:{className:"font-semibold",extra:"max-w-[10rem] md:max-w-[18rem]"}},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr,comp_params:{className:""}}],h7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,hasLoaded:s,error:a,queryCount:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("collections","/pages/collections");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(de,{show:!a,children:f.jsx(mr,{should_onboard:c,overallColelctionCount:o,hasLoaded:s,resource:l})}),f.jsx(de,{show:a,children:a==null?void 0:a.toString()}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
|
658
659
|
shelf-border-color shadow-md mt-5
|
659
660
|
dark:shadow-slate-900 `,children:[f.jsx(Ts,{isCollectionEmpty:!1,ref:n,reload:d,createLink:"/pages/collections/create",searchTitle:"Search by Name or Handle",isLoading:i}),f.jsxs(de,{show:!a&&(r==null?void 0:r.length),children:[f.jsx(pr,{context:e,data:r,fields:Xce}),f.jsx(jr,{prev:h,next:p,limit:t.limit,onLimitChange:u})]})]})]})})},Jce=[{key:"title",name:"Title",comp:$t},{key:"updated_at",name:"Last Updated",comp:Ss},{key:void 0,name:"Actions",comp:Fr}],eue=b.forwardRef(({collection_handle_or_id:t,limit:e=5,context:n,onLoaded:r,...i},s)=>{const{sdk:a}=sn(),{pages:o,page:l,loading:c,error:u,queryCount:d,actions:{prev:h,next:p,query:m}}=So(`collections/${t}/products`,Cl,!1),g=_D();b.useEffect(()=>{r&&r(d)},[d,r]),b.useEffect(()=>{m({limit:e,sortBy:["updated_at","id"]})},[m,e]),b.useImperativeHandle(s,()=>({refresh:()=>m({limit:e})}),[m,e]);const v=b.useMemo(()=>({getState:()=>n==null?void 0:n.getState(),editDocumentUrl:y=>`/pages/products/${y}`,deleteDocument:async y=>{const x=l.findIndex(C=>C.id===y||C.handle===y);if(x==-1)return;const _=n.data,w=l[x];await a.products.batchRemoveProductsFromCollection([w],_),l.splice(x,1),g()}}),[g,l,n]);return f.jsxs(f.Fragment,{children:[f.jsx(pr,{context:v,data:l,fields:Jce}),f.jsx(jr,{prev:h,next:p,onLimitChange:void 0})]})}),tue=({value:t,context:e})=>{const{sdk:n}=sn(),[r,i]=b.useState(!1),[s,a]=b.useState(-1),[o,l]=b.useState(void 0),c=b.useRef(),u=b.useRef(),d=b.useCallback(async h=>{i(!0);try{await n.products.batchAddProductsToCollection(h,t),u.current.refresh()}catch{l(o)}finally{i(!1)}c.current.hide()},[o,t==null?void 0:t.handle]);return f.jsxs(fa,{name:"🎁 Products in collection "+(s>=0?s:""),className:"w-full --lg:w-[30rem] h-fit",border:!0,error:o,children:[f.jsxs(de,{show:t==null?void 0:t.handle,children:[f.jsx(eue,{ref:u,collection_handle_or_id:t==null?void 0:t.handle,context:e,onLoaded:a,className:"text-sm h-fit"}),f.jsx("div",{className:"flex flex-row justify-end",children:f.jsxs("div",{className:"flex flex-row items-center w-fit gap-3 mt-7",children:[f.jsx("span",{children:"Add Product",className:"text-gray-500"}),f.jsx(lt,{className:`text-gray-500 text-sm w-fit mx-auto
|
@@ -661,7 +662,7 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ve=Ne(V,_e,Z,P,ie+".
|
|
661
662
|
transition-transform cursor-pointer`,stroke:"border-2",rounded:"rounded-full",from:"from-pink-500",to:"to-kf-500",onClick:()=>!r&&c.current.show(),children:f.jsx(jH,{className:"text-4xl text-white "+(r?"animate-spin":"")})})]})}),f.jsx(ha,{ref:c,children:f.jsx(kf,{onSave:d,onCancel:()=>c.current.hide()})})]}),f.jsx(de,{show:!(t!=null&&t.handle),children:f.jsx("p",{children:`Only after Collection is created,
|
662
663
|
you will be able to add products here`,className:"text-2xl font-semibold text-gray-400"})})]})},nue=({collectionId:t,value:e})=>{const[n,r]=b.useState([]),[i,s]=b.useState(),{sdk:a}=sn();t=(e==null?void 0:e.handle)??t;const o=b.useCallback(async(l=!0)=>{try{s(void 0),await a.collections.bulkAddRemoveTags(t,n,l)}catch(c){console.error(c),s((c==null?void 0:c.message)??String(c))}},[n,t]);return t?f.jsxs(fa,{name:"Add tags to all products in Collection",className:"w-full h-fit",error:i,desc:"Add/Remove all tags at once",children:[f.jsx(pa,{className:"w-full h-fit",onChange:r}),f.jsx(Tt,{className:"my-5"}),f.jsxs("div",{className:"flex flex-row justify-between w-full --mt-5",children:[f.jsx(Zr,{text:"Add Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!0)}),f.jsx(Zr,{text:"Remove Tags",keep_text_on_load:!0,className:"w-fit",onClick:l=>o(!1)})]})]}):null},rue={name:"Root",comp:He,comp_params:{className:"w-full flex flex-col gap-5 max-w- lg:w-[35rem]"},fields:[{comp:tue,comp_params:{className:"w-full"}},{key:"title",name:"Title",type:"text",validate:!0,editable:!0,desc:"Give an efficient title to the collection, e.g. - Women shirts",comp:Q(Pe(Le),{className:"w-full h-10"}),comp_params:{className:"w-full h-fit"}},{key:"handle",name:"🔗 Handle",type:"text",validate:!1,editable:!0,desc:`A handle uniquely identifies the collection.
|
663
664
|
Will be computed automatically if not filled by the product title`,comp:Q(H0,{className:"w-full h-fit"}),comp_params:{className:"w-full h-fit"}},{key:"desc",name:"📝 Description",type:"text",validate:!1,editable:!0,desc:"Describe the collection for your customers",comp:Q(va),comp_params:{className:"w-full"}},{key:"media",name:"🎥 Media",validate:!1,editable:!0,desc:"Manage and edit your media files",comp:Q(Nu),comp_params:{className:"w-full"}},{key:"attributes",name:"Attributes",validate:!1,editable:!0,desc:"Attributes can contain richer text values than tags",comp:Q(Ao),comp_params:{className:"w-full"}},{name:"JSON",type:"compund",validate:!1,editable:!1,desc:"Observe the RAW data",comp:Ds,comp_params:{className:"w-full"}}]},iue={name:"Main",comp:He,comp_params:{className:`w-full items-center lg:items-start lg:w-[18rem]
|
664
|
-
flex flex-col gap-5`},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the collection",editable:!0,defaultValue:!0,comp:Q(bf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Use tags to attach attributes to the collection",comp:Q(pa),comp_params:{className:"w-full "}},{comp:nue,comp_params:{className:"w-full"}}]},sue={name:"Root",comp:He,comp_params:{className:"w-full gap-5 --justify-center --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row --mx-auto"},fields:[rue,iue]},aue=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(sy,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),o5=({mode:t,...e})=>{const{id:n,base:r}=hr(),{actions:{savePromise:i,deletePromise:s,setError:a,reload:o,navWithState:l,duplicate:c},context:u,key:d,sdk:h,doc:p,isCreateMode:m,isEditMode:g,isViewMode:v,loading:y,hasChanged:x,hasLoaded:_,error:w,ref_head:C,ref_root:S}=mi("collections",n,"/pages/collections",t,r),k=b.useCallback(()=>c({title:(p==null?void 0:p.title)+" duplicate"}),[p,c]),N=b.useCallback(async()=>{await i(),a(void 0);try{await h.collections.publish(n,400),await o()}catch(D){a({messages:[{message:D.toString()}]})}},[n,i,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["collections",n??"create"],className:""}),f.jsx(As,{doc:p,className:"mt-5",collectionId:"collections"}),f.jsx(aue,{onClickSave:g?i:void 0,onClickCreate:m?i:void 0,onClickPublish:m?void 0:N,onClickDelete:m?void 0:s,onClickDuplicate:m?void 0:k,onClickReload:m?void 0:async()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{changes_made:x,ref:C,time:p==null?void 0:p.created_at,className:"mt-8"},p==null?void 0:p.updated_at),f.jsx(de,{show:_&&g||m,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:w,className:"w-full"}),f.jsx(ci,{ref:S,field:sue,context:u,value:p??{},isViewMode:v,className:"mt-8"},d)]})})]})},Lp=t=>{switch(t){case Lt.regular.type:return"bg-teal-600 dark:bg-teal-600/40";case Lt.bulk.type:return"bg-red-400 dark:bg-red-400/40";case Lt.buy_x_get_y.type:return"bg-cyan-500 dark:bg-cyan-500/40";case Lt.order.type:return"bg-kf-400 dark:bg-kf-400/40";case Lt.bundle.type:return"bg-sky-500 dark:bg-sky-400/40";default:return"bg-slate-400 dark:bg-slate-400/20"}},oue=({value:t,...e})=>{const n=b.useMemo(()=>{var i;return(i=Object.values(Lt).find(s=>s.type===(t==null?void 0:t.type)))==null?void 0:i.name.split(" ")[0]},[t]),r="text-white rounded-xl py-px px-2 whitespace-nowrap border shelf-border-color-blend "+Lp(t==null?void 0:t.type);return f.jsx("span",{className:r+" bg-",children:n})},lue=({...t})=>f.jsxs("div",{...t,children:[f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(ln,{to:"/pages/discounts",draggable:"false",children:f.jsx(qa,{value:"all",bgColor:"bg-pink-400 dark:bg-pink-400/60"})}),Object.values(Lt).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=type:${e.id}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(e.type)})},e.id))]}),f.jsxs("div",{className:"flex flex-row flex-wrap gap-2 mt-1",children:[Object.values(yo).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=app:${e.name.toLowerCase()}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(e.type)})},e.id)),[{name:"enabled",v:!0},{name:"disabled",v:!1}].map((e,n)=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=active:${e.v}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(void 0)})},n))]})]}),cue=({value:t,context:e,...n})=>{const r=e.item.active?"bg-teal-500":"bg-red-500",i="whitespace-nowrap pr-2 font-semibold text-base max-w-[150px] sm:max-w-max overflow-x-auto",s=e.item.application.id===yo.Manual.id;return f.jsxs("div",{className:i,children:[f.jsx("span",{children:t}),s&&f.jsx(YR,{className:`block --text-xl text-white --p-0.5
|
665
|
+
flex flex-col gap-5`},fields:[{key:"active",name:"Active",validate:!0,desc:"activate or deactivate the collection",editable:!0,defaultValue:!0,comp:Q(bf,{className:"text-gray-600"},!0),comp_params:{className:"w-full"}},{key:"tags",name:"# Tags",type:"compund",validate:!1,editable:!0,desc:"Use tags to attach attributes to the collection",comp:Q(pa),comp_params:{className:"w-full "}},{comp:nue,comp_params:{className:"w-full"}}]},sue={name:"Root",comp:He,comp_params:{className:"w-full gap-5 --justify-center --bg-red-100 items-center lg:max-w-max lg:items-start lg:w-fit flex flex-col lg:flex-row --mx-auto"},fields:[rue,iue]},aue=({onClickSave:t=void 0,onClickCreate:e=void 0,onClickDelete:n=void 0,onClickPublish:r=void 0,onClickDuplicate:i=void 0,onClickReload:s,id:a,className:o})=>f.jsx(Ns,{id:a,className:o,onClickCreate:e,onClickDelete:n,onClickDuplicate:i,onClickReload:s,onClickSave:t,children:f.jsx(Zr,{Icon:f.jsx(sy,{}),text:"publish",keep_text_on_load:!0,show:!!r,onClick:r,className:""})}),o5=({mode:t,...e})=>{const{id:n,base:r}=hr(),{actions:{savePromise:i,deletePromise:s,setError:a,reload:o,navWithState:l,duplicate:c},context:u,key:d,sdk:h,doc:p,isCreateMode:m,isEditMode:g,isViewMode:v,loading:y,hasChanged:x,hasLoaded:_,error:w,ref_head:C,ref_root:S}=mi("collections",n,"/pages/collections",t,r),k=b.useCallback(()=>c({title:(p==null?void 0:p.title)+" duplicate"}),[p,c]),N=b.useCallback(async()=>{await i(),a(void 0);try{await h.collections.publish(n,400),await o()}catch(D){a({messages:[{message:D.toString()}]})}},[n,i,o]);return f.jsxs("div",{className:"w-full lg:min-w-fit mx-auto",children:[f.jsx($i,{major:["collections",n??"create"],className:""}),f.jsx(As,{doc:p,className:"mt-5",collectionId:"collections"}),f.jsx(aue,{onClickSave:g?i:void 0,onClickCreate:m?i:void 0,onClickPublish:m?void 0:N,onClickDelete:m?void 0:s,onClickDuplicate:m?void 0:k,onClickReload:m?void 0:async()=>o(!1),id:n,className:"mt-5"}),f.jsx(Cs,{changes_made:x,ref:C,time:p==null?void 0:p.created_at,className:"mt-8"},p==null?void 0:p.updated_at),f.jsx(de,{show:_&&g||m,children:f.jsxs("div",{className:"w-full max-w-[40rem] lg:w-fit lg:max-w-none mx-auto",children:[f.jsx(Hr,{error:w,className:"w-full"}),f.jsx(ci,{ref:S,field:sue,context:u,value:p??{},isViewMode:v,className:"mt-8"},d)]})})]})},Lp=t=>{switch(t){case Lt.regular.type:return"bg-teal-600 dark:bg-teal-600/40";case Lt.bulk.type:return"bg-red-400 dark:bg-red-400/40";case Lt.buy_x_get_y.type:return"bg-cyan-500 dark:bg-cyan-500/40";case Lt.order.type:return"bg-kf-400 dark:bg-kf-400/40";case Lt.bundle.type:return"bg-sky-500 dark:bg-sky-400/40";default:return"bg-slate-400 dark:bg-slate-400/20"}},oue=({value:t,...e})=>{const n=b.useMemo(()=>{var i;return(i=Object.values(Lt).find(s=>s.type===(t==null?void 0:t.type)))==null?void 0:i.name.split(" ")[0]},[t]),r="text-white rounded-xl py-px px-2 whitespace-nowrap border shelf-border-color-blend "+Lp(t==null?void 0:t.type);return f.jsx("span",{className:r+" bg-",children:n})},lue=({...t})=>f.jsxs("div",{...t,children:[f.jsxs("div",{className:"flex flex-row gap-2 flex-wrap",children:[f.jsx(ln,{to:"/pages/discounts",draggable:"false",children:f.jsx(qa,{value:"all",bgColor:"bg-pink-400 dark:bg-pink-400/60"})}),Object.values(Lt).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=type:${e.id}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(e.type)})},e.id))]}),f.jsxs("div",{className:"flex flex-row flex-wrap gap-2 mt-1",children:[Object.values(yo).map(e=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=app:${e.name.toLowerCase()}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(e.type)})},e.id)),[{name:"enabled",v:!0},{name:"disabled",v:!1}].map((e,n)=>f.jsx(ln,{draggable:"false",to:`/pages/discounts/q/vql=active:${e.v}`,children:f.jsx(qa,{value:e.name,bgColor:Lp(void 0)})},n))]})]}),cue=({value:t,context:e,...n})=>{const r=e.item.active?"bg-teal-500":"bg-red-500",i="whitespace-nowrap pr-2 font-semibold text-base max-w-[150px] sm:max-w-max overflow-clip hover:overflow-x-auto",s=e.item.application.id===yo.Manual.id;return f.jsxs("div",{className:i,children:[f.jsx("span",{children:t}),s&&f.jsx(YR,{className:`block --text-xl text-white --p-0.5
|
665
666
|
align-middle text-center ${r}`}),!s&&f.jsx("span",{children:"AUTO",className:`block text-xs text-white w-fit px-1 border shelf-border-color-blend
|
666
667
|
align-middle text-center ${r}`})]})},uue=[{key:"handle",name:"Code",comp:cue},{key:"info.details.meta",name:"Type",comp:oue},{key:"updated_at",name:"Last Updated",comp:Ss,comp_params:{className:"font-semibold"}},{key:void 0,name:"Actions",comp:Fr}],p7=({})=>{const{query_api:t,context:e,ref_actions:n,page:r,loading:i,error:s,queryCount:a,hasLoaded:o,resource:l,resource_is_probably_empty:c,actions:{onLimitChange:u,onReload:d,prev:h,next:p}}=Br("discounts","/pages/discounts");return f.jsx("div",{className:"h-full w-full",children:f.jsxs("div",{className:"max-w-[56rem] mx-auto",children:[f.jsx(mr,{should_onboard:c,overallColelctionCount:a,hasLoaded:o,resource:l}),f.jsx(de,{show:s,children:s==null?void 0:s.toString()}),f.jsx(lue,{className:"mt-5"}),f.jsxs("div",{className:`w-full rounded-md overflow-hidden border
|
667
668
|
shelf-border-color dark:shadow-slate-900
|
@@ -761,7 +762,7 @@ Decide whether the discount is:
|
|
761
762
|
bg-slate-50 dark:bg-slate-800
|
762
763
|
text-gray-600 dark:text-gray-400
|
763
764
|
rounded-full text-base font-semibold tracking-tight`,Icon:f.jsx(ny,{className:"--text-red-500 text-base"}),loading:l,text:"delete",onClick:d})})}),f.jsxs(de,{show:e&&r,children:[f.jsx(Gd,{src:e==null?void 0:e.url,draggable:"false",crossOrigin:"anonymous",className:"w-fit mx-auto h-full rounded-lg"}),f.jsxs("div",{className:"w-full",children:[f.jsx(E5,{label:"Url",Icon:RL,className:""}),f.jsx("a",{href:e==null?void 0:e.url,target:"_blank",children:f.jsx("div",{children:e==null?void 0:e.url,className:"break-words w-full underline"})})]}),f.jsxs("div",{className:"w-full",children:[f.jsx(E5,{label:"Usage",Icon:vme,className:""}),f.jsx(_me,{usage:e==null?void 0:e.usage})]}),f.jsxs("div",{className:"w-full",children:[f.jsx(E5,{label:"Tags",Icon:FL,className:""}),f.jsx(xme,{search:e==null?void 0:e.search})]})]})]})})}),f.jsx(Fy,{ref:o,onApprove:h,title:f.jsxs("p",{className:`text-xl flex
|
764
|
-
flex-row items-center gap-3`,children:[f.jsx(ry,{className:"text-2xl"}),"Warning"]})})]})};function wme(t){return f.jsxs(dL,{children:[f.jsx(fe,{path:"*",element:f.jsx(lL,{to:"home"})}),f.jsx(fe,{path:"home",element:f.jsx(ch,{className:"
|
765
|
+
flex-row items-center gap-3`,children:[f.jsx(ry,{className:"text-2xl"}),"Warning"]})})]})};function wme(t){return f.jsxs(dL,{children:[f.jsx(fe,{path:"*",element:f.jsx(lL,{to:"home"})}),f.jsx(fe,{path:"home",element:f.jsx(ch,{className:"",children:f.jsx(ZW,{})})}),f.jsx(fe,{path:"settings",element:f.jsx(ch,{className:"",children:f.jsx(mme,{})})}),f.jsxs(fe,{path:"apps",element:f.jsx(ch,{className:""}),children:[f.jsxs(fe,{path:"gallery",children:[f.jsx(fe,{path:"",element:f.jsx(ck,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(ck,{})}),f.jsx(fe,{path:"img/:handle",element:f.jsx(bme,{})})]}),f.jsxs(fe,{path:"templates",children:[f.jsx(fe,{path:"",element:f.jsx(jw,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(jw,{})}),f.jsx(fe,{path:":id",element:f.jsx(r5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(r5,{mode:"view"})}),f.jsx(fe,{path:"create",element:f.jsx(r5,{mode:"create"})})]}),f.jsxs(fe,{path:"extensions",children:[f.jsx(fe,{path:"",element:f.jsx(nme,{})}),f.jsx(fe,{path:":id/view",element:f.jsx(ome,{})})]})]}),f.jsxs(fe,{path:"pages",element:f.jsx(ch,{className:""}),children:[f.jsxs(fe,{path:"storefronts",children:[f.jsx(fe,{path:"",element:f.jsx(ok,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(ok,{})}),f.jsx(fe,{path:":id",element:f.jsx(b5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(b5,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(b5,{mode:"create"})})]}),f.jsxs(fe,{path:"customers",children:[f.jsx(fe,{path:"",element:f.jsx(Lw,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(Lw,{})}),f.jsx(fe,{path:":id",element:f.jsx($2,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx($2,{mode:"view"})}),f.jsx(fe,{path:"create",element:f.jsx($2,{mode:"create"})})]}),f.jsxs(fe,{path:"tags",children:[f.jsx(fe,{path:"",element:f.jsx(Rw,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(Rw,{})}),f.jsx(fe,{path:":id",element:f.jsx(V2,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(V2,{mode:"view"})}),f.jsx(fe,{path:"create",element:f.jsx(V2,{mode:"create"})})]}),f.jsxs(fe,{path:"products",children:[f.jsx(fe,{path:"",element:f.jsx(c7,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(c7,{})}),f.jsx(fe,{path:":id",element:f.jsx(a5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(a5,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(a5,{mode:"create"})})]}),f.jsxs(fe,{path:"collections",children:[f.jsx(fe,{path:"",element:f.jsx(h7,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(h7,{})}),f.jsx(fe,{path:":id",element:f.jsx(o5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(o5,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(o5,{mode:"create"})})]}),f.jsxs(fe,{path:"orders",children:[f.jsx(fe,{path:"",element:f.jsx(J6,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(J6,{})}),f.jsx(fe,{path:":id",element:f.jsx(U2,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(U2,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(U2,{mode:"create"})})]}),f.jsxs(fe,{path:"discounts",children:[f.jsx(fe,{path:"",element:f.jsx(p7,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(p7,{})}),f.jsx(fe,{path:":id",element:f.jsx(x5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(x5,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(x5,{mode:"create"})})]}),f.jsxs(fe,{path:"shipping-methods",children:[f.jsx(fe,{path:"",element:f.jsx(ak,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(ak,{})}),f.jsx(fe,{path:":id",element:f.jsx(_5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(_5,{mode:"view"})}),f.jsx(fe,{path:"create/:base?",element:f.jsx(_5,{mode:"create"})})]}),f.jsxs(fe,{path:"posts",children:[f.jsx(fe,{path:"",element:f.jsx(lk,{})}),f.jsx(fe,{path:"q/:query_params",element:f.jsx(lk,{})}),f.jsx(fe,{path:":id",element:f.jsx(w5,{mode:"edit"})}),f.jsx(fe,{path:":id/view",element:f.jsx(w5,{mode:"view"})}),f.jsx(fe,{path:"create",element:f.jsx(w5,{mode:"create"})})]}),f.jsxs(fe,{path:"payment-gateways",children:[f.jsx(fe,{path:"",element:f.jsx(Kpe,{})}),f.jsx(fe,{path:":id/view",element:f.jsx(Jpe,{})})]})]})]})}const kme=({...t})=>f.jsx("div",{...t,children:f.jsxs("div",{className:`w-full h-10 flex flex-row justify-end items-center
|
765
766
|
text-gray-500 gap-3 py-3 px-4`,children:[f.jsx("a",{href:"https://github.com/store-craft/storecraft",title:"Join our Discord",alt:"Join our Discord",target:"_blank",rel:"noopener noreferrer",children:f.jsx(XH,{className:"text-2xl --animate-pulse"})}),f.jsx("a",{href:"https://github.com/store-craft/storecraft",title:"Fork us on Github",alt:"Fork us on Github",target:"_blank",rel:"noopener noreferrer",children:f.jsx(JH,{className:"text-xl"})}),f.jsx("a",{href:"https://linkedin.com/company/store-craft/",title:"Catch us at Linkedin",alt:"Catch us at Linkedin",target:"_blank",rel:"noopener noreferrer",children:f.jsx(ez,{className:"text-xl"})})]})}),Eme=({...t})=>f.jsxs("div",{...t,children:[f.jsxs("div",{className:`w-full h-full px-3
|
766
767
|
flex flex-row items-center
|
767
768
|
bg-gradient-to-r from-transparent to-kf-500
|
@@ -786,7 +787,7 @@ Decide whether the discount is:
|
|
786
787
|
text-gray-400 dark:text-white`,children:`all rights reserved, storecraft (${new Date().getFullYear()})`})}),Ame=({commit:t})=>{var e,n;return f.jsxs("div",{className:"w-full flex flex-row gap-3 items-center",children:[f.jsx("a",{href:t==null?void 0:t.html_url,target:"blank",children:f.jsx("div",{className:`text-[10px] font-bold w-11 text-center border rounded-md
|
787
788
|
bg-pink-500/15 border-pink-500/20 px-1 --shadow-md
|
788
789
|
text-pink-500/90 font-mono tracking-wider
|
789
|
-
shadow-pink-500 shadow-[0px_0px_2px]`,children:(e=t==null?void 0:t.sha)==null?void 0:e.slice(-5)})}),f.jsx("div",{className:"w-full line-clamp-1 text-sm",children:(n=t==null?void 0:t.commit)==null?void 0:n.message})]})},Dme=({...t})=>{const[e,n]=b.useState([]);return b.useEffect(()=>{async function r(){try{const s=await(await fetch("https://api.github.com/repos/micro-gl/micro-gl/commits")).json();n(s)}catch{}}r()},[]),e!=null&&e.length?f.jsx("div",{...t,children:f.jsx("div",{className:"flex-1 h-fit md:h-full",children:f.jsxs("div",{className:"w-fit h-fit md:h-full flex flex-col gap-3 mx-auto",children:[f.jsxs("div",{className:"flex flex-row items-center gap-2",children:[f.jsx(NL,{}),f.jsx("p",{children:"Latest Commits",className:"font-bold font-inter"})]}),f.jsx("div",{className:"flex flex-1 flex-col gap-3 w-full md:overflow-auto p-0.5",children:e.map(r=>f.jsx(Ame,{commit:r},r.sha))})]})})}):null},Ome=t=>({email:t.email,endpoint:t.endpoint}),Mme=({is_backend_endpoint_editable:t=!0})=>{const{config:e,sdk:n,actions:{updateConfig:r}}=sn(),[i,s]=b.useState(e??{}),[a,o]=b.useState(void 0),{darkMode:l,toggle:c}=Ll();b.useEffect(()=>{const h=new URLSearchParams(location.search),p=Object.fromEntries(h.entries());s(m=>({...m,...p}))},[location.search]);const u=b.useCallback((h,p)=>{s({...i,[h]:p})},[i]),d=b.useCallback(async h=>{h.preventDefault(),console.log("submit");try{r(Ome(i))}catch(p){const m=p?String(p):"check your project ID or API Key";o(`Error initializing Shelf, code : ${m}`)}try{await n.auth.signin(i.email,i.password)}catch(p){o(p)}},[n,r,i]);return f.jsx("div",{className:"relative w-full h-
|
790
|
+
shadow-pink-500 shadow-[0px_0px_2px]`,children:(e=t==null?void 0:t.sha)==null?void 0:e.slice(-5)})}),f.jsx("div",{className:"w-full line-clamp-1 text-sm",children:(n=t==null?void 0:t.commit)==null?void 0:n.message})]})},Dme=({...t})=>{const[e,n]=b.useState([]);return b.useEffect(()=>{async function r(){try{const s=await(await fetch("https://api.github.com/repos/micro-gl/micro-gl/commits")).json();n(s)}catch{}}r()},[]),e!=null&&e.length?f.jsx("div",{...t,children:f.jsx("div",{className:"flex-1 h-fit md:h-full",children:f.jsxs("div",{className:"w-fit h-fit md:h-full flex flex-col gap-3 mx-auto",children:[f.jsxs("div",{className:"flex flex-row items-center gap-2",children:[f.jsx(NL,{}),f.jsx("p",{children:"Latest Commits",className:"font-bold font-inter"})]}),f.jsx("div",{className:"flex flex-1 flex-col gap-3 w-full md:overflow-auto p-0.5",children:e.map(r=>f.jsx(Ame,{commit:r},r.sha))})]})})}):null},Ome=t=>({email:t.email,endpoint:t.endpoint}),Mme=({is_backend_endpoint_editable:t=!0})=>{const{config:e,sdk:n,actions:{updateConfig:r}}=sn(),[i,s]=b.useState(e??{}),[a,o]=b.useState(void 0),{darkMode:l,toggle:c}=Ll();b.useEffect(()=>{const h=new URLSearchParams(location.search),p=Object.fromEntries(h.entries());s(m=>({...m,...p}))},[location.search]);const u=b.useCallback((h,p)=>{s({...i,[h]:p})},[i]),d=b.useCallback(async h=>{h.preventDefault(),console.log("submit");try{r(Ome(i))}catch(p){const m=p?String(p):"check your project ID or API Key";o(`Error initializing Shelf, code : ${m}`)}try{await n.auth.signin(i.email,i.password)}catch(p){o(p)}},[n,r,i]);return f.jsx("div",{className:"relative w-full h-full "+(l?"dark":""),children:f.jsxs("div",{className:"relative w-full h-full overflow-auto shelf-body-bg",children:[f.jsx(Eme,{className:"w-full h-12 --bg-green-400"}),f.jsx(kme,{className:`absolute w-full --bg-green-300 left-0 top-12 h-fit
|
790
791
|
z-30 --bg-green-300/30 `}),f.jsxs("div",{className:`w-full h-fit md:h-[calc(100%-3rem)]
|
791
792
|
flex flex-col p-10
|
792
793
|
--md:overflow-auto
|
@@ -798,4 +799,4 @@ Decide whether the discount is:
|
|
798
799
|
md:scale-[0.8] md:origin-top-left
|
799
800
|
w-full max-w-[22rem] h-fit
|
800
801
|
rounded-md
|
801
|
-
`,sstyle:{transformOrigin:"top center"},children:f.jsx(Sme,{is_backend_endpoint_editable:t,className:"w-full ",onSubmit:d,credentials:i,onChange:u,error:a})}),f.jsx(Dme,{className:"flex-1 h-fit md:h-full "})]}),f.jsx(Nme,{className:"relative md:fixed md:left-10 md:bottom-0"})]})})};var ev={},uk=C0;ev.createRoot=uk.createRoot,ev.hydrateRoot=uk.hydrateRoot;const Pme=(t,e=!0)=>{const n=ev.createRoot(t);return n.render(f.jsx(Ime,{is_backend_endpoint_editable:e})),()=>{n.unmount()}},Ime=({is_backend_endpoint_editable:t=!0})=>{const{isAuthenticated:e,actions:{trigger:n}}=sn(),r=e;return f.jsxs(yL,{children:[f.jsx(de,{show:r,children:f.jsx(wme,{})}),f.jsx(de,{show:!r,children:f.jsx(Mme,{trigger:n,is_backend_endpoint_editable:t})})]})};Pme(document.getElementById("root"),!0);
|
802
|
+
`,sstyle:{transformOrigin:"top center"},children:f.jsx(Sme,{is_backend_endpoint_editable:t,className:"w-full ",onSubmit:d,credentials:i,onChange:u,error:a})}),f.jsx(Dme,{className:"flex-1 h-fit md:h-full "})]}),f.jsx(Nme,{className:"relative md:fixed md:left-10 md:bottom-0"})]})})};var ev={},uk=C0;ev.createRoot=uk.createRoot,ev.hydrateRoot=uk.hydrateRoot;const Pme=(t,e=!0)=>{const n=ev.createRoot(t);return n.render(f.jsx(Ime,{is_backend_endpoint_editable:e})),()=>{n.unmount()}},Ime=({is_backend_endpoint_editable:t=!0})=>{const{isAuthenticated:e,actions:{trigger:n}}=sn(),r=e;return f.jsx("div",{className:"--bg-red-300 w-screen ",style:{height:"100dvh"},children:f.jsx("div",{className:"w-full h-full",style:{zoom:.9},children:f.jsxs(yL,{children:[f.jsx(de,{show:r,children:f.jsx(wme,{})}),f.jsx(de,{show:!r,children:f.jsx(Mme,{trigger:n,is_backend_endpoint_editable:t})})]})})})};Pme(document.getElementById("root"),!0);
|