PageSourceSearch

https://donito.me/_nuxt/6967e1943733/DlimJKQU.js

js donito.me collected 2026-09-24 21:07:20 UTC 26,702 bytes, 1 lines download raw bytes

1import{_ as Se,r,w as ke,a as Me,o as _,b as F,e,h as i,A as $e,B as we,z as a,f as k,i as L,x as Re,c as Be,m as Ee,D as V,g as xe,F as Ce,t as J,d as He,I as Ze,n as Ae}from"./BafG0enI.js";import{_ as ze}from"./BsHNuFUB.js";import{Z as g}from"./C8nN3eV3.js";import{Z as Q}from"./DE4PaMGF.js";import{a as De,Z as Ie}from"./DQlF2TAd.js";import{Z as Ue}from"./B8bEEtrS.js";import{Z as A}from"./c1Yp4dtY.js";import{Z as z}from"./DHsBBda0.js";import{Z as Fe}from"./BgP9oW4s.js";import{f as Pe,r as je}from"./Zhx2y9F8.js";import{L as Ke}from"./DRaE4gO-.js";import{T as Ge}from"./Blz80T0k.js";import{g as We,s as Ye,d as he,r as Je}from"./D80AN_xn.js";import{g as Qe}from"./BW1a5xWq.js";import"./IyP0z1E8.js";import"./b7c24pf3.js";import"./BxKQ9M-4.js";import"./DkkuhfSA.js";import"./ByzfnZr9.js";import"./A2KAE38E.js";import"./BLI0msjf.js";import"./DhHT-QsW.js";import"./BporYn2C.js";import"./CyUIBIFw.js";import"./BtzAHBZp.js";import"./CRvvokFe.js";const Xe={class:"queue-settings-form"},el={class:"queue-settings-card"},ll={class:"queue-settings-card__icon"},tl={class:"queue-settings-card__body"},ol={class:"queue-settings-group"},nl={class:"queue-settings-group__title"},il={class:"queue-settings-grid"},sl={class:"queue-settings-group"},al={class:"queue-settings-group__title"},ul={class:"queue-settings-grid"},dl={class:"queue-settings-group"},rl={class:"queue-settings-group__title"},_l={class:"queue-settings-grid"},vl={class:"queue-settings-group"},ml={class:"queue-settings-group__title"},pl={class:"queue-file-grid"},cl={class:"queue-file-field"},gl={key:3,class:"queue-file-current"},fl={class:"queue-file-field"},bl={key:3,class:"queue-file-current"},yl={class:"queue-settings-group"},ql={class:"queue-settings-group__title"},Vl={class:"queue-settings-grid"},kl={class:"queue-settings-card"},$l={class:"queue-settings-card__icon"},wl={class:"queue-settings-card__body"},Cl={class:"queue-settings-grid queue-settings-grid--general"},Il={class:"queue-settings-savebar"},Ul={class:"queue-settings-savebar__actions"},Fl={__name:"FormList",props:{data:{type:Array,default:()=>[]},isEdit:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["sendData","uploadFile","removeFile","deleteCondition","preview-change"],setup(E,{emit:X}){const $=E,S=X,f=r(!0),D=r(!1),n=r({}),C=r(1),I=r(1),w=r(!1),b=r(!1),d=r(!1),y=r(!1),M=[{id:1,value:1,title:"آپلود فایل",active:!1},{id:2,value:2,title:"آدرس مستقیم",active:!1},{id:3,value:3,title:"اشتراک فایل دونیتو",active:!1}],O=[{id:1,value:1,title:"راست به چپ",active:!1},{id:2,value:2,title:"چپ به راست",active:!1}],R=[{id:1,value:1,title:"سمت راست",active:!1},{id:2,value:2,title:"سمت چپ",active:!1}],ee=[{id:1,value:1,title:"راست به چپ",active:!1},{id:2,value:2,title:"چپ به راست",active:!1}];ke(()=>$.data,x,{immediate:!0,deep:!0}),ke(n,v=>S("preview-change",{...v}),{deep:!0});
1function x(v){n.value=Object.fromEntries((v||[]).map(l=>[l.key,l.value])),S("preview-change",{...n.value})}function P(){if($.loading)return;const v={...n.value};C.value===1&&delete v.tool_list_dq_item_background_file,I.value===1&&delete v.tool_list_dq_item_background_link_pattern_file,S("sendData",v)}async function j(v,l){var o,K;const c=l==="tool_list_dq_item_background_file"?w:b;c.value=!0;try{const G=await Pe(v,l,!0),T=(K=(o=G.data)==null?void 0:o.url)==null?void 0:K.replace("temp","settings");if(!T)return;n.value[l]=T,S("uploadFile",{key:l,id:G.data.id})}finally{c.value=!1}}function H(v){S("removeFile",v),n.value[v]=null,d.value=!1,y.value=!1}function B(v){const l=n.value[v];l&&!String(l).startsWith("F::")&&window.open(l)}function Z(v,l){n.value[l]=v}return(v,l)=>{const c=Me("font-awesome-icon");return _(),F("div",Xe,[e("section",el,[e("button",{type:"button",class:"queue-settings-card__header",onClick:l[0]||(l[0]=o=>f.value=!f.value)},[e("span",ll,[i(c,{icon:"pen"})]),l[41]||(l[41]=e("span",{class:"queue-settings-card__title"},[e("strong",null,"محتوا و ظاهر حمایت"),e("small",null,"متن، ابعاد، حرکت و پس‌زمینه هر حمایت")],-1)),i(c,{icon:f.value?"chevron-down":"chevron-left"},null,8,["icon"])]),$e(e("div",tl,[e("div",ol,[e("div",nl,[e("span",null,[i(c,{icon:"user"})]),l[42]||(l[42]=e("div",null,[e("strong",null,"نام حامی"),e("small",null,"رنگ و تایپوگرافی نام نمایش‌داده‌شده")],-1))]),e("div",il,[i(a(A),{label:"رنگ نام حامی",modelValue:n.value.tool_list_dq_item_donator_color,"onUpdate:modelValue":l[1]||(l[1]=o=>n.value.tool_list_dq_item_donator_color=o)},null,8,["modelValue"]),i(a(g),{label:"اندازه متن",type:"number",modelValue:n.value.tool_list_dq_item_donator_font_size,"onUpdate:modelValue":l[2]||(l[2]=o=>n.value.tool_list_dq_item_donator_font_size=o)},null,8,["modelValue"]),i(a(g),{label:"وزن متن",type:"number",modelValue:n.value.tool_list_dq_item_donator_font_weight,"onUpdate:modelValue":l[3]||(l[3]=o=>n.value.tool_list_dq_item_donator_font_weight=o)},null,8,["modelValue"]),i(a(g),{label:"نام فونت",modelValue:n.value.tool_list_dq_item_donator_font_family,"onUpdate:modelValue":l[4]||(l[4]=o=>n.value.tool_list_dq_item_donator_font_family=o)},null,8,["modelValue"])])]),e("div",sl,[e("div",al,[e("span",null,[i(c,{icon:"money-bill"})]),l[43]||(l[43]=e("div",null,[e("strong",null,"مبلغ حمایت"),e("small",null,"رنگ و تایپوگرافی مبلغ هر حمایت")],-1))]),e("div",ul,[i(a(A),{label:"رنگ مبلغ",modelValue:n.value.tool_list_dq_item_price_color,"onUpdate:modelValue":l[5]||(l[5]=o=>n.value.tool_list_dq_item_price_color=o)},null,8,["modelValue"]),i(a(g),{label:"اندازه متن",type:"number",modelValue:n.value.tool_list_dq_item_price_font_size,"onUpdate:modelValue":l[6]||(l[6]=o=>n.value.tool_list_dq_item_price_font_size=o)},null,8,["modelValue"]),i(a(g),{label:"وزن متن",type:"number",modelValue:n.value.tool_list_dq_item_price_font_weight,"onUpdate:modelValue":l[7]||(l[7]=o=>n.value.tool_list_dq_item_price_font_weight=o)},null,8,["modelValue"]),i(a(g),{label:"نام فونت",modelValue:n.value.tool_list_dq_item_price_font_family,"onUpdate:modelValue":l[8]||(l[8]=o=>n.value.tool_list_dq_item_price_font_family=o)},null,8,["modelValue"])])]),e("div",dl,[e("div",rl,[e("span",null,[i(c,{icon:"sliders"})]),l[44]||(l[44]=e("div",null,[e("strong",null,"چیدمان و اندازه‌ها"),e("small",null,"موقعیت، جهت ورود و فضای آیتم‌ها")],-1))]),e("div",_l,[i(a(z),{options:O,label:"جهت انیمیشن ورودی",modelValue:n.value.tool_list_dq_input_animation_direction_horizontally,"onUpdate:modelValue":l[9]||(l[9]=o=>n.value.tool_list_dq_input_animation_direction_horizontally=o)},null,8,["modelValue"]),i(a(z),{options:R,label:"موقعیت آیتم‌ها",modelValue:n.value.tool_list_dq_item_horizontal_position,"onUpdate:modelValue":l[10]||(l[10]=o=>n.value.tool_list_dq_item_horizontal_position=o)},null,8,["modelValue"]),i(a(g),{label:"عرض هر آیتم",type:"number",modelValue:n.value.tool_list_dq_item_width,"onUpdate:modelValue":l[11]||(l[11]=o=>n.value.tool_list_dq_item_width=o)},null,8,["modelValue"]),i(a(g),{label:"ارتفاع هر آیتم",type:"number",modelValue:n.value.tool_list_dq_item_height,"onUpdate:modelValue":l[12]||(l[12]=o=>
1n.value.tool_list_dq_item_height=o)},null,8,["modelValue"]),i(a(g),{label:"گردی گوشه‌ها",type:"number",modelValue:n.value.tool_list_dq_item_border_radius,"onUpdate:modelValue":l[13]||(l[13]=o=>n.value.tool_list_dq_item_border_radius=o)},null,8,["modelValue"]),i(a(g),{label:"فاصله داخلی",type:"number",modelValue:n.value.tool_list_dq_item_padding,"onUpdate:modelValue":l[14]||(l[14]=o=>n.value.tool_list_dq_item_padding=o)},null,8,["modelValue"]),i(a(g),{label:"فاصله اطراف",type:"number",modelValue:n.value.tool_list_dq_item_margin,"onUpdate:modelValue":l[15]||(l[15]=o=>n.value.tool_list_dq_item_margin=o)},null,8,["modelValue"])])]),e("div",vl,[e("div",ml,[e("span",null,[i(c,{icon:"image"})]),l[45]||(l[45]=e("div",null,[e("strong",null,"تصویر پس‌زمینه"),e("small",null,"یک تصویر اصلی یا مستقیم برای کادر حمایت انتخاب کنید")],-1))]),e("div",pl,[e("div",cl,[i(a(z),{options:M,label:"روش انتخاب تصویر",modelValue:C.value,"onUpdate:modelValue":l[16]||(l[16]=o=>C.value=o)},null,8,["modelValue"]),C.value===2?(_(),k(a(g),{key:0,label:"آدرس تصویر",placeholder:"https://…",ltr:"",modelValue:n.value.tool_list_dq_item_background_file,"onUpdate:modelValue":l[17]||(l[17]=o=>n.value.tool_list_dq_item_background_file=o)},null,8,["modelValue"])):C.value===3?(_(),k(a(Fe),{key:1,label:"انتخاب از اشتراک فایل دونیتو",type:"file","file-val":n.value.tool_list_dq_item_background_file,onSelected:l[18]||(l[18]=o=>Z(o,"tool_list_dq_item_background_file"))},null,8,["file-val"])):(_(),k(a(Ue),{key:2,label:"آپلود تصویر (حداکثر ۱۲۰ مگابایت)",type:"file",loading:w.value,onUpload:l[19]||(l[19]=o=>j(o,"tool_list_dq_item_background_file"))},null,8,["loading"])),n.value.tool_list_dq_item_background_file?(_(),F("div",gl,[l[46]||(l[46]=e("span",null,"فایل فعلی آماده نمایش است.",-1)),e("div",null,[e("button",{type:"button","aria-label":"مشاهده تصویر فعلی",onClick:l[20]||(l[20]=o=>B("tool_list_dq_item_background_file"))},[i(c,{icon:"eye"})]),e("button",{type:"button","aria-label":"حذف تصویر فعلی",onClick:l[21]||(l[21]=o=>d.value=!0)},[i(c,{icon:"trash"})])])])):L("",!0)]),e("div",fl,[i(a(z),{options:M,label:"روش انتخاب پترن",modelValue:I.value,"onUpdate:modelValue":l[22]||(l[22]=o=>I.value=o)},null,8,["modelValue"]),I.value===2?(_(),k(a(g),{key:0,label:"آدرس پترن",placeholder:"https://…",ltr:"",modelValue:n.value.tool_list_dq_item_background_link_pattern_file,"onUpdate:modelValue":l[23]||(l[23]=o=>n.value.tool_list_dq_item_background_link_pattern_file=o)},null,8,["modelValue"])):I.value===3?(_(),k(a(Fe),{key:1,label:"انتخاب از اشتراک فایل دونیتو",type:"file","file-val":n.value.tool_list_dq_item_background_link_pattern_file,onSelected:l[24]||(l[24]=o=>Z(o,"tool_list_dq_item_background_link_pattern_file"))},null,8,["file-val"])):(_(),k(a(Ue),{key:2,label:"آپلود پترن (حداکثر ۱۲۰ مگابایت)",type:"file",loading:b.value,onUpload:l[25]||(l[25]=o=>j(o,"tool_list_dq_item_background_link_pattern_file"))},null,8,["loading"])),n.value.tool_list_dq_item_background_link_pattern_file?(_(),F("div",bl,[l[47]||(l[47]=e("span",null,"پترن فعلی آماده نمایش است.",-1)),e("div",null,[e("button",{type:"button","aria-label":"مشاهده پترن فعلی",onClick:l[26]||(l[26]=o=>B("tool_list_dq_item_background_link_pattern_file"))},[i(c,{icon:"eye"})]),e("button",{type:"button","aria-label":"حذف پترن فعلی",onClick:l[27]||(l[27]=o=>y.value=!0)},[i(c,{icon:"trash"})])])])):L("",!0)])])]),e("div",yl,[e("div",ql,[e("span",null,[i(c,{icon:"image"})]),l[48]||(l[48]=e("div",null,[e("strong",null,"رنگ‌های پس‌زمینه"),e("small",null,"گرادینت و نوار زمان هر حمایت")],-1))]),e("div",Vl,[i(a(A),{label:"رنگ اول",modelValue:n.value.tool_list_dq_item_background_primary_color,"onUpdate:modelValue":l[28]||(l[28]=o=>n.value.tool_list_dq_item_background_primary_color=o)},null,8,["modelValue"]),i(a(A),{label:"رنگ دوم",modelValue:n.value.tool_list_dq_item_background_secondary_color,"onUpdate:modelValue":l[29]||(l[29]=o=>n.value.tool_list_dq_item_background_secondary_color=o)},null,8,["modelValue"]),i(a(A),{label:"رنگ نوار زمان",modelValue:n.value.tool_list_dq_item_progress_bar_color,"onUpdate:modelValue":l[30]||(l[30]=o=>n.value.tool_list_dq_item_progress_bar_color=o)},null,8,["modelValue"]),i(a(z),{options:ee,label:"جهت حرکت نوار",modelValue:n.value.tool_list_dq_item_progress_bar_direction,"onUpdate:modelValue":l[31]||(l[31]=o=>n.value.tool_list_dq_item_progress_bar_direction=o)},null,8,["modelValue"]),i(a(g),{label:"زاویه گرادینت",type:"number",modelValue:n.value.tool_list_dq_item_background_gradient_angel,"onUpdate:modelValue":l[32]||(l[32]=o=>n.value.tool_list_dq_item_background_gradient_angel=o)},null,8,["modelValue"])])])],512),[[we,f.value]])]),e("section",kl,[e("button",{type:"button",class:"queue-settings-card__header",onClick:l[33]||(l[33]=o=>D.value=!D.value)},[e("span",$l,[i(c,{icon:"cog"})]),l[49]||(l[49]=e("span",{class:"queue-settings-card__title"},[e("strong",null,"تنظیمات کلی شرط"),e("small",null,"تعداد حمایت‌های هم‌زمان و مدت نمایش")],-1)),i(c,{icon:D.value?"chevron-down":"chevron-left"},null,8,["icon"])]),$e(e("div",wl,[e("div",Cl,[i(a(g),{label:"تعداد آیتم‌های این گروه",type:"number",modelValue:n.value.tool_list_dq_items_count,"onUpdate:modelValue":l[34]||(l[34]=o=>n.value.tool_list_dq_items_count=o)},null,8,["modelValue"]),i(a(g),{label:"مدت نمایش هر حمایت (ثانیه)",type:"number",modelValue:n.value.tool_list_dq_timing_visible_duration,"onUpdate:modelValue":l[35]||(l[35]=o=>n.value.tool_list_dq_timing_visible_duration=o)},null,8,["modelValue"])])],512),[[we,D.value]])]),e("div",Il,[l[50]||(l[50]=e("p",null,"شرط مبلغ و تنظیمات ظاهری با هم ذخیره می‌شوند.",-1)),e("div",Ul,[E.isEdit?(_(),k(a(Ie),{key:0,class:"queue-settings-savebar__button queue-settings-savebar__button--danger",title:"حذف شرط",iconRight:"trash",rounded:"xs",isOutline:"",variant:a(De).DANGER,onClicked:l[36]||(l[36]=o=>S("deleteCondition"))},null,8,["variant"])):L("",!0),i(a(Ie),{class:"queue-settings-savebar__button queue-settings-savebar__button--primary",title:E.isEdit?"ذخیره تغییرات":"ایجاد شرط",iconRight:"check",rounded:"xs",loading:E.loading,onClicked:P},null,8,["title","loading"])])]),d.value?(_(),k(a(Q),{key:0,title:"آیا تصویر پس‌زمینه حذف شود؟",onCloseModal:l[37]||(l[37]=o=>d.value=!1),onRemovedConfirm:l[38]||(l[38]=o=>H("tool_list_dq_item_background_file"))})):L("",!0),y.value?(_(),k(a(Q),{key:1,title:"آیا پترن پس‌زمینه حذف شود؟",onCloseModal:l[39]||(l[39]=o=>y.value=!1),onRemovedConfirm:l[40]||(l[40]=o=>H("tool_list_dq_item_background_link_pattern_file"))})):L("",!0)])}}},Le=Se(Fl,[["__scopeId","data-v-9726f7f4"]]),Ll={class:"queue-tool-page"},Sl={class:"queue-tool-hero"},Ml={class:"queue-tool-hero__icon"},Dl={class:"queue-tool-link-card"},Tl={class:"queue-tool-link-card__control"},Nl={class:"queue-tool-link-value",dir:"ltr"},Ol=["disabled"],Rl={class:"queue-tool-link-actions"},Bl=["disabled"],El={class:"queue-tool-layout"},xl={class:"queue-conditions"},Hl={class:"queue-conditions__header"},Zl={class:"queue-conditions__overview-copy"},Al={class:"queue-conditions__overview-icon"},zl={key:0,class:"queue-condition queue-condition--active"},Pl={class:"queue-condition__number"},jl={class:"queue-condition__editor"},Kl={class:"queue-condition__form"},Gl={class:"queue-threshold-card"},Wl={class:"queue-threshold-card__amount"},Yl={class:"queue-threshold-card__amount-control"},hl=["onClick"],Jl={class:"queue-condition__number"},Ql={class:"queue-condition__copy"},Xl={key:0,class:"queue-condition__editor"},et={class:"queue-condition__form"},lt={class:"queue-threshold-card"},tt={class:"queue-threshold-card__amount"},ot={class:"queue-threshold-card__amount-control"},nt={key:1,class:"queue-conditions__empty"}
1,it={__name:"order_list",setup(E){Re({title:"لیست نوبتی حمایت‌ها"});const X=Qe("tools_list","لیست نوبتی حمایت‌ها"),$=r([]),S=r([]),f=r(""),D=r(!0),n=r(!1),C=r(!1),I=r(!1),w=r(null),b=r(""),d=r({data:[],condition:0,overlayId:""}),y=r({}),M=r({}),O=r(!1),R=r(!1),ee=Be(()=>{const s=$.value.map(t=>({id:t.editorId,condition:t.condition,settings:W(t.data)}));if(b.value==="create")s.push({id:"new",condition:Number(d.value.condition||0),settings:{...y.value}});else if(b.value==="edit"){const t=s.findIndex(u=>u.id===w.value);t>=0&&(s[t]={...s[t],condition:Number(d.value.condition||0),settings:{...y.value}})}return s.sort((t,u)=>u.condition-t.condition)});Ee(x);async function x(s={}){var N,q,ie,se,ae,ue,de;const{silent:t=!1,reopenOverlayId:u="",createdCondition:U=null,knownOverlayIds:m=[]}=s;t||(D.value=!0);try{const le=(se=(ie=(q=(N=(await We()).data)==null?void 0:N[0])==null?void 0:q.children)==null?void 0:ie.data)==null?void 0:se.find(p=>p.type==="tool_list"),te=(ue=(ae=le==null?void 0:le.children)==null?void 0:ae.data)==null?void 0:ue.find(p=>p.type==="tool_list_dq"),re=(de=te==null?void 0:te.settings)==null?void 0:de.data;if(!re)throw new Error("تنظیمات لیست نوبتی پیدا نشد.");const _e=[];re.forEach((p,h)=>{var me,pe,ce,ge,fe,be,ye,qe;if(p.condition==="C-NORMAL")f.value=((ce=(pe=(me=p.settings)==null?void 0:me.data)==null?void 0:pe.find(oe=>oe.key==="tool_key"))==null?void 0:ce.value)||"";else if(p.condition==="C-DEFAULT")S.value=T((ge=p.settings)==null?void 0:ge.data);else{const oe=Number(((be=(fe=p.condition)==null?void 0:fe.split("-"))==null?void 0:be[1])||0),Ve=T((ye=p.settings)==null?void 0:ye.data),ne=((qe=Ve.find(Oe=>Oe.key==="tool_list_dq_id"))==null?void 0:qe.value)||"";_e.push({id:h,editorId:ne?`overlay-${ne}`:`condition-${h}`,overlayId:ne,condition:oe,data:Ve})}}),$.value=_e.sort((p,h)=>p.condition-h.condition);const ve=u?$.value.find(p=>p.overlayId===u):U!==null?$.value.find(p=>p.condition===U&&!m.includes(p.overlayId))||[...$.value].reverse().find(p=>p.condition===U):null;ve&&H(ve)}catch(Y){V().$toast.error((Y==null?void 0:Y.message)||"دریافت تنظیمات ابزار انجام نشد.",{theme:"colored",type:"error",dangerouslyHTMLString:!0})}finally{t||(D.value=!1)}}function P(){b.value="create",w.value="new",M.value={},d.value={data:T(S.value),condition:0,overlayId:""},y.value=W(d.value.data)}function j(s){if(w.value===s.editorId)return B();H(s)}function H(s){b.value="edit",w.value=s.editorId,M.value={},d.value={...s,data:T(s.data)},y.value=W(d.value.data)}function B(){w.value=null,b.value=""}async function Z(s){if(n.value)return;const t=Number(d.value.condition);if(!Number.isFinite(t)||t<0){V().$toast.error("مبلغ شرط معتبر نیست.",{theme:"colored",type:"error"});return}n.value=!0;const u=b.value,U=d.value.overlayId,m=$.value.map(q=>q.overlayId),N={...s,condition_value:t,...M.value};u==="edit"&&(N.overlay_id=U);try{await Ye(N),await x({silent:!0,reopenOverlayId:u==="edit"?U:"",createdCondition:u==="create"?t:null,knownOverlayIds:m}),V().$toast.success(u==="edit"?"شرط با موفقیت ویرایش شد.":"شرط جدید با موفقیت ساخته شد.",{theme:"colored",dangerouslyHTMLString:!0})}catch(q){V().$toast.error(q.message,{theme:"colored",type:"error",dangerouslyHTMLString:!0})}finally{n.value=!1}}function v(s){M.value={...M.value,[s.key]:`F::${s.id}`}}async function l(s){delete M.value[s];const t=d.value.data.find(u=>u.key===s);if(t&&(t.value=null),b.value==="edit")try{await je(s,{condition_value:Number(d.value.condition),overlay_id:d.value.overlayId}),V().$toast.success("فایل با موفقیت حذف شد.",{theme:"colored",dangerouslyHTMLString:!0})}catch(u){V().$toast.error(u.message||"حذف فایل انجام نشد.",{theme:"colored",type:"error"})}}async function c(){if(!(C.value||!d.value.overlayId)){C.value=!0;try{await he({overlay_id:d.value.overlayId}),R.value=!1,B(),await x({silent:!0}),V().$toast.success("شرط با موفقیت حذف شد.",{theme:"colored",dangerouslyHTMLString:!0})}catch(s){V().$toast.error(s.message,{theme:"colored",type:"error",dangerouslyHTMLString:!0})}finally{C.value=!1}}}async function o(){if(!I.value){I.value=!0;try{const s=await Je("tool_list_dq");f.value=s.data.tool_key,O.value=!1,V().$toast.success("کلید جدید ایجاد شد.",{theme:"colored",dangerouslyHTMLString:!0})}catch(s){V().$toast.error(s.message,{theme:"colored",type:"error",dangerouslyHTMLString:!0})}finally{I.value=!1}}}async function K(s){if(s)try{await navigator.clipboard.writeText(s),V().$toast.success("لینک ابزار کپی شد.",{theme:"colored",dangerouslyHTMLString:!0})}catch{V().$toast.error("کپی لینک انجام نشد.",{theme:"colored",type:"error"})}}function G(s){const t=s==null?void 0:s.split("/overlays/")[1];t&&window.open(`/overlays/${t}`)}function T(s=[]){return s.map(t=>({...t}))}function W(s=[]){return Object.fromEntries(s.map(t=>[t.key,t.value]))}
1function Te(s){return Number(s||0).toLocaleString("fa-IR")}function Ne(s){const t=W(s.data),u=Number(t.tool_list_dq_items_count||1).toLocaleString("fa-IR"),U=Number(t.tool_list_dq_timing_visible_duration||0).toLocaleString("fa-IR");return`${u} آیتم هم‌زمان · ${U} ثانیه نمایش`}return(s,t)=>{const u=Me("font-awesome-icon"),U=Ze;return _(),F("div",Ll,[i(a(ze),{breads:a(X),class:"queue-tool-page__breadcrumb"},null,8,["breads"]),e("section",Sl,[e("span",Ml,[i(u,{icon:"clock"})]),t[11]||(t[11]=e("div",{class:"queue-tool-hero__copy"},[e("span",null,"نمایش شرطی حمایت‌ها"),e("h1",null,"لیست نوبتی حمایت‌ها"),e("p",null,"برای بازه‌های مختلف مبلغ، ظاهر و مدت نمایش جدا بسازید تا حمایت‌ها به‌ترتیب در پخش دیده شوند.")],-1)),i(U,{to:"/panel/tools/tool_list",class:"queue-tool-hero__back"},{default:xe(()=>[i(u,{icon:"bars"}),t[10]||(t[10]=e("span",null,"همه لیست‌ها",-1))]),_:1})]),D.value?(_(),k(Ge,{key:0,label:"در حال دریافت شرط‌های لیست نوبتی…"})):(_(),F(Ce,{key:1},[e("section",Dl,[t[14]||(t[14]=e("div",{class:"queue-tool-link-card__copy"},[e("span",null,"لینک OBS"),e("h2",null,"آدرس ابزار"),e("p",null,"همه شرط‌های این لیست از همین لینک مشترک استفاده می‌کنند.")],-1)),e("div",Tl,[e("div",Nl,[e("span",null,J(f.value||"لینک ابزار در دسترس نیست"),1),e("button",{type:"button","aria-label":"کپی لینک ابزار",disabled:!f.value,onClick:t[0]||(t[0]=m=>K(f.value))},[i(u,{icon:"copy"})],8,Ol)]),e("div",Rl,[e("button",{type:"button",disabled:!f.value,onClick:t[1]||(t[1]=m=>G(f.value))},[i(u,{icon:"eye"}),t[12]||(t[12]=e("span",null,"مشاهده خروجی",-1))],8,Bl),e("button",{type:"button",onClick:t[2]||(t[2]=m=>O.value=!0)},[i(u,{icon:"rotate"}),t[13]||(t[13]=e("span",null,"ساخت لینک جدید",-1))])])])]),e("div",El,[e("section",xl,[e("header",Hl,[e("div",Zl,[e("span",Al,[i(u,{icon:"sliders"})]),t[15]||(t[15]=e("div",null,[e("h2",null,"شرط‌های مبلغ"),e("p",null,"هر شرط را باز کنید و ظاهر حمایت‌های آن بازه را مستقل تغییر دهید.")],-1))]),e("button",{type:"button",class:"queue-conditions__add",onClick:P},[i(u,{icon:"plus"}),t[16]||(t[16]=e("span",null,"شرط جدید",-1))])]),b.value==="create"?(_(),F("article",zl,[e("button",{type:"button",class:"queue-condition__summary",onClick:B},[e("span",Pl,[i(u,{icon:"plus"})]),t[17]||(t[17]=e("span",{class:"queue-condition__copy"},[e("strong",null,"شرط جدید"),e("small",null,"حداقل مبلغ و ظاهر این گروه را مشخص کنید.")],-1)),t[18]||(t[18]=e("span",{class:"queue-condition__status"},"در حال ساخت",-1)),i(u,{icon:"chevron-down"})]),e("div",jl,[e("div",Kl,[e("div",Gl,[e("span",null,[i(u,{icon:"filter"})]),t[21]||(t[21]=e("div",null,[e("strong",null,"حداقل مبلغ حمایت"),e("small",null,"حمایت‌های برابر یا بیشتر از این مبلغ وارد گروه می‌شوند.")],-1)),e("div",Wl,[t[20]||(t[20]=e("label",null,"مبلغ (تومان)",-1)),e("div",Yl,[i(a(g),{label:"",type:"number",ltr:"",modelValue:d.value.condition,"onUpdate:modelValue":t[3]||(t[3]=m=>d.value.condition=m)},null,8,["modelValue"]),t[19]||(t[19]=e("span",null,"تومان",-1))])])]),i(Le,{data:d.value.data,loading:n.value,onSendData:Z,onUploadFile:v,onRemoveFile:l,onPreviewChange:t[4]||(t[4]=m=>y.value=m)},null,8,["data","loading"])])])])):L("",!0),(_(!0),F(Ce,null,He($.value,(m,N)=>(_(),F("article",{key:m.editorId,class:Ae(["queue-condition",{"queue-condition--active":w.value===m.editorId}])},[e("button",{type:"button",class:"queue-condition__summary",onClick:q=>j(m)},[e("span",Jl,J((N+1).toLocaleString("fa-IR")),1),e("span",Ql,[e("strong",null,"حمایت از "+J(Te(m.condition))+" تومان",1),e("small",null,J(Ne(m)),1)]),t[22]||(t[22]=e("span",{class:"queue-condition__status"},"فعال",-1)),i(u,{icon:w.value===m.editorId?"chevron-down":"chevron-left"},null,8,["icon"])],8,hl),w.value===m.editorId?(_(),F("div",Xl,[e("div",et,[e("div",lt,[e("span",null,[i(u,{icon:"filter"})]),t[25]||(t[25]=e("div",null,[e("strong",null,"حداقل مبلغ حمایت"),e("small",null,"حمایت‌های برابر یا بیشتر از این مبلغ وارد گروه می‌شوند.")],-1)),e("div",tt,[t[24]||(t[24]=e("label",null,"مبلغ (تومان)",-1)),e("div",ot,[i(a(g),{label:"",type:"number",ltr:"",modelValue:d.value.condition,"onUpdate:modelValue":t[5]||(t[5]=q=>d.value.condition=q)},null,8,["modelValue"]),t[23]||(t[23]=e("span",null,"تومان",-1))])])]),i(Le,{data:d.value.data,isEdit:!0,loading:n.value,onSendData:Z,onDeleteCondition:t[6]||(t[6]=q=>R.value=!0),onUploadFile:v,onRemoveFile:l,onPreviewChange:t[7]||(t[7]=q=>y.value=q)},null,8,["data","loading"])])])):L("",!0)],2))),128)),!$.value.length&&b.value!=="create"?(_(),F("div",nt,[e("span",null,[i(u,{icon:"filter"})]),t[26]||(t[26]=e("strong",null,"هنوز شرطی ساخته نشده است",-1)),t[27]||(t[27]=e("p",null,"برای شروع، اولین حداقل مبلغ را تعریف کنید.",-1)),e("button",{type:"button",onClick:P},"ایجاد اولین شرط")])):L("",!0)]),i(Ke,{settings:y.value,groups:ee.value,type:"tool_list_dq",conditional:""},null,8,["settings","groups"])])],64)),O.value?(_(),k(a(Q),{key:2,errorTitle:"ساخت کلید جدید",title:"آیا کلید ابزار لیست حمایت‌ها دوباره ایجاد شود؟",loading:I.value,onCloseModal:t[8]||(t[8]=m=>O.value=!1),errorVariant:a(De).PRIMARY,description:"با تغییر کلید ابزار، آدرس Browser Source در OBS را نیز باید به‌روزرسانی Ú©Ù
1†ÛŒØ¯.",onRemovedConfirm:o},null,8,["loading","errorVariant"])):L("",!0),R.value?(_(),k(a(Q),{key:3,title:"آیا این شرط حذف شود؟",loading:C.value,onCloseModal:t[9]||(t[9]=m=>R.value=!1),onRemovedConfirm:c},null,8,["loading"])):L("",!0)])}}},Dt=Se(it,[["__scopeId","data-v-012a9f2b"]]);export{Dt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.