Files
appco_dist/.output/public/_nuxt/C3iaeegE.js
T

2 lines
12 KiB
JavaScript
Raw Normal View History

2026-03-03 20:40:54 +03:30
import{_ as ue}from"./LnMFAdTT.js";import{d1 as ie,d0 as ae,d2 as ce,d3 as de,cH as V,af as pe,a0 as G,aq as ve,cC as fe,r as m,l as k,d as F,H as j,o as X,z as w,G as K,E as h,B as r,D as d,A as U,a1 as L,a2 as Y,F as P,C as q,K as l,R as _e,a3 as Q,d4 as le,u as me,aB as Z,J as ge,a5 as ye,S as E,aj as he,a6 as xe,T as ee}from"./CE4SaZgW.js";import{l as te}from"./BsxsqCS1.js";import{_ as be}from"./BJJxomfH.js";import{g as we}from"./DEFgvqDI.js";import{u as H}from"./GIvwLoBE.js";import{u as oe,B as W}from"./DAaUah2x.js";import{B as D}from"./g9otGdDE.js";import{B as ne}from"./BX4wePgn.js";import{M as Se,_ as Ce}from"./DSO9kF0m.js";import{_ as ke}from"./BgR2E6gQ.js";import{_ as $e,C as Be}from"./Dw4nSNyv.js";import{I as J}from"./C9-mKqzf.js";import{C as qe,a as Re}from"./CGyvzagx.js";import{g as Ue}from"./73mfAfc8.js";import{g as ze,a as Ke}from"./C18jMsoU.js";import{_ as Pe}from"./Tyt-5zMt.js";import{u as De}from"./D7Yr8Azi.js";const T=new WeakMap;function Fe(y,c,a={}){const{mode:i="replace",route:s=ie(),router:e=ae(),transform:o}=a;let x=_=>_,p=_=>_;typeof o=="function"?x=o:o&&(o.get&&(x=o.get),o.set&&(p=o.set)),T.has(e)||T.set(e,new Map);const v=T.get(e);let t=s.query[y];ce(()=>{t=void 0});let f;const b=de((_,$)=>(f=$,{get(){return _(),x(t!==void 0?t:V(c))},set(S){S=p(S),t!==S&&(t=S===V(c)?void 0:S,v.set(y,S===V(c)?void 0:S),$(),pe(()=>{if(v.size===0)return;const z=Object.fromEntries(v.entries());v.clear();const{params:R,query:O,hash:n}=s;e[V(i)]({params:R,query:{...O,...z},hash:n})}))}}));return G(()=>s.query[y],_=>{t!==x(_)&&(t=_,f())},{flush:"sync"}),b}async function Oe(){return await ve.get("/site/collection/menu")}const re=fe("category",()=>{const y=m([]),c=k(()=>y.value.sort((e,o)=>e.position-o.position));async function a(){y.value=await Oe()}const i=e=>c.value.filter(o=>e.includes(o.parent_id)),s=k(()=>c.value.filter(e=>!e.parent_id));return{_category:y,category:c,getCategory:a,getCategorySubs:i,categoryWithoutSub:s}}),je={class:"overflow-y-auto px-2 mt3"},Ae={class:"pb-5"},Ie=F({__name:"SortProductSheet",props:{open:{type:Boolean,default:!1},value:{}},emits:["update:open","update:value","success"],setup(y,{emit:c}){const a=j(),i=y,s=c,e=k({get(){return i.value},set(t){s("update:value",t)}}),o=k({get(){return i.open},set(t){s("update:open",t)}});async function x(t){e.value=t,p(),s("success")}function p(){o.value=!1}const v=m([{title:a.useString("newest"),order:"-created_at"},{title:a.useString("popular"),order:"-count_fav"},{title:a.useString("bestSeller"),order:"-count_order"},{title:a.useString("mostVisited"),order:"-count_view"},{title:a.useString("cheapest"),order:"+price"},{title:a.useString("mostExpensive"),order:"-price"}]);return X(()=>{e.value=v.value[0]}),(t,f)=>{const b=Ce,_=Se;return w(),K(ne,{"close-on-click-overlay":"",show:o.value,"onUpdate:show":f[0]||(f[0]=$=>o.value=$),onClose:p},{default:h(()=>[r("div",je,[r("div",Ae,[d(_,{selectedKeys:[e.value?.order],class:"!border-none select-none"},{default:h(()=>[(w(!0),U(L,null,Y(v.value,($,S)=>(w(),K(b,{key:$.order,onClick:z=>x($)},{default:h(()=>[P(q($.title),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["selectedKeys"])])]),d(D,{block:"",danger:"",onClick:p},{default:h(()=>[P(q(l(a).useString("cancel")),1)]),_:1})]),_:1},8,["show"])}}}),Ve=F({__name:"CollapsePanel",setup(y){return(c,a)=>(w(),K(l($e),null,{default:h(()=>[_e(c.$slots,"default")]),_:3}))}}),Le=["alt"],Me={class:"max-h-60 mt-4 overflow-y-auto w-full px-2"},Ne={class:"flex flex-col gap-4 font-medium !text-gray-600"},Ee={class:"truncate w-10rem"},se=F({__name:"CollapsePanelFilter",props:{options:{default:()=>[]},value:{default:()=>[]}},emits:["update:value"],setup(y,{emit:c}){const a=y,i=j(),s=m(""),{prefixCls:e}=oe("collapse-filter"),o=c,x=k({set:v=>{o("update:value",v)},get:()=>a.value}),p=k(()=>s.value?a.options.filter(v=>v.label?.includes(s.value)):a.options);return(v,t)=>{const f=J;return w(),K(Ve,{class:Q([l(e)])},{default:h(()=>[d(f,{value:s.value,"onUpdate:value":t[0]||(t[0]=b=>s.value=b),bordered:!1,size:"large",placeholder:l(i).useString("search"),class:"input-search myCustomColl