vendor: 5,194 bytes, line 1
1import{aV as Tt,I as Ee,J as Be,a1 as cl,U as fl,aI as Pt,r as V,e as j,p as Je,m as et,q as we,b as s,a as o,Z as ne,O as vt,P as qe,R as vl,X as ml,l as Et,$ as nt,v as mt,Q as at,L as ht,aA as Bt,aW as _t,a4 as hl,F as _e,a0 as J,a9 as gl,aC as Ft,N as pl,aX as yl,ab as At,c as N,o as G,w as p,d as E,t as w,y as f,ad as bl,G as ot,ac as ae,aY as zt,aa as wl,a7 as xl,A as Cl,ai as Z,aZ as Ge,a8 as We,ae as St}from"./CZKrCW95.js";import{_ as Dt}from"./DlAUqK2U.js";import{a as Vl,c as $t,m as Ll,V as st,b as Pe}from"./B0el_ozC.js";import{b as Qe,V as rt,a as it,c as ut}from"./BfmgkWTs.js";import{u as Ml,m as kl,V as Ke}from"./Bjiwuuh6.js";import{a as _l,V as q,l as Sl,n as $l,p as Il,u as Rl,b as Tl,i as Pl}from"./C3jY5UVn.js";import{V as ue}from"./DKHrIh8-.js";import{V as El}from"./Be8c3Z76.js";import{V as Bl}from"./DmlxHzSo.js";import{V as Fl}from"./4iuXTIOT.js";import{u as Al,V as It,c as Rt,d as zl,e as Dl,m as Ul,g as Ut}from"./atoFrtZJ.js";import{V as Ol}from"./Dh4j_8FL.js";import{f as Ot,b as Gl,s as Wl}from"./B7AGmgI6.js";import{u as Fe}from"./CLDV_6GI.js";import{a as ql,u as jl}from"./DKc_LwJd.js";import{m as Gt,a as Wt}from"./Bumdt7pZ.js";import{u as Hl}from"./Ba5Nsn-A.js";import{M as Nl}from"./CEZ3J8n-.js";import{u as Yl}from"./Bs79FSaB.js";const Xl=e=>{const{touchstartX:u,touchendX:r,touchstartY:a,touchendY:y}=e,x=.5,i=16;e.offsetX=r-u,e.offsetY=y-a,Math.abs(e.offsetY)<x*Math.abs(e.offsetX)&&(e.left&&r<u-i&&e.left(e),e.right&&r>u+i&&e.right(e)),Math.abs(e.offsetX)<x*Math.abs(e.offsetY)&&(e.up&&y<a-i&&e.up(e),e.down&&y>a+i&&e.down(e))};function Ql(e,u){var a;const r=e.changedTouches[0];u.touchstartX=r.clientX,u.touchstartY=r.clientY,(a=u.start)==null||a.call(u,{originalEvent:e,...u})}function Kl(e,u){var a;const r=e.changedTouches[0];u.touchendX=r.clientX,u.touchendY=r.clientY,(a=u.end)==null||a.call(u,{originalEvent:e,...u}),Xl(u)}function Jl(e,u){var a;const r=e.changedTouches[0];u.touchmoveX=r.clientX,u.touchmoveY=r.clientY,(a=u.move)==null||a.call(u,{originalEvent:e,...u})}function Zl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const u={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:r=>Ql(r,u),touchend:r=>Kl(r,u),touchmove:r=>Jl(r,u)}}function en(e,u){var M;const r=u.value,a=r!=null&&r.parent?e.parentElement:e,y=(r==null?void 0:r.options)??{passive:!0},x=(M=u.instance)==null?void 0:M.$.uid;if(!a||!x)return;const i=Zl(u.value);a._touchHandlers=a._touchHandlers??Object.create(null),a._touchHandlers[x]=i,Tt(i).forEach(T=>{a.addEventListener(T,i[T],y)})}function tn(e,u){var x,i;const r=(x=u.value)!=null&&x.parent?e.parentElement:e,a=(i=u.instance)==null?void 0:i.$.uid;if(!(r!=null&&r._touchHandlers)||!a)return;const y=r._touchHandlers[a];Tt(y).forEach(M=>{r.removeEventListener(M,y[M])}),delete r._touchHandlers[a]}const dt={mounted:en,unmounted:tn},qt=Symbol.for("vuetify:v-window"),jt=Symbol.for("vuetify:v-window-group"),Ht=Be({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...Wt(),...Gt(),...vl()},"VWindow"),ct=Ee()({name:"VWindow",directives:{vTouch:dt},props:Ht(),emits:{"update:modelValue":e=>!0},setup(e,u){let{slots:r}=u;const{themeClasses:a}=cl(e),{isRtl:y}=fl(),{t:x}=Pt(),i=_l(e,jt),M=V(),T=j(()=>y.value?!e.reverse:e.reverse),z=Je(!1),Y=j(()=>{const m=e.direction==="vertical"?"y":"x",h=(T.value?!z.value:z.value)?"-reverse":"";return`v-window-${m}${h}-transition`}),W=Je(0),$=V(void 0),A=j(()=>i.items.value.findIndex(m=>i.selected.value.includes(m.id)));et(A,(m,g)=>{const h=i.items.value.length,F=h-1;h<=2?z.value=m<g:m===F&&g===0?z.value=!0:m===0&&g===F?z.value=!1:z.value=m<g}),ml(qt,{transition:Y,isReversed:z,transitionCount:W,transitionHeight:$,rootRef:M});const B=we(()=>e.continuous||A.value!==0),O=we(()=>e.continuous||A.value!==i.items.value.length-1);function ee(){B.value&&i.prev()}function D(){O.value&&i.next()}const H=j(()=>{const m=[],g={icon:y.value?e.nextIcon:e.prevIcon,class:`v-window__${T.value?"right":"left"}`,onClick:i.prev,"aria-label":x("$vuetify.carousel.prev")};m.push(B.value?r.prev?r.prev({props:g}):s(q,g,null):o("div",null,null));const h={icon:y.value?e.prevIcon:e.nextIcon,class:`v-window__${T.value?"left":"right"}`,onClick:i.next,"aria-label":x("$vuetify.carousel.next")};return m.push(O.value?r.next?r.next({props:h}):s(q,h,null):o("div",null,null)),m}),v=j(()=>e.touch===!1?e.touch:{...{left:()=>{T.value?ee():D()},right:()=>{T.value?D():ee()},start:g=>{let{originalEvent:h}=g;h.stopPropagation()}},...e.touch===!0?{}:e.touch});return Fe(()=>ne(s(e.tag,{ref:M,class:qe(["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},a.value,e.class]),style:vt(e.style)}
1,{default:()=>{var m,g;return[o("div",{class:"v-window__container",style:{height:$.value}},[(m=r.default)==null?void 0:m.call(r,{group:i}),e.showArrows!==!1&&o("div",{class:"v-window__controls"},[H.value])]),(g=r.additional)==null?void 0:g.call(r,{group:i})]}}),[[dt,v.value]])),{group:i}}}),Nt=Be({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Wt(),...$l(),...kl()},"VWindowItem"),Ze=Ee()({name:"VWindowItem",directives:{vTouch:dt},props:Nt(),emits:{"group:selected":e=>!0},setup(e,u){let{slots:r}=u;const a=Et(qt),y=Sl(e,jt),{isBooted:x}=Hl();if(!a||!y)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const i=Je(!1),M=j(()=>x.value&&(a.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function T(){!i.value||!a||(i.value=!1,a.transitionCount.value>0&&(a.transitionCount.value-=1,a.transitionCount.value===0&&(a.transitionHeight.value=void 0)))}function z(){var B;i.value||!a||(i.value=!0,a.transitionCount.value===0&&(a.transitionHeight.value=at((B=a.rootRef.value)==null?void 0:B.clientHeight)),a.transitionCount.value+=1)}function Y(){T()}function W(B){i.value&&mt(()=>{!M.value||!i.value||!a||(a.transitionHeight.value=at(B.clientHeight))})}const $=j(()=>{const B=a.isReversed.value?e.reverseTransition:e.transition;return M.value?{name:typeof B!="string"?a.transition.value:B,onBeforeEnter:z,onAfterEnter:T,onEnterCancelled:Y,onBeforeLeave:z,onAfterLeave:T,onLeaveCancelled:Y,onEnter:W}:!1}),{hasContent:A}=Ml(e,y.isSelected);return Fe(()=>s(Nl,{transition:$.value,disabled:!x.value},{default:()=>{var B;return[ne(o("div",{class:qe(["v-window-item",y.selectedClass.value,e.class]),style:vt(e.style)},[A.value&&((B=r.default)==null?void 0:B.call(r))]),[[nt,y.isSelected.value]])]}})),{groupItem:y}}});function ln(){function e(r){var y,x;return[...((y=r.dataTransfer)==null?void 0:y.items)??[]].filter(i=>i.kind==="file").map(i=>i.webkitGetAsEntry()).filter(Boolean).length>0||[...((x=r.dataTransfer)==null?void 0:x.files)??[]].length>0}async function u(r){var x,i;const a=[],y=[...((x=r.dataTransfer)==null?void 0:x.items)??[]].filter(M=>M.kind==="file").map(M=>M.webkitGetAsEntry()).filter(Boolean);if(y.length)for(const M of y){const T=await Yt(M,Xt(".",M));a.push(...T.map(z=>z.file))}else a.push(...((i=r.dataTransfer)==null?void 0:i.files)??[]);return a}return{handleDrop:u,hasFilesOrFolders:e}}function Yt(e){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Promise((r,a)=>{e.isFile?e.file(x=>r([{file:x,path:u}]),a):e.isDirectory&&e.createReader().readEntries(async x=>{const i=[];for(const M of x)i.push(...await Yt(M,Xt(u,M)));r(i)})})}function Xt(e,u){return u.isDirectory?`${e}/${u.name}`:e}const nn=Be({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:e=>typeof e=="boolean"||[1e3,1024].includes(Number(e))},...Ul({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>Bt(e).every(u=>u!=null&&typeof u=="object")},...Dl({clearable:!0})},"VFileInput"),an=Ee()({name:"VFileInput",inheritAttrs:!1,props:nn(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,u){let{attrs:r,emit:a,slots:y}=u;const{t:x}=Pt(),i=ht(e,"modelValue",e.modelValue,C=>Bt(C),C=>!e.multiple&&Array.isArray(C)?C[0]:C),{isFocused:M,focus:T,blur:z}=Al(e),Y=j(()=>typeof e.showSize!="boolean"?e.showSize:void 0),W=j(()=>(i.value??[]).reduce((C,P)=>{let{size:le=0}=P;return C+le},0)),$=j(()=>_t(W.value,Y.value)),A=j(()=>(i.value??[]).map(C=>{const{name:P="",size:le=0}=C;return e.showSize?`${P} (${_t(le,Y.value)})`:P})),B=j(()=>{var P;const C=((P=i.value)==null?void 0:P.length)??0;return e.showSize?x(e.counterSizeString,C,$.value):x(e.counterString,C)}),O=V(),ee=V(),D=V(),H=we(()=>M.value||e.active),v=j(()=>["plain","underlined"].includes(e.variant)),m=Je(!1),{handleDrop:g,hasFilesOrFolders:h}=ln();function F(){var C;D.value!==document.activeElement&&((C=D.value)==null||C.focus()),M.value||T()}function X(C){var P;(P=D.value)==null||P.click()}function de(C){a("mousedown:control",C)}function te(C){var P;(P=D.value)==null||P.click(),a("click:control",C)}function he(C){C.stopPropagation(),F(),mt(()=>{i.value=[],gl(e["onClick:clear"],C)})}function Ue(C){C.preventDefault(),C.stopImmediatePropagation(),m.value=!0}function xe(C){C.preventDefault(),m.value=!1}async function Oe(C){if(C.preventDefault(),C.stopImmediatePropagation(),m.value=!1,!D.value||!h(C))return;const P=new DataTransfer;for(const le of await g(C))P.items.add(le);D.value.files=P.files,D.value.dispatchEvent(new Event("change",{bubbles:!0}))}return et(i,C=>{(!Array.isArray(C)||!C.length)&&D.value&&(D.value.value="")}
vendor: 5,627 bytes, line 1
1),Fe(()=>{const C=!!(y.counter||e.counter),P=!!(C||y.details),[le,Ce]=hl(r),{modelValue:Se,...je}=It.filterProps(e),Ve=Rt.filterProps(e);return s(It,J({ref:O,modelValue:e.multiple?i.value:i.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":m.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":v.value},e.class],style:e.style,"onClick:prepend":X},le,je,{centerAffix:!v.value,focused:M.value}),{...y,default:ce=>{let{id:oe,isDisabled:se,isDirty:$e,isReadonly:Ae,isValid:ge}=ce;return s(Rt,J({ref:ee,"prepend-icon":e.prependIcon,onMousedown:de,onClick:te,"onClick:clear":he,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},Ve,{id:oe.value,active:H.value||$e.value,dirty:$e.value||e.dirty,disabled:se.value,focused:M.value,error:ge.value===!1,onDragover:Ue,onDrop:Oe}),{...y,default:pe=>{var re;let{props:{class:Ie,...He}}=pe;return o(_e,null,[o("input",J({ref:D,type:"file",readonly:Ae.value,disabled:se.value,multiple:e.multiple,name:e.name,onClick:I=>{I.stopPropagation(),Ae.value&&I.preventDefault(),F()},onChange:I=>{if(!I.target)return;const Le=I.target;i.value=[...Le.files??[]]},onDragleave:xe,onFocus:F,onBlur:z},He,Ce),null),o("div",{class:qe(Ie)},[!!((re=i.value)!=null&&re.length)&&!e.hideInput&&(y.selection?y.selection({fileNames:A.value,totalBytes:W.value,totalBytesReadable:$.value}):e.chips?A.value.map(I=>s(Vl,{key:I,size:"small",text:I},null)):A.value.join(", "))])])}})},details:P?ce=>{var oe,se;return o(_e,null,[(oe=y.details)==null?void 0:oe.call(y,ce),C&&o(_e,null,[o("span",null,null),s(zl,{active:!!((se=i.value)!=null&&se.length),value:B.value,disabled:e.disabled},y.counter)])])}:void 0})}),Ot({},O,ee,D)}}),gt=Symbol.for("vuetify:v-tabs"),on=Be({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...Ft(Il({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),ft=Ee()({name:"VTab",props:on(),setup(e,u){let{slots:r,attrs:a}=u;const{textColorClasses:y,textColorStyles:x}=ql(()=>e.sliderColor),i=V(),M=V(),T=j(()=>e.direction==="horizontal"),z=j(()=>{var W,$;return(($=(W=i.value)==null?void 0:W.group)==null?void 0:$.isSelected.value)??!1});function Y(W){var A,B;let{value:$}=W;if($){const O=(B=(A=i.value)==null?void 0:A.$el.parentElement)==null?void 0:B.querySelector(".v-tab--selected .v-tab__slider"),ee=M.value;if(!O||!ee)return;const D=getComputedStyle(O).color,H=O.getBoundingClientRect(),v=ee.getBoundingClientRect(),m=T.value?"x":"y",g=T.value?"X":"Y",h=T.value?"right":"bottom",F=T.value?"width":"height",X=H[m],de=v[m],te=X>de?H[h]-v[h]:H[m]-v[m],he=Math.sign(te)>0?T.value?"right":"bottom":Math.sign(te)<0?T.value?"left":"top":"center",xe=(Math.abs(te)+(Math.sign(te)<0?H[F]:v[F]))/Math.max(H[F],v[F])||0,Oe=H[F]/v[F]||0,C=1.5;Gl(ee,{backgroundColor:[D,"currentcolor"],transform:[`translate${g}(${te}px) scale${g}(${Oe})`,`translate${g}(${te/C}px) scale${g}(${(xe-1)/C+1})`,"none"],transformOrigin:Array(3).fill(he)},{duration:225,easing:Wl})}}return Fe(()=>{const W=q.filterProps(e);return s(q,J({symbol:gt,ref:i,class:["v-tab",e.class],style:e.style,tabindex:z.value?0:-1,role:"tab","aria-selected":String(z.value),active:!1},W,a,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":Y}),{...r,default:()=>{var $;return o(_e,null,[(($=r.default)==null?void 0:$.call(r))??e.text,!e.hideSlider&&o("div",{ref:M,class:qe(["v-tab__slider",y.value]),style:vt(x.value)},null)])}})}),Ot({},i)}}),sn=Be({...Ft(Ht(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VTabsWindow"),rn=Ee()({name:"VTabsWindow",props:sn(),emits:{"update:modelValue":e=>!0},setup(e,u){let{slots:r}=u;const a=Et(gt,null),y=ht(e,"modelValue"),x=j({get(){var i;return y.value!=null||!a?y.value:(i=a.items.value.find(M=>a.selected.value.includes(M.id)))==null?void 0:i.value},set(i){y.value=i}});return Fe(()=>{const i=ct.filterProps(e);return s(ct,J({_as:"VTabsWindow"},i,{modelValue:x.value,"onUpdate:modelValue":M=>x.value=M,class:["v-tabs-window",e.class],style:e.style,mandatory:!1,touch:!1}),r)}),{}}}),un=Be({...Nt()},"VTabsWindowItem"),dn=Ee()({name:"VTabsWindowItem",props:un(),setup(e,u){let{slots:r}=u;return Fe(()=>{const a=Ze.filterProps(e);return s(Ze,J({_as:"VTabsWindowItem"},a,{class:["v-tabs-window-item",e.class],style:e.style}),r)}),{}}});function cn(e){return e?e.map(u=>yl(u)?u:{text:u,value:u}):[]}const fn=Be({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...Ll({mandatory:"force",selectedClass:"v-tab-item--selected"}),...Tl(),...Gt()},"VTabs"),vn=Ee()({name:"VTabs",props:fn(),emits:{"update:modelValue":e=>!0},setup(e,u){let{attrs:r,slots:a}=u;const y=ht(e,"modelValue"),x=j(()=>cn(e.items)),{densityClasses:i}=Rl(e),{backgroundColorClasses:M,backgroundColorStyles:T}=jl(()=>e.bgColor),{scopeId:z}=Yl();return pl({VTab:{color:we(()=>e.color),direction:we(()=>e.direction),stacked:we(()=>e.stacked),fixed:we(()=>e.fixedTabs),sliderColor:we(()=>e.sliderColor),hideSlider:we(()=>e.hideSlider)}}),Fe(()=>{const Y=$t.filterProps(e),W=!!(a.window||e.items.length>0);return o(_e,null,[s($t,J(Y,{modelValue:y.value,"onUpdate:modelValue":$=>y.value=$,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},i.value,M.value,e.class],style:[{"--v-tabs-height":at(e.height)}
1,T.value,e.style],role:"tablist",symbol:gt},z,r),{default:()=>{var $;return[(($=a.default)==null?void 0:$.call(a))??x.value.map(A=>{var B;return((B=a.tab)==null?void 0:B.call(a,{item:A}))??s(ft,J(A,{key:A.text,value:A.value}),{default:a[`tab.${A.value}`]?()=>{var O;return(O=a[`tab.${A.value}`])==null?void 0:O.call(a,{item:A})}:void 0})})]}}),W&&s(rn,J({modelValue:y.value,"onUpdate:modelValue":$=>y.value=$,key:"tabs-window"},z),{default:()=>{var $;return[x.value.map(A=>{var B;return((B=a.item)==null?void 0:B.call(a,{item:A}))??s(dn,{value:A.value},{default:()=>{var O;return(O=a[`item.${A.value}`])==null?void 0:O.call(a,{item:A})}})}),($=a.window)==null?void 0:$.call(a)]}})])}),{}}}),mn={class:"d-flex flex-column gap-4 mt-4"},hn=["innerHTML"],gn={style:{"font-size":"18px"}},pn={class:"svg-preview-edit__hint"},yn={__name:"SvgPreviewModal",props:{modelValue:Boolean,letters:{type:Array,default:()=>[]},availableLetters:{type:Array,default:()=>[]}},emits:["update:modelValue","isReplaceLetter","update-letter"],setup(e,{emit:u}){const r=e,{t:a}=At(),y=u,x=V([]),i=V(!1),M=V(-1),T=V(""),z=v=>Array.isArray(v)?v.map(m=>({...m||{}})):[];et(()=>r.letters,v=>{x.value=z(v)},{immediate:!0,deep:!0});const Y=v=>{const m=[];return Array.isArray(v)&&v.forEach(g=>{if(!(!g||typeof g!="object")){if(Array.isArray(g.letter)){g.letter.forEach(h=>{h&&typeof h=="object"&&m.push({...h,value:h.value??g.value,classLang:h.classLang??g.classLang})});return}typeof g.letter=="string"&&m.push(g)}}),m},W=v=>{const m=String(v||"").trim();return m&&Y(r.availableLetters).find(g=>String((g==null?void 0:g.letter)??"")===m)||null},$=v=>Array.from(String(v||"")).map(m=>m.codePointAt(0)).filter(Boolean),A=(v,m)=>{const g=String(m||"").trim(),h=W(g),F=$(g),X=(h==null?void 0:h.ligature)??F.length>1,de=(h==null?void 0:h.decimal)??(F.length===1?F[0]:F.join(","));return{...v,...h,letter:(h==null?void 0:h.letter)??g,decimal:de,classLang:(h==null?void 0:h.classLang)??(v==null?void 0:v.classLang),order:(h==null?void 0:h.order)??(v==null?void 0:v.order),orderLetter:(h==null?void 0:h.orderLetter)??(v==null?void 0:v.orderLetter),value:(h==null?void 0:h.value)??(v==null?void 0:v.value),ligature:!!X,ligDecimals:(h==null?void 0:h.ligDecimals)??(X?F.join(","):null),svg:(v==null?void 0:v.svg)??(h==null?void 0:h.svg)??null,image:(v==null?void 0:v.image)??(h==null?void 0:h.image)??null}},B=()=>{y("update:modelValue",!1)},O=v=>{y("isReplaceLetter",{replaceLetter:v,letters:z(x.value)})},ee=(v,m)=>{M.value=m,T.value=String((v==null?void 0:v.letter)??""),i.value=!0},D=()=>{i.value=!1,M.value=-1,T.value=""},H=()=>{const v=M.value,m=T.value.trim();if(!m||v<0||!Array.isArray(x.value)||!x.value[v])return;const g=A(x.value[v],m);x.value.splice(v,1,g),y("update-letter",{index:v,letter:g}),D()};return(v,m)=>(G(),N(_e,null,[s(st,{"model-value":r.modelValue,"onUpdate:modelValue":B,"max-width":"1100px",persistent:""},{default:p(()=>[s(Qe,null,{default:p(()=>[s(rt,null,{default:p(()=>[E(w(f(a)("modalLoadManual.svgPreview"))+" ",1),s(Ke),s(q,{icon:"",onClick:B},{default:p(()=>[s(ue,null,{default:p(()=>m[4]||(m[4]=[E("mdi-close")])),_:1,__:[4]})]),_:1})]),_:1}),o("div",mn,[s(q,{color:"primary",class:"text-white text-lg font-bold","prepend-icon":"mdi-plus-box",onClick:m[0]||(m[0]=g=>O(!0))},{default:p(()=>[E(w(f(a)("modalLoadManual.addAsNewFont")),1)]),_:1}),s(q,{color:"success",class:"text-white text-lg font-bold mt-2","prepend-icon":"mdi-plus-circle-multiple",onClick:m[1]||(m[1]=g=>O(!1))},{default:p(()=>[E(w(f(a)("modalLoadManual.addToExistingFont")),1)]),_:1})]),s(it,null,{default:p(()=>[s(El,null,{default:p(()=>[(G(!0),N(_e,null,bl(x.value,(g,h)=>(G(),ot(Bl,{key:h,cols:"6",md:"4",lg:"3"},{default:p(()=>[s(Qe,{class:"svg-preview-card pa-3 text-center",elevation:"2"},{default:p(()=>[s(Pe,{location:"top"},{activator:p(({props:F})=>[s(q,J({ref_for:!0},F,{class:"svg-preview-card__edit",icon:"",size:"small",variant:"tonal",color:"primary",onClick:X=>ee(g,h)}),{default:p(()=>[s(ue,{size:"18"},{default:p(()=>m[5]||(m[5]=[E("mdi-pencil")])),_:1,__:[5]})]),_:2},1040,["onClick"])]),default:p(()=>
1[o("span",null,w(f(a)("addFont.editLetterInstruction")),1)]),_:2},1024),g.svg?(G(),N("div",{key:0,innerHTML:g.svg,style:{width:"100%",height:"120px",display:"flex","align-items":"center","justify-content":"center"}},null,8,hn)):ae("",!0),s(Fl,{class:"my-2"}),o("div",gn,w(g.letter||g.decimal),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),s(ut,null,{default:p(()=>[s(Ke),s(q,{color:"primary",variant:"flat",onClick:B},{default:p(()=>[E(w(v.$t("modalLoadManual.closeDialog")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"]),s(st,{modelValue:i.value,"onUpdate:modelValue":m[3]||(m[3]=g=>i.value=g),"max-width":"420"},{default:p(()=>[s(Qe,{rounded:"xl"},{default:p(()=>[s(rt,{class:"d-flex align-center justify-space-between"},{default:p(()=>[o("span",null,w(f(a)("addFont.correctLetter")),1),s(q,{icon:"",variant:"text",size:"small",onClick:D},{default:p(()=>[s(ue,null,{default:p(()=>m[6]||(m[6]=[E("mdi-close")])),_:1,__:[6]})]),_:1})]),_:1}),s(it,null,{default:p(()=>[o("div",pn,w(f(a)("addFont.editLetterInstruction")),1),s(Ut,{modelValue:T.value,"onUpdate:modelValue":m[2]||(m[2]=g=>T.value=g),autofocus:"",variant:"outlined",density:"comfortable",label:f(a)("addFont.letter"),onKeyup:zt(H,["enter"])},null,8,["modelValue","label"])]),_:1}),s(ut,null,{default:p(()=>[s(Ke),s(q,{variant:"text",onClick:D},{default:p(()=>[E(w(f(a)("modalLoadManual.cancel")),1)]),_:1}),s(q,{color:"primary",variant:"flat",onClick:H},{default:p(()=>m[7]||(m[7]=[E(" Ok ")])),_:1,__:[7]})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}},Qt=Dt(yn,[["__scopeId","data-v-794cd54a"]]),bn={class:"d-flex justify-space-between align-center"},wn={class:"headline"},xn={key:0,class:"editor-loading-overlay loading-cursor_editor fixed inset-0 z-50 bg-white bg-opacity-60 backdrop-blur-sm flex items-center justify-center transition-opacity"},Cn={class:"text-center"},Vn={class:"text-lg font-medium"},Ln={class:"p-6 pb-40"},Mn={class:"flex flex-col items-center mb-4"},kn={class:"flex gap-6 d-flex justify-center"},_n={class:"relative w-[80vw] max-w-full"},Sn={key:0,class:"absolute inset-0 z-20 bg-white bg-opacity-95 flex items-center justify-center d-flex"},$n={class:"qr-info-box mt-5"},In={key:1,class:"qr-info-box mt-6"},Rn={key:0,class:"mt-3"},Tn={key:0,class:"text-green-700"},Pn={key:1,class:"text-red-600"},En={key:1,class:"mt-3"},Bn={key:0,class:"text-green-700"},Fn={key:1,class:"text-red-600"},An={key:2,class:"mt-2"},zn={class:"mb-2"},Dn={style:{"white-space":"pre-wrap"}},Un={for:"thresh"},On={class:"checkboxes"},Gn={class:""},Wn={style:{"white-space":"pre-wrap"}},qn={key:0},jn={for:"sharpen"},Hn=["disabled"],Nn={class:"text-sm mt-1",style:{"min-height":"1.25rem"}},Yn={key:0,class:"text-red-500"},Xn={for:"blur"},Qn=["disabled"],Kn={class:"text-sm mt-1",style:{"min-height":"1.25rem"}},Jn={key:0,class:"text-red-500"},Zn={class:"d-flex flex-column items-center w-full"},ea={class:"d-flex justify-space-around w-full mt-4"},ta={style:{"justify-content":"center"},class:"mt-6 d-flex justify-center"},la={style:{"justify-content":"center"},class:"mt-6 d-flex justify-center"},na={components:{SvgPreviewModal:Qt},methods:{}},aa=wl({...na,__name:"Editor",props:{letters:{}},emits:["uploadSvgFromEditor"],setup(e,{expose:u,emit:r}){const{t:a}=At();xl(()=>{try{Me(re),re=null}catch{}try{Me(I),I=null}catch{}try{Me(pt),pt=null}catch{}try{je.forEach(t=>Me(t)),je=[]}catch{}ke(!1)});const y=V(!0),x=V(!1),i=j(()=>H.value&&X.value),M=r,T=e,z=j(()=>T.letters||[]),Y=V(!1),W=(t,l)=>{M("uploadSvgFromEditor",{localLetters:t,replaceLetter:l}),se.value=!1,$.value=!1},$=V(!1);u({open:()=>{$.value=!0}});const B=t=>{const l=typeof t=="object"&&t!==null?t.replaceLetter:t,n=typeof t=="object"&&t!==null&&Array.isArray(t.letters)?t.letters:g.value;W(n,l)},O=({index:t,letter:l})=>{if(!Number.isInteger(t)||t<0||!l)return;const n=Array.isArray(g.value)?[...g.value]:[];t>=n.length||(n[t]={...n[t],...l},g.value=n)},ee=V(),D=()=>{var t,l;(l=(t=ee.value)==null?void 0:t.$el.querySelector("input[type=file]"))==null||l.click()},H=V(!1),v=V([]),m=V(!1),g=V([]),h=V(null),F=V(!1),X=V(!1),de=V(!1),te=V(null),he=V(null),Ue=V(null),xe=V(!1),Oe=async()=>{await Lt()},C=V(null),P=V(null),le=V(100),Ce=V(5),Se=V(1);V(3);let je=[];const Ve=V(!1),ce=V(3),oe=V(2),se=V(!1),$e=V(!1),Ae=V(!0),ge=V(!0),pe=V(!0),Ie=V(!0);V(null);const He=V({});let re=null,I=null;const Le=V(0);let pt=null;const Kt=async()=>{le.value=100,Ce.value=5,ce.value=3,oe.value=2,Se.value=1,Ve.value=!1,ge.value=!0,pe.value=!0,Ie.value=!0,await lt()},yt=V(null),Jt=t=>{const l=t.split(";base64,"),n=l[0].split(":")[1],d=atob(l[1]),c=[];for(let L=0;L<d.length;L+=512){const b=d.slice(L,L+512),S=new Array(b.length);for(let k=0;k<b.length;k++)S[k]=b.charCodeAt(k);c.push(new Uint8Array(S))}return new Blob(c,{type:n})},Zt=t=>{g.value=t,m.value=!0};et($,async t=>{t&&(await mt(),I&&P.value&&setTimeout(async()=>{window.cv.imshow(P.value,I),await Ne()},50))});const el=async()=>{try{h.value?Ue.value=!1:(Ue.value=!0,Re(a("modalLoadManual.qrNotFound"),"error"));const t=await tl();$e.value=!0;const l=new FormData;t.forEach(({row:d,column:c,img:L})=>{const b=Jt(L),S=`r${d}_c${c}.png`,k=new File([b],S,{type:"image/png"});l.append("images",k)}
1),tt.value&&(l.append("imagesTemplate",tt.value),l.append("qcode",h.value.trim())),$e.value=!0;const n=await St.uploadExtractedLetters(l);g.value=n.data.letter,Zt(n.data.letter),se.value=!0}catch{alert("ÐÑибка пÑи оÑпÑавке изобÑажений. ÐожалÑйÑÑа, попÑобÑйÑе позже.")}finally{$e.value=!1}},tl=async()=>{try{const t=window.cv,l=yt.value;if(!l)return[];for(;l.firstChild;)l.removeChild(l.firstChild);if(!v.value.length||!I||typeof I.cols!="number")return alert(a("modalLoadManual.noDataToExtract")),[];const n=v.value.map(_=>({..._,cx:_.x+_.width/2,cy:_.y+_.height/2}));n.sort((_,U)=>_.cy-U.cy);const d=20,c=[];let L=[];for(let _=0;_<n.length;_++){const U=n[_];L.length>0&&Math.abs(U.cy-L[0].cy)>d&&(c.push([...L]),L=[]),L.push(U)}L.length>0&&c.push(L),c.forEach(_=>_.sort((U,Q)=>U.cx-Q.cx));const b=v.value[0],S=Math.min(b.width,b.height),k=Math.round(S*.037),R=[];for(let _=0;_<c.length;_++){const U=c[_];for(let Q=0;Q<U.length;Q++){let{x:ie,y:Te,width:ze,height:K}=U[Q];if(ie=Math.max(ie+k,0),Te=Math.max(Te+k,0),ze=Math.max(ze-2*k,1),K=Math.max(K-2*k,1),ie<0||Te<0||ie+ze>I.cols||Te+K>I.rows)continue;const ve=I.roi(new t.Rect(ie,Te,ze,K)),me=ve.clone();ve.delete();const ye=document.createElement("canvas");ye.width=me.cols,ye.height=me.rows;const be=ye.getContext("2d");be.imageSmoothingEnabled=!1,be.fillStyle="#ffffff",be.fillRect(0,0,ye.width,ye.height),t.imshow(ye,me),me.delete();const De=ye.toDataURL("image/png");R.push({row:_,column:Q,img:De})}}return R}catch(t){return alert("ÐÑибка: "+((t==null?void 0:t.message)||t)),[]}},bt=async()=>{if(!te.value.trim()){alert("ÐведиÑе QCODE");return}try{const t=te.value.trim();await Vt(t,!0),h.value=t,F.value=!0,xe.value=!0,de.value=!1}catch{alert("ÐÑибка пÑи вводе QCODE вÑÑÑнÑÑ")}},tt=V(null),ll=async t=>{var d;const l=(d=t.target.files)==null?void 0:d[0],n=!X.value;if(!l){x.value=!1,ke(!1);return}n?(x.value=!0,H.value=!0):ke(!0);try{if(await il(),!l||!C.value)return;tt.value=l;const c=new Image;c.onload=async()=>{try{const L=window.cv,b=C.value.getContext("2d");C.value.width=c.width,C.value.height=c.height,P.value.width=c.width,P.value.height=c.height,b.drawImage(c,0,0),re&&re.delete(),re=L.imread(C.value),await lt();const S=await Lt(!0);if(S)await Vt(S,!1);else return;await Ne(!0)}finally{X.value=!0,x.value=!1,ke(!1)}},c.src=URL.createObjectURL(l)}catch{x.value=!1,ke(!1)}finally{l||ke(!1)}},Ne=async t=>{await nl(),fe.value=!0},lt=async()=>{ke(!0);try{if(!re||!P.value)return;const t=window.cv;if(Ye(re.clone()),ge.value){const b=new t.Mat;let S=Number(Ce.value);t.GaussianBlur(I,b,new t.Size(S,S),0),Ye(b)}if(pe.value){const b=Math.max(0,Se.value),S=t.matFromArray(3,3,t.CV_32F,[-1,-1,-1,-1,9*b,-1,-1,-1,-1]),k=new t.Mat;t.filter2D(I,k,-1,S),Ye(k),S.delete()}let l=new t.Mat;Ie.value?(t.cvtColor(I,l,t.COLOR_RGBA2GRAY),Me(I),I=null):l=I.clone();const n=Number(le.value)||100;let d=new t.Mat;t.threshold(l,d,n,255,t.THRESH_BINARY_INV),l.delete();let c=d;if(Ve.value){const b=new t.Mat,S=Math.max(1,ce.value|1),k=Math.max(1,oe.value),R=t.getStructuringElement(t.MORPH_RECT,new t.Size(S,S));t.morphologyEx(d,b,t.MORPH_CLOSE,R,new t.Point(-1,-1),k),Me(d),c=b,R.delete()}const L=new t.Mat;t.bitwise_not(c,L),Me(c),Ye(L),t.imshow(P.value,I),await sl()}catch{alert("ÐÑоизоÑла оÑибка пÑи пÑименении ÑилÑÑÑов, попÑобÑйÑе Ñнова")}finally{ke(!1)}};function Ye(t){I&&I!==t&&Me(I),I=t}function Me(t){var l;try{(l=t==null?void 0:t.delete)==null||l.call(t)}catch{}}const wt=(t,l=30)=>{const n=[],d=(L,b)=>Math.abs(L.x-b.x)<l&&Math.abs(L.y-b.y)<l,c=L=>{if(L.length===0)return;const[b,...S]=L,k=[b],R=[];for(const U of S)d(U,b)?k.push(U):R.push(U);const _=k[k.length-1];n.push(_),c(R)};return c(t),n},nl=async(t=!1)=>{v.value=[];try{const n=window.cv;if(!I||!P.value)return;const d=new n.MatVector,c=new n.Mat,L=I.clone();try{n.findContours(L,d,c,n.RETR_TREE,n.CHAIN_APPROX_SIMPLE)}finally{L.delete()}const b=[],S=300,k=new n.MatVector;for(let K=0;K<d.size();K++){const ve=d.get(K),me=new n.Mat;ve.convertTo(me,n.CV_32F);const ye=n.arcLength(me,!0),be=new n.Mat;n.approxPolyDP(me,be,.04*ye,!0);
1const De=n.boundingRect(ve),dl={x:De.x+De.width/2,y:De.y+De.height/2};if(Xe&&ul(dl,Xe)){me.delete(),be.delete();continue}if(be.total()===4&&n.contourArea(ve)>S&&n.isContourConvex(be)){const Mt=n.boundingRect(ve),kt=Mt.width/Mt.height;kt>.8&&kt<1.2&&b.push(ve.clone())}me.delete(),be.delete()}const{mainGroupContours:R}=rl(n,b,40);let _=0;if(!R.length){alert("ÐонÑÑÑÑ Ð½Ðµ найденÑ, попÑобÑйÑе Ñнова");return}const U=Ct(n,R);let Q=wt(U,30);const ie=Object.values(He.value).reduce((K,ve)=>K+ve.length,0),Te=Q.filter(K=>K.width<200&&K.height<200);var l;const ze=Te.length===Q.length;if(Q.length===ie&&!ze)xt(n,P.value,null,{mainGroupContours:R}),v.value=Q,he.value=!0,Re("â ÐÑе бÑÐºÐ²Ñ Ð½Ð°Ð¹Ð´ÐµÐ½Ñ Ñ Ð¿ÐµÑвой попÑÑки","success");else{l=ol(n,b,25),xt(n,P.value,null,{mainGroupContours:l});const K=Ct(n,l);v.value=K,K.length===ie?(he.value=!0,Re(a("modalLoadManual.qrFilterSuccess"),"success")):(he.value=!1,Re(a("modalLoadManual.qrFilterFail"),"error"))}return al(b,R,l??[]),d.delete(),c.delete(),R}catch(n){alert("ÐÑибка: "+((n==null?void 0:n.message)||n))}};function al(...t){const l=new Set;for(const n of t)for(const d of n){if(!d)continue;const c=d.addr||d.dataPtr||d;if(!l.has(c)){l.add(c);try{d.delete()}catch{}}}}const ol=(t,l,n=25)=>{const d=new Map;for(const b of l){const S=t.boundingRect(b),k=Math.max(S.width,S.height);let R=null;for(const[_]of d)if(Math.abs(_-k)<=n){R=_;break}R!==null?d.get(R).push(b):d.set(k,[b])}let c=[],L=-1;for(const[b,S]of d.entries())b>L&&(L=b,c=S);return c},xt=(t,l,n,{mainGroupContours:d=[],drawMain:c=!0,drawSecond:L=!0})=>{if(!I)return;const b=new t.Mat;if(t.cvtColor(I,b,t.COLOR_GRAY2RGBA),c&&d.length>0){const R=new t.MatVector;d.forEach(_=>R.push_back(_)),t.drawContours(b,R,-1,new t.Scalar(255,0,0,255),2),R.delete()}const S=new Set,k=d.map(R=>{const _=t.boundingRect(R);return{x:_.x,y:_.y,width:_.width,height:_.height}}).filter(R=>{const _=`${R.x}_${R.y}_${R.width}_${R.height}`;return S.has(_)?!1:(S.add(_),!0)});return t.imshow(l,b),b.delete(),k},Ct=(t,l)=>{const n=new Set;return l.map(d=>{const c=t.boundingRect(d);return{x:c.x,y:c.y,width:c.width,height:c.height}}).filter(d=>{const c=`${d.x}_${d.y}_${d.width}_${d.height}`;return n.has(c)?!1:(n.add(c),!0)})},sl=async()=>{const t=wt(v.value,30),l=window.cv;if(!P.value||t.length===0)return;const n=l.imread(P.value);t.forEach(d=>{const c=new l.Point(d.x,d.y),L=new l.Point(d.x+d.width,d.y+d.height);l.rectangle(n,c,L,new l.Scalar(255,0,0,255),2)}),l.imshow(P.value,n),n.delete()},rl=(t,l,n=10)=>{const d=new Map;for(const k of l){const R=t.boundingRect(k),_=Math.max(R.width,R.height);let U=null;for(const[Q]of d)if(Math.abs(Q-_)<=n){U=Q;break}U!==null?d.get(U).push(k):d.set(_,[k])}const c=k=>`${k.x}_${k.y}_${k.width}_${k.height}`,L=new Set;let b=[],S=-1;for(const[k,R]of d.entries()){const _=R.filter(U=>{const Q=t.boundingRect(U),ie=c(Q);return L.has(ie)?!1:(L.add(ie),!0)});_.length>b.length&&(b=_,S=k)}return{mainGroupContours:b,averageSize:S}};function il(){return window.cv?(Y.value=!0,Promise.resolve()):new Promise((t,l)=>{window.Module={onRuntimeInitialized(){Y.value=!0,t()}};const n=document.createElement("script");n.src="https://docs.opencv.org/4.x/opencv.js",n.defer=!0,n.onerror=()=>{l(new Error("Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ OpenCV.js"))},document.head.appendChild(n)})}const Vt=async(t,l)=>{var n;try{const d=await St.getDataOfLetters(t);He.value=JSON.parse(d.data.letter),d.data.letter&&l&&(xe.value=!0,F.value=!0,Ne(!0)),d.data.letter||(F.value=!1)}catch(d){((n=d.response)==null?void 0:n.status)===404?(Re(a("modalLoadManual.qrFilterFail"),"error"),F.value=!1):(F.value=!1,Re(a("modalLoadManual.dataRequestError"),"error"))}};function ul(t,l){let n=!1;for(let d=0,c=l.length-1;d<l.length;c=d++){const L=l[d].x,b=l[d].y,S=l[c].x,k=l[c].y;b>t.y!=k>t.y&&t.x<(S-L)*(t.y-b)/(k-b+1e-5)+L&&(n=!n)}return n}const fe=Cl({visible:!1,message:"",color:"info",timeout:3e3});function Re(t,l="info",n=3e3){fe.message=t,fe.color={success:"green",error:"red",warning:"orange",info:"blue"}[l],fe.timeout=n,fe.visible=!0}let Xe=null;const Lt=async(t=!1)=>{const l=window.cv,n=new l.QRCodeDetector,d=L=>{const b=new l.Mat,S=new l.Mat;return{text:n.detectAndDecode(L,b,S),bbox:b,straight:S}};let c=d(re);if(!c.text&&I&&(c=d(I)),xe.value=!0,F.value=!!c.text,c.text){h.value=c.text,Xe=[];for(let L=0;L<c.bbox.data32F.length;L+=2)Xe.push({x:c.bbox.data32F[L],y:c.bbox.data32F[L+1]});return t||alert(`â QR-код ÑÑпеÑно пÑоÑиÑан: 2`+c.text),c.bbox.delete(),c.straight.delete(),n.delete(),c.text}return h.value=null,t||Re(a("modalLoadManual.qrNotFound"),"error"),c.bbox.delete(),c.straight.delete(),n.delete(),null},ke=t=>{H.value=t;const l=document.getElementById("global-loading-overlay");if(x.value&&!X.value){l&&l.remove();return}if(t){if(l)return;const n=document.createElement("div");n.id="global-loading-overlay",n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.background="rgba(255, 255, 255, 0.6)",n.style.zIndex="9999",n.style.cursor="progress",n.style.pointerEvents="all",document.body.appendChild(n)}else l&&l.remove()};return(t,l)=>(G(),N(_e,null,[s(Ol,{modelValue:f(fe).visible,"onUpdate:modelValue":l[0]||(l[0]=n=>f(fe).visible=n),color:f(fe).color,timeout:f(fe).timeout,location:"top end",elevation:"7"},{default:p(()=>[E(w(f(fe).message),1)]),_:1},8,["modelValue","color","timeout"]),s(st,{transition:"dialog-bottom-transition",fullscreen:!0,modelValue:f($),"onUpdate:modelValue":l[20]||(l[20]=n=>Z($)?$.value=n:null)},{default:p(()=>[s(Qe,null,{default:p(()=>[s(rt,null,{default:p(()=>[o("div",bn,[o("span",wn,w(t.$t("addFont.addSymbols")),1),s(ue,{onClick:l[1]||(l[1]=n=>$.value=!1),style:{cursor:"pointer"}},{default:p(()=>l[22]||(l[22]=[E("mdi-close")])),_:1,__:[22]})])]),_:1}),s(it,null,{default:p(()=>[f(i)?(G(),N("div",xn,[o("div",Cn,[s(Pl,{indeterminate:"",color:"primary",size:"48",class:"mb-2"}),o("div",Vn,w(t.$t("modalLoadManual.processing")),1)])])):ae("",!0),o("div",Ln,[o("div",Mn,[f(X)?(G(),ot(q,{key:0,color:"primary",onClick:D,class:"mb-2",disabled:f(H)},{default:p(()=>[E(w(t.$t("modalLoadManual.uploadNewImage")),1)]),_:1},8,["disabled"])):ae("",!0),ne(s(an,{ref_key:"fileInput",ref:ee,accept:"image/*",onChange:ll},null,512),[[nt,!1]])]),o("div",{ref_key:"extractedImages",ref:yt},null,512),o("div",kn,[o("canvas",{ref_key:"canvasInput",ref:C,style:{display:"none"}},null,512),o("div",_n,[o("canvas",{ref_key:"canvasOutput",ref:P,class:"border w-full"},null,512),f(X)?ae("",!0):(G(),N("div",Sn,[s(q,{color:"deep-purple-accent-4",class:"text-white font-bold text-xl rounded-2xl shadow-2xl hover:scale-105 hover:brightness-110 transition-all duration-300",elevation:"12",loading:f(x),disabled:f(x),onClick:D},{default:p(()=>[s(ue,{start:"",class:"mr-2"},{default:p(()=>l[23]||(l[23]=[E("mdi-upload")])),_:1,__:[23]}),E(" "+w(t.$t("modalLoadManual.uploadImage")),1)]),_:1},8,["loading","disabled"])]))])]),o("div",$n,[f(X)?(G(),ot(q,{key:0,onClick:l[2]||(l[2]=n=>y.value=!f(y)),color:"primary",class:"mb-2 mt-4",style:{position:"fixed",top:"16px",right:"16px","z-index":"200"},variant:"flat"},{default:p(()=>[E(w(f(y)?f(a)("modalLoadManual.hideLogs"):f(a)("modalLoadManual.showLogs")),1)]),_:1})):ae("",!0),f(y)?(G(),N("div",In,[f(he)!==null&&f(F)?(G(),N("div",Rn,[f(he)?(G(),N("p",Tn,w(t.$t("modalLoadManual.allLettersDetected")),1)):(G(),N("p",Pn,[E(w(t.$t("modalLoadManual.lettersDetectError"))+" ",1),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("span",null,w(t.$t("modalLoadManual.tooltipMissingLetters")),1)]),_:1}),o("span",{onClick:l[3]||(l[3]=n=>Ne(!0)),style:{color:"blue"},class:"underline text-blue-600 cursor-pointer ml-1 hover:text-blue-800"}
2,w(t.$t("modalLoadManual.tryAgain")),1),l[24]||(l[24]=E(" . "))]))])):ae("",!0),f(xe)?(G(),N("div",En,[f(F)?(G(),N("p",Bn,[E(w(t.$t("modalLoadManual.qrSuccess"))+" ",1),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("span",null,[E(w(t.$t("modalLoadManual.qrSuccessTooltipPart1")),1),l[25]||(l[25]=o("br",null,null,-1)),E(" "+w(t.$t("modalLoadManual.qrSuccessTooltipPart2")),1)])]),_:1})])):(G(),N("p",Fn,[E(w(t.$t("modalLoadManual.qrFail"))+" ",1),o("span",{onClick:Oe,style:{color:"blue"},class:"underline text-blue-600 cursor-pointer ml-1 hover:text-blue-800"},"(повÑоÑиÑÑ Ð¿Ð¾Ð¿ÑÑкÑ)"),o("span",{style:{color:"blue"},onClick:l[4]||(l[4]=n=>de.value=!f(de)),class:"ml-3 text-blue-600 underline cursor-pointer hover:text-blue-800"},w(t.$t("modalLoadManual.manualQR")),1)])),f(de)?(G(),N("div",An,[s(Ut,{modelValue:f(te),"onUpdate:modelValue":l[5]||(l[5]=n=>Z(te)?te.value=n:null),label:t.$t("modalLoadManual.enterQRCode"),variant:"outlined",density:"compact",class:"max-w-sm",onKeyup:zt(bt,["enter"])},null,8,["modelValue","label"]),s(q,{onClick:bt,class:"mt-1",color:"primary"},{default:p(()=>[E(w(t.$t("modalLoadManual.uploadTemplate")),1)]),_:1})])):ae("",!0)])):ae("",!0)])):ae("",!0)]),ne(o("div",{class:qe(t.$isMobile()?"":"filter-panel")},[s(vn,{modelValue:f(Le),"onUpdate:modelValue":l[6]||(l[6]=n=>Z(Le)?Le.value=n:null),class:"mb-2"},{default:p(()=>[s(ft,{value:0},{default:p(()=>[E(w(t.$t("modalLoadManual.mainFilters")),1)]),_:1}),s(ft,{value:1},{default:p(()=>[E(w(t.$t("modalLoadManual.extraFilters")),1)]),_:1})]),_:1},8,["modelValue"]),s(ct,{modelValue:f(Le),"onUpdate:modelValue":l[17]||(l[17]=n=>Z(Le)?Le.value=n:null)},{default:p(()=>[s(Ze,{value:0},{default:p(()=>[o("div",null,[o("div",zn,[o("label",null,[ne(o("input",{type:"checkbox","onUpdate:modelValue":l[7]||(l[7]=n=>Z(Ae)?Ae.value=n:null),disabled:""},null,512),[[Ge,f(Ae),void 0,{number:!0}]]),E(" "+w(t.$t("modalLoadManual.binarization")),1)]),l[26]||(l[26]=E()),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("p",Dn,w(f(a)("modalLoadManual.binarizationTooltip")),1)]),_:1})]),o("label",Un,w(t.$t("modalLoadManual.thresholdLabel"))+" "+w(f(le)),1),ne(o("input",{type:"range",id:"thresh",min:"0",max:"255","onUpdate:modelValue":l[8]||(l[8]=n=>Z(le)?le.value=n:null)},null,512),[[We,f(le),void 0,{number:!0}]])])]),_:1}),s(Ze,{value:1},{default:p(()=>[o("div",null,[o("div",On,[o("div",null,[o("label",null,[ne(o("input",{type:"checkbox","onUpdate:modelValue":l[9]||(l[9]=n=>Z(ge)?ge.value=n:null)},null,512),[[Ge,f(ge)]]),E(" "+w(t.$t("modalLoadManual.blur")),1)]),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("span",null,[o("span",null,w(f(a)("modalLoadManual.blurTooltip")),1)])]),_:1})]),o("div",Gn,[o("label",null,[ne(o("input",{type:"checkbox","onUpdate:modelValue":l[10]||(l[10]=n=>Z(pe)?pe.value=n:null)},null,512),[[Ge,f(pe)]]),E(" "+w(t.$t("modalLoadManual.sharpenStrength")),1)]),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("span",null,[o("span",null,w(f(a)("modalLoadManual.sharpenTooltip")),1)])]),_:1})])]),o("div",null,[o("label",null,[ne(o("input",{type:"checkbox","onUpdate:modelValue":l[11]||(l[11]=n=>Z(Ie)?Ie.value=n:null)},null,512),[[Ge,f(Ie)]]),E(" "+w(t.$t("modalLoadManual.grayscale")),1)])]),l[27]||(l[27]=o("hr",{class:"my-4 border-gray-300"},null,-1)),o("div",null,[o("label",null,[ne(o("input",{type:"checkbox","onUpdate:modelValue":l[12]||(l[12]=n=>Z(Ve)?Ve.value=n:null)},null,512),[[Ge,f(Ve)]]),E(" "+w(t.$t("modalLoadManual.morphology")),1)]),s(Pe,{location:"top","open-on-hover":""},{activator:p(({props:n})=>[s(ue,J(n,{icon:"mdi-help-circle",class:"text-blue-600 cursor-pointer",size:"20"}),null,16)]),default:p(()=>[o("p",Wn,w(f(a)("modalLoadManual.morphologyTooltip")),1)]),_:1})]),f(Ve)?(G(),N("div",qn,[o("label",null,w(t.$t("modalLoadManual.morphologySize"))+" "+w(f(ce)),1),ne(o("input",{type:"range",min:"1",max:"15",step:"2","onUpdate:modelValue":l[13]||(l[13]=n=>Z(ce)?ce.value=n:null)},null,512),[[We,f(ce),void 0,{number:!0}]]),o("label",null,w(t.$t("modalLoadManual.morphologyIterations"))+" "+w(f(oe)),1),ne(o("input",{type:"range",min:"1",max:"5",step:"1","onUpdate:modelValue":l[14]||(l[14]=n=>Z(oe)?oe.value=n:null)},null,512),[[We,f(oe),void 0,{number:!0}]])])):ae("",!0),l[28]||(l[28]=o("hr",{class:"my-4 border-gray-300"},null,-1)),o("div",null,[o("label",jn,w(t.$t("modalLoadManual.sharpenStrength"))+": "+w(f(Se)),1),ne(o("input",{type:"range",id:"sharpen",min:"0.95",max:"1.08",step:"0.007","onUpdate:modelValue":l[15]||(l[15]=n=>Z(Se)?Se.value=n:null),disabled:!f(pe)},null,8,Hn),[[We,f(Se),void 0,{number:!0}]]),o("div",Nn,[f(pe)?ae("",!0):(G(),N("span",Yn,w(t.$t("modalLoadManual.filterUnavailable")),1))])]),l[29]||(l[29]=o("hr",{class:"my-4 border-gray-300"},null,-1)),o("div",null,[o("label",Xn,"РазмÑÑие (ÑадиÑÑ): "+w(f(Ce)),1),ne(o("input",{type:"range",id:"blur",min:"1",max:"25",step:"2","onUpdate:modelValue":l[16
2]||(l[16]=n=>Z(Ce)?Ce.value=n:null),disabled:!f(ge)},null,8,Qn),[[We,f(Ce),void 0,{number:!0}]]),o("div",Kn,[f(ge)?ae("",!0):(G(),N("span",Jn,w(t.$t("modalLoadManual.filterUnavailable")),1))])])])]),_:1})]),_:1},8,["modelValue"]),o("div",Zn,[o("div",ea,[o("button",{onClick:lt,class:"btn"},w(t.$t("modalLoadManual.applyFilters")),1),o("button",{onClick:Kt,class:"btn bg-gray-300 text-black hover:bg-gray-400"},w(t.$t("modalLoadManual.resetFilters")),1)]),o("div",ta,[s(q,{onClick:el,loading:f($e),color:"success",class:"text-white font-bold"},{default:p(()=>[E(w(t.$t("modalLoadManual.createSvg")),1)]),_:1},8,["loading"])]),o("div",la,[s(q,{onClick:l[18]||(l[18]=n=>$.value=!1),size:"small",color:"default",class:"font-bold"},{default:p(()=>[E(w(t.$t("modalLoadManual.closeDialog")),1)]),_:1})])])],2),[[nt,f(X)]])])]),_:1}),s(ut,null,{default:p(()=>[s(Ke),s(q,{text:"",onClick:l[19]||(l[19]=n=>$.value=!1)},{default:p(()=>[E(w(t.$t("addFont.closeButton")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(f(Qt),{modelValue:f(se),"onUpdate:modelValue":l[21]||(l[21]=n=>Z(se)?se.value=n:null),letters:f(g),"available-letters":f(z),onUpdateLetter:O,onIsReplaceLetter:B},null,8,["modelValue","letters","available-letters"])],64))}}),La=Dt(aa,[["__scopeId","data-v-2ea321cb"]]);export{La as E,an as V,vn as a,ft as b,ct as c,Ze as d};
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.