varew=Object.defineProperty;varlv=u=>{throwTypeError(u)};varsw=(u,t,e)=>tinu?ew(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e;varP=(u,t,e)=>sw(u,typeoft!="symbol"?t+"":t,e),Wp=(u,t,e)=>t.has(u)||lv("Cannot "+e);varn=(u,t,e)=>(Wp(u,t,"read from private field"),e?e.call(u):t.get(u)),m=(u,t,e)=>t.has(u)?lv("Cannot add the same private member more than once"):tinstanceofWeakSet?t.add(u):t.set(u,e),p=(u,t,e,s)=>(Wp(u,t,"write to private field"),s?s.call(u,e):t.set(u,e),e),v=(u,t,e)=>(Wp(u,t,"access private method"),e);varYt=(u,t,e,s)=>({set_(i){p(u,t,i,e)},get_(){returnn(u,t,s)}});import{EasUu}from"./index-C7hG1muh.js";import{daski,oasR,casU,qasC,sasz,naswe,aaasj,gasut,jasct,xaspt,waset,Masye,adasri,eas$t,Aaswt,yasrt,DasEi,Hasjv,alasiw,aQasnw,PasWf,tascv,aLasXp,zasig,agasrw,aRasaw,Gasow,fasFs,aBaslw,vascw}from"./index-Dq6jPnBF.js";import{Aashw}from"./AppConfirmDialog-BAMSH1eR.js";import{EasWv,aasXv}from"./el-form-item-SSeqyTAb.js";import{EasHu}from"./index-BBcwoX6C.js";import{aasqv,EasPp}from"./el-checkbox-Dq7CoyZi.js";import{Easzu}from"./el-input-number-BDyZxQAe.js";/* empty css */import{_asTi}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{EasMp,aasIp}from"./el-select-BrrEHV9d.js";import{Easdw}from"./el-slider-VlvZRp2n.js";import{Easuw}from"./el-switch-Caq0t2I2.js";import"./el-popper-DueI9GzG.js";import"./el-tooltip-l0sNRNKZ.js";import"./el-scrollbar-DmODyDOE.js";import{Easfw}from"./el-tag-BZzVQkhP.js";import{EasYv}from"./el-pagination-CBFqVdBF.js";import{EasKv}from"./el-progress-Bfrh9EEb.js";import{Easpw}from"./el-upload-C8Jo1oua.js";import{aasgw,basmw,sasvw,casbw,rasyw,uasww,easAw,fashv,hasSw,iasxw,jasQv,kasEw,lasCw,mas_w,nasdv,taskw,pasTw,oasPw,qasMw,vasIw}from"./dataProcess-B5afu3Hl.js";import{uasDw}from"./models-Bl_wKpKl.js";import"./castArray-MugqytcL.js";import"./_baseClone-DVLNguQR.js";import"./raf-BV6Sit1E.js";import"./index-czD5JTxt.js";import"./index-VqqV1S6i.js";import"./omit-DdM_zsdI.js";import"./index-DwZOTAXO.js";import"./index-CVANbXnO.js";import"./vnode-mg6izvAi.js";import"./index-dORzQmpw.js";import"./scroll-BZwvBC8N.js";import"./clamp-Ixi6GGap.js";import"./toNumber-D7aw_Sl7.js";import"./_baseIteratee-B5ivR0tO.js";import"./debounce-Hp5uL67z.js";import"./validator-Dj0EyMKa.js";import"./model-CuW7a35u.js";constLw={class:"generation-option-row dataset-split-row"},Fw={class:"dataset-split-config"},Rw={class:"dataset-split-grid"},Ow={class:"dataset-split-field"},Nw={class:"dataset-split-input"},Bw={class:"dataset-split-field"},$w={class:"dataset-split-input"},Uw={class:"dataset-split-field"},Hw={class:"dataset-split-input"},zw={key:0,role:"alert"},Vw=ki({__name:"DatasetSplitEditor",props:{modelValue:{},ariaLabelPrefix:{default:""}},emits:["update:modelValue"],setup(u,{emit:t}){conste=u,s=t,i=ct(()=>{const{train:o,validation:l,test:c}=e.modelValue;returno+l+c});functionr(o,l){s("update:modelValue",{...e.modelValue,[o]:Math.min(100,Math.max(0,Number(l)||0))})}functiona(o){return`${e.ariaLabelPrefix}${o}比例`}return(o,l)=>{constc=zu;returnR(),U("div",Lw,[l[9]||(l[9]=C("div",{class:"generation-option-copy"},[C("strong",null,"数据集划分"),C("small",null,"按比例将生成后的问答对随机划分为训练集、验证集和测试集")],-1)),C("div",Fw,[C("div",Rw,[C("label",Ow,[l[4]||(l[4]=C("span",null,"训练集",-1)),C("span",Nw,[z(c,{"model-value":u.modelValue.train,min:0,max:100,step:1,precision:0,"controls-position":"right","aria-label":a("训练集"),"onUpdate:modelValue":l[0]||(l[0]=h=>r("train",h))},null,8,["model-value","aria-label"]),l[3]||(l[3]=C("span",null,"%",-1))])]),C("label",Bw,[l[6]||(l[6]=C("span",null,"验证集",-1)),C("span",$w,[z(c,{"model-value":u.modelValue.validation,min:0,max:100,step:1,precision:0,"controls-position":"right","aria-label":a("验证集"),"onUpdate:modelValue":l[1]||(l[1]=h=>r("validation",h))},null,8,["model-value","aria-label"]),l[5]||(l[5]=C("span",null,"%",-
`)){o.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),a.collapseToStart();return}const{startContainer:l,startOffset:c}=o,h=[],d=[];if(l.nodeType===Node.TEXT_NODE){const w=l.parentElement;if(d.push(l.nodeValue.slice(c).replaceAll(Zu,"")),w!==this.editorDiv){let E=h;for(const A of this.editorDiv.childNodes){if(A===w){E=d;continue}E.push(v(b=Kt,br,If).call(b,A))}}h.push(l.nodeValue.slice(0,c).replaceAll(Zu,""))}else if(l===this.editorDiv){let w=h,E=0;for(const A of this.editorDiv.childNodes)E++===c&&(w=d),w.push(v(S=Kt,br,If).call(S,A))}p(this,Xs,`${h.join(`
`),position:A,pageIndex:_-1,rect:h.slice(0),rotation:d,annotationElementId:f,id:f,deleted:!1,popupRef:g,comment:(b==null?void 0:b.str)||null,richText:y,creationDate:S,modificationDate:w}}const a=await super.deserialize(e,s,i);return p(a,qs,e.fontSize),a.color=B.makeHexColor(...e.color),p(a,Xs,v(o=Kt,br,um).call(o,e.value)),a._initialData=r,e.comment&&a.setCommentData(e),a}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const s=Pt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),i=Object.assign(super.serialize(e),{color:s,fontSize:n(this,qs),value:v(this,Ae,zy).call(this)});return this.addComment(i),e?(i.isCopy=!0,i):this.annotationElementId&&!v(this,Ae,Vy).call(this,i)?null:(i.id=this.annotationElementId,i)}renderAnnotationElement(e){const s=super.renderAnnotationElement(e);if(!s)return null;const{style:i}=s;i.fontSize=`calc(${n(this,qs)}px*var(--total-scale-factor))`,i.color=this.color,s.replaceChildren();for(const r of n(this,Xs).split(`
`)){const a=document.createElement("div");a.append(r?document.createTextNode(r):document.createElement("br")),s.append(a)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:n(this,Xs)}}),s}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}};Xs=new WeakMap,vu=new WeakMap,il=new WeakMap,qs=new WeakMap,Ae=new WeakSet,$y=function(e){const s=r=>{this.editorDiv.style.fontSize=`calc(${r}px*var(--total-scale-factor))`,this.translate(0,-(r-n(this,qs))*this.parentScale),p(this,qs,r),v(this,Ae,Mf).call(this)},i=n(this,qs);this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Uy=function(e){const s=r=>{this.color=r,this.onUpdatedColor()},i=this.color;this.addCommands({cmd:s.bind(this,e),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:gt.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Hy=function(){var i;const e=[];this.editorDiv.normalize();let s=null;for(const r of this.editorDiv.childNodes)(s==null?void 0:s.nodeType)===Node.TEXT_NODE&&r.nodeName==="BR"||(e.push(v(i=Kt,br,If).call(i,r)),s=r);return e.join(`
`)},Mf=function(){const[e,s]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:r,div:a}=this,o=a.style.display,l=a.classList.contains("hidden");a.classList.remove("hidden"),a.style.display="hidden",r.div.append(this.div),i=a.getBoundingClientRect(),a.remove(),a.style.display=o,a.classList.toggle("hidden",l)}this.rotation%180===this.parentRotation%180?(this.width=i.width/e,this.height=i.height/s):(this.width=i.height/e,this.height=i.width/s),this.fixAndSetPosition()},br=new WeakSet,If=function(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(Zu,"")},Df=function(){if(this.editorDiv.replaceChildren(),!!n(this,Xs))for(const e of n(this,Xs).split(`
`)){const s=document.createElement("div");s.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(s)}},zy=function(){return n(this,Xs).replaceAll(""," ")},um=function(e){return e.replaceAll(" ","")},Vy=function(e){const{value:s,fontSize:i,color:r,pageIndex:a}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==s||e.fontSize!==i||e.color.some((o,l)=>o!==r[l])||e.pageIndex!==a},m(Kt,br),P(Kt,"_freeTextDefaultContent",""),P(Kt,"_internalPadding",0),P(Kt,"_defaultColor",null),P(Kt,"_defaultFontSize",10),P(Kt,"_type","freetext"),P(Kt,"_editorType",lt.FREETEXT);let dm=Kt;class X{toSVGPath(){Ct("Abstract method `toSVGPath` must be implemented.")}get box(){Ct("Abstract getter `box` must be implemented.")}serialize(t,e){Ct("Abstract method `serialize` must be implemented.")}static _rescale(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o<l;o+=2)a[o]=e+t[o]*i,a[o+1]=s+t[o+1]*r;return a}static _rescaleAndSwap(t,e,s,i,r,a){a||(a=new Float32Array(t.length));for(let o=0,l=t.length;o<l;o+=2)a[o]=e+t[o+1]*i,a[o+1]=s+t[o]*r;return a}static _translate(t,e,s,i){i||(i=new Float32Array(t.length));for(let r=0,a=t.length;r<a;r+=2)i[r]=e+t[r],i[r+1]=s+t[r+1];return i}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,e,s,i,r){switch(r){case 90:return[1-e/s,t/i];case 180:return[1-t/s,1-e/i];case 270:return[e/s,1-t/i];default:return[t/s,e/i]}}static createBezierPoints(t,e,s,i,r,a){return[(t+5*s)/6,(e+5*i)/6,(5*s+r)/6,(5*i+a)/6,(s+r)/2,(i+a)/2]}}P(X,"PRECISION",1e-4);var Ys,Hi,Wc,Xc,pn,yt,nl,rl,bu,yu,qc,Yc,da,wu,xp,Ep,Ce,Uh,Gy,jy,Wy,Xy,qy,Yy;const In=class In{constructor({x:t,y:e},s,i,r,a,o=0){m(this,Ce);m(this,Ys);m(this,Hi,[]);m(this,Wc);m(this,Xc);m(this,pn,[]);m(this,yt,new Float32Array(18));m(this,nl);m(this,rl);m(this,bu);m(this,yu);m(this,qc);m(this,Yc);m(this,da,[]);p(this,Ys,s),p(this,Yc,r*i),p(this,Xc,a),n(this,yt).set([NaN,NaN,NaN,NaN,t,e],6),p(this,Wc,o),p(this,yu,n(In,wu)*i),p(this,bu,n(In,Ep)*i),p(this,qc,i),n(this,da).push(t,e)}isEmpty(){return isNaN(n(this,yt)[8])}add({x:t,y:e}){var I;p(this,nl,t),p(this,rl,e);const[s,i,r,a]=n(this,Ys);let[o,l,c,h]=n(this,yt).subarray(8,12);const d=t-c,f=e-h,g=Math.hypot(d,f);if(g<n(this,bu))return!1;const y=g-n(this,yu),b=y/g,S=b*d,w=b*f;let E=o,A=l;o=c,l=h,c+=S,h+=w,(I=n(this,da))==null||I.push(t,e);const _=-w/y,x=S/y,k=_*n(this,Yc),M=x*n(this,Yc);return n(this,yt).set(n(this,yt).subarray(2,8),0),n(this,yt).set([c+k,h+M],4),n(this,yt).set(n(this,yt).subarray(14,18),12),n(this,yt).set([c-k,h-M],16),isNaN(n(this,yt)[6])?(n(this,pn).length===0&&(n(this,yt).set([o+k,l+M],2),n(this,pn).push(NaN,NaN,NaN,NaN,(o+k-s)/r,(l+M-i)/a),n(this,yt).set([o-k,l-M],14),n(this,Hi).push(NaN,NaN,NaN,NaN,(o-k-s)/r,(l-M-i)/a)),n(this,yt).set([E,A,o,l,c,h],6),!this.isEmpty()):(n(this,yt).set([E,A,o,l,c,h],6),Math.abs(Math.atan2(A-l,E-o)-Math.atan2(w,S))<Math.PI/2?([o,l,c,h]=n(this,yt).subarray(2,6),n(this,pn).push(NaN,NaN,NaN,NaN,((o+c)/2-s)/r,((l+h)/2-i)/a),[o,l,E,A]=n(this,yt).subarray(14,18),n(this,Hi).push(NaN,NaN,NaN,NaN,((E+o)/2-s)/r,((A+l)/2-i)/a),!0):([E,A,o,l,c,h]=n(this,yt).subarray(0,6),n(this,pn).push(((E+5*o)/6-s)/r,((A+5*l)/6-i)/a,((5*o+c)/6-s)/r,((5*l+h)/6-i)/a,((o+c)/2-s)/r,((l+h)/2-i)/a),[c,h,o,l,E,A]=n(this,yt).subarray(12,18),n(this,Hi).push(((E+5*o)/6-s)/r,((A+5*l)/6-i)/a,((5*o+c)/6-s)/r,((5*l+h)/6-i)/a,((o+c)/2-s)/r,((l+h)/2-i)/a),!0))}toSVGPath(){if(this.isEmpty())return"";const t=n(this,pn),e=n(this,Hi);if(isNaN(n(this,yt)[6])&&!this.isEmpty())return v(this,Ce,Gy).call(this);const s=[];s.push(`M${t[4]}${t[5]}`);for(let i=6;i<t.length;i+=6)isNaN(t[i])?s.push(`L${t[i+4]}${t[i+5]}`):s.push(`C${t[i]}${t[i+1]}${t[i+2]}${t[i+3]}${t[i+4]}${t[i+5]}`);v(this,Ce,Wy).call(this,s);for(let i=e.length-6;i>=6;i-=6)isNaN(e[i])?s.push(`L${e[i+4]}${e[i+5]}`):s.push(`C${e[i]}${e[i+1]}${e[i+2]}${e[i+3]}${e[i+4]}${e[i+5]}`);return v(this,Ce,jy).call(this,s),s.join(" ")}newFreeDrawOutline(t,e,s,i,r,a){return new Ky(t,e,s,i,r,a)}getOutlines(){var d;const t=n(this,pn),e=n(this,Hi),s=n(this,yt),[i,r,a,o]=n