2026-10-13 13:23:32 +03:30
|
|
|
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-6969d1dc.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-1e71e6d8.js";import{u as H,_ as fe}from"./useBaseTable-2f44456a.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-c84b0596.js";import{I as D}from"./Icon-e9d21126.js";import{t as ge}from"./useDataTime-c5fd0475.js";import{g as we,a as xe,v as ye}from"./itemViews-5b0a87d8.js";import{_ as be,I as ke,J as ee,K as Me,d as Ae,i as v,z as Ie,B as W,o as A,c as I,e as o,w as m,f as J,b as s,l as x,t as O,L as X,n as V,H as h,M as K}from"./index-88b436a3.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-eb78e5b4.js";import{M as Ce}from"./index-801e70c1.js";import{S as G}from"./index-77cb2497.js";import{T as P}from"./isSymbol-5adcf314.js";import{U as Q}from"./index-58f8102d.js";import"./usePrice-bc935b83.js";import"./index-5b1d7174.js";import"./SearchOutlined-a51da12b.js";import"./omit-c69ba12d.js";import"./vnode-4c3cf924.js";import"./FormItemContext-0dc63d45.js";import"./index-371b21ab.js";import"./_plugin-vue_export-helper-0965689e.js";import"./isPlainObject-6af67cf0.js";import"./index-608635af.js";import"./updateLocale-50b6b1dc.js";import"./shallowequal-a265b4c4.js";import"./useState-89585daf.js";import"./useMemo-9783b0bd.js";import"./lodash-ff1cad4c.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-8738a2db.js";import"./index-59dbbd66.js";import"./Badge-b5f795c2.js";import"./isNumeric-3f69e2aa.js";import"./index-e3b71aec.js";import"./index-6971af25.js";import"./styleChecker-e121d19f.js";import"./index-4ad375f9.js";import"./index-70730f49.js";import"./DialogWrap-540d386d.js";import"./pickAttrs-fd92707c.js";import"./css-aae66f86.js";import"./index-7fdb0173.js";import"./toArray-20aa7010.js";import"./isMobile-e2e89480.js";import"./index-4c23d157.js";import"./supabaseTableQuery-81d2dd21.js";import"./index-ad76e424.js";import"./_flatRest-bfa472d2.js";import"./Col-dbdf0e50.js";import"./index-f6397275.js";import"./useRefs-b589f2c4.js";const Te=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:l=>l.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"زیرعنوان",dataIndex:"sub_title",key:"sub_title"},{title:"زمان",dataIndex:"time",key:"time",customRender:l=>{const p=l.record.time||{minutes:0,seconds:0},r=String(p.minutes??0).padStart(2,"0"),g=String(p.seconds??0).padStart(2,"0");return`${r}:${g}`}},{title:"صوت",dataIndex:"src",key:"src",customRender:l=>l.record.src?"دارد":"-"},{title:"ترتیب",dataIndex:"sort_order",key:"sort_order",align:"center"},{title:"نمایش",dataIndex:"show",key:"show",align:"center",customRender:l=>l.record.show===!1?"مخفی":"نمایش"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:l=>ge(l.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],te="music_macharta_audio";async function Ue(l){const p=await ke("music_macharta_audios",l);return Array.isArray(p)?p:[p]}async function Re(l,p){const r=await ee("music_macharta_audios",l,{...p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function Se(l,p){const r=await ee("music_macharta_audios",l,{show:p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function De(l){await Me("music_macharta_audios",l)}function $e(l){return xe(l,te)}function Z(l,p){return we(l,p,te)}async function Le(l){const{TableEngineRequest:p}=await be(()=>import("./buildSupabaseQuery-073609fa.js"),["assets/buildSupabaseQuery-073609fa.js","assets/index-88b436a3.js","assets/index-ceed3b68.css"]),r={...l};!r.sort&&!r.order&&(r.sort={key:"sort_order",order:"desc"});const g=await p(r,"music_macharta_audios");try{if(Array.isArray(g==null?void 0:g.rows)){const y=r.page||1,T=r.limit||20,U=(y-1)*T,C=g.rows.map((c,$)=>({...c,title:c.title??"",sub_title:c.sub_title??"",cover:c.cover??null,src:c.src??null,time:c.time??{minutes:0,seconds:0},show:c.show??!0,sort_order:c.sort_order??0
|