2026-08-19 18:36:32 +03:30
|
|
|
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-0121d908.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-83b58369.js";import{u as W,_ as ft}from"./useBaseTable-7b78293f.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-dcd86e7a.js";import{I as D}from"./Icon-8dedfa53.js";import{t as gt}from"./useDataTime-a337f5c6.js";import{v as wt}from"./viewersColumns-4aa7c51d.js";import{_ as xt,G as P,d as bt,g as _,E as yt,Q as J,o as I,c as C,b as i,w as p,e as X,a as s,j as x,t as q,H as G,k as V,D as g,I as Q}from"./index-b0561d74.js";import{g as kt,a as Mt}from"./itemViews-a859fc8d.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-833169e4.js";import{M as It}from"./index-12bdf78c.js";import{S as K}from"./index-b7f1770d.js";import{T as E}from"./isSymbol-a4291d99.js";import{U as Z}from"./index-2e6c7b29.js";import"./usePrice-bc935b83.js";import"./index-d18c8f13.js";import"./SearchOutlined-ca6a4719.js";import"./omit-e6701bfc.js";import"./vnode-531f9d95.js";import"./FormItemContext-5520cb52.js";import"./index-092c5981.js";import"./_plugin-vue_export-helper-130a5518.js";import"./isPlainObject-3a5eccde.js";import"./index-5d725680.js";import"./updateLocale-b730d578.js";import"./index-bc659f42.js";import"./shallowequal-4f931fa5.js";import"./useState-94528018.js";import"./useMemo-0162b583.js";import"./lodash-9a3882db.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-71825e72.js";import"./index-46f9dc77.js";import"./Badge-d2c862d8.js";import"./isNumeric-3f69e2aa.js";import"./index-7febe226.js";import"./index-93c22234.js";import"./styleChecker-d39a1d44.js";import"./index-b618fa76.js";import"./index-2dc7fe57.js";import"./DialogWrap-9c2d8a9c.js";import"./pickAttrs-69dd58a4.js";import"./css-aae66f86.js";import"./index-482a46a3.js";import"./toArray-1ab9b01c.js";import"./isMobile-e2e89480.js";import"./index-840dd6b2.js";import"./index-5398304a.js";import"./_flatRest-39f9ed6b.js";import"./Col-08664037.js";import"./index-ea044634.js";import"./useRefs-899ec8f3.js";const Ct=[{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 m=l.record.time||{minutes:0,seconds:0},r=String(m.minutes??0).padStart(2,"0"),v=String(m.seconds??0).padStart(2,"0");return`${r}:${v}`}},{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=>gt(l.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],et="music_macharta_audio";async function Tt(l){const{data:m,error:r}=await P.from("music_macharta_audios").insert([l]).select();if(r)throw r;return m}async function Ut(l,m){const{data:r,error:v}=await P.from("music_macharta_audios").update({...m,updated_at:new Date().toISOString()}).eq("id",l).select();if(v)throw v;return r}async function At(l,m){const{data:r,error:v}=await P.from("music_macharta_audios").update({show:m,updated_at:new Date().toISOString()}).eq("id",l).select();if(v)throw v;return r}async function Rt(l){const{error:m}=await P.from("music_macharta_audios").delete().eq("id",l);if(m)throw m}function St(l){return Mt(l,et)}function tt(l,m){return kt(l,m,et)}async function Dt(l){const{TableEngineRequest:m}=await xt(()=>import("./buildSupabaseQuery-09e09955.js"),["assets/buildSupabaseQuery-09e09955.js","assets/index-b0561d74.js","assets/index-a54d32f7.css","assets/supabaseTableQuery-8ab5665d.js"]),r={...l};!r.sort&&!r.order&&(r.sort={key:"sort_order",order:"desc"});const v=await m(r,"music_macharta_audios");try{if(Array.isArray(v==null?void 0:v.rows)){const b=r.page||1,U=r.
|