import{$ as qt,q as je,_ as Le,o as X,a as ne,n as Ve,d as ye,b as Yn,r as ge,e as B,F as xe,f as Xe,t as de,j as De,k as Oe,g as ue,x as yt,y as bt,z as _n,C as Pr,w as Xn,I as $t,s as ut,J as Qn,K as Lr,L as Mr,M as bo,v as Cr,N as Ir,u as Xt,O as Hi,P as _o,Q as mr,E as Zn}from"./_plugin-vue_export-helper-DfQgE-tC.js";import Dr from"./NachrichtForm-CYhyjrPN.js";import{B as jt}from"./BackendResponse-9vt7nNmn.js";import{I as wo}from"./InputCheckbox-BdSNXE_n.js";import{I as ar}from"./InputText-DVlsj828.js";import{F as Fe,a as jr,_ as zr}from"./InputModelBase-CeuTljlj.js";import{I as Oo}from"./InputButton-DNVNN41X.js";import{I as Ao}from"./InputSelect-CwN66A5n.js";import{F as Rt}from"./FieldValidityExamples-CjjfBqdt.js";import{c as He,g as qr}from"./_commonjsHelpers-Cpj98o6Y.js";import{S as Eo}from"./StandardProfilsucheService-e5OB7b4q.js";import"./FormError-s39Y7_4b.js";import"./InputEmail-CZ0nPjKB.js";import"./InputTextarea-D-_ql-5p.js";import"./SuccessMessage-Dc-q-6eb.js";function ko(e){const n={header:{type:"buchhalterProfil",action:"getMyProfil",accessToken:e}};return qt.ajax({url:agenda.request.url,method:"POST",data:n})}const So=je({props:{socialLink:{type:Object},big:{type:Boolean,default:!1}},data(){return{iconNames:{YouTube:"youtube-brands",Facebook:"facebook-f-brands",Twitter:"twitter-brands",Xing:"xing-brands",LinkedIn:"linkedin-in",Instagram:"instagram",TikTok:"tiktok"}}}}),To=["href"];function Ro(e,n,t,i,r,o){var l,f,a,p,h;return X(),ne("a",{class:Ve(["social-link",{big:e.big}]),tabindex:"-1",style:Yn(e.big?"pointer-events: none":""),href:(f=(l=e.socialLink)==null?void 0:l.link)!=null&&f.includes("https://")?(a=e.socialLink)==null?void 0:a.link:"https://"+((p=e.socialLink)==null?void 0:p.link),target:"_blank"},[(h=e.socialLink)!=null&&h.name?(X(),ne("span",{key:0,class:Ve("icon-"+(e.iconNames[e.socialLink.name]?e.iconNames[e.socialLink.name]:"link"))},null,2)):ye("",!0)],14,To)}const $r=Le(So,[["render",Ro]]),xo=je({components:{NachrichtForm:Dr,ProfilSocialIcon:$r},props:{user:{type:Object,default(){return{}}},socialLinks:{type:Array,default(){return[]}}},data(){return{url:window.location.protocol+"//"+window.location.host,isLoggedIn:agenda.wUserCur.isLoggedIn,descriptionToLong:!1,descriptionOpen:!1,isMobile:!1,seoLink:""}},computed:{descriptionOpenerText(){return this.descriptionOpen?"Weniger anzeigen":"Mehr anzeigen"},webseitenUrl(){return this.user.webseite.toLowerCase().includes("https://")||this.user.webseite.toLowerCase().includes("http://")?this.user.webseite:"https://"+this.user.webseite},vcfLink(){let e="data:text/vcard;charset=utf-8,";return e+="BEGIN:VCARD%0A",e+="VERSION:3.0%0A",e+="ORG;CHARSET=UTF-8:"+this.user.firma+"%0A",this.user.titel?e+="FN;CHARSET=UTF-8:"+this.user.titel+" "+this.user.vorname+" "+this.user.nachname+"%0A":e+="FN;CHARSET=UTF-8:"+this.user.vorname+" "+this.user.nachname+"%0A",e+="N;CHARSET=UTF-8:"+this.user.nachname+";"+this.user.vorname+";;"+this.user.titel+";%0A",this.user.telefon&&(e+="TEL;TYPE=WORK,VOICE:"+this.user.telefon+"%0A"),this.user.fax&&(e+="TEL;TYPE=WORK,FAX:"+this.user.fax+"%0A"),this.user.mobiltelefon&&(e+="TEL;TYPE=CELL,MOBILE:"+this.user.mobiltelefon+"%0A"),(this.user.strasse||this.user.plz||this.user.ort)&&(this.user.strasse&&this.user.adresseSichtbar?e+="ADR;WORK;CHARSET=UTF-8:;;"+this.user.strasse+";"+this.user.ort+";;"+this.user.plz+";%0A":e+="ADR;WORK;CHARSET=UTF-8:;;;"+this.user.ort+";;"+this.user.plz+";%0A"),this.user.webseite&&(e+="URL;WORK:"+this.webseitenUrl+"%0A"),this.user.profilAktiv&&(e+="NOTE;CHARSET=UTF-8:"+this.url+"/profil/"+this.seoLink+"%0A"),e+="END:VCARD",e},vcfName(){return this.user.vorname+this.user.nachname+".vcf"}},mounted(){window.addEventListener("resize",this.appHeight),this.appHeight(),this.isLoggedIn&&ko(agenda.wUserCur.accessToken).then(e=>{let n=new jt(e);this.seoLink=n.form.seoLink})},methods:{toggleDescriptionOpen(){this.descriptionOpen=!this.descriptionOpen,this.appHeight()},appHeight(){let e=document.getElementById("profil-header-box"),n=document.getElementById("profil-description"),t=document.getElementById("profil-description-text"),i=window.innerWidth<769;this.isMobile=i;let r=240;if(e&&n&&t){let o=e.offsetHeight,l=parseFloat(getComputedStyle(document.documentElement).fontSize);o-=l,i&&o>r&&(o=r);let f=t.offsetHeight;f>o&&!this.descriptionOpen?(this.descriptionToLong=!0,n.style.height=o+"px"):f===o&&!this.descriptionOpen?n.style.height=o+"px":(this.descriptionOpen||(this.descriptionToLong=!1),n.style.height=f+"px")}}}}),Bt=e=>(yt("data-v-8d8c4474"),e=e(),bt(),e),No={class:"profil-header"},Po={class:"elementSection"},Lo={class:""},Mo={class:"elementHeadline"},Co=Bt(()=>B("div",{class:"elementHr"},[B("hr")],-1)),Io={class:"elementContainerStandard elementContainerStandardColumns_var5050"},Do={class:"col col1"},jo={class:"elementBoxPadding_var20"},zo={class:"boxInner"},qo={id:"profil-header-box",class:"elementBox elementBoxPadding_var20 elementBoxBorder_varBoxShadow elementBoxBackgroundColor_varWhite profil-header-box"},$o={class:"boxInner"},Bo={class:"profil-header--social-links"},Fo={class:"elementContainerStandard_var1 elementContainerStandardColumns_var3070"},Ho={class:"col col1"},Uo=["src","alt"],Wo={class:"col col2"},Vo={class:"elementText elementText_var0 elementTextListStyle_varFontAgenda"},Ko={key:0},Yo=Bt(()=>B("span",{class:"icon-map-marker-alt"},null,-1)),Zo={key:0},Go=Bt(()=>B("br",null,null,-1)),Xo={key:1},Qo=Bt(()=>B("span",{class:"icon-phone"},null,-1)),Jo={key:2},ea=Bt(()=>B("span",{class:"icon-mobile"},null,-1)),ta={key:3},na=Bt(()=>B("span",{class:"icon-fax"},null,-1)),ia={key:4},ra=Bt(()=>B("span",{class:"icon-globe"},null,-1)),oa=["href"],aa={key:0,class:"elementLink elementLink_var10 elementLink-button-color_varGrey isInverseBackground"},sa=["href","download"],la={key:1,class:"visitenkarte"},ua={class:"col col2"},ca={key:0},fa={class:"elementBox elementBoxPadding_var20 elementBoxHeight_var0"},ha={class:"boxInner"},da=["innerHTML"];function pa(e,n,t,i,r,o){const l=ge("profil-social-icon"),f=ge("nachricht-form");return X(),ne("div",No,[B("div",Po,[B("div",Lo,[B("div",Mo,[B("h1",null,[e.isMobile?ye("",!0):(X(),ne(xe,{key:0},[Xe(de(e.user.anrede)+" "+de(e.user.titel),1)],64)),Xe(" "+de(e.user.vorname)+" "+de(e.user.nachname),1)])]),Co,B("div",Io,[B("div",Do,[B("div",null,[B("div",jo,[B("div",zo,[B("div",qo,[B("div",$o,[B("div",Bo,[(X(!0),ne(xe,null,De(e.socialLinks,(a,p)=>(X(),Oe(l,{key:p,"social-link":a},null,8,["social-link"]))),128))]),B("div",Fo,[B("div",Ho,[B("img",{decoding:"async",loading:"lazy",class:"avatar",src:e.user.avatar,alt:e.user.vorname+" "+e.user.nachname+" - "+(e.user.anrede==="Herr"?" Buchhalter in ":"Buchhalterin in ")+e.user.ort},null,8,Uo)]),B("div",Wo,[B("div",null,[B("div",Vo,[B("p",null,[B("strong",null,de(e.user.firma),1)]),B("ul",null,[e.user.strasse||e.user.plz||e.user.ort?(X(),ne("li",Ko,[Yo,e.user.strasse&&e.user.adresseSichtbar?(X(),ne("span",Zo,[Xe(de(e.user.strasse),1),Go])):ye("",!0),Xe(" "+de(e.user.plz)+" "+de(e.user.ort),1)])):ye("",!0),e.user.telefon?(X(),ne("li",Xo,[Qo,Xe(de(e.user.telefon),1)])):ye("",!0),e.user.mobiltelefon?(X(),ne("li",Jo,[ea,Xe(de(e.user.mobiltelefon),1)])):ye("",!0),e.user.fax?(X(),ne("li",ta,[na,Xe(de(e.user.fax),1)])):ye("",!0),e.user.webseite?(X(),ne("li",ia,[ra,B("a",{href:e.webseitenUrl,target:"_blank"},de(e.user.webseite),9,oa)])):ye("",!0)])])])])]),e.isMobile?(X(),ne("div",aa,[B("a",{href:e.vcfLink,download:e.vcfName,class:"vcfButton"},"Kontakt speichern",8,sa)])):ye("",!0),e.user.emailSichtbar?(X(),ne("div",la,[ue(f,{"seo-link":e.user.seoLink,"profil-activ":e.user.profilAktiv},null,8,["seo-link","profil-activ"])])):ye("",!0)])])])])])]),B("div",ua,[e.user.beschreibung.length>0?(X(),ne("div",ca,[B("div",fa,[B("div",ha,[B("div",{id:"profil-description",class:Ve(["elementText profil-description",{"text-hidden":e.descriptionToLong&&!e.descriptionOpen}])},[B("div",{id:"profil-description-text",innerHTML:e.user.beschreibung},null,8,da)],2),e.descriptionToLong?(X(),ne("div",{key:0,class:"profil-show-more",onClick:n[0]||(n[0]=(...a)=>e.toggleDescriptionOpen&&e.toggleDescriptionOpen(...a))},de(e.descriptionOpenerText),1)):ye("",!0)])])])):ye("",!0)])])])])])}const va=Le(xo,[["render",pa],["__scopeId","data-v-8d8c4474"]]),ma=je({name:"ProfilChild",props:{child:{type:Object,default(){return{}}},firstChild:{type:Boolean,default:!0}}}),ga={class:"profil-child"},ya={class:"h4"},ba={key:1,class:"elementText title-of-other-checkbox"},_a={key:2},wa={key:3},Oa={key:0,class:"elementText"},Aa={class:"h5"},Ea={key:0},ka={key:1},Sa={key:0},Ta={key:0};function Ra(e,n,t,i,r,o){const l=ge("profil-child",!0);return X(),ne("div",ga,[e.firstChild?(X(),ne("div",{key:0,class:Ve(["elementText elementText_varCyan1 title-of-first-checkbox",{hasNoChildren:!e.child.children}])},[B("p",ya,de(e.child.name),1)],2)):(X(),ne("div",ba,[B("p",null,[B("strong",null,de(e.child.name),1)])])),e.child.children?(X(),ne("div",_a,[(X(!0),ne(xe,null,De(e.child.children,(f,a)=>(X(),Oe(l,{"first-child":!1,child:f,key:a},null,8,["child"]))),128))])):(X(),ne("div",wa,[e.child.listType==="1"?(X(),ne("div",Oa,[B("p",Aa,[(X(!0),ne(xe,null,De(e.child.fields,(f,a)=>(X(),ne("span",{key:a},[Xe(de(f.name),1),a<e.child.fields.length-1?(X(),ne("span",Ea,", ")):ye("",!0),f.text&&f.text!==""?(X(),ne("span",ka,": "+de(f.text),1)):ye("",!0)]))),128))])])):(X(),ne("div",{key:1,class:Ve(["elementText elementText_var0 elementTextListStyle_var0",{elementTextListStyle_varCheckboxYellow1:e.child.listType==="0"}])},[B("div",null,[e.child.fields?(X(),ne("ul",Sa,[(X(!0),ne(xe,null,De(e.child.fields,(f,a)=>(X(),ne("li",{key:a},[Xe(de(f.name),1),f.text&&f.text!==""?(X(),ne("span",Ta,": "+de(f.text),1)):ye("",!0)]))),128))])):ye("",!0)])],2))]))])}const xa=Le(ma,[["render",Ra]]),Na=je({props:{checkbox:{type:Object,default(){return{}}},open:Boolean},components:{ProfilChild:xa},emits:["toggle-dropdown"]}),Pa={class:"elementSection"},La={class:"profil-dropdown"},Ma=B("span",{class:"profilIcon"},[B("span",{class:"icon-chevron-left"})],-1),Ca=B("div",{class:"elementHr"},[B("hr")],-1),Ia={class:"accordion-content"},Da={key:0,class:"elementText"},ja={class:"h5"},za={class:"elementContainerStandard elementContainerStandardColumns_var5050"},qa={class:"col col1"},$a={class:"col col2"};function Ba(e,n,t,i,r,o){const l=ge("profil-child");return X(),ne("div",{class:Ve(["profil-checkbox profil-as-mobil-accordion",{open:e.open}])},[B("div",Pa,[B("div",{class:"elementHeadline",onClick:n[0]||(n[0]=f=>e.$emit("toggle-dropdown"))},[B("h2",La,[B("strong",null,de(e.checkbox.name),1),Ma])]),Ca,B("div",Ia,[e.checkbox.text?(X(),ne("div",Da,[B("p",ja,de(e.checkbox.text),1)])):ye("",!0),B("div",za,[B("div",qa,[(X(!0),ne(xe,null,De(e.checkbox.children.slice(0,Math.ceil(e.checkbox.children.length/2)),(f,a)=>(X(),ne("div",{key:a},[ue(l,{child:f},null,8,["child"])]))),128))]),B("div",$a,[(X(!0),ne(xe,null,De(e.checkbox.children.slice(Math.ceil(e.checkbox.children.length/2)),(f,a)=>(X(),ne("div",{key:a},[ue(l,{child:f},null,8,["child"])]))),128))])])])])],2)}const Fa=Le(Na,[["render",Ba]]),Ha=je({props:{documents:Object,open:Boolean},emits:["toggle-dropdown"]}),Ua={class:"elementSection"},Wa=B("h2",{class:"profil-dropdown"},[B("strong",null,"Dokumente"),B("span",{class:"profilIcon"},[B("span",{class:"icon-chevron-left"})])],-1),Va=[Wa],Ka=B("div",{class:"elementHr"},[B("hr")],-1),Ya={class:"accordion-content"},Za={class:"elementStandard elementContainerStandard elementContainerStandardColumns4"},Ga=["href"],Xa=B("div",{class:"elementFontAgenda elementFontAgendaFloat_varCenter elementFontAgendaSize_varDefault elementFontAgendaColor_varYellow1"},[B("span",{class:"icon-arrow-alt-to-bottom"})],-1),Qa={class:"elementText"},Ja={class:"alignCenter"};function es(e,n,t,i,r,o){return X(),ne("div",{class:Ve(["profil-documents profil-as-mobil-accordion",{open:e.open}])},[B("div",Ua,[B("div",null,[B("div",{class:"elementHeadline",onClick:n[0]||(n[0]=l=>e.$emit("toggle-dropdown"))},Va),Ka,B("div",Ya,[B("div",Za,[(X(!0),ne(xe,null,De(e.documents,(l,f)=>(X(),ne("div",{class:"item",key:f},[B("a",{href:l.path,target:"_blank"},[Xa,B("div",Qa,[B("p",Ja,[B("u",null,de(l.name),1)])])],8,Ga)]))),128))])])])])],2)}const ts=Le(Ha,[["render",es]]),ns=je({name:"ProfilEditHeader",props:{showCheck:{type:Boolean,default(){return!1}},showLoading:{type:Boolean,default(){return!1}},errorMessage:{type:String,default(){return""}}},emits:{save:null,toProfile:null},data(){return{navHeight:0}},methods:{updateNavHeight(){let e=qt("#blockHeaderMain");this.navHeight=e.height()}},mounted(){this.$nextTick(()=>{this.updateNavHeight(),window.addEventListener("resize",this.updateNavHeight)})}}),wn=e=>(yt("data-v-2c5106dc"),e=e(),bt(),e),is=wn(()=>B("h2",{class:"mobileHeading"},"Profil-Bearbeitung",-1)),rs={class:"flex-row"},os=wn(()=>B("div",{class:"desktopHeading no-margin"},[B("p",{class:"h3"},"Profil-Bearbeitung")],-1)),as={class:"sticky-buttons"},ss=wn(()=>B("span",{class:"loading-circle"},null,-1)),ls=[ss],us=wn(()=>B("span",null,"Speichern",-1)),cs=wn(()=>B("span",null,"Zum Profil",-1)),fs=[cs],hs={key:0,class:"sticky-error"};function ds(e,n,t,i,r,o){return X(),ne(xe,null,[is,B("div",{class:"sticky",style:Yn({top:e.navHeight+"px"}),ref:"header"},[B("div",rs,[os,B("div",as,[B("div",{class:Ve(["elementLink elementLink_varBx4 inverse",{disabled:e.showCheck}])},[B("a",{onClick:n[0]||(n[0]=l=>e.$emit("save"))},[B("span",{class:"icon-check",style:Yn({width:(e.showCheck?20:0)+"px",opacity:e.showCheck?1:0})},null,4),B("span",{class:"loading-wrapper",style:Yn({width:(e.showLoading?20:0)+"px",opacity:e.showLoading?1:0})},ls,4),us])],2),B("div",{class:Ve(["elementLink elementLink_varBx4",{disabled:e.showCheck}])},[B("a",{onClick:n[1]||(n[1]=l=>e.showCheck?null:e.$emit("toProfile"))},fs)],2)])]),e.errorMessage!==""?(X(),ne("div",hs,de(e.errorMessage),1)):ye("",!0)],4)],64)}const ps=Le(ns,[["render",ds],["__scopeId","data-v-2c5106dc"]]),vs=function(){const e={header:{type:"buchhalterProfil",action:"getProfilCheckboxes"}};return qt.ajax({url:agenda.request.url,type:"POST",data:e})},ms={getProfilCheckboxes:vs},gs=je({components:{InputCheckbox:wo,InputText:ar},props:{checkboxes:Object},data(){return{checkBoxData:[],fieldData:{},checkBoxColor:"#F8BA00"}},emits:["dataChanged"],methods:{getFieldData(){return this.fieldData},setValuesToFields(){this.checkboxes!=null&&this.parseCheckboxes(this.checkboxes,e=>{this.fieldData[e.id]&&(e.value?this.fieldData[e.id].value=e.value:e.text?this.fieldData[e.id].value=e.text:this.fieldData[e.id].value=!0)})},parseCheckboxes(e,n){e.forEach(t=>{t.children&&t.children.forEach(i=>{i.fields&&i.fields.forEach(r=>{n(r)}),i.children&&i.children.forEach(r=>{r.fields&&r.fields.forEach(o=>{n(o)})})})})}},mounted(){ms.getProfilCheckboxes().then(e=>{let n=new jt(e);this.checkBoxData=n.tab.checkbox,this.parseCheckboxes(this.checkBoxData,t=>{const i=new Fe(t.name,t.value,!1);i.addValidityRule(new jr(()=>(this.$emit("dataChanged"),!0),"")),this.fieldData[t.id]=i}),this.setValuesToFields()})}}),Br=e=>(yt("data-v-69bd909a"),e=e(),bt(),e),ys={class:"content checkboxes"},bs={key:0,class:"loading-div"},_s=Br(()=>B("div",{class:"form-footer__loading-image"},null,-1)),ws=[_s],Os=Br(()=>B("hr",null,null,-1)),As={class:"childHeading elementText elementText_varCyan1"},Es={class:"h4"};function ks(e,n,t,i,r,o){const l=ge("input-checkbox"),f=ge("input-text");return X(),ne("div",ys,[e.checkBoxData.length===0?(X(),ne("div",bs,ws)):ye("",!0),(X(!0),ne(xe,null,De(e.checkBoxData,a=>(X(),ne("div",{class:"checkboxContent",key:a.id},[B("h2",null,de(a.name),1),Os,(X(!0),ne(xe,null,De(a.children,p=>(X(),ne("div",{class:Ve(["child",{hasNoChildren:!p.children}]),key:p.id},[B("div",As,[B("p",Es,de(p.name),1)]),B("div",{class:Ve(["childFields",{small:p.fields&&p.fields.length<=2}])},[(X(!0),ne(xe,null,De(p.fields,h=>(X(),ne("div",{class:"fieldInsideGrid",key:h.id},[h.showtext?(X(),Oe(f,{key:1,model:e.fieldData[h.id]},null,8,["model"])):(X(),Oe(l,{key:0,model:e.fieldData[h.id],color:e.checkBoxColor},null,8,["model","color"]))]))),128))],2),(X(!0),ne(xe,null,De(p.children,h=>(X(),ne("div",{class:"secondChild",key:h.id},[B("p",null,[B("strong",null,de(h.name),1)]),B("div",{class:Ve(["childFields",{small:h.fields&&h.fields.length<=2}])},[(X(!0),ne(xe,null,De(h.fields,c=>(X(),ne("div",{class:"fieldInsideGrid",key:c.id},[c.showtext?(X(),Oe(f,{key:1,model:e.fieldData[c.id]},null,8,["model"])):(X(),Oe(l,{key:0,model:e.fieldData[c.id],color:e.checkBoxColor},null,8,["model","color"]))]))),128))],2)]))),128))],2))),128))]))),128))])}const Ss=Le(gs,[["render",ks],["__scopeId","data-v-69bd909a"]]),Ts=function(e){const n=new FormData;return n.append("header[type]","buchhalterFiles"),n.append("header[action]","uploadFile"),n.append("header[accessToken]",agenda.wUserCur.accessToken),n.append("file",e,e.name),qt.ajax({url:agenda.request.url,type:"POST",data:n,contentType:!1,processData:!1})},Rs=function(e){const n=new FormData;return n.append("header[type]","buchhalterFiles"),n.append("header[action]","uploadAvatar"),n.append("header[accessToken]",agenda.wUserCur.accessToken),n.append("form[imageData][value]",e),qt.ajax({url:agenda.request.url,type:"POST",data:n,contentType:!1,processData:!1})},Fr={uploadFile:Ts,uploadAvatar:Rs},xs={name:"InputFile",extends:zr,created(){this.model.value=[]},data:()=>({fileUploadReady:!0}),props:{multiple:{type:Boolean,default:!1}},methods:{onFileChange(e){this.model.value=[];const n=e.target.files||e.dataTransfer.files;for(let t=0;t<n.length;t++)this.model.value.push(n[t]);this.$emit("file-changed"),e.target.value=[]},onInputClick(){this.model.disabled||this.$refs.input.click()},resetFiles(){this.fileUploadReady=!1,this.model.value="",this.$nextTick(()=>{this.fileUploadReady=!0})}}},Ns={class:"ainput-container"},Ps={key:0,class:"textHighlight"},Ls=["autocomplete","name","multiple","required","disabled","readonly"],Ms={key:0,class:"ainput-errormessage"};function Cs(e,n,t,i,r,o){return X(),ne("div",{class:Ve(["ainput",{error:!e.model.valid,disabled:e.model.disabled}])},[B("div",Ns,[e.model.value===void 0||e.model.value.length===0?(X(),ne("a",{key:0,class:"ainput-file",onClick:n[0]||(n[0]=(...l)=>o.onInputClick&&o.onInputClick(...l))},[Xe(de(e.model.label)+" ",1),e.model.required?(X(),ne("span",Ps,"*")):ye("",!0)])):ye("",!0)]),B("input",{type:"file",ref:"input",class:"ainput-file-input",autocomplete:e.autocomplete,name:e.formElementName,multiple:t.multiple,required:e.model.required,disabled:e.model.disabled,readonly:e.model.readonly,onChange:n[1]||(n[1]=(...l)=>o.onFileChange&&o.onFileChange(...l)),onFocus:n[2]||(n[2]=(...l)=>e.onFocus&&e.onFocus(...l)),onBlur:n[3]||(n[3]=(...l)=>e.onBlur&&e.onBlur(...l)),onInvalid:n[4]||(n[4]=(...l)=>e.onInvalid&&e.onInvalid(...l))},null,40,Ls),e.model.valid?ye("",!0):(X(),ne("p",Ms,de(e.model.message),1))],2)}const Is=Le(xs,[["render",Cs]]),Ds=je({name:"DateiUpload",props:{user:Object,documents:Array},emits:["dokument-name-changed","dokument-delete","dokument-add"],data(){return{file:new Fe("Neue Datei hochladen",[]).setRequired(!1),error:""}},methods:{uploadFile(){this.error="",this.file.value[0].size<1024*1024?Fr.uploadFile(this.file.value[0]).then(e=>{let n=new jt(e);if(n.err.code===-1){let t={path:n.form.url,name:this.file.value[0].name};this.$emit("dokument-add",t),this.file.value=[]}else this.error='Fehler beim Hochladen der Datei "'+this.file.value[0].name+'": '+e.err.msg,this.file.value=[]}).catch(e=>{this.error="Beim hochladen der Datei ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.",this.file.value=[],console.error(e)}):(this.error="Die ausgewählte Datei ist zu groß. (Max. 1MB)",this.file.value=[])}},components:{InputFile:Is}}),On=e=>(yt("data-v-e39f381b"),e=e(),bt(),e),js={class:"profil-edit--datei-upload"},zs=On(()=>B("h2",null,"Dokumente",-1)),qs=On(()=>B("hr",null,null,-1)),$s=On(()=>B("p",null,[B("strong",null," Hier können Sie PDF-Dateien hochladen, wie zum Beispiel Ihren individuellen Lebenslauf und Zertifikate. ")],-1)),Bs={key:0},Fs=["href"],Hs=On(()=>B("span",null,"Datei umbenennen:",-1)),Us=["onUpdate:modelValue","onChange"],Ws=["onClick"],Vs={key:0,class:"profil-edit--datei-upload--error"},Ks=On(()=>B("span",null,"(max. 1MB, Typ = pdf)",-1));function Ys(e,n,t,i,r,o){const l=ge("input-file");return X(),ne("div",js,[zs,qs,$s,e.documents&&e.documents.length?(X(),ne("ul",Bs,[(X(!0),ne(xe,null,De(e.documents,(f,a)=>(X(),ne("li",{key:a},[B("div",null,[B("a",{href:f.path,target:"_blank"},[B("strong",null,de(f.name)+" anzeigen",1)],8,Fs)]),Hs,_n(B("input",{type:"text","onUpdate:modelValue":p=>f.name=p,onChange:p=>e.$emit("dokument-name-changed",a,f.name)},null,40,Us),[[Pr,f.name]]),B("a",{class:"profil-edit--datei-upload--loeschen",href:"",onClick:Xn(p=>e.$emit("dokument-delete",a),["prevent"])}," Datei löschen ",8,Ws)]))),128))])):ye("",!0),B("form",{onSubmit:n[0]||(n[0]=Xn(()=>{},["prevent"])),class:"profil-edit--datei-upload-add"},[e.error?(X(),ne("p",Vs,de(e.error),1)):ye("",!0),B("div",null,[ue(l,{model:e.file,onFileChanged:e.uploadFile},null,8,["model","onFileChanged"])]),Ks],32)])}const Zs=Le(Ds,[["render",Ys],["__scopeId","data-v-e39f381b"]]),Gs=function(){return qt.ajax({url:"/buchhalterseite2022-wGlobal/wGlobal/scripts/php/UserRefresh",method:"POST"})},Xs={refreshUser:Gs},Qs=function(e,n,t,i){const r={header:{type:"buchhalterProfil",action:"save",accessToken:agenda.wUserCur.accessToken},tab:{user:e,checkbox:n,files:t,socialLinks:i}};return qt.ajax({url:agenda.request.url,type:"POST",data:JSON.stringify(r),contentType:"application/json"})},Js={save:Qs};function gr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ee(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?gr(Object(t),!0).forEach(function(i){rt(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gr(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function rt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function el(e,n){if(e==null)return{};var t,i,r=function(l,f){if(l==null)return{};var a,p,h={},c=Object.keys(l);for(p=0;p<c.length;p++)a=c[p],f.indexOf(a)>=0||(h[a]=l[a]);return h}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function zt(e){return function(n){if(Array.isArray(n))return Ui(n)}(e)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(e)||function(n,t){if(n){if(typeof n=="string")return Ui(n,t);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ui(n,t)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ui(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}var yr,tl,$n,Ce=(yr=function(e){/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(){var n={}.hasOwnProperty;function t(){for(var i=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var l=typeof o;if(l==="string"||l==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var f=t.apply(null,o);f&&i.push(f)}}else if(l==="object")if(o.toString===Object.prototype.toString)for(var a in o)n.call(o,a)&&o[a]&&i.push(a);else i.push(o.toString())}}return i.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t})()},yr($n={path:tl,exports:{},require:function(e,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(n==null&&$n.path)}},$n.exports),$n.exports),ct=function(e){return function(n,t){if(!n)return e;var i;typeof n=="string"?i=n:t=n;var r=e;return i&&(r+="__"+i),r+(t?Object.keys(t).reduce(function(o,l){var f=t[l];return f&&(o+=" "+(typeof f=="boolean"?r+"--"+l:r+"--"+l+"_"+f)),o},""):"")}};function Ji(e,n,t){var i,r,o,l,f;function a(){var h=Date.now()-l;h<n&&h>=0?i=setTimeout(a,n-h):(i=null,t||(f=e.apply(o,r),o=r=null))}n==null&&(n=100);var p=function(){o=this,r=arguments,l=Date.now();var h=t&&!i;return i||(i=setTimeout(a,n)),h&&(f=e.apply(o,r),o=r=null),f};return p.clear=function(){i&&(clearTimeout(i),i=null)},p.flush=function(){i&&(f=e.apply(o,r),o=r=null,clearTimeout(i),i=null)},p}Ji.debounce=Ji;var er=Ji,se=function(){return se=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},se.apply(this,arguments)};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function Hr(e,n){var t,i;return e&&n?(t=""+e+n[0].toUpperCase()+n.slice(1),i=e+"-"+n):(t=e||n,i=e||n),{name:t,classname:i}}function Ur(e){return/^blob:/.test(e)}function br(e){return Ur(e)||function(n){return/^data:/.test(n)}(e)}function Gt(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Ie(e){return e===void 0}function Gn(e){return typeof e=="object"&&e!==null}function tr(e,n,t){var i={};return Gn(e)?(Object.keys(n).forEach(function(r){Ie(e[r])?i[r]=n[r]:Gn(n[r])?Gn(e[r])?i[r]=tr(e[r],n[r],t[r]):i[r]=e[r]?n[r]:t[r]:n[r]===!0||n[r]===!1?i[r]=!!e[r]:i[r]=e[r]}),i):e?n:t}function Bn(e){var n=Number(e);return Number.isNaN(n)?e:n}function _r(e){return typeof(e=="number"||function(n){return typeof n=="object"&&n!==null}(e)&&toString.call(e)=="[object Number]")&&!Wr(e)}function Wr(e){return e!=e}function Vr(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}var gn=function(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.type="manipulateImage",this.move=e,this.scale=n},nl=function(e,n){n===void 0&&(n={}),this.type="resize",this.directions=e,this.params=n},sr=function(e){this.type="move",this.directions=e},il=function(){function e(n,t,i,r,o){this.type="drag",this.nativeEvent=n,this.position=i,this.previousPosition=r,this.element=t,this.anchor=o}return e.prototype.shift=function(){var n=this,t=n.element,i=n.anchor,r=n.position;if(t){var o=t.getBoundingClientRect(),l=o.left,f=o.top;return{left:r.left-l-i.left,top:r.top-f-i.top}}return{left:0,top:0}},e}(),lr={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(e){e.cancelable&&!this.disabled&&e.touches.length===1&&(this.touches=zt(e.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),e.touches.length&&this.initAnchor(this.touches.reduce(function(n,t){return{clientX:n.clientX+t.clientX/e.touches.length,clientY:n.clientY+t.clientY/e.touches.length}},{clientX:0,clientY:0})),e.preventDefault&&e.preventDefault(),e.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(e){this.touches.length&&(this.processMove(e,e.touches),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation())},onMouseDown:function(e){if(!this.disabled){var n={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[n],this.initAnchor(n),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var n=this.$refs.draggable.getBoundingClientRect(),t=n.left,i=n.right,r=n.bottom,o=n.top;this.anchor={left:e.clientX-t,top:e.clientY-o,bottom:r-e.clientY,right:i-e.clientX}},processMove:function(e,n){var t=zt(n);if(this.touches.length){if(this.touches.length===1&&t.length===1){var i=this.$refs.draggable;this.$emit("drag",new il(e,i,{left:t[0].clientX,top:t[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=t}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};lr.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"draggable",class:t.classname,onTouchstart:n[1]||(n[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:n[2]||(n[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:n[3]||(n[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:n[4]||(n[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[$t(e.$slots,"default")],34)};var Wi=ct("vue-handler-wrapper"),Kr={name:"HandlerWrapper",components:{DraggableElement:lr},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var e;if(this.horizontalPosition||this.verticalPosition){var n,t=Hr(this.horizontalPosition,this.verticalPosition);e=Wi((rt(n={},t.classname,!0),rt(n,"disabled",this.disabled),n))}else e=Wi({disabled:this.disabled});return{root:e,draggable:Wi("draggable")}}},emits:["leave","enter","drag","drag-end"]};Kr.render=function(e,n,t,i,r,o){var l=ge("DraggableElement");return X(),Oe("div",{class:o.classes.root},[ue(l,{class:o.classes.draggable,onDrag:n[1]||(n[1]=function(f){return e.$emit("drag",f)}),onDragEnd:n[2]||(n[2]=function(f){return e.$emit("drag-end")}),onLeave:n[3]||(n[3]=function(f){return e.$emit("leave")}),onEnter:n[4]||(n[4]=function(f){return e.$emit("enter")})},{default:ut(function(){return[$t(e.$slots,"default")]}),_:3},8,["class"])],2)};var rl=ct("vue-line-wrapper"),Yr={name:"LineWrapper",components:{DraggableElement:lr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var e;return rl((rt(e={},this.position,!0),rt(e,"disabled",this.disabled),e))}},emits:["leave","enter","drag","drag-end"]};Yr.render=function(e,n,t,i,r,o){var l=ge("DraggableElement");return X(),Oe(l,{class:o.classname,onDrag:n[1]||(n[1]=function(f){return e.$emit("drag",f)}),onDragEnd:n[2]||(n[2]=function(f){return e.$emit("drag-end")}),onLeave:n[3]||(n[3]=function(f){return e.$emit("leave")}),onEnter:n[4]||(n[4]=function(f){return e.$emit("enter")})},{default:ut(function(){return[$t(e.$slots,"default")]}),_:3},8,["class"])};var vt=["left","right","top","bottom"],ol=["left","right"],al=["top","bottom"],sl=["left","top"],ll=["fill-area","fit-area","stencil","none"],wr={left:0,top:0,width:0,height:0};function Or(e,n,t){return!(t=t||["width","height","left","top"]).some(function(i){return e[i]!==n[i]})}function gt(e){return{left:e.left,top:e.top,right:e.left+e.width,bottom:e.top+e.height}}function Qt(e,n){return{left:e.left-n.left,top:e.top-n.top}}function Ue(e){return{left:e.left+e.width/2,top:e.top+e.height/2}}function yn(e,n){var t={left:0,top:0,right:0,bottom:0};return vt.forEach(function(i){var r=n[i],o=gt(e)[i];t[i]=r!==void 0&&o!==void 0?i==="left"||i==="top"?Math.max(0,r-o):Math.max(0,o-r):0}),t}function pt(e,n){return{left:e.left-n.left,top:e.top-n.top,width:e.width+n.left+n.right,height:e.height+n.top+n.bottom}}function ti(e){return{left:-e.left,top:-e.top}}function nt(e,n){return se(se({},e),{left:e.left+n.left,top:e.top+n.top})}function ot(e,n,t,i){if(n!==1){if(t){var r=Ue(e);return{width:e.width*n,height:e.height*n,left:e.left+e.width*(1-n)/2+(t.left-r.left)*(1-n),top:e.top+e.height*(1-n)/2+(t.top-r.top)*(1-n)}}return{width:e.width*n,height:e.height*n,left:e.left+e.width*(1-n)/2,top:e.top+e.height*(1-n)/2}}return e}function ke(e){return e.width/e.height}function Jt(e,n){return Math.min(n.right!==void 0&&n.left!==void 0?(n.right-n.left)/e.width:1/0,n.bottom!==void 0&&n.top!==void 0?(n.bottom-n.top)/e.height:1/0)}function en(e,n){var t={left:0,top:0},i=yn(e,n);return i.left&&i.left>0?t.left=i.left:i.right&&i.right>0&&(t.left=-i.right),i.top&&i.top>0?t.top=i.top:i.bottom&&i.bottom>0&&(t.top=-i.bottom),t}function Vi(e,n){var t;return n.minimum&&e<n.minimum?t=n.minimum:n.maximum&&e>n.maximum&&(t=n.maximum),t}function Zr(e,n){var t=ke(e),i=ke(n);return n.width<1/0&&n.height<1/0?t>i?{width:n.width,height:n.width/t}:{width:n.height*t,height:n.height}:n.width<1/0?{width:n.width,height:n.width/t}:n.height<1/0?{width:n.height*t,height:n.height}:e}function Gr(e,n){var t=n*Math.PI/180;return{width:Math.abs(e.width*Math.cos(t))+Math.abs(e.height*Math.sin(t)),height:Math.abs(e.width*Math.sin(t))+Math.abs(e.height*Math.cos(t))}}function xt(e,n){var t=n*Math.PI/180;return{left:e.left*Math.cos(t)-e.top*Math.sin(t),top:e.left*Math.sin(t)+e.top*Math.cos(t)}}function ni(e,n){var t=yn(We(e,n),n);return t.left+t.right+t.top+t.bottom?t.left+t.right>t.top+t.bottom?Math.min((e.width+t.left+t.right)/e.width,Jt(e,n)):Math.min((e.height+t.top+t.bottom)/e.height,Jt(e,n)):1}function We(e,n,t){t===void 0&&(t=!1);var i=en(e,n);return nt(e,t?ti(i):i)}function nr(e){return{width:e.right!==void 0&&e.left!==void 0?e.right-e.left:1/0,height:e.bottom!==void 0&&e.top!==void 0?e.bottom-e.top:1/0}}function ul(e,n){return se(se({},e),{minWidth:Math.min(n.width,e.minWidth),minHeight:Math.min(n.height,e.minHeight),maxWidth:Math.min(n.width,e.maxWidth),maxHeight:Math.min(n.height,e.maxHeight)})}function Xr(e,n,t){t===void 0&&(t=!0);var i={};return vt.forEach(function(r){var o=e[r],l=n[r];o!==void 0&&l!==void 0?i[r]=r==="left"||r==="top"?t?Math.max(o,l):Math.min(o,l):t?Math.min(o,l):Math.max(o,l):l!==void 0?i[r]=l:o!==void 0&&(i[r]=o)}),i}function ii(e,n){return Xr(e,n,!0)}function Ar(e){var n=e.size,t=e.aspectRatio,i=e.ignoreMinimum,r=e.sizeRestrictions;return!!((n.correctRatio||ke(n)>=t.minimum&&ke(n)<=t.maximum)&&n.height<=r.maxHeight&&n.width<=r.maxWidth&&n.width&&n.height&&(i||n.height>=r.minHeight&&n.width>=r.minWidth))}function Er(e,n){return Math.pow(e.width-n.width,2)+Math.pow(e.height-n.height,2)}function kt(e){var n=e.width,t=e.height,i=e.sizeRestrictions,r={minimum:e.aspectRatio&&e.aspectRatio.minimum||0,maximum:e.aspectRatio&&e.aspectRatio.maximum||1/0},o={width:Math.max(i.minWidth,Math.min(i.maxWidth,n)),height:Math.max(i.minHeight,Math.min(i.maxHeight,t))};function l(p,h){return h===void 0&&(h=!1),p.reduce(function(c,s){return Ar({size:s,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:h})&&(!c||Er(s,{width:n,height:t})<Er(c,{width:n,height:t}))?s:c},null)}var f=[];r&&[r.minimum,r.maximum].forEach(function(p){p&&f.push({width:o.width,height:o.width/p,correctRatio:!0},{width:o.height*p,height:o.height,correctRatio:!0})}),Ar({size:o,aspectRatio:r,sizeRestrictions:i})&&f.push(o);var a=l(f)||l(f,!0);return a&&{width:a.width,height:a.height}}function ir(e){var n=e.event,t=e.coordinates,i=e.positionRestrictions,r=i===void 0?{}:i,o=nt(t,n.directions);return nt(o,en(o,r))}function cl(e){var n=e.coordinates,t=e.transform,i=e.imageSize,r=e.sizeRestrictions,o=e.positionRestrictions,l=e.aspectRatio,f=e.visibleArea,a=function(h,c){return ir({coordinates:h,positionRestrictions:o,event:new sr({left:c.left-h.left,top:c.top-h.top})})},p=se({},n);return(Array.isArray(t)?t:[t]).forEach(function(h){var c={};Ie((c=typeof h=="function"?h({coordinates:p,imageSize:i,visibleArea:f}):h).width)&&Ie(c.height)||(p=function(s,u){var b=se(se(se({},s),kt({width:u.width,height:u.height,sizeRestrictions:r,aspectRatio:l})),{left:0,top:0});return a(b,{left:s.left,top:s.top})}(p,se(se({},p),c))),Ie(c.left)&&Ie(c.top)||(p=a(p,se(se({},p),c)))}),p}function fl(e){e.event;var n=e.getAreaRestrictions,t=e.boundaries,i=e.coordinates,r=e.visibleArea;e.aspectRatio;var o=e.stencilSize,l=e.sizeRestrictions,f=e.positionRestrictions;e.stencilReference;var a,p,h,c=se({},i),s=se({},r),u=se({},o);a=ke(u),p=ke(c),h===void 0&&(h=.001),(a===0||p===0?Math.abs(p-a)<h:Math.abs(p/a)<1+h&&Math.abs(p/a)>1-h)||(c=se(se({},c),kt({sizeRestrictions:l,width:c.width,height:c.height,aspectRatio:{minimum:ke(u),maximum:ke(u)}})));var b=ni(s=ot(s,c.width*t.width/(s.width*u.width)),n({visibleArea:s,type:"resize"}));return b!==1&&(s=ot(s,b),c=ot(c,b)),s=We(s=nt(s,Qt(Ue(c),Ue(s))),n({visibleArea:s,type:"move"})),{coordinates:c=We(c,ii(gt(s),f)),visibleArea:s}}function hl(e){var n=e.event,t=e.getAreaRestrictions,i=e.boundaries,r=e.coordinates,o=e.visibleArea;e.aspectRatio,e.stencilSize,e.sizeRestrictions;var l=e.positionRestrictions;e.stencilReference;var f=se({},r),a=se({},o);if(r&&o&&n.type!=="manipulateImage"){var p={width:0,height:0};a.width,i.width,ke(i)>ke(f)?(p.height=.8*i.height,p.width=p.height*ke(f)):(p.width=.8*i.width,p.height=p.width*ke(f));var h=ni(a=ot(a,f.width*i.width/(a.width*p.width)),t({visibleArea:a,type:"resize"}));a=ot(a,h),h!==1&&(p.height/=h,p.width/=h),a=We(a=nt(a,Qt(Ue(f),Ue(a))),t({visibleArea:a,type:"move"})),f=We(f,ii(gt(a),l))}return{coordinates:f,visibleArea:a}}function dl(e){var n=e.event,t=e.coordinates,i=e.visibleArea,r=e.getAreaRestrictions,o=se({},i),l=se({},t);if(n.type==="setCoordinates"){var f=Math.max(0,l.width-o.width),a=Math.max(0,l.height-o.height);f>a?o=ot(o,Math.min(l.width/o.width,Jt(o,r({visibleArea:o,type:"resize"})))):a>f&&(o=ot(o,Math.min(l.height/o.height,Jt(o,r({visibleArea:o,type:"resize"}))))),o=We(o=nt(o,ti(en(l,gt(o)))),r({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:l}}function pl(e){var n=e.imageSize,t=e.visibleArea,i=e.coordinates,r=t||n;return{left:(t?t.left:0)+r.width/2-i.width/2,top:(t?t.top:0)+r.height/2-i.height/2}}function vl(e){var n=e.imageSize,t=e.visibleArea,i=e.aspectRatio,r=e.sizeRestrictions,o=t||n,l=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ke(o))),f=o.width<o.height?{width:.8*o.width,height:.8*o.width/l}:{height:.8*o.height,width:.8*o.height*l};return kt(se(se({},f),{aspectRatio:i,sizeRestrictions:r}))}function ml(e){var n,t,i=e.imageSize,r=e.visibleArea,o=e.boundaries,l=e.aspectRatio,f=e.sizeRestrictions,a=e.stencilSize,p=r||i;return ke(p)>ke(o)?t=(n=a.height*p.height/o.height)*ke(a):n=(t=a.width*p.width/o.width)/ke(a),kt({width:t,height:n,aspectRatio:l,sizeRestrictions:f})}function gl(e){var n=e.getAreaRestrictions,t=e.coordinates,i=e.imageSize,r=ke(e.boundaries);if(t){var o={height:Math.max(t.height,i.height),width:Math.max(t.width,i.width)},l=Zr({width:ke(o)>r?o.width:o.height*r,height:ke(o)>r?o.width/r:o.height},nr(n())),f={left:t.left+t.width/2-l.width/2,top:t.top+t.height/2-l.height/2,width:l.width,height:l.height},a=yn(t,gt(se({left:0,top:0},i))),p={};return!a.left&&!a.right&&f.width<=i.width&&(p.left=0,p.right=i.width),!a.top&&!a.bottom&&f.height<=i.height&&(p.top=0,p.bottom=i.height),We(f,p)}var h=ke(i);return l={height:h>r?i.height:i.width/r,width:h>r?i.height*r:i.width},{left:i.width/2-l.width/2,top:i.height/2-l.height/2,width:l.width,height:l.height}}function Fn(e,n){return Xr(e,gt(n))}function yl(e){var n=e.event,t=e.coordinates,i=e.visibleArea,r=e.sizeRestrictions,o=e.getAreaRestrictions,l=e.positionRestrictions,f=e.adjustStencil,a=n.scale,p=n.move,h=se({},i),c=se({},t),s=1,u=1,b=a.factor&&Math.abs(a.factor-1)>.001;h=nt(h,{left:p.left||0,top:p.top||0});var g={stencil:{minimum:Math.max(r.minWidth?r.minWidth/c.width:0,r.minHeight?r.minHeight/c.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/c.width:1/0,r.maxHeight?r.maxHeight/c.height:1/0,Jt(c,l))},area:{maximum:Jt(h,o({visibleArea:h,type:"resize"}))}};a.factor&&b&&(a.factor<1?(u=Math.max(a.factor,g.stencil.minimum))>1&&(u=1):a.factor>1&&(u=Math.min(a.factor,Math.min(g.area.maximum,g.stencil.maximum)))<1&&(u=1)),u&&(h=ot(h,u,a.center));var y=t.left-i.left,v=i.width+i.left-(t.width+t.left),m=t.top-i.top,w=i.height+i.top-(t.height+t.top);return h=We(h=nt(h,en(h,{left:l.left!==void 0?l.left-y*u:void 0,top:l.top!==void 0?l.top-m*u:void 0,bottom:l.bottom!==void 0?l.bottom+w*u:void 0,right:l.right!==void 0?l.right+v*u:void 0})),o({visibleArea:h,type:"move"})),c.width=c.width*u,c.height=c.height*u,c.left=h.left+y*u,c.top=h.top+m*u,c=We(c,ii(gt(h),l)),a.factor&&b&&f&&(a.factor>1?s=Math.min(g.area.maximum,a.factor)/u:a.factor<1&&(s=Math.max(c.height/h.height,c.width/h.width,a.factor/u)),s!==1&&(h=nt(h=We(h=ot(h,s,a.factor>1?a.center:Ue(c)),o({visibleArea:h,type:"move"})),ti(en(c,gt(h)))))),{coordinates:c,visibleArea:h}}function bl(e){var n=e.aspectRatio,t=e.getAreaRestrictions,i=e.coordinates,r=e.visibleArea,o=e.sizeRestrictions,l=e.positionRestrictions,f=e.imageSize,a=e.previousImageSize,p=e.angle,h=se({},i),c=se({},r),s=xt(Ue(se({left:0,top:0},a)),p);return(h=se(se({},kt({sizeRestrictions:o,aspectRatio:n,width:h.width,height:h.height})),xt(Ue(h),p))).left-=s.left-f.width/2+h.width/2,h.top-=s.top-f.height/2+h.height/2,c=ot(c,ni(c,t({visibleArea:c,type:"resize"}))),{coordinates:h=We(h,l),visibleArea:c=We(c=nt(c,Qt(Ue(h),Ue(i))),t({visibleArea:c,type:"move"}))}}function _l(e){var n=e.flip,t=e.previousFlip,i=e.rotate,r=e.getAreaRestrictions,o=e.coordinates,l=e.visibleArea,f=e.imageSize,a=se({},o),p=se({},l),h=t.horizontal!==n.horizontal,c=t.vertical!==n.vertical;if(h||c){var s=xt({left:f.width/2,top:f.height/2},-i),u=xt(Ue(a),-i),b=xt({left:h?s.left-(u.left-s.left):u.left,top:c?s.top-(u.top-s.top):u.top},i);a=nt(a,Qt(b,Ue(a))),u=xt(Ue(p),-i),p=We(p=nt(p,Qt(b=xt({left:h?s.left-(u.left-s.left):u.left,top:c?s.top-(u.top-s.top):u.top},i),Ue(p))),r({visibleArea:p,type:"move"}))}return{coordinates:a,visibleArea:p}}function kr(e){var n=e.directions,t=e.coordinates,i=e.positionRestrictions,r=i===void 0?{}:i,o=e.sizeRestrictions,l=e.preserveRatio,f=e.compensate,a=se({},n),p=pt(t,a).width,h=pt(t,a).height;p<0&&(a.left<0&&a.right<0?(a.left=-(t.width-o.minWidth)/(a.left/a.right),a.right=-(t.width-o.minWidth)/(a.right/a.left)):a.left<0?a.left=-(t.width-o.minWidth):a.right<0&&(a.right=-(t.width-o.minWidth))),h<0&&(a.top<0&&a.bottom<0?(a.top=-(t.height-o.minHeight)/(a.top/a.bottom),a.bottom=-(t.height-o.minHeight)/(a.bottom/a.top)):a.top<0?a.top=-(t.height-o.minHeight):a.bottom<0&&(a.bottom=-(t.height-o.minHeight)));var c=yn(pt(t,a),r);f&&(c.left&&c.left>0&&c.right===0?(a.right+=c.left,a.left-=c.left):c.right&&c.right>0&&c.left===0&&(a.left+=c.right,a.right-=c.right),c.top&&c.top>0&&c.bottom===0?(a.bottom+=c.top,a.top-=c.top):c.bottom&&c.bottom>0&&c.top===0&&(a.top+=c.bottom,a.bottom-=c.bottom),c=yn(pt(t,a),r));var s={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(vt.forEach(function(g){var y=c[g];y&&a[g]&&(s[g]=Math.max(0,1-y/a[g]))}),l){var u=Math.min.apply(null,vt.map(function(g){return s[g]}));u!==1/0&&vt.forEach(function(g){a[g]*=u})}else vt.forEach(function(g){s[g]!==1/0&&(a[g]*=s[g])});if(p=pt(t,a).width,h=pt(t,a).height,a.right+a.left&&(p>o.maxWidth?s.width=(o.maxWidth-t.width)/(a.right+a.left):p<o.minWidth&&(s.width=(o.minWidth-t.width)/(a.right+a.left))),a.bottom+a.top&&(h>o.maxHeight?s.height=(o.maxHeight-t.height)/(a.bottom+a.top):h<o.minHeight&&(s.height=(o.minHeight-t.height)/(a.bottom+a.top))),l){var b=Math.min(s.width,s.height);b!==1/0&&vt.forEach(function(g){a[g]*=b})}else s.width!==1/0&&ol.forEach(function(g){a[g]*=s.width}),s.height!==1/0&&al.forEach(function(g){a[g]*=s.height});return a}function Hn(e,n,t){return n==0&&t==0?e/2:n==0?0:t==0?e:e*Math.abs(n/(n+t))}var wl=ct("vue-simple-handler"),Ol=ct("vue-simple-handler-wrapper"),ur={name:"SimpleHandler",components:{HandlerWrapper:Kr},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var e,n=(rt(e={},this.horizontalPosition,!!this.horizontalPosition),rt(e,this.verticalPosition,!!this.verticalPosition),rt(e,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),rt(e,"hover",this.hover),e);return{default:Ce(wl(n),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ce(Ol(n),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};ur.render=function(e,n,t,i,r,o){var l=ge("HandlerWrapper");return X(),Oe(l,{class:o.classes.wrapper,"vertical-position":t.verticalPosition,"horizontal-position":t.horizontalPosition,disabled:t.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:ut(function(){return[ue("div",{class:o.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Al=ct("vue-simple-line"),El=ct("vue-simple-line-wrapper"),cr={name:"SimpleLine",components:{LineWrapper:Yr},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Ce(Al(rt({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Ce(El(rt({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(e){this.$emit("drag",e)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};cr.render=function(e,n,t,i,r,o){var l=ge("LineWrapper");return X(),Oe(l,{class:o.classes.wrapper,position:t.position,disabled:t.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:ut(function(){return[ue("div",{class:o.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Ki=ct("vue-bounding-box"),kl=["east","west",null],Sl=["south","north",null],Qr={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return ur}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return cr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var e=[];return kl.forEach(function(n){Sl.forEach(function(t){if(n!==t){var i=Hr(n,t),r=i.name,o=i.classname;e.push({name:r,classname:o,verticalDirection:t,horizontalDirection:n})}})}),{points:e}},computed:{style:function(){var e={};return this.width&&this.height&&(e.width="".concat(this.width,"px"),e.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),e},classes:function(){var e=this.handlersClasses,n=this.handlersWrappersClasses,t=this.linesClasses,i=this.linesWrappersClasses;return{root:Ki(),handlers:e,handlersWrappers:n,lines:t,linesWrappers:i}},lineNodes:function(){var e=this,n=[];return this.points.forEach(function(t){t.horizontalDirection&&t.verticalDirection||!e.lines[t.name]||n.push({name:t.name,component:e.linesComponent,class:Ce(e.classes.lines.default,e.classes.lines[t.name],!e.resizable&&e.classes.lines.disabled),wrapperClass:Ce(e.classes.linesWrappers.default,e.classes.linesWrappers[t.name],!e.resizable&&e.classes.linesWrappers.disabled),hoverClass:e.classes.lines.hover,verticalDirection:t.verticalDirection,horizontalDirection:t.horizontalDirection,disabled:!e.resizable})}),n},handlerNodes:function(){var e=this,n=[],t=this.width,i=this.height;return this.points.forEach(function(r){if(e.handlers[r.name]){var o={name:r.name,component:e.handlersComponent,class:Ce(e.classes.handlers.default,e.classes.handlers[r.name]),wrapperClass:Ce(e.classes.handlersWrappers.default,e.classes.handlersWrappers[r.name]),hoverClass:e.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!e.resizable};if(t&&i){var l=r.horizontalDirection,f=r.verticalDirection,a=l==="east"?t:l==="west"?0:t/2,p=f==="south"?i:f==="north"?0:i/2;o.wrapperClass=Ki("handler"),o.wrapperStyle={transform:"translate(".concat(a,"px, ").concat(p,"px)")},e.transitions&&e.transitions.enabled&&(o.wrapperStyle.transition="".concat(e.transitions.time,"ms ").concat(e.transitions.timingFunction))}else o.wrapperClass=Ki("handler",rt({},r.classname,!0));n.push(o)}}),n}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(e,n,t){var i,r=e.shift(),o=r.left,l=r.top,f={left:0,right:0,top:0,bottom:0};n==="west"?f.left-=o:n==="east"&&(f.right+=o),t==="north"?f.top-=l:t==="south"&&(f.bottom+=l),!t&&n?i="width":t&&!n&&(i="height"),this.resizable&&this.$emit("resize",new nl(f,{allowedDirections:{left:n==="west"||!n,right:n==="east"||!n,bottom:t==="south"||!t,top:t==="north"||!t},preserveAspectRatio:e.nativeEvent&&e.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};Qr.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"box",class:o.classes.root,style:o.style},[$t(e.$slots,"default"),ue("div",null,[(X(!0),Oe(xe,null,De(o.lineNodes,function(l){return X(),Oe(Qn(l.component),{key:l.name,"default-class":l.class,"hover-class":l.hoverClass,"wrapper-class":l.wrapperClass,position:l.name,disabled:l.disabled,onDrag:function(f){return o.onHandlerDrag(f,l.horizontalDirection,l.verticalDirection)},onDragEnd:n[1]||(n[1]=function(f){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(X(!0),Oe(xe,null,De(o.handlerNodes,function(l){return X(),Oe("div",{key:l.name,style:l.wrapperStyle,class:l.wrapperClass},[(X(),Oe(Qn(l.component),{"default-class":l.class,"hover-class":l.hoverClass,"wrapper-class":l.wrapperClass,"horizontal-position":l.horizontalDirection,"vertical-position":l.verticalDirection,disabled:l.disabled,onDrag:function(f){return o.onHandlerDrag(f,l.horizontalDirection,l.verticalDirection)},onDragEnd:n[2]||(n[2]=function(f){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var Tl=ct("vue-draggable-area"),Jr={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:Tl()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(e){if(e.cancelable){var n=this.movable&&e.touches.length===1;n&&(this.touches=zt(e.touches)),(this.touchStarted||n)&&(e.preventDefault(),e.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(e){this.touches.length>=1&&(this.touchStarted?(this.processMove(e,e.touches),e.preventDefault(),e.stopPropagation()):Vr({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:e.touches[0].clientX,y:e.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(e){if(this.movable&&e.button===0){var n={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[n],this.initAnchor(n),e.stopPropagation()}},onMouseMove:function(e){this.touches.length&&(this.processMove(e,[{fake:!0,clientX:e.clientX,clientY:e.clientY}]),e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(e){var n=this.$refs.container.getBoundingClientRect(),t=n.left,i=n.top;this.anchor={x:e.clientX-t,y:e.clientY-i}},processMove:function(e,n){var t=zt(n);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,o=i.top;this.touches.length===1&&t.length===1&&this.$emit("move",new sr({left:t[0].clientX-(r+this.anchor.x),top:t[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Jr.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"container",onTouchstart:n[1]||(n[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:n[2]||(n[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[$t(e.$slots,"default")],544)};function Yi(e){var n,t;return{rotate:e.rotate||0,flip:{horizontal:((n=e==null?void 0:e.flip)===null||n===void 0?void 0:n.horizontal)||!1,vertical:((t=e==null?void 0:e.flip)===null||t===void 0?void 0:t.vertical)||!1}}}function Rl(e){return new Promise(function(n,t){try{if(e)if(/^data:/i.test(e))n(function(a){a=a.replace(/^data:([^;]+);base64,/gim,"");for(var p=atob(a),h=p.length,c=new ArrayBuffer(h),s=new Uint8Array(c),u=0;u<h;u++)s[u]=p.charCodeAt(u);return c}(e));else if(/^blob:/i.test(e)){var i=new FileReader;i.onload=function(a){n(a.target.result)},o=e,l=function(a){i.readAsArrayBuffer(a)},(f=new XMLHttpRequest).open("GET",o,!0),f.responseType="blob",f.onload=function(){this.status!=200&&this.status!==0||l(this.response)},f.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?n(r.response):t("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",e,!0),r.responseType="arraybuffer",r.send(null)}else t("Error: the image is empty")}catch(a){t(a)}var o,l,f})}function eo(e){var n=e.rotate,t=e.flip,i=e.scaleX,r=e.scaleY,o="";return o+=" rotate("+n+"deg) ",o+=" scaleX("+i*(t.horizontal?-1:1)+") ",o+=" scaleY("+r*(t.vertical?-1:1)+") "}function xl(e){try{var n,t=new DataView(e),i=void 0,r=void 0,o=void 0,l=void 0;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var f=t.byteLength,a=2;a+1<f;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a++}if(o&&(i=o+10,function(u,b,g){var y,v="";for(y=b,g+=b;y<g;y++)v+=String.fromCharCode(u.getUint8(y));return v}(t,o+4,4)==="Exif")){var p=t.getUint16(i);if(((r=p===18761)||p===19789)&&t.getUint16(i+2,r)===42){var h=t.getUint32(i+4,r);h>=8&&(l=i+h)}}if(l){for(var c=t.getUint16(l,r),s=0;s<c;s++)if(a=l+12*s+2,t.getUint16(a,r)===274){a+=8,n=t.getUint16(a,r),t.setUint16(a,1,r);break}}return n}catch{return null}}function Sr(e,n){var t=n.getBoundingClientRect(),i=t.left,r=t.top,o={left:0,top:0},l=0;return e.forEach(function(f){o.left+=(f.clientX-i)/e.length,o.top+=(f.clientY-r)/e.length}),e.forEach(function(f){l+=Vr({x:o.left,y:o.top},{x:f.clientX-i,y:f.clientY-r})}),{centerMass:o,spread:l,count:e.length}}var to={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=er(this.processEnd),this.touches=[]},methods:{processMove:function(e,n){if(this.touches.length){if(this.touches.length===1&&n.length===1)this.$emit("move",new gn({left:this.touches[0].clientX-n[0].clientX,top:this.touches[0].clientY-n[0].clientY}));else if(this.touches.length>1&&this.touchResize){var t=Sr(n,this.$refs.container),i=this.oldGeometricProperties;i.count===t.count&&i.count>1&&this.$emit("resize",new gn({left:i.centerMass.left-t.centerMass.left,top:i.centerMass.top-t.centerMass.top},{factor:i.spread/t.spread,center:t.centerMass})),this.oldGeometricProperties=t}this.touches=n}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(e){return this.eventsFilter?this.eventsFilter(e,this.transforming)!==!1:(e.preventDefault(),e.stopPropagation(),!0)},onTouchStart:function(e){if(e.cancelable&&(this.touchMove||this.touchResize&&e.touches.length>1)&&this.processEvent(e)){var n=this.$refs.container,t=n.getBoundingClientRect(),i=t.left,r=t.top,o=t.bottom,l=t.right;this.touches=zt(e.touches).filter(function(f){return f.clientX>i&&f.clientX<l&&f.clientY>r&&f.clientY<o}),this.oldGeometricProperties=Sr(this.touches,n)}},onTouchEnd:function(e){e.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(e){var n=this;if(this.touches.length){var t=zt(e.touches).filter(function(i){return!i.identifier||n.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(e)&&(this.processMove(e,t),this.processStart())}},onMouseDown:function(e){if(this.mouseMove&&"buttons"in e&&e.buttons===1&&this.processEvent(e)){var n={fake:!0,clientX:e.clientX,clientY:e.clientY};this.touches=[n],this.processStart()}},onMouseMove:function(e){this.touches.length&&this.processEvent(e)&&this.processMove(e,[{clientX:e.clientX,clientY:e.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(e){if(this.wheelResize&&this.processEvent(e)){var n=this.$refs.container.getBoundingClientRect(),t=n.left,i=n.top,r=1+this.wheelResize.ratio*(l=e.deltaY||e.detail||e.wheelDelta,(f=+l)==0||Wr(f)?f:f>0?1:-1),o={left:e.clientX-t,top:e.clientY-i};this.$emit("resize",new gn({},{factor:r,center:o})),this.touches.length||this.debouncedProcessEnd()}var l,f}},emits:["resize","move","transform-end"]};to.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"container",onTouchstart:n[1]||(n[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:n[2]||(n[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:n[3]||(n[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[$t(e.$slots,"default")],544)};var rr={components:{TransformableImage:to},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};rr.render=function(e,n,t,i,r,o){var l=ge("transformable-image");return X(),Oe(l,{"touch-move":t.touchMove,"touch-resize":t.touchResize,"mouse-move":t.mouseMove,"wheel-resize":t.wheelResize,onMove:n[1]||(n[1]=function(f){return e.$emit("move",f)}),onResize:n[2]||(n[2]=function(f){return e.$emit("resize",f)})},{default:ut(function(){return[$t(e.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Un=ct("vue-preview"),no={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Un({fill:this.fill}),wrapper:Un("wrapper"),imageWrapper:Un("image-wrapper"),image:Ce(Un("image"),this.imageClass)}},style:function(){if(this.fill)return{};var e={};return this.width&&(e.width="".concat(this.size.width,"px")),this.height&&(e.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},wrapperStyle:function(){var e={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(e.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),e},imageStyle:function(){if(this.coordinates&&this.image){var e=this.coordinates.width/this.size.width,n=Ee(Ee({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/e,scaleY:1/e}),t=this.imageSize.width,i=this.imageSize.height,r=Gr({width:t,height:i},n.rotate),o={width:"".concat(t,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},l={rotate:{left:(t-r.width)*n.scaleX/2,top:(i-r.height)*n.scaleY/2},scale:{left:(1-n.scaleX)*t/2,top:(1-n.scaleY)*i/2}};return o.transform=`translate( `.concat(-this.coordinates.left/e-l.rotate.left-l.scale.left,"px,").concat(-this.coordinates.top/e-l.rotate.top-l.scale.top,"px) ")+eo(n),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(e){(e.width||e.height)&&this.onChangeImage()}},mounted:function(){var e=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){e.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var e=this.$refs.image;this.calculatedImageSize.height=e.naturalHeight,this.calculatedImageSize.width=e.naturalWidth},refresh:function(){var e=this.$refs.root;this.width||(this.calculatedSize.width=e.clientWidth),this.height||(this.calculatedSize.height=e.clientHeight)},onChangeImage:function(){var e=this.$refs.image;e&&e.complete&&this.refreshImage(),this.refresh()}}};no.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"root",class:o.classes.root,style:o.style},[ue("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[_n(ue("img",{ref:"image",src:t.image&&t.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[Lr,t.image&&t.image.src]])],6)],6)};var io={components:{Preview:no},inheritAttrs:!1};io.render=function(e,n,t,i,r,o){var l=ge("preview");return X(),Oe(l,Mr(e.$attrs,{fill:!0}),null,16)};var Zi=ct("vue-rectangle-stencil"),ro={name:"RectangleStencil",components:{StencilPreview:io,BoundingBox:Qr,DraggableArea:Jr},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return ur}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return cr}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Ce(Zi({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Ce(Zi("preview"),this.previewClass),boundingBox:Ce(Zi("bounding-box"),this.boundingBoxClass)}},style:function(){var e=this.stencilCoordinates,n=e.height,t=e.width,i=e.left,r=e.top,o={width:"".concat(t,"px"),height:"".concat(n,"px"),transform:"translate(".concat(i,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(e){this.$emit("move",e),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(e){this.$emit("resize",e),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};ro.render=function(e,n,t,i,r,o){var l=ge("stencil-preview"),f=ge("draggable-area"),a=ge("bounding-box");return X(),Oe("div",{class:o.classes.stencil,style:o.style},[ue(a,{width:t.stencilCoordinates.width,height:t.stencilCoordinates.height,transitions:t.transitions,class:o.classes.boundingBox,handlers:t.handlers,"handlers-component":t.handlersComponent,"handlers-classes":t.handlersClasses,"handlers-wrappers-classes":t.handlersWrappersClasses,lines:t.lines,"lines-component":t.linesComponent,"lines-classes":t.linesClasses,"lines-wrappers-classes":t.linesWrappersClasses,resizable:t.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:ut(function(){return[ue(f,{movable:t.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:ut(function(){return[ue(l,{image:t.image,coordinates:t.coordinates,width:t.stencilCoordinates.width,height:t.stencilCoordinates.height,class:o.classes.preview,transitions:t.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var Nl=["transitions"],Et=ct("vue-advanced-cropper"),oo={name:"Cropper",components:{BackgroundWrapper:rr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return ro}},backgroundWrapperComponent:{type:[Object,String],default:function(){return rr}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(e){return ll.indexOf(e)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(e){return!(typeof e=="string"&&e!=="fill"&&e!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(e){var n=e.event,t=e.coordinates,i=e.aspectRatio,r=e.positionRestrictions,o=e.sizeRestrictions,l=se(se({},t),{right:t.left+t.width,bottom:t.top+t.height}),f=n.params||{},a=se({},n.directions),p=f.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(a.left=0,a.right=0),o.heightFrozen&&(a.top=0,a.bottom=0),vt.forEach(function(d){p[d]||(a[d]=0)});var h=pt(l,a=kr({coordinates:l,directions:a,sizeRestrictions:o,positionRestrictions:r})).width,c=pt(l,a).height,s=f.preserveRatio?ke(l):Vi(h/c,i);if(s){var u=f.respectDirection;if(u||(u=l.width>=l.height||s===1?"width":"height"),u==="width"){var b=h/s-l.height;if(p.top&&p.bottom){var g=a.top,y=a.bottom;a.bottom=Hn(b,y,g),a.top=Hn(b,g,y)}else p.bottom?a.bottom=b:p.top?a.top=b:p.right?a.right=0:p.left&&(a.left=0)}else if(u==="height"){var v=l.width-c*s;if(p.left&&p.right){var m=a.left,w=a.right;a.left=-Hn(v,m,w),a.right=-Hn(v,w,m)}else p.left?a.left=-v:p.right?a.right=-v:p.top?a.top=0:p.bottom&&(a.bottom=0)}a=kr({directions:a,coordinates:l,sizeRestrictions:o,positionRestrictions:r,preserveRatio:!0,compensate:f.compensate})}return h=pt(l,a).width,c=pt(l,a).height,(s=f.preserveRatio?ke(l):Vi(h/c,i))&&Math.abs(s-h/c)>.001&&vt.forEach(function(d){p[d]||(a[d]=0)}),ir({event:new sr({left:-a.left,top:-a.top}),coordinates:{width:t.width+a.right+a.left,height:t.height+a.top+a.bottom,left:t.left,top:t.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:ir},initStretcher:{type:Function,default:function(e){var n=e.stretcher,t=e.imageSize,i=ke(t);n.style.width=t.width+"px",n.style.height=n.clientWidth/i+"px",n.style.width=n.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(e){var n=e.visibleArea,t=e.coordinates,i=e.aspectRatio,r=e.sizeRestrictions,o=e.positionRestrictions,l=se(se({},t),kt({width:t.width,height:t.height,aspectRatio:i,sizeRestrictions:{maxWidth:n.width,maxHeight:n.height,minHeight:Math.min(n.height,r.minHeight),minWidth:Math.min(n.width,r.minWidth)}}));return l=We(l=nt(l,Qt(Ue(t),Ue(l))),ii(gt(n),o))}},fitVisibleArea:{type:Function,default:function(e){var n=e.visibleArea,t=e.boundaries,i=e.getAreaRestrictions,r=e.coordinates,o=se({},n);o.height=o.width/ke(t),o.top+=(n.height-o.height)/2,(r.height-o.height>0||r.width-o.width>0)&&(o=ot(o,Math.max(r.height/o.height,r.width/o.width)));var l=ti(en(r,gt(o=ot(o,ni(o,i({visibleArea:o,type:"resize"}))))));return o.width<r.width&&(l.left=0),o.height<r.height&&(l.top=0),o=We(o=nt(o,l),i({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(e){var n=e.visibleArea,t=e.boundaries,i=e.imageSize,r=e.imageRestriction,o=e.type,l={};return r==="fill-area"?l={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ke(t)>ke(i)?(l={top:0,bottom:i.height},n&&o==="move"&&(n.width>i.width?(l.left=-(n.width-i.width)/2,l.right=i.width-l.left):(l.left=0,l.right=i.width))):(l={left:0,right:i.width},n&&o==="move"&&(n.height>i.height?(l.top=-(n.height-i.height)/2,l.bottom=i.height-l.top):(l.top=0,l.bottom=i.height)))),l}},sizeRestrictionsAlgorithm:{type:Function,default:function(e){return{minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(e){var n=e.imageSize,t={};return e.imageRestriction!=="none"&&(t={left:0,top:0,right:n.width,bottom:n.height}),t}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:Ee({},wr)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var e=function(n){return n*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(e))+Math.abs(this.imageAttributes.height*Math.sin(e)),height:Math.abs(this.imageAttributes.width*Math.sin(e))+Math.abs(this.imageAttributes.height*Math.cos(e))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var e=tr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:tr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:e}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var e=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Ie(this.minWidth)?0:Bn(this.minWidth),minHeight:Ie(this.minHeight)?0:Bn(this.minHeight),maxWidth:Ie(this.maxWidth)?1/0:Bn(this.maxWidth),maxHeight:Ie(this.maxHeight)?1/0:Bn(this.maxHeight)});if(e=function(i){var r=i.areaRestrictions,o=i.sizeRestrictions,l=i.boundaries,f=i.positionRestrictions,a=se(se({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});f.left!==void 0&&f.right!==void 0&&(a.maxWidth=Math.min(a.maxWidth,f.right-f.left)),f.bottom!==void 0&&f.top!==void 0&&(a.maxHeight=Math.min(a.maxHeight,f.bottom-f.top));var p=nr(r),h=Zr(l,p);return p.width<1/0&&(!a.maxWidth||a.maxWidth>h.width)&&(a.maxWidth=Math.min(a.maxWidth,h.width)),p.height<1/0&&(!a.maxHeight||a.maxHeight>h.height)&&(a.maxHeight=Math.min(a.maxHeight,h.height)),a.minWidth>a.maxWidth&&(a.minWidth=a.maxWidth,a.widthFrozen=!0),a.minHeight>a.maxHeight&&(a.minHeight=a.maxHeight,a.heightFrozen=!0),a}({sizeRestrictions:e,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var n=this.getStencilSize(),t=nr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));e.maxWidth=Math.min(e.maxWidth,t.width*n.width/this.boundaries.width),e.maxHeight=Math.min(e.maxHeight,t.height*n.height/this.boundaries.height),e.maxWidth<e.minWidth&&(e.minWidth=e.maxWidth),e.maxHeight<e.minHeight&&(e.minHeight=e.maxHeight)}return e}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Et(),image:Ce(Et("image"),this.imageClass),stencil:Et("stencil"),boundaries:Ce(Et("boundaries"),this.boundariesClass),stretcher:Ce(Et("stretcher")),background:Ce(Et("background"),this.backgroundClass),foreground:Ce(Et("foreground"),this.foregroundClass),imageWrapper:Ce(Et("image-wrapper")),cropperWrapper:Ce(Et("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var e=this.coordinates,n=e.width,t=e.height,i=e.left,r=e.top;return{width:n/this.coefficient,height:t/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var e={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(e.opacity="0"),e},imageStyle:function(){var e=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},n={left:(e.width-this.imageSize.width)/(2*this.coefficient),top:(e.height-this.imageSize.height)/(2*this.coefficient)},t={left:(1-1/this.coefficient)*e.width/2,top:(1-1/this.coefficient)*e.height/2},i=Ee(Ee({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/e.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/e.height)}),r={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-n.left-t.left-this.imageTransforms.translateX,"px, ").concat(-n.top-t.top-this.imageTransforms.translateY,"px)")+eo(i)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var e=this;this.$nextTick(function(){e.resetCoordinates(),e.runAutoZoom("setCoordinates"),e.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(e,n){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(t){return e[t]!==n[t]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=er(this.update,this.debounce),this.debouncedDisableTransitions=er(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var e=this.initialized?this.prepareResult(Ee({},this.coordinates)):this.defaultCoordinates(),n={rotate:this.imageTransforms.rotate%360,flip:Ee({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var t=this;return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Ee({},this.visibleArea):null,imageTransforms:n,get canvas(){return t.canvas?t.getCanvas():void 0}}}return{image:this.image,coordinates:e,visibleArea:this.visibleArea?Ee({},this.visibleArea):null,canvas:void 0,imageTransforms:n}},zoom:function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.transitions,r=i===void 0||i;this.onManipulateImage(new gn({},{factor:1/e,center:n}),{normalize:!1,transitions:r})},move:function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.transitions,r=i===void 0||i;this.onManipulateImage(new gn({left:e||0,top:n||0}),{normalize:!1,transitions:r})},setCoordinates:function(e){var n=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.autoZoom,r=i===void 0||i,o=t.transitions,l=o===void 0||o;this.$nextTick(function(){n.imageLoaded?(n.transitionsActive||(l&&n.enableTransitions(),n.coordinates=n.applyTransform(e),r&&n.runAutoZoom("setCoordinates"),l&&n.debouncedDisableTransitions()),n.onChange()):n.delayedTransforms=e})},refresh:function(){var e=this,n=this.$refs.image;if(this.src&&n)return this.initialized?this.updateVisibleArea().then(function(){e.onChange()}):this.resetVisibleArea().then(function(){e.onChange()})},reset:function(){var e=this;return this.resetVisibleArea().then(function(){e.onChange(!1)})},awaitRender:function(e){var n=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){e(),n.awaiting=!1}))},prepareResult:function(e){return this.roundResult?function(n){var t=n.coordinates,i=n.sizeRestrictions,r=n.positionRestrictions,o={width:Math.round(t.width),height:Math.round(t.height),left:Math.round(t.left),top:Math.round(t.top)};return o.width>i.maxWidth?o.width=Math.floor(t.width):o.width<i.minWidth&&(o.width=Math.ceil(t.width)),o.height>i.maxHeight?o.height=Math.floor(t.height):o.height<i.minHeight&&(o.height=Math.ceil(t.height)),We(o,r)}(Ee(Ee({},this.getPublicProperties()),{},{positionRestrictions:Fn(this.positionRestrictions,this.visibleArea),coordinates:e})):e},processAutoZoom:function(e,n,t,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?fl:this.autoZoom?hl:dl);var o=r({event:{type:e,params:i},visibleArea:n,coordinates:t,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return Ee(Ee({},o),{},{changed:!Or(o.visibleArea,n)||!Or(o.coordinates,t)})},runAutoZoom:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.transitions,i=t!==void 0&&t,r=el(n,Nl),o=this.processAutoZoom(e,this.visibleArea,this.coordinates,r),l=o.visibleArea,f=o.coordinates,a=o.changed;i&&a&&this.enableTransitions(),this.visibleArea=l,this.coordinates=f,i&&a&&this.debouncedDisableTransitions()},normalizeEvent:function(e){return function(n){var t=n.event,i=n.visibleArea,r=n.coefficient;if(t.type==="manipulateImage")return se(se({},t),{move:{left:t.move&&t.move.left?r*t.move.left:0,top:t.move&&t.move.top?r*t.move.top:0},scale:{factor:t.scale&&t.scale.factor?t.scale.factor:1,center:t.scale&&t.scale.center?{left:t.scale.center.left*r+i.left,top:t.scale.center.top*r+i.top}:null}});if(t.type==="resize"){var o=se(se({},t),{directions:se({},t.directions)});return vt.forEach(function(f){o.directions[f]*=r}),o}if(t.type==="move"){var l=se(se({},t),{directions:se({},t.directions)});return sl.forEach(function(f){l.directions[f]*=r}),l}return t}(Ee(Ee({},this.getPublicProperties()),{},{event:e}))},getCanvas:function(){if(this.$refs.canvas){var e=this.$refs.canvas,n=this.$refs.image,t=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(f,a,p){var h=p.rotate,c=p.flip,s={width:a.naturalWidth,height:a.naturalHeight},u=Gr(s,h),b=f.getContext("2d");f.height=u.height,f.width=u.width,b.save();var g=xt(Ue(se({left:0,top:0},s)),h);return b.translate(-(g.left-u.width/2),-(g.top-u.height/2)),b.rotate(h*Math.PI/180),b.translate(c.horizontal?s.width:0,c.vertical?s.height:0),b.scale(c.horizontal?-1:1,c.vertical?-1:1),b.drawImage(a,0,0,s.width,s.height),b.restore(),f}(this.$refs.sourceCanvas,n,this.imageTransforms):n,i=Ee({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(f){return f.find(function(a){return p=a,!Number.isNaN(parseFloat(p))&&isFinite(p);var p})},o=kt({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(i.maxArea&&o.width*o.height>i.maxArea){var l=Math.sqrt(i.maxArea/(o.width*o.height));o={width:Math.round(l*o.width),height:Math.round(l*o.height)}}return function(f,a,p,h,c){f.width=h?h.width:p.width,f.height=h?h.height:p.height;var s=f.getContext("2d");s.clearRect(0,0,f.width,f.height),c&&(c.imageSmoothingEnabled&&(s.imageSmoothingEnabled=c.imageSmoothingEnabled),c.imageSmoothingQuality&&(s.imageSmoothingQuality=c.imageSmoothingQuality),c.fillColor&&(s.fillStyle=c.fillColor,s.fillRect(0,0,f.width,f.height),s.save()));var u=p.left<0?-p.left:0,b=p.top<0?-p.top:0;s.drawImage(a,p.left+u,p.top+b,p.width,p.height,u*(f.width/p.width),b*(f.height/p.height),f.width,f.height)}(e,t,this.coordinates,o,i),e}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(e){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],t=this.visibleArea&&n?ul(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&n?Fn(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return cl({transform:e,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:t,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var e=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var n=this.defaultSize;n||(n=this.stencilSize?ml:vl);var t=this.sizeRestrictions;t.minWidth,t.minHeight,t.maxWidth,t.maxHeight;var i=Gt(n)?n({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):n,r=this.defaultPosition||pl,o=[i,function(l){var f=l.coordinates;return Ee({},Gt(r)?r({coordinates:f,imageSize:e.imageSize,visibleArea:e.visibleArea}):e.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,zt(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var e=this;this.imageLoaded=!1,setTimeout(function(){var n=e.$refs.stretcher;n&&(n.style.height="auto",n.style.width="auto"),e.coordinates=e.defaultCoordinates(),e.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var e=this,n=this.$refs.stretcher,t=this.$refs.cropper;return this.initStretcher({cropper:t,stretcher:n,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:t,imageSize:e.imageSize};if(Gt(e.defaultBoundaries)?e.boundaries=e.defaultBoundaries(i):e.defaultBoundaries==="fit"?e.boundaries=function(r){var o=r.cropper,l=r.imageSize,f=o.clientHeight,a=o.clientWidth,p=f,h=l.width*f/l.height;return h>a&&(h=a,p=l.height*a/l.width),{width:h,height:p}}(i):e.boundaries=function(r){var o=r.cropper;return{width:o.clientWidth,height:o.clientHeight}}(i),!e.boundaries.width||!e.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var e=this;return this.appliedImageTransforms=Ee(Ee({},this.defaultImageTransforms),{},{flip:Ee({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){e.priority!=="visible-area"&&(e.visibleArea=null,e.resetCoordinates());var n,t,i,r,o,l,f=e.defaultVisibleArea||gl;e.visibleArea=Gt(f)?f({imageSize:e.imageSize,boundaries:e.boundaries,coordinates:e.priority!=="visible-area"?e.coordinates:null,getAreaRestrictions:e.getAreaRestrictions,stencilSize:e.getStencilSize()}):e.defaultVisibleArea,e.visibleArea=(n={visibleArea:e.visibleArea,boundaries:e.boundaries,getAreaRestrictions:e.getAreaRestrictions},t=n.visibleArea,i=n.boundaries,r=n.getAreaRestrictions,o=se({},t),l=ke(i),o.width/o.height!==l&&(o.height=o.width/l),We(o,r({visibleArea:o,type:"move"}))),e.priority==="visible-area"?e.resetCoordinates():e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("resetVisibleArea")}).catch(function(){e.visibleArea=null})},updateVisibleArea:function(){var e=this;return this.updateBoundaries().then(function(){e.visibleArea=e.fitVisibleArea({imageSize:e.imageSize,boundaries:e.boundaries,visibleArea:e.visibleArea,coordinates:e.coordinates,getAreaRestrictions:e.getAreaRestrictions}),e.coordinates=e.fitCoordinates({visibleArea:e.visibleArea,coordinates:e.coordinates,aspectRatio:e.getAspectRatio(),positionRestrictions:e.positionRestrictions,sizeRestrictions:e.sizeRestrictions}),e.runAutoZoom("updateVisibleArea")}).catch(function(){e.visibleArea=null})},onChange:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];e&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var e,n=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(br(r))return!1;var o=window.location,l=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],f={protocol:l[1]||"",host:l[2]||"",port:l[3]||""},a=function(p){return p.port||((p.protocol||o.protocol)==="http"?80:433)};return!(!f.protocol&&!f.host&&!f.port||f.protocol&&f.protocol==o.protocol&&f.host&&f.host==o.host&&f.host&&a(f)==a(o))}(this.src)){var t=Ie(this.crossOrigin)?this.canvas:this.crossOrigin;t===!0&&(t="anonymous"),this.imageAttributes.crossOrigin=t||null}if(this.checkOrientation){var i=(e=this.src,new Promise(function(r){Rl(e).then(function(o){var l=xl(o);r(o?{source:e,arrayBuffer:o,orientation:l}:{source:e,arrayBuffer:null,orientation:null})}).catch(function(o){console.warn(o),r({source:e,arrayBuffer:null,orientation:null})})}));setTimeout(function(){i.then(n.onParseImage)},this.transitionTime)}else setTimeout(function(){n.onParseImage({source:n.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var e=this,n=this.$refs.image;n&&!this.imageLoaded&&(this.imageAttributes.height=n.naturalHeight,this.imageAttributes.width=n.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){e.$emit("ready"),e.onChange(!1)}))},onParseImage:function(e){var n=this,t=e.source,i=e.arrayBuffer,r=e.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?Ur(t)||!br(t)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(o){for(var l=[],f=new Uint8Array(o);f.length>0;){var a=f.subarray(0,8192);l.push(String.fromCharCode.apply(null,Array.from?Array.from(a):a.slice())),f=f.subarray(8192)}return"data:image/jpeg;base64,"+btoa(l.join(""))}(i):this.imageAttributes.src=t,Gt(this.defaultTransforms)?this.appliedImageTransforms=Yi(this.defaultTransforms()):Gn(this.defaultTransforms)?this.appliedImageTransforms=Yi(this.defaultTransforms):this.appliedImageTransforms=function(o){var l=Yi({});if(o)switch(o){case 2:l.flip.horizontal=!0;break;case 3:l.rotate=-180;break;case 4:l.flip.vertical=!0;break;case 5:l.rotate=90,l.flip.vertical=!0;break;case 6:l.rotate=90;break;case 7:l.rotate=90,l.flip.horizontal=!0;break;case 8:l.rotate=-90}return l}(r),this.defaultImageTransforms=Ee(Ee({},this.appliedImageTransforms),{},{flip:Ee({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var o=n.$refs.image;o&&o.complete&&(function(l){return!!l.naturalWidth}(o)?n.onSuccessLoadImage():n.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(e){var n=this;this.transitionsOptions.enabled||this.awaitRender(function(){n.coordinates=n.moveAlgorithm(Ee(Ee({},n.getPublicProperties()),{},{positionRestrictions:Fn(n.positionRestrictions,n.visibleArea),coordinates:n.coordinates,event:n.normalizeEvent(e)})),n.onChange()})},onResize:function(e){var n=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var t=n.sizeRestrictions,i=Math.min(n.coordinates.width,n.coordinates.height,20*n.coefficient);n.coordinates=n.resizeAlgorithm(Ee(Ee({},n.getPublicProperties()),{},{positionRestrictions:Fn(n.positionRestrictions,n.visibleArea),sizeRestrictions:{maxWidth:Math.min(t.maxWidth,n.visibleArea.width),maxHeight:Math.min(t.maxHeight,n.visibleArea.height),minWidth:Math.max(t.minWidth,i),minHeight:Math.max(t.minHeight,i)},event:n.normalizeEvent(e)})),n.onChange(),n.ticking=!1})},onManipulateImage:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var t=n.transitions,i=t!==void 0&&t,r=n.normalize,o=r===void 0||r;i&&this.enableTransitions();var l=yl(Ee(Ee({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(e):e,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),f=l.visibleArea,a=l.coordinates;this.visibleArea=f,this.coordinates=a,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.visibleArea,t=e.type,i=t===void 0?"move":t;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:n,type:i})},getAspectRatio:function(e){var n,t,i=this.stencilProps,r=i.aspectRatio,o=i.minAspectRatio,l=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var f=this.$refs.stencil.aspectRatios();n=f.minimum,t=f.maximum}if(Ie(n)&&(n=Ie(r)?o:r),Ie(t)&&(t=Ie(r)?l:r),!e&&(Ie(n)||Ie(t))){var a=this.getStencilSize(),p=a?ke(a):null;Ie(n)&&(n=_r(p)?p:void 0),Ie(t)&&(t=_r(p)?p:void 0)}return{minimum:n,maximum:t}},getStencilSize:function(){if(this.stencilSize)return e={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},n=e.boundaries,t=e.stencilSize,i=e.aspectRatio,Vi(ke(r=Gt(t)?t({boundaries:n,aspectRatio:i}):t),i)&&(r=kt({sizeRestrictions:{maxWidth:n.width,maxHeight:n.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>n.width||r.height>n.height)&&(r=kt({sizeRestrictions:{maxWidth:n.width,maxHeight:n.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ke(r),maximum:ke(r)}})),r;var e,n,t,i,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return Ee({},wr)},flip:function(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var o=Ee({},this.imageTransforms.flip),l=_l({flip:{horizontal:e?!o.horizontal:o.horizontal,vertical:n?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),f=l.visibleArea,a=l.coordinates;e&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),n&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=f,this.coordinates=a,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.transitions,i=t===void 0||t;if(!this.transitionsActive){i&&this.enableTransitions();var r=Ee({},this.imageSize);this.appliedImageTransforms.rotate+=e;var o=bl({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:e,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),l=o.visibleArea,f=o.coordinates,a=this.processAutoZoom("rotateImage",l,f);l=a.visibleArea,f=a.coordinates,this.visibleArea=l,this.coordinates=f,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},Pl={key:0,ref:"canvas",style:{display:"none"}},Ll={key:1,ref:"sourceCanvas",style:{display:"none"}};oo.render=function(e,n,t,i,r,o){return X(),Oe("div",{ref:"cropper",class:o.classes.cropper},[ue("div",{ref:"stretcher",class:o.classes.stretcher},null,2),ue("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(X(),Oe(Qn(t.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:ut(function(){return[ue("div",{class:o.classes.background,style:o.boundariesStyle},null,6),ue("div",{class:o.classes.imageWrapper},[ue("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:n[1]||(n[1]=Xn(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),ue("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),_n((X(),Oe(Qn(t.stencilComponent),Mr({ref:"stencil",image:o.image,coordinates:r.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},t.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Lr,r.imageLoaded]]),t.canvas?(X(),Oe("canvas",Pl,null,512)):ye("",!0),t.canvas?(X(),Oe("canvas",Ll,null,512)):ye("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Ml=je({name:"ProfilEditAvatarCrop",components:{InputButton:Oo,Cropper:oo},props:{avatarFile:{type:File}},emits:["cancel","change"],data(){return{avatarImage:"",image:{src:"",type:""}}},mounted(){this.loadImage()},computed:{croppedImage(){const e=this.$refs.cropper;if(e){const t=e.getResult().canvas;if(t){const r=t.width,o=t.height;if(r>1e3||o>1e3){const l=document.createElement("canvas");l.width=1e3,l.height=1e3;const f=l.getContext("2d");if(f)return f.drawImage(t,0,0,1e3,1e3),l.toDataURL("image/png")}return t.toDataURL("image/png")}}return""}},methods:{loadImage(){if(!this.avatarFile)return;const e=new FileReader,n=URL.createObjectURL(this.avatarFile);e.addEventListener("load",t=>{this.image.src=n,this.avatarFile&&t.target&&t.target.result&&(this.image.type=this.getMimeType(t.target.result,this.avatarFile.type))}),e.readAsDataURL(this.avatarFile)},getMimeType(e,n=""){const t=new Uint8Array(e).subarray(0,4);let i="";for(let r=0;r<t.length;r++)i+=t[r].toString(16);switch(i){case"89504e47":return"image/png";case"47494638":return"image/gif";case"ffd8ffe0":case"ffd8ffe1":case"ffd8ffe2":case"ffd8ffe3":case"ffd8ffe8":return"image/jpeg";default:return n}}}}),Cl={class:"avatar-crop"},Il={class:"avatar-crop__container"},Dl={class:"avatar-crop__container__image"},jl={class:"avatar-crop__container__buttons"};function zl(e,n,t,i,r,o){const l=ge("cropper"),f=ge("input-button");return X(),ne("div",Cl,[B("div",Il,[B("div",Dl,[ue(l,{class:"avatar-crop__container__image__cropper",src:e.image.src,ref:"cropper","stencil-props":{aspectRatio:1}},null,8,["src"])]),B("div",jl,[ue(f,{highlighted:!1,onClick:n[0]||(n[0]=a=>e.$emit("cancel"))},{default:ut(()=>[Xe("Abbrechen")]),_:1}),ue(f,{highlighted:!0,onClick:n[1]||(n[1]=a=>e.$emit("change",e.croppedImage))},{default:ut(()=>[Xe("Speichern")]),_:1})])])])}const ql=Le(Ml,[["render",zl]]),$l=je({name:"ProfilEditAvatar",components:{ProfilEditAvatarCrop:ql},props:{modelValue:{type:String,default:""},resizedAvatar:{type:String,default:""}},emits:["update:modelValue","error","dataChanged"],data(){return{avatarUploading:!1,avatarCropViewVisible:!1,avatarCropViewImage:new File([],""),originalAvatar:"",currentAvatar:""}},setup(e,{emit:n}){return{get avatar(){return e.modelValue},set avatar(t){n("update:modelValue",t),n("dataChanged")}}},mounted(){this.originalAvatar=this.modelValue,this.currentAvatar=this.resizedAvatar},methods:{onAvatarChangeClick(){this.$refs.avatarFileInput&&this.$refs.avatarFileInput.click()},onAvatarChange(e){const n=e.target;if(n.files){const t=n.files[0];t&&(this.avatarCropViewVisible=!0,this.avatarCropViewImage=t)}},uploadAvatar(e){this.avatarUploading=!0,Fr.uploadAvatar(e).then(n=>{let t=new jt(n);t.err.code===-1?(this.originalAvatar=t.form.url,this.avatar=t.form.url,this.currentAvatar=e):this.$emit("error","Beim hochladen des Avatar ist ein Fehler aufgetreten"),this.avatarUploading=!1}).catch(()=>{this.$emit("error","Beim hochladen des Avatar ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut."),this.avatarUploading=!1}),this.avatarCropViewVisible=!1}}}),ao=e=>(yt("data-v-524e5553"),e=e(),bt(),e),Bl={class:"content avatar_section"},Fl={class:"avatar_container flex-column flex flex-center"},Hl=ao(()=>B("div",{class:"loading_bar"},[B("div",{class:"loading_bar_inner"})],-1)),Ul=[Hl],Wl=ao(()=>B("div",{class:"avatar_hover avatar_background_container"},[B("span",{class:"icon-camera"})],-1)),Vl=["src"],Kl={class:"image_buttons flex-row"};function Yl(e,n,t,i,r,o){const l=ge("profil-edit-avatar-crop");return X(),ne(xe,null,[B("div",Bl,[B("div",Fl,[B("div",{class:"avatar_upload flex flex-center",onClick:n[0]||(n[0]=(...f)=>e.onAvatarChangeClick&&e.onAvatarChangeClick(...f))},[B("div",{class:Ve(["avatar_uploading avatar_background_container",{visible:e.avatarUploading}])},Ul,2),Wl,B("img",{src:e.currentAvatar,alt:"Avatar Bild - Eigenes Profil"},null,8,Vl)]),B("div",Kl,[B("a",{href:"#",class:"image_upload",onClick:n[1]||(n[1]=(...f)=>e.onAvatarChangeClick&&e.onAvatarChangeClick(...f))},"Profilbild ändern"),B("input",{type:"file",ref:"avatarFileInput",accept:"image/*",class:"hidden",onChange:n[2]||(n[2]=(...f)=>e.onAvatarChange&&e.onAvatarChange(...f))},null,544)])])]),e.avatarCropViewVisible?(X(),Oe(l,{key:0,"avatar-file":e.avatarCropViewImage,onChange:e.uploadAvatar,onCancel:n[3]||(n[3]=f=>e.avatarCropViewVisible=!1)},null,8,["avatar-file","onChange"])):ye("",!0)],64)}const Zl=Le($l,[["render",Yl],["__scopeId","data-v-524e5553"]]),Gl={name:"InputDate",extends:zr,props:{minDate:{type:String,default:""}},data(){return{fieldValidation:void 0}},created(){this.fieldValidation=new jr(e=>{if(!e.required&&!e.value||this.minDate.length<=0)return!0;let n=new Date(e.value),t=new Date(this.minDate);return n>=t},this.dateValidationMessage),this.model.addValidityRule(this.fieldValidation)},computed:{dateValidationMessage(){return this.minDate.length<=0?"":`Bitte geben Sie ein Datum an das älter ist als ${new Date(this.minDate).toLocaleString("de").split(",")[0]}`}},watch:{minDate(){this.fieldValidation.message=this.dateValidationMessage}},methods:{}},Xl={class:"ainput-label"},Ql={key:0,class:"ainput-stern"},Jl={class:"ainput-date"},eu={class:"ainput-input ainput-date-picker"},tu=["name","required","disabled","readonly","min"],nu=B("span",{class:"ainput-date-picker-icon"},[B("span",{class:"ainput-date-picker-icon-button"},[B("button",{type:"button"},[B("span",{class:"icon-calendar-alt"})])])],-1),iu={key:0,class:"ainput-errormessage"};function ru(e,n,t,i,r,o){return X(),ne("div",{class:Ve(["ainput",{error:!e.model.valid,disabled:e.model.disabled||e.model.readonly}])},[B("span",Xl,[Xe(de(e.model.label),1),e.model.required?(X(),ne("span",Ql,"*")):ye("",!0)]),B("div",Jl,[B("label",eu,[_n(B("input",{class:"ainput-date-picker-input",type:"date","onUpdate:modelValue":n[0]||(n[0]=l=>e.model.value=l),name:e.formElementName,required:e.model.required,disabled:e.model.disabled,readonly:e.model.readonly,min:t.minDate,onFocus:n[1]||(n[1]=(...l)=>e.onFocus&&e.onFocus(...l)),onBlur:n[2]||(n[2]=(...l)=>e.onBlur&&e.onBlur(...l)),onKeydown:n[3]||(n[3]=(...l)=>e.onKeydown&&e.onKeydown(...l)),onInvalid:n[4]||(n[4]=(...l)=>e.onInvalid&&e.onInvalid(...l)),onChange:n[5]||(n[5]=l=>e.$emit("change"))},null,40,tu),[[Pr,e.model.value]]),nu])]),e.model.valid?ye("",!0):(X(),ne("p",iu,de(e.model.message),1))],2)}const ou=Le(Gl,[["render",ru]]),au={name:"InputSwitch",props:{modelValue:{type:Boolean,default:!1}},created(){this.value=this.modelValue},emits:["update:modelValue"],data(){return{value:!1}},watch:{value(e){this.$emit("update:modelValue",e)}}},su={class:"ainput"},lu={class:"ainput-switch__label"},uu=["value"],cu={key:0,class:"light"},fu=B("span",{class:"ainput-switch__slider"},null,-1),hu={key:1};function du(e,n,t,i,r,o){return X(),ne("div",su,[B("div",{class:Ve(["ainput-switch",{"ainput-switch--enabled":r.value}])},[B("label",lu,[_n(B("input",{type:"checkbox",value:t.modelValue,"onUpdate:modelValue":n[0]||(n[0]=l=>r.value=l)},null,8,uu),[[bo,r.value]]),r.value?(X(),ne("span",cu,"ja")):ye("",!0),fu,r.value?ye("",!0):(X(),ne("span",hu,"nein"))])],2)])}const pu=Le(au,[["render",du]]),vu=je({name:"ProfilEditInformation",components:{InputSwitch:pu,InputDate:ou,InputText:ar,InputSelect:Ao},props:{user:{type:Object,default(){return{}}}},emits:["dataChanged"],data(){var e,n,t,i,r,o,l,f,a,p,h,c,s,u,b,g;return{profilAktiv:((e=this.user)==null?void 0:e.profilAktiv)||!1,emailSichtbar:(n=this.user)==null?void 0:n.emailSichtbar,adresseSichtbar:(t=this.user)==null?void 0:t.adresseSichtbar,model:{anrede:new Fe("Anrede",(i=this.user)==null?void 0:i.anrede),titel:new Fe("Titel",(r=this.user)==null?void 0:r.titel,!1).addValidityRule(Rt.createFromRegex("^[a-zA-ZäüöÖÄÜß][a-zA-ZäüöÖÄÜß\\-. ]*$","Im Feld Titel sind nur Buchstaben, Leerzeichen, Bindestriche und Punkte erlaubt.")),vorname:new Fe("Vorname",(o=this.user)==null?void 0:o.vorname,!0).addValidityRule(Rt.createFromRegex("^[a-zA-ZäüöÖÄÜß][a-zA-ZäüöÖÄÜß\\- ]*$","Im Feld Vorname sind nur Buchstaben, Leerzeichen und Bindestriche erlaubt.")),nachname:new Fe("Nachname",(l=this.user)==null?void 0:l.nachname,!0).addValidityRule(Rt.createFromRegex("^[a-zA-ZäüöÖÄÜß][a-zA-ZäüöÖÄÜß\\- ]*$","Im Feld Nachname sind nur Buchstaben, Leerzeichen und Bindestriche erlaubt.")),mobil:new Fe("Mobil",(f=this.user)==null?void 0:f.mobiltelefon,!1).addValidityRule(Rt.telefon()),geburtstag:new Fe("Geburtstag",(a=this.user)==null?void 0:a.geburtsdatum,!1)},business:{name:new Fe("Firmenname",(p=this.user)==null?void 0:p.firma,!1),strasse:new Fe("Straße",(h=this.user)==null?void 0:h.strasse),plz:new Fe("PLZ",(c=this.user)==null?void 0:c.plz,!0).addValidityRule(Rt.createFromRegex("^(\\d){5}$","Im Feld PLZ sind nur genau 5 Ziffern erlaubt.")),ort:new Fe("Ort",(s=this.user)==null?void 0:s.ort,!0).addValidityRule(Rt.createFromRegex("^[a-zA-ZäüöÖÄÜß][a-zA-ZäüöÖÄÜß\\-.()/ ]*$","Im Feld Ort sind nur Buchstaben, Punkte, Klammern, Schrägstriche, Leerzeichen und Bindestriche erlaubt.")),telefon:new Fe("Telefon",(u=this.user)==null?void 0:u.telefon).addValidityRule(Rt.telefon()),telefax:new Fe("Telefax",(b=this.user)==null?void 0:b.fax,!1).addValidityRule(Rt.createFromRegex("^0[0-9 -]{5,}$","Geben Sie bitte eine Faxnummer inkl. Vorwahl ein (nur Zahlen, Bindestriche und Leerzeichen)")),website:new Fe("Website",(g=this.user)==null?void 0:g.webseite,!1)},isMobile:!1}},created(){this.resizeListener(),window.addEventListener("resize",()=>{this.resizeListener()})},watch:{model:{handler(){this.$emit("dataChanged")},deep:!0},business:{handler(){this.$emit("dataChanged")},deep:!0},profilAktiv(){this.$emit("dataChanged")},emailSichtbar(){this.$emit("dataChanged")}},methods:{getUserSave(){return this.model.vorname.checkValidity(),this.model.vorname.value.trim()===""&&(this.model.vorname.valid=!1,this.model.vorname.message="Bitte füllen Sie das Feld aus."),this.model.nachname.checkValidity(),this.model.nachname.value.trim()===""&&(this.model.nachname.valid=!1,this.model.nachname.message="Bitte füllen Sie das Feld aus."),{profilAktiv:this.profilAktiv?1:0,adresseSichtbar:this.adresseSichtbar?1:0,emailSichtbar:this.emailSichtbar?1:0,anrede:this.model.anrede.value,titel:this.model.titel.value,vorname:this.model.vorname.value,nachname:this.model.nachname.value,mobiltelefon:this.model.mobil.value,geburtsdatum:this.model.geburtstag.value,firma:this.business.name.value,strasse:this.business.strasse.value,plz:this.business.plz.value,ort:this.business.ort.value,telefon:this.business.telefon.value,fax:this.business.telefax.value,webseite:this.business.website.value,beschreibung:"",avatar:""}},resizeListener(){(window.innerWidth>0?window.innerWidth:screen.width)<769?this.isMobile=!0:this.isMobile=!1}}}),tn=e=>(yt("data-v-7f565a95"),e=e(),bt(),e),mu={class:"switch switch-content"},gu=tn(()=>B("p",{class:"switch_text"},"Profil ist sichtbar",-1)),yu={class:"switch switch-content"},bu={key:0,class:"switch_text"},_u={key:1,class:"switch_text"},wu={class:"switch switch-content"},Ou=tn(()=>B("p",{class:"switch_text"},"Straße öffentlich schalten",-1)),Au={class:"content"},Eu={class:"info_text flex flex-row flex-mobile-column flex-space-between-desktop full-width"},ku={class:"flex flex-column full-width"},Su=tn(()=>B("h3",null,"Angaben zur Person",-1)),Tu=tn(()=>B("hr",null,null,-1)),Ru={class:"flex flex-row flex-space-between"},xu={class:"flex flex-column full-width"},Nu=tn(()=>B("h3",null,"Kontakt Geschäftlich",-1)),Pu=tn(()=>B("hr",null,null,-1)),Lu={class:"flex flex-row flex-space-between"},Mu={class:"flex-1_3"},Cu={class:"flex-2_3"},Iu={class:"flex-column flex"},Du={class:"flex flex-row flex-space-between"},ju={class:"flex-1_2"},zu={class:"flex-1_2"},qu={class:"flex-1_2"};function $u(e,n,t,i,r,o){const l=ge("input-switch"),f=ge("input-text"),a=ge("input-select"),p=ge("input-date");return X(),ne(xe,null,[B("div",mu,[gu,ue(l,{modelValue:e.profilAktiv,"onUpdate:modelValue":n[0]||(n[0]=h=>e.profilAktiv=h)},null,8,["modelValue"])]),B("div",yu,[e.isMobile?(X(),ne("p",bu,"Besucher können mir Nachrichten senden")):(X(),ne("p",_u,"Profilbesucher können mir Nachrichten senden")),ue(l,{modelValue:e.emailSichtbar,"onUpdate:modelValue":n[1]||(n[1]=h=>e.emailSichtbar=h)},null,8,["modelValue"])]),B("div",wu,[Ou,ue(l,{modelValue:e.adresseSichtbar,"onUpdate:modelValue":n[2]||(n[2]=h=>e.adresseSichtbar=h)},null,8,["modelValue"])]),B("div",Au,[B("div",Eu,[B("div",ku,[Su,Tu,ue(f,{model:e.model.titel},null,8,["model"]),ue(a,{model:e.model.anrede,options:["Frau","Herr"],name:"anrede"},null,8,["model"]),B("div",Ru,[ue(f,{class:"flex-1_2",model:e.model.vorname},null,8,["model"]),ue(f,{class:"flex-1_2",model:e.model.nachname},null,8,["model"])]),ue(f,{model:e.model.mobil},null,8,["model"]),ue(p,{model:e.model.geburtstag},null,8,["model"])]),B("div",xu,[Nu,Pu,ue(f,{model:e.business.name},null,8,["model"]),ue(f,{model:e.business.strasse},null,8,["model"]),B("div",Lu,[B("div",Mu,[ue(f,{model:e.business.plz},null,8,["model"])]),B("div",Cu,[ue(f,{model:e.business.ort},null,8,["model"])])]),B("div",Iu,[B("div",Du,[B("div",ju,[ue(f,{model:e.business.telefon},null,8,["model"])]),B("div",zu,[ue(f,{model:e.business.telefax},null,8,["model"])])]),B("div",qu,[ue(f,{model:e.business.website},null,8,["model"])])])])])])],64)}const Bu=Le(vu,[["render",$u],["__scopeId","data-v-7f565a95"]]);var so={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(e,n){(function(i,r){e.exports=r()})(typeof self<"u"?self:He,function(){return function(t){var i={};function r(o){if(i[o])return i[o].exports;var l=i[o]={i:o,l:!1,exports:{}};return t[o].call(l.exports,l,l.exports,r),l.l=!0,l.exports}return r.m=t,r.c=i,r.d=function(o,l,f){r.o(o,l)||Object.defineProperty(o,l,{configurable:!1,enumerable:!0,get:f})},r.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(l,"a",l),l},r.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},r.p="",r(r.s=109)}([function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(17),l=r(18),f=r(19),a=r(45),p=r(46),h=r(47),c=r(48),s=r(49),u=r(12),b=r(32),g=r(33),y=r(31),v=r(1),m={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:o.default,Format:l.default,Leaf:f.default,Embed:c.default,Scroll:a.default,Block:h.default,Inline:p.default,Text:s.default,Attributor:{Attribute:u.default,Class:b.default,Style:g.default,Store:y.default}};i.default=m},function(t,i,r){var o=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,m){v.__proto__=m}||function(v,m){for(var w in m)m.hasOwnProperty(w)&&(v[w]=m[w])};return function(v,m){y(v,m);function w(){this.constructor=v}v.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=function(y){o(v,y);function v(m){var w=this;return m="[Parchment] "+m,w=y.call(this,m)||this,w.message=m,w.name=w.constructor.name,w}return v}(Error);i.ParchmentError=l;var f={},a={},p={},h={};i.DATA_KEY="__blot";var c;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(c=i.Scope||(i.Scope={}));function s(y,v){var m=b(y);if(m==null)throw new l("Unable to create "+y+" blot");var w=m,d=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:w.create(v);return new w(d,v)}i.create=s;function u(y,v){return v===void 0&&(v=!1),y==null?null:y[i.DATA_KEY]!=null?y[i.DATA_KEY].blot:v?u(y.parentNode,v):null}i.find=u;function b(y,v){v===void 0&&(v=c.ANY);var m;if(typeof y=="string")m=h[y]||f[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)m=h.text;else if(typeof y=="number")y&c.LEVEL&c.BLOCK?m=h.block:y&c.LEVEL&c.INLINE&&(m=h.inline);else if(y instanceof HTMLElement){var w=(y.getAttribute("class")||"").split(/\s+/);for(var d in w)if(m=a[w[d]],m)break;m=m||p[y.tagName]}return m==null?null:v&c.LEVEL&m.scope&&v&c.TYPE&m.scope?m:null}i.query=b;function g(){for(var y=[],v=0;v<arguments.length;v++)y[v]=arguments[v];if(y.length>1)return y.map(function(d){return g(d)});var m=y[0];if(typeof m.blotName!="string"&&typeof m.attrName!="string")throw new l("Invalid definition");if(m.blotName==="abstract")throw new l("Cannot register abstract class");if(h[m.blotName||m.attrName]=m,typeof m.keyName=="string")f[m.keyName]=m;else if(m.className!=null&&(a[m.className]=m),m.tagName!=null){Array.isArray(m.tagName)?m.tagName=m.tagName.map(function(d){return d.toUpperCase()}):m.tagName=m.tagName.toUpperCase();var w=Array.isArray(m.tagName)?m.tagName:[m.tagName];w.forEach(function(d){(p[d]==null||m.className==null)&&(p[d]=m)})}return m}i.register=g},function(t,i,r){var o=r(51),l=r(11),f=r(3),a=r(20),p="\0",h=function(c){Array.isArray(c)?this.ops=c:c!=null&&Array.isArray(c.ops)?this.ops=c.ops:this.ops=[]};h.prototype.insert=function(c,s){var u={};return c.length===0?this:(u.insert=c,s!=null&&typeof s=="object"&&Object.keys(s).length>0&&(u.attributes=s),this.push(u))},h.prototype.delete=function(c){return c<=0?this:this.push({delete:c})},h.prototype.retain=function(c,s){if(c<=0)return this;var u={retain:c};return s!=null&&typeof s=="object"&&Object.keys(s).length>0&&(u.attributes=s),this.push(u)},h.prototype.push=function(c){var s=this.ops.length,u=this.ops[s-1];if(c=f(!0,{},c),typeof u=="object"){if(typeof c.delete=="number"&&typeof u.delete=="number")return this.ops[s-1]={delete:u.delete+c.delete},this;if(typeof u.delete=="number"&&c.insert!=null&&(s-=1,u=this.ops[s-1],typeof u!="object"))return this.ops.unshift(c),this;if(l(c.attributes,u.attributes)){if(typeof c.insert=="string"&&typeof u.insert=="string")return this.ops[s-1]={insert:u.insert+c.insert},typeof c.attributes=="object"&&(this.ops[s-1].attributes=c.attributes),this;if(typeof c.retain=="number"&&typeof u.retain=="number")return this.ops[s-1]={retain:u.retain+c.retain},typeof c.attributes=="object"&&(this.ops[s-1].attributes=c.attributes),this}}return s===this.ops.length?this.ops.push(c):this.ops.splice(s,0,c),this},h.prototype.chop=function(){var c=this.ops[this.ops.length-1];return c&&c.retain&&!c.attributes&&this.ops.pop(),this},h.prototype.filter=function(c){return this.ops.filter(c)},h.prototype.forEach=function(c){this.ops.forEach(c)},h.prototype.map=function(c){return this.ops.map(c)},h.prototype.partition=function(c){var s=[],u=[];return this.forEach(function(b){var g=c(b)?s:u;g.push(b)}),[s,u]},h.prototype.reduce=function(c,s){return this.ops.reduce(c,s)},h.prototype.changeLength=function(){return this.reduce(function(c,s){return s.insert?c+a.length(s):s.delete?c-s.delete:c},0)},h.prototype.length=function(){return this.reduce(function(c,s){return c+a.length(s)},0)},h.prototype.slice=function(c,s){c=c||0,typeof s!="number"&&(s=1/0);for(var u=[],b=a.iterator(this.ops),g=0;g<s&&b.hasNext();){var y;g<c?y=b.next(c-g):(y=b.next(s-g),u.push(y)),g+=a.length(y)}return new h(u)},h.prototype.compose=function(c){var s=a.iterator(this.ops),u=a.iterator(c.ops),b=[],g=u.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var y=g.retain;s.peekType()==="insert"&&s.peekLength()<=y;)y-=s.peekLength(),b.push(s.next());g.retain-y>0&&u.next(g.retain-y)}for(var v=new h(b);s.hasNext()||u.hasNext();)if(u.peekType()==="insert")v.push(u.next());else if(s.peekType()==="delete")v.push(s.next());else{var m=Math.min(s.peekLength(),u.peekLength()),w=s.next(m),d=u.next(m);if(typeof d.retain=="number"){var O={};typeof w.retain=="number"?O.retain=m:O.insert=w.insert;var R=a.attributes.compose(w.attributes,d.attributes,typeof w.retain=="number");if(R&&(O.attributes=R),v.push(O),!u.hasNext()&&l(v.ops[v.ops.length-1],O)){var S=new h(s.rest());return v.concat(S).chop()}}else typeof d.delete=="number"&&typeof w.retain=="number"&&v.push(d)}return v.chop()},h.prototype.concat=function(c){var s=new h(this.ops.slice());return c.ops.length>0&&(s.push(c.ops[0]),s.ops=s.ops.concat(c.ops.slice(1))),s},h.prototype.diff=function(c,s){if(this.ops===c.ops)return new h;var u=[this,c].map(function(m){return m.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:p;var d=m===c?"on":"with";throw new Error("diff() called "+d+" non-document")}).join("")}),b=new h,g=o(u[0],u[1],s),y=a.iterator(this.ops),v=a.iterator(c.ops);return g.forEach(function(m){for(var w=m[1].length;w>0;){var d=0;switch(m[0]){case o.INSERT:d=Math.min(v.peekLength(),w),b.push(v.next(d));break;case o.DELETE:d=Math.min(w,y.peekLength()),y.next(d),b.delete(d);break;case o.EQUAL:d=Math.min(y.peekLength(),v.peekLength(),w);var O=y.next(d),R=v.next(d);l(O.insert,R.insert)?b.retain(d,a.attributes.diff(O.attributes,R.attributes)):b.push(R).delete(d);break}w-=d}}),b.chop()},h.prototype.eachLine=function(c,s){s=s||` `;for(var u=a.iterator(this.ops),b=new h,g=0;u.hasNext();){if(u.peekType()!=="insert")return;var y=u.peek(),v=a.length(y)-u.peekLength(),m=typeof y.insert=="string"?y.insert.indexOf(s,v)-v:-1;if(m<0)b.push(u.next());else if(m>0)b.push(u.next(m));else{if(c(b,u.next(1).attributes||{},g)===!1)return;g+=1,b=new h}}b.length()>0&&c(b,{},g)},h.prototype.transform=function(c,s){if(s=!!s,typeof c=="number")return this.transformPosition(c,s);for(var u=a.iterator(this.ops),b=a.iterator(c.ops),g=new h;u.hasNext()||b.hasNext();)if(u.peekType()==="insert"&&(s||b.peekType()!=="insert"))g.retain(a.length(u.next()));else if(b.peekType()==="insert")g.push(b.next());else{var y=Math.min(u.peekLength(),b.peekLength()),v=u.next(y),m=b.next(y);if(v.delete)continue;m.delete?g.push(m):g.retain(y,a.attributes.transform(v.attributes,m.attributes,s))}return g.chop()},h.prototype.transformPosition=function(c,s){s=!!s;for(var u=a.iterator(this.ops),b=0;u.hasNext()&&b<=c;){var g=u.peekLength(),y=u.peekType();if(u.next(),y==="delete"){c-=Math.min(g,c-b);continue}else y==="insert"&&(b<c||!s)&&(c+=g);b+=g}return c},t.exports=h},function(t,i){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):o.call(u)==="[object Array]"},p=function(u){if(!u||o.call(u)!=="[object Object]")return!1;var b=r.call(u,"constructor"),g=u.constructor&&u.constructor.prototype&&r.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!b&&!g)return!1;var y;for(y in u);return typeof y>"u"||r.call(u,y)},h=function(u,b){l&&b.name==="__proto__"?l(u,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):u[b.name]=b.newValue},c=function(u,b){if(b==="__proto__")if(r.call(u,b)){if(f)return f(u,b).value}else return;return u[b]};t.exports=function s(){var u,b,g,y,v,m,w=arguments[0],d=1,O=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},d=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});d<O;++d)if(u=arguments[d],u!=null)for(b in u)g=c(w,b),y=c(u,b),w!==y&&(R&&y&&(p(y)||(v=a(y)))?(v?(v=!1,m=g&&a(g)?g:[]):m=g&&p(g)?g:{},h(w,{name:b,newValue:s(R,m,y)})):typeof y<"u"&&h(w,{name:b,newValue:y}));return w}},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BlockEmbed=i.bubbleFormats=void 0;var o=function(){function A(E,x){for(var M=0;M<x.length;M++){var z=x[M];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(E,z.key,z)}}return function(E,x,M){return x&&A(E.prototype,x),M&&A(E,M),E}}(),l=function A(E,x,M){E===null&&(E=Function.prototype);var z=Object.getOwnPropertyDescriptor(E,x);if(z===void 0){var U=Object.getPrototypeOf(E);return U===null?void 0:A(U,x,M)}else{if("value"in z)return z.value;var V=z.get;return V===void 0?void 0:V.call(M)}},f=r(3),a=w(f),p=r(2),h=w(p),c=r(0),s=w(c),u=r(16),b=w(u),g=r(6),y=w(g),v=r(7),m=w(v);function w(A){return A&&A.__esModule?A:{default:A}}function d(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function O(A,E){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:A}function R(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(A,E):A.__proto__=E)}var S=1,T=function(A){R(E,A);function E(){return d(this,E),O(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"attach",value:function(){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"attach",this).call(this),this.attributes=new s.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new h.default().insert(this.value(),(0,a.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(M,z){var U=s.default.query(M,s.default.Scope.BLOCK_ATTRIBUTE);U!=null&&this.attributes.attribute(U,z)}},{key:"formatAt",value:function(M,z,U,V){this.format(U,V)}},{key:"insertAt",value:function(M,z,U){if(typeof z=="string"&&z.endsWith(` `)){var V=s.default.create(L.blotName);this.parent.insertBefore(V,M===0?this:this.next),V.insertAt(0,z.slice(0,-1))}else l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,M,z,U)}}]),E}(s.default.Embed);T.scope=s.default.Scope.BLOCK_BLOT;var L=function(A){R(E,A);function E(x){d(this,E);var M=O(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,x));return M.cache={},M}return o(E,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(s.default.Leaf).reduce(function(M,z){return z.length()===0?M:M.insert(z.value(),k(z))},new h.default).insert(` `,k(this))),this.cache.delta}},{key:"deleteAt",value:function(M,z){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"deleteAt",this).call(this,M,z),this.cache={}}},{key:"formatAt",value:function(M,z,U,V){z<=0||(s.default.query(U,s.default.Scope.BLOCK)?M+z===this.length()&&this.format(U,V):l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"formatAt",this).call(this,M,Math.min(z,this.length()-M-1),U,V),this.cache={})}},{key:"insertAt",value:function(M,z,U){if(U!=null)return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,M,z,U);if(z.length!==0){var V=z.split(` `),te=V.shift();te.length>0&&(M<this.length()-1||this.children.tail==null?l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,Math.min(M,this.length()-1),te):this.children.tail.insertAt(this.children.tail.length(),te),this.cache={});var H=this;V.reduce(function(I,N){return H=H.split(I,!0),H.insertAt(0,N),N.length},M+te.length)}}},{key:"insertBefore",value:function(M,z){var U=this.children.head;l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,M,z),U instanceof b.default&&U.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"length",this).call(this)+S),this.cache.length}},{key:"moveChildren",value:function(M,z){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"moveChildren",this).call(this,M,z),this.cache={}}},{key:"optimize",value:function(M){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,M),this.cache={}}},{key:"path",value:function(M){return l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"path",this).call(this,M,!0)}},{key:"removeChild",value:function(M){l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"removeChild",this).call(this,M),this.cache={}}},{key:"split",value:function(M){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(z&&(M===0||M>=this.length()-S)){var U=this.clone();return M===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var V=l(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"split",this).call(this,M,z);return this.cache={},V}}}]),E}(s.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[y.default,s.default.Embed,m.default];function k(A){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(E=(0,a.default)(E,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?E:k(A.parent,E)}i.bubbleFormats=k,i.BlockEmbed=T,i.default=L},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.overload=i.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},l=function(){function H(I,N){var D=[],j=!0,W=!1,$=void 0;try{for(var C=I[Symbol.iterator](),F;!(j=(F=C.next()).done)&&(D.push(F.value),!(N&&D.length===N));j=!0);}catch(K){W=!0,$=K}finally{try{!j&&C.return&&C.return()}finally{if(W)throw $}}return D}return function(I,N){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return H(I,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function H(I,N){for(var D=0;D<N.length;D++){var j=N[D];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(I,j.key,j)}}return function(I,N,D){return N&&H(I.prototype,N),D&&H(I,D),I}}();r(50);var a=r(2),p=k(a),h=r(14),c=k(h),s=r(8),u=k(s),b=r(9),g=k(b),y=r(0),v=k(y),m=r(15),w=k(m),d=r(3),O=k(d),R=r(10),S=k(R),T=r(34),L=k(T);function k(H){return H&&H.__esModule?H:{default:H}}function A(H,I,N){return I in H?Object.defineProperty(H,I,{value:N,enumerable:!0,configurable:!0,writable:!0}):H[I]=N,H}function E(H,I){if(!(H instanceof I))throw new TypeError("Cannot call a class as a function")}var x=(0,S.default)("quill"),M=function(){f(H,null,[{key:"debug",value:function(N){N===!0&&(N="log"),S.default.level(N)}},{key:"find",value:function(N){return N.__quill||v.default.find(N)}},{key:"import",value:function(N){return this.imports[N]==null&&x.error("Cannot import "+N+". Are you sure it was registered?"),this.imports[N]}},{key:"register",value:function(N,D){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof N!="string"){var $=N.attrName||N.blotName;typeof $=="string"?this.register("formats/"+$,N,D):Object.keys(N).forEach(function(C){j.register(C,N[C],D)})}else this.imports[N]!=null&&!W&&x.warn("Overwriting "+N+" with",D),this.imports[N]=D,(N.startsWith("blots/")||N.startsWith("formats/"))&&D.blotName!=="abstract"?v.default.register(D):N.startsWith("modules")&&typeof D.register=="function"&&D.register()}}]);function H(I){var N=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(E(this,H),this.options=z(I,D),this.container=this.options.container,this.container==null)return x.error("Invalid Quill container",I);this.options.debug&&H.debug(this.options.debug);var j=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=v.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new c.default(this.scroll),this.selection=new w.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,function($){$===u.default.events.TEXT_CHANGE&&N.root.classList.toggle("ql-blank",N.editor.isBlank())}),this.emitter.on(u.default.events.SCROLL_UPDATE,function($,C){var F=N.selection.lastRange,K=F&&F.length===0?F.index:void 0;U.call(N,function(){return N.editor.update(null,C,K)},$)});var W=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+j+"<p><br></p></div>");this.setContents(W),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return f(H,[{key:"addContainer",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof N=="string"){var j=N;N=document.createElement("div"),N.classList.add(j)}return this.container.insertBefore(N,D),N}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(N,D,j){var W=this,$=V(N,D,j),C=l($,4);return N=C[0],D=C[1],j=C[3],U.call(this,function(){return W.editor.deleteText(N,D)},j,N,-1*D)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(N),this.container.classList.toggle("ql-disabled",!N)}},{key:"focus",value:function(){var N=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=N,this.scrollIntoView()}},{key:"format",value:function(N,D){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;return U.call(this,function(){var $=j.getSelection(!0),C=new p.default;if($==null)return C;if(v.default.query(N,v.default.Scope.BLOCK))C=j.editor.formatLine($.index,$.length,A({},N,D));else{if($.length===0)return j.selection.format(N,D),C;C=j.editor.formatText($.index,$.length,A({},N,D))}return j.setSelection($,u.default.sources.SILENT),C},W)}},{key:"formatLine",value:function(N,D,j,W,$){var C=this,F=void 0,K=V(N,D,j,W,$),Y=l(K,4);return N=Y[0],D=Y[1],F=Y[2],$=Y[3],U.call(this,function(){return C.editor.formatLine(N,D,F)},$,N,0)}},{key:"formatText",value:function(N,D,j,W,$){var C=this,F=void 0,K=V(N,D,j,W,$),Y=l(K,4);return N=Y[0],D=Y[1],F=Y[2],$=Y[3],U.call(this,function(){return C.editor.formatText(N,D,F)},$,N,0)}},{key:"getBounds",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=void 0;typeof N=="number"?j=this.selection.getBounds(N,D):j=this.selection.getBounds(N.index,N.length);var W=this.container.getBoundingClientRect();return{bottom:j.bottom-W.top,height:j.height,left:j.left-W.left,right:j.right-W.left,top:j.top-W.top,width:j.width}}},{key:"getContents",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,j=V(N,D),W=l(j,2);return N=W[0],D=W[1],this.editor.getContents(N,D)}},{key:"getFormat",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof N=="number"?this.editor.getFormat(N,D):this.editor.getFormat(N.index,N.length)}},{key:"getIndex",value:function(N){return N.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(N){return this.scroll.leaf(N)}},{key:"getLine",value:function(N){return this.scroll.line(N)}},{key:"getLines",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof N!="number"?this.scroll.lines(N.index,N.length):this.scroll.lines(N,D)}},{key:"getModule",value:function(N){return this.theme.modules[N]}},{key:"getSelection",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return N&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-N,j=V(N,D),W=l(j,2);return N=W[0],D=W[1],this.editor.getText(N,D)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(N,D,j){var W=this,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return U.call(this,function(){return W.editor.insertEmbed(N,D,j)},$,N)}},{key:"insertText",value:function(N,D,j,W,$){var C=this,F=void 0,K=V(N,0,j,W,$),Y=l(K,4);return N=Y[0],F=Y[2],$=Y[3],U.call(this,function(){return C.editor.insertText(N,D,F)},$,N,D.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(N,D,j){this.clipboard.dangerouslyPasteHTML(N,D,j)}},{key:"removeFormat",value:function(N,D,j){var W=this,$=V(N,D,j),C=l($,4);return N=C[0],D=C[1],j=C[3],U.call(this,function(){return W.editor.removeFormat(N,D)},j,N)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(N){var D=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return U.call(this,function(){N=new p.default(N);var W=D.getLength(),$=D.editor.deleteText(0,W),C=D.editor.applyDelta(N),F=C.ops[C.ops.length-1];F!=null&&typeof F.insert=="string"&&F.insert[F.insert.length-1]===` `&&(D.editor.deleteText(D.getLength()-1,1),C.delete(1));var K=$.compose(C);return K},j)}},{key:"setSelection",value:function(N,D,j){if(N==null)this.selection.setRange(null,D||H.sources.API);else{var W=V(N,D,j),$=l(W,4);N=$[0],D=$[1],j=$[3],this.selection.setRange(new m.Range(N,D),j),j!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API,j=new p.default().insert(N);return this.setContents(j,D)}},{key:"update",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u.default.sources.USER,D=this.scroll.update(N);return this.selection.update(N),D}},{key:"updateContents",value:function(N){var D=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return U.call(this,function(){return N=new p.default(N),D.editor.applyDelta(N,j)},j,!0)}}]),H}();M.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},M.events=u.default.events,M.sources=u.default.sources,M.version="1.3.7",M.imports={delta:p.default,parchment:v.default,"core/module":g.default,"core/theme":L.default};function z(H,I){if(I=(0,O.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},I),!I.theme||I.theme===M.DEFAULTS.theme)I.theme=L.default;else if(I.theme=M.import("themes/"+I.theme),I.theme==null)throw new Error("Invalid theme "+I.theme+". Did you register it?");var N=(0,O.default)(!0,{},I.theme.DEFAULTS);[N,I].forEach(function(W){W.modules=W.modules||{},Object.keys(W.modules).forEach(function($){W.modules[$]===!0&&(W.modules[$]={})})});var D=Object.keys(N.modules).concat(Object.keys(I.modules)),j=D.reduce(function(W,$){var C=M.import("modules/"+$);return C==null?x.error("Cannot load "+$+" module. Are you sure you registered it?"):W[$]=C.DEFAULTS||{},W},{});return I.modules!=null&&I.modules.toolbar&&I.modules.toolbar.constructor!==Object&&(I.modules.toolbar={container:I.modules.toolbar}),I=(0,O.default)(!0,{},M.DEFAULTS,{modules:j},N,I),["bounds","container","scrollingContainer"].forEach(function(W){typeof I[W]=="string"&&(I[W]=document.querySelector(I[W]))}),I.modules=Object.keys(I.modules).reduce(function(W,$){return I.modules[$]&&(W[$]=I.modules[$]),W},{}),I}function U(H,I,N,D){if(this.options.strict&&!this.isEnabled()&&I===u.default.sources.USER)return new p.default;var j=N==null?null:this.getSelection(),W=this.editor.delta,$=H();if(j!=null&&(N===!0&&(N=j.index),D==null?j=te(j,$,I):D!==0&&(j=te(j,N,D,I)),this.setSelection(j,u.default.sources.SILENT)),$.length()>0){var C,F=[u.default.events.TEXT_CHANGE,$,W,I];if((C=this.emitter).emit.apply(C,[u.default.events.EDITOR_CHANGE].concat(F)),I!==u.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,F)}}return $}function V(H,I,N,D,j){var W={};return typeof H.index=="number"&&typeof H.length=="number"?typeof I!="number"?(j=D,D=N,N=I,I=H.length,H=H.index):(I=H.length,H=H.index):typeof I!="number"&&(j=D,D=N,N=I,I=0),(typeof N>"u"?"undefined":o(N))==="object"?(W=N,j=D):typeof N=="string"&&(D!=null?W[N]=D:j=N),j=j||u.default.sources.API,[H,I,W,j]}function te(H,I,N,D){if(H==null)return null;var j=void 0,W=void 0;if(I instanceof p.default){var $=[H.index,H.index+H.length].map(function(Y){return I.transformPosition(Y,D!==u.default.sources.USER)}),C=l($,2);j=C[0],W=C[1]}else{var F=[H.index,H.index+H.length].map(function(Y){return Y<I||Y===I&&D===u.default.sources.USER?Y:N>=0?Y+N:Math.max(I,Y+N)}),K=l(F,2);j=K[0],W=K[1]}return new m.Range(j,W-j)}i.expandConfig=z,i.overload=V,i.default=M},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function y(v,m){for(var w=0;w<m.length;w++){var d=m[w];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(v,d.key,d)}}return function(v,m,w){return m&&y(v.prototype,m),w&&y(v,w),v}}(),l=function y(v,m,w){v===null&&(v=Function.prototype);var d=Object.getOwnPropertyDescriptor(v,m);if(d===void 0){var O=Object.getPrototypeOf(v);return O===null?void 0:y(O,m,w)}else{if("value"in d)return d.value;var R=d.get;return R===void 0?void 0:R.call(w)}},f=r(7),a=c(f),p=r(0),h=c(p);function c(y){return y&&y.__esModule?y:{default:y}}function s(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function u(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function b(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var g=function(y){b(v,y);function v(){return s(this,v),u(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return o(v,[{key:"formatAt",value:function(w,d,O,R){if(v.compare(this.statics.blotName,O)<0&&h.default.query(O,h.default.Scope.BLOT)){var S=this.isolate(w,d);R&&S.wrap(O,R)}else l(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"formatAt",this).call(this,w,d,O,R)}},{key:"optimize",value:function(w){if(l(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,w),this.parent instanceof v&&v.compare(this.statics.blotName,this.parent.statics.blotName)>0){var d=this.parent.isolate(this.offset(),this.length());this.moveChildren(d),d.wrap(this)}}}],[{key:"compare",value:function(w,d){var O=v.order.indexOf(w),R=v.order.indexOf(d);return O>=0||R>=0?O-R:w===d?0:w<d?-1:1}}]),v}(h.default.Inline);g.allowedChildren=[g,h.default.Embed,a.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],i.default=g},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(0),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function p(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function h(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var c=function(s){h(u,s);function u(){return a(this,u),p(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(l.default.Text);i.default=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function m(w,d){for(var O=0;O<d.length;O++){var R=d[O];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(w,R.key,R)}}return function(w,d,O){return d&&m(w.prototype,d),O&&m(w,O),w}}(),l=function m(w,d,O){w===null&&(w=Function.prototype);var R=Object.getOwnPropertyDescriptor(w,d);if(R===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:m(S,d,O)}else{if("value"in R)return R.value;var T=R.get;return T===void 0?void 0:T.call(O)}},f=r(54),a=c(f),p=r(10),h=c(p);function c(m){return m&&m.__esModule?m:{default:m}}function s(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function u(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function b(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var g=(0,h.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(m){document.addEventListener(m,function(){for(var w=arguments.length,d=Array(w),O=0;O<w;O++)d[O]=arguments[O];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(R){if(R.__quill&&R.__quill.emitter){var S;(S=R.__quill.emitter).handleDOM.apply(S,d)}})})});var v=function(m){b(w,m);function w(){s(this,w);var d=u(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));return d.listeners={},d.on("error",g.error),d}return o(w,[{key:"emit",value:function(){g.log.apply(g,arguments),l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(O){for(var R=arguments.length,S=Array(R>1?R-1:0),T=1;T<R;T++)S[T-1]=arguments[T];(this.listeners[O.type]||[]).forEach(function(L){var k=L.node,A=L.handler;(O.target===k||k.contains(O.target))&&A.apply(void 0,[O].concat(S))})}},{key:"listenDOM",value:function(O,R,S){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push({node:R,handler:S})}}]),w}(a.default);v.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},v.sources={API:"api",SILENT:"silent",USER:"user"},i.default=v},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});function o(f,a){if(!(f instanceof a))throw new TypeError("Cannot call a class as a function")}var l=function f(a){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,f),this.quill=a,this.options=p};l.DEFAULTS={},i.default=l},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=["error","warn","log","info"],l="warn";function f(p){if(o.indexOf(p)<=o.indexOf(l)){for(var h,c=arguments.length,s=Array(c>1?c-1:0),u=1;u<c;u++)s[u-1]=arguments[u];(h=console)[p].apply(h,s)}}function a(p){return o.reduce(function(h,c){return h[c]=f.bind(console,c,p),h},{})}f.level=a.level=function(p){l=p},i.default=a},function(t,i,r){var o=Array.prototype.slice,l=r(52),f=r(53),a=t.exports=function(s,u,b){return b||(b={}),s===u?!0:s instanceof Date&&u instanceof Date?s.getTime()===u.getTime():!s||!u||typeof s!="object"&&typeof u!="object"?b.strict?s===u:s==u:c(s,u,b)};function p(s){return s==null}function h(s){return!(!s||typeof s!="object"||typeof s.length!="number"||typeof s.copy!="function"||typeof s.slice!="function"||s.length>0&&typeof s[0]!="number")}function c(s,u,b){var g,y;if(p(s)||p(u)||s.prototype!==u.prototype)return!1;if(f(s))return f(u)?(s=o.call(s),u=o.call(u),a(s,u,b)):!1;if(h(s)){if(!h(u)||s.length!==u.length)return!1;for(g=0;g<s.length;g++)if(s[g]!==u[g])return!1;return!0}try{var v=l(s),m=l(u)}catch{return!1}if(v.length!=m.length)return!1;for(v.sort(),m.sort(),g=v.length-1;g>=0;g--)if(v[g]!=m[g])return!1;for(g=v.length-1;g>=0;g--)if(y=v[g],!a(s[y],u[y],b))return!1;return typeof s==typeof u}},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(1),l=function(){function f(a,p,h){h===void 0&&(h={}),this.attrName=a,this.keyName=p;var c=o.Scope.TYPE&o.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&o.Scope.LEVEL|c:this.scope=o.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return f.keys=function(a){return[].map.call(a.attributes,function(p){return p.name})},f.prototype.add=function(a,p){return this.canAdd(a,p)?(a.setAttribute(this.keyName,p),!0):!1},f.prototype.canAdd=function(a,p){var h=o.query(a,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof p=="string"?this.whitelist.indexOf(p.replace(/["']/g,""))>-1:this.whitelist.indexOf(p)>-1},f.prototype.remove=function(a){a.removeAttribute(this.keyName)},f.prototype.value=function(a){var p=a.getAttribute(this.keyName);return this.canAdd(a,p)&&p?p:""},f}();i.default=l},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.Code=void 0;var o=function(){function T(L,k){var A=[],E=!0,x=!1,M=void 0;try{for(var z=L[Symbol.iterator](),U;!(E=(U=z.next()).done)&&(A.push(U.value),!(k&&A.length===k));E=!0);}catch(V){x=!0,M=V}finally{try{!E&&z.return&&z.return()}finally{if(x)throw M}}return A}return function(L,k){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return T(L,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function T(L,k){for(var A=0;A<k.length;A++){var E=k[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(L,E.key,E)}}return function(L,k,A){return k&&T(L.prototype,k),A&&T(L,A),L}}(),f=function T(L,k,A){L===null&&(L=Function.prototype);var E=Object.getOwnPropertyDescriptor(L,k);if(E===void 0){var x=Object.getPrototypeOf(L);return x===null?void 0:T(x,k,A)}else{if("value"in E)return E.value;var M=E.get;return M===void 0?void 0:M.call(A)}},a=r(2),p=m(a),h=r(0),c=m(h),s=r(4),u=m(s),b=r(6),g=m(b),y=r(7),v=m(y);function m(T){return T&&T.__esModule?T:{default:T}}function w(T,L){if(!(T instanceof L))throw new TypeError("Cannot call a class as a function")}function d(T,L){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:T}function O(T,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);T.prototype=Object.create(L&&L.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(T,L):T.__proto__=L)}var R=function(T){O(L,T);function L(){return w(this,L),d(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(g.default);R.blotName="code",R.tagName="CODE";var S=function(T){O(L,T);function L(){return w(this,L),d(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return l(L,[{key:"delta",value:function(){var A=this,E=this.domNode.textContent;return E.endsWith(` `)&&(E=E.slice(0,-1)),E.split(` `).reduce(function(x,M){return x.insert(M).insert(` `,A.formats())},new p.default)}},{key:"format",value:function(A,E){if(!(A===this.statics.blotName&&E)){var x=this.descendant(v.default,this.length()-1),M=o(x,1),z=M[0];z!=null&&z.deleteAt(z.length()-1,1),f(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,A,E)}}},{key:"formatAt",value:function(A,E,x,M){if(E!==0&&!(c.default.query(x,c.default.Scope.BLOCK)==null||x===this.statics.blotName&&M===this.statics.formats(this.domNode))){var z=this.newlineIndex(A);if(!(z<0||z>=A+E)){var U=this.newlineIndex(A,!0)+1,V=z-U+1,te=this.isolate(U,V),H=te.next;te.format(x,M),H instanceof L&&H.formatAt(0,A-U+E-V,x,M)}}}},{key:"insertAt",value:function(A,E,x){if(x==null){var M=this.descendant(v.default,A),z=o(M,2),U=z[0],V=z[1];U.insertAt(V,E)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?A:A+1}},{key:"newlineIndex",value:function(A){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(E)return this.domNode.textContent.slice(0,A).lastIndexOf(` `);var x=this.domNode.textContent.slice(A).indexOf(` `);return x>-1?A+x:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(` `)||this.appendChild(c.default.create("text",` `)),f(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,A);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===E.statics.formats(E.domNode)&&(E.optimize(A),E.moveChildren(this),E.remove())}},{key:"replace",value:function(A){f(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(E){var x=c.default.find(E);x==null?E.parentNode.removeChild(E):x instanceof c.default.Embed?x.remove():x.unwrap()})}}],[{key:"create",value:function(A){var E=f(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,A);return E.setAttribute("spellcheck",!1),E}},{key:"formats",value:function(){return!0}}]),L}(u.default);S.blotName="code-block",S.tagName="PRE",S.TAB=" ",i.Code=R,i.default=S},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},l=function(){function H(I,N){var D=[],j=!0,W=!1,$=void 0;try{for(var C=I[Symbol.iterator](),F;!(j=(F=C.next()).done)&&(D.push(F.value),!(N&&D.length===N));j=!0);}catch(K){W=!0,$=K}finally{try{!j&&C.return&&C.return()}finally{if(W)throw $}}return D}return function(I,N){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return H(I,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function H(I,N){for(var D=0;D<N.length;D++){var j=N[D];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(I,j.key,j)}}return function(I,N,D){return N&&H(I.prototype,N),D&&H(I,D),I}}(),a=r(2),p=E(a),h=r(20),c=E(h),s=r(0),u=E(s),b=r(13),g=E(b),y=r(24),v=E(y),m=r(4),w=E(m),d=r(16),O=E(d),R=r(21),S=E(R),T=r(11),L=E(T),k=r(3),A=E(k);function E(H){return H&&H.__esModule?H:{default:H}}function x(H,I,N){return I in H?Object.defineProperty(H,I,{value:N,enumerable:!0,configurable:!0,writable:!0}):H[I]=N,H}function M(H,I){if(!(H instanceof I))throw new TypeError("Cannot call a class as a function")}var z=/^[ -~]*$/,U=function(){function H(I){M(this,H),this.scroll=I,this.delta=this.getDelta()}return f(H,[{key:"applyDelta",value:function(N){var D=this,j=!1;this.scroll.update();var W=this.scroll.length();return this.scroll.batchStart(),N=te(N),N.reduce(function($,C){var F=C.retain||C.delete||C.insert.length||1,K=C.attributes||{};if(C.insert!=null){if(typeof C.insert=="string"){var Y=C.insert;Y.endsWith(` `)&&j&&(j=!1,Y=Y.slice(0,-1)),$>=W&&!Y.endsWith(` `)&&(j=!0),D.scroll.insertAt($,Y);var J=D.scroll.line($),oe=l(J,2),le=oe[0],fe=oe[1],me=(0,A.default)({},(0,m.bubbleFormats)(le));if(le instanceof w.default){var be=le.descendant(u.default.Leaf,fe),Ne=l(be,1),Re=Ne[0];me=(0,A.default)(me,(0,m.bubbleFormats)(Re))}K=c.default.attributes.diff(me,K)||{}}else if(o(C.insert)==="object"){var Z=Object.keys(C.insert)[0];if(Z==null)return $;D.scroll.insertAt($,Z,C.insert[Z])}W+=F}return Object.keys(K).forEach(function(Q){D.scroll.formatAt($,F,Q,K[Q])}),$+F},0),N.reduce(function($,C){return typeof C.delete=="number"?(D.scroll.deleteAt($,C.delete),$):$+(C.retain||C.insert.length||1)},0),this.scroll.batchEnd(),this.update(N)}},{key:"deleteText",value:function(N,D){return this.scroll.deleteAt(N,D),this.update(new p.default().retain(N).delete(D))}},{key:"formatLine",value:function(N,D){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(W).forEach(function($){if(!(j.scroll.whitelist!=null&&!j.scroll.whitelist[$])){var C=j.scroll.lines(N,Math.max(D,1)),F=D;C.forEach(function(K){var Y=K.length();if(!(K instanceof g.default))K.format($,W[$]);else{var J=N-K.offset(j.scroll),oe=K.newlineIndex(J+F)-J+1;K.formatAt(J,oe,$,W[$])}F-=Y})}}),this.scroll.optimize(),this.update(new p.default().retain(N).retain(D,(0,S.default)(W)))}},{key:"formatText",value:function(N,D){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(W).forEach(function($){j.scroll.formatAt(N,D,$,W[$])}),this.update(new p.default().retain(N).retain(D,(0,S.default)(W)))}},{key:"getContents",value:function(N,D){return this.delta.slice(N,N+D)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(N,D){return N.concat(D.delta())},new p.default)}},{key:"getFormat",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[],W=[];D===0?this.scroll.path(N).forEach(function(C){var F=l(C,1),K=F[0];K instanceof w.default?j.push(K):K instanceof u.default.Leaf&&W.push(K)}):(j=this.scroll.lines(N,D),W=this.scroll.descendants(u.default.Leaf,N,D));var $=[j,W].map(function(C){if(C.length===0)return{};for(var F=(0,m.bubbleFormats)(C.shift());Object.keys(F).length>0;){var K=C.shift();if(K==null)return F;F=V((0,m.bubbleFormats)(K),F)}return F});return A.default.apply(A.default,$)}},{key:"getText",value:function(N,D){return this.getContents(N,D).filter(function(j){return typeof j.insert=="string"}).map(function(j){return j.insert}).join("")}},{key:"insertEmbed",value:function(N,D,j){return this.scroll.insertAt(N,D,j),this.update(new p.default().retain(N).insert(x({},D,j)))}},{key:"insertText",value:function(N,D){var j=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D=D.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(N,D),Object.keys(W).forEach(function($){j.scroll.formatAt(N,D.length,$,W[$])}),this.update(new p.default().retain(N).insert(D,(0,S.default)(W)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var N=this.scroll.children.head;return N.statics.blotName!==w.default.blotName||N.children.length>1?!1:N.children.head instanceof O.default}},{key:"removeFormat",value:function(N,D){var j=this.getText(N,D),W=this.scroll.line(N+D),$=l(W,2),C=$[0],F=$[1],K=0,Y=new p.default;C!=null&&(C instanceof g.default?K=C.newlineIndex(F)-F+1:K=C.length()-F,Y=C.delta().slice(F,F+K-1).insert(` `));var J=this.getContents(N,D+K),oe=J.diff(new p.default().insert(j).concat(Y)),le=new p.default().retain(N).concat(oe);return this.applyDelta(le)}},{key:"update",value:function(N){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,W=this.delta;if(D.length===1&&D[0].type==="characterData"&&D[0].target.data.match(z)&&u.default.find(D[0].target)){var $=u.default.find(D[0].target),C=(0,m.bubbleFormats)($),F=$.offset(this.scroll),K=D[0].oldValue.replace(v.default.CONTENTS,""),Y=new p.default().insert(K),J=new p.default().insert($.value()),oe=new p.default().retain(F).concat(Y.diff(J,j));N=oe.reduce(function(le,fe){return fe.insert?le.insert(fe.insert,C):le.push(fe)},new p.default),this.delta=W.compose(N)}else this.delta=this.getDelta(),(!N||!(0,L.default)(W.compose(N),this.delta))&&(N=W.diff(this.delta,j));return N}}]),H}();function V(H,I){return Object.keys(I).reduce(function(N,D){return H[D]==null||(I[D]===H[D]?N[D]=I[D]:Array.isArray(I[D])?I[D].indexOf(H[D])<0&&(N[D]=I[D].concat([H[D]])):N[D]=[I[D],H[D]]),N},{})}function te(H){return H.reduce(function(I,N){if(N.insert===1){var D=(0,S.default)(N.attributes);return delete D.image,I.insert({image:N.attributes.image},D)}if(N.attributes!=null&&(N.attributes.list===!0||N.attributes.bullet===!0)&&(N=(0,S.default)(N),N.attributes.list?N.attributes.list="ordered":(N.attributes.list="bullet",delete N.attributes.bullet)),typeof N.insert=="string"){var j=N.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return I.insert(j,N.attributes)}return I.push(N)},new p.default)}i.default=U},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.Range=void 0;var o=function(){function T(L,k){var A=[],E=!0,x=!1,M=void 0;try{for(var z=L[Symbol.iterator](),U;!(E=(U=z.next()).done)&&(A.push(U.value),!(k&&A.length===k));E=!0);}catch(V){x=!0,M=V}finally{try{!E&&z.return&&z.return()}finally{if(x)throw M}}return A}return function(L,k){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return T(L,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function T(L,k){for(var A=0;A<k.length;A++){var E=k[A];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(L,E.key,E)}}return function(L,k,A){return k&&T(L.prototype,k),A&&T(L,A),L}}(),f=r(0),a=v(f),p=r(21),h=v(p),c=r(11),s=v(c),u=r(8),b=v(u),g=r(10),y=v(g);function v(T){return T&&T.__esModule?T:{default:T}}function m(T){if(Array.isArray(T)){for(var L=0,k=Array(T.length);L<T.length;L++)k[L]=T[L];return k}else return Array.from(T)}function w(T,L){if(!(T instanceof L))throw new TypeError("Cannot call a class as a function")}var d=(0,y.default)("quill:selection"),O=function T(L){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;w(this,T),this.index=L,this.length=k},R=function(){function T(L,k){var A=this;w(this,T),this.emitter=k,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=a.default.create("cursor",this),this.lastRange=this.savedRange=new O(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,b.default.sources.USER),1)}),this.emitter.on(b.default.events.EDITOR_CHANGE,function(E,x){E===b.default.events.TEXT_CHANGE&&x.length()>0&&A.update(b.default.sources.SILENT)}),this.emitter.on(b.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var E=A.getNativeRange();E!=null&&E.start.node!==A.cursor.textNode&&A.emitter.once(b.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(E.start.node,E.start.offset,E.end.node,E.end.offset)}catch{}})}}),this.emitter.on(b.default.events.SCROLL_OPTIMIZE,function(E,x){if(x.range){var M=x.range,z=M.startNode,U=M.startOffset,V=M.endNode,te=M.endOffset;A.setNativeRange(z,U,V,te)}}),this.update(b.default.sources.SILENT)}return l(T,[{key:"handleComposition",value:function(){var k=this;this.root.addEventListener("compositionstart",function(){k.composing=!0}),this.root.addEventListener("compositionend",function(){if(k.composing=!1,k.cursor.parent){var A=k.cursor.restore();if(!A)return;setTimeout(function(){k.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var k=this;this.emitter.listenDOM("mousedown",document.body,function(){k.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){k.mouseDown=!1,k.update(b.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(k,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[k])){this.scroll.update();var E=this.getNativeRange();if(!(E==null||!E.native.collapsed||a.default.query(k,a.default.Scope.BLOCK))){if(E.start.node!==this.cursor.textNode){var x=a.default.find(E.start.node,!1);if(x==null)return;if(x instanceof a.default.Leaf){var M=x.split(E.start.offset);x.parent.insertBefore(this.cursor,M)}else x.insertBefore(this.cursor,E.start.node);this.cursor.attach()}this.cursor.format(k,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=this.scroll.length();k=Math.min(k,E-1),A=Math.min(k+A,E-1)-k;var x=void 0,M=this.scroll.leaf(k),z=o(M,2),U=z[0],V=z[1];if(U==null)return null;var te=U.position(V,!0),H=o(te,2);x=H[0],V=H[1];var I=document.createRange();if(A>0){I.setStart(x,V);var N=this.scroll.leaf(k+A),D=o(N,2);if(U=D[0],V=D[1],U==null)return null;var j=U.position(V,!0),W=o(j,2);return x=W[0],V=W[1],I.setEnd(x,V),I.getBoundingClientRect()}else{var $="left",C=void 0;return x instanceof Text?(V<x.data.length?(I.setStart(x,V),I.setEnd(x,V+1)):(I.setStart(x,V-1),I.setEnd(x,V),$="right"),C=I.getBoundingClientRect()):(C=U.domNode.getBoundingClientRect(),V>0&&($="right")),{bottom:C.top+C.height,height:C.height,left:C[$],right:C[$],top:C.top,width:0}}}},{key:"getNativeRange",value:function(){var k=document.getSelection();if(k==null||k.rangeCount<=0)return null;var A=k.getRangeAt(0);if(A==null)return null;var E=this.normalizeNative(A);return d.info("getNativeRange",E),E}},{key:"getRange",value:function(){var k=this.getNativeRange();if(k==null)return[null,null];var A=this.normalizedToRange(k);return[A,k]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(k){var A=this,E=[[k.start.node,k.start.offset]];k.native.collapsed||E.push([k.end.node,k.end.offset]);var x=E.map(function(U){var V=o(U,2),te=V[0],H=V[1],I=a.default.find(te,!0),N=I.offset(A.scroll);return H===0?N:I instanceof a.default.Container?N+I.length():N+I.index(te,H)}),M=Math.min(Math.max.apply(Math,m(x)),this.scroll.length()-1),z=Math.min.apply(Math,[M].concat(m(x)));return new O(z,M-z)}},{key:"normalizeNative",value:function(k){if(!S(this.root,k.startContainer)||!k.collapsed&&!S(this.root,k.endContainer))return null;var A={start:{node:k.startContainer,offset:k.startOffset},end:{node:k.endContainer,offset:k.endOffset},native:k};return[A.start,A.end].forEach(function(E){for(var x=E.node,M=E.offset;!(x instanceof Text)&&x.childNodes.length>0;)if(x.childNodes.length>M)x=x.childNodes[M],M=0;else if(x.childNodes.length===M)x=x.lastChild,M=x instanceof Text?x.data.length:x.childNodes.length+1;else break;E.node=x,E.offset=M}),A}},{key:"rangeToNative",value:function(k){var A=this,E=k.collapsed?[k.index]:[k.index,k.index+k.length],x=[],M=this.scroll.length();return E.forEach(function(z,U){z=Math.min(M-1,z);var V=void 0,te=A.scroll.leaf(z),H=o(te,2),I=H[0],N=H[1],D=I.position(N,U!==0),j=o(D,2);V=j[0],N=j[1],x.push(V,N)}),x.length<2&&(x=x.concat(x)),x}},{key:"scrollIntoView",value:function(k){var A=this.lastRange;if(A!=null){var E=this.getBounds(A.index,A.length);if(E!=null){var x=this.scroll.length()-1,M=this.scroll.line(Math.min(A.index,x)),z=o(M,1),U=z[0],V=U;if(A.length>0){var te=this.scroll.line(Math.min(A.index+A.length,x)),H=o(te,1);V=H[0]}if(!(U==null||V==null)){var I=k.getBoundingClientRect();E.top<I.top?k.scrollTop-=I.top-E.top:E.bottom>I.bottom&&(k.scrollTop+=E.bottom-I.bottom)}}}}},{key:"setNativeRange",value:function(k,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,M=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(d.info("setNativeRange",k,A,E,x),!(k!=null&&(this.root.parentNode==null||k.parentNode==null||E.parentNode==null))){var z=document.getSelection();if(z!=null)if(k!=null){this.hasFocus()||this.root.focus();var U=(this.getNativeRange()||{}).native;if(U==null||M||k!==U.startContainer||A!==U.startOffset||E!==U.endContainer||x!==U.endOffset){k.tagName=="BR"&&(A=[].indexOf.call(k.parentNode.childNodes,k),k=k.parentNode),E.tagName=="BR"&&(x=[].indexOf.call(E.parentNode.childNodes,E),E=E.parentNode);var V=document.createRange();V.setStart(k,A),V.setEnd(E,x),z.removeAllRanges(),z.addRange(V)}}else z.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof A=="string"&&(E=A,A=!1),d.info("setRange",k),k!=null){var x=this.rangeToNative(k);this.setNativeRange.apply(this,m(x).concat([A]))}else this.setNativeRange(null);this.update(E)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.default.sources.USER,A=this.lastRange,E=this.getRange(),x=o(E,2),M=x[0],z=x[1];if(this.lastRange=M,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,s.default)(A,this.lastRange)){var U;!this.composing&&z!=null&&z.native.collapsed&&z.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[b.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(A),k];if((U=this.emitter).emit.apply(U,[b.default.events.EDITOR_CHANGE].concat(V)),k!==b.default.sources.SILENT){var te;(te=this.emitter).emit.apply(te,V)}}}}]),T}();function S(T,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),T.contains(L)}i.Range=O,i.default=R},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function b(g,y){for(var v=0;v<y.length;v++){var m=y[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),l=function b(g,y,v){g===null&&(g=Function.prototype);var m=Object.getOwnPropertyDescriptor(g,y);if(m===void 0){var w=Object.getPrototypeOf(g);return w===null?void 0:b(w,y,v)}else{if("value"in m)return m.value;var d=m.get;return d===void 0?void 0:d.call(v)}},f=r(0),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(){return h(this,g),c(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,[{key:"insertInto",value:function(v,m){v.children.length===0?l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,v,m):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(a.default.Embed);u.blotName="break",u.tagName="BR",i.default=u},function(t,i,r){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var b in u)u.hasOwnProperty(b)&&(s[b]=u[b])};return function(s,u){c(s,u);function b(){this.constructor=s}s.prototype=u===null?Object.create(u):(b.prototype=u.prototype,new b)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(44),f=r(30),a=r(1),p=function(c){o(s,c);function s(u){var b=c.call(this,u)||this;return b.build(),b}return s.prototype.appendChild=function(u){this.insertBefore(u)},s.prototype.attach=function(){c.prototype.attach.call(this),this.children.forEach(function(u){u.attach()})},s.prototype.build=function(){var u=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(b){try{var g=h(b);u.insertBefore(g,u.children.head||void 0)}catch(y){if(y instanceof a.ParchmentError)return;throw y}})},s.prototype.deleteAt=function(u,b){if(u===0&&b===this.length())return this.remove();this.children.forEachAt(u,b,function(g,y,v){g.deleteAt(y,v)})},s.prototype.descendant=function(u,b){var g=this.children.find(b),y=g[0],v=g[1];return u.blotName==null&&u(y)||u.blotName!=null&&y instanceof u?[y,v]:y instanceof s?y.descendant(u,v):[null,-1]},s.prototype.descendants=function(u,b,g){b===void 0&&(b=0),g===void 0&&(g=Number.MAX_VALUE);var y=[],v=g;return this.children.forEachAt(b,g,function(m,w,d){(u.blotName==null&&u(m)||u.blotName!=null&&m instanceof u)&&y.push(m),m instanceof s&&(y=y.concat(m.descendants(u,w,v))),v-=d}),y},s.prototype.detach=function(){this.children.forEach(function(u){u.detach()}),c.prototype.detach.call(this)},s.prototype.formatAt=function(u,b,g,y){this.children.forEachAt(u,b,function(v,m,w){v.formatAt(m,w,g,y)})},s.prototype.insertAt=function(u,b,g){var y=this.children.find(u),v=y[0],m=y[1];if(v)v.insertAt(m,b,g);else{var w=g==null?a.create("text",b):a.create(b,g);this.appendChild(w)}},s.prototype.insertBefore=function(u,b){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return u instanceof g}))throw new a.ParchmentError("Cannot insert "+u.statics.blotName+" into "+this.statics.blotName);u.insertInto(this,b)},s.prototype.length=function(){return this.children.reduce(function(u,b){return u+b.length()},0)},s.prototype.moveChildren=function(u,b){this.children.forEach(function(g){u.insertBefore(g,b)})},s.prototype.optimize=function(u){if(c.prototype.optimize.call(this,u),this.children.length===0)if(this.statics.defaultChild!=null){var b=a.create(this.statics.defaultChild);this.appendChild(b),b.optimize(u)}else this.remove()},s.prototype.path=function(u,b){b===void 0&&(b=!1);var g=this.children.find(u,b),y=g[0],v=g[1],m=[[this,u]];return y instanceof s?m.concat(y.path(v,b)):(y!=null&&m.push([y,v]),m)},s.prototype.removeChild=function(u){this.children.remove(u)},s.prototype.replace=function(u){u instanceof s&&u.moveChildren(this),c.prototype.replace.call(this,u)},s.prototype.split=function(u,b){if(b===void 0&&(b=!1),!b){if(u===0)return this;if(u===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(u,this.length(),function(y,v,m){y=y.split(v,b),g.appendChild(y)}),g},s.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},s.prototype.update=function(u,b){var g=this,y=[],v=[];u.forEach(function(m){m.target===g.domNode&&m.type==="childList"&&(y.push.apply(y,m.addedNodes),v.push.apply(v,m.removedNodes))}),v.forEach(function(m){if(!(m.parentNode!=null&&m.tagName!=="IFRAME"&&document.body.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var w=a.find(m);w!=null&&(w.domNode.parentNode==null||w.domNode.parentNode===g.domNode)&&w.detach()}}),y.filter(function(m){return m.parentNode==g.domNode}).sort(function(m,w){return m===w?0:m.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(m){var w=null;m.nextSibling!=null&&(w=a.find(m.nextSibling));var d=h(m);(d.next!=w||d.next==null)&&(d.parent!=null&&d.parent.removeChild(g),g.insertBefore(d,w||void 0))})},s}(f.default);function h(c){var s=a.find(c);if(s==null)try{s=a.create(c)}catch{s=a.create(a.Scope.INLINE),[].slice.call(c.childNodes).forEach(function(b){s.domNode.appendChild(b)}),c.parentNode&&c.parentNode.replaceChild(s.domNode,c),s.attach()}return s}i.default=p},function(t,i,r){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var b in u)u.hasOwnProperty(b)&&(s[b]=u[b])};return function(s,u){c(s,u);function b(){this.constructor=s}s.prototype=u===null?Object.create(u):(b.prototype=u.prototype,new b)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(12),f=r(31),a=r(17),p=r(1),h=function(c){o(s,c);function s(u){var b=c.call(this,u)||this;return b.attributes=new f.default(b.domNode),b}return s.formats=function(u){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return u.tagName.toLowerCase()},s.prototype.format=function(u,b){var g=p.query(u);g instanceof l.default?this.attributes.attribute(g,b):b&&g!=null&&(u!==this.statics.blotName||this.formats()[u]!==b)&&this.replaceWith(u,b)},s.prototype.formats=function(){var u=this.attributes.values(),b=this.statics.formats(this.domNode);return b!=null&&(u[this.statics.blotName]=b),u},s.prototype.replaceWith=function(u,b){var g=c.prototype.replaceWith.call(this,u,b);return this.attributes.copy(g),g},s.prototype.update=function(u,b){var g=this;c.prototype.update.call(this,u,b),u.some(function(y){return y.target===g.domNode&&y.type==="attributes"})&&this.attributes.build()},s.prototype.wrap=function(u,b){var g=c.prototype.wrap.call(this,u,b);return g instanceof s&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},s}(a.default);i.default=h},function(t,i,r){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var s in c)c.hasOwnProperty(s)&&(h[s]=c[s])};return function(h,c){p(h,c);function s(){this.constructor=h}h.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(30),f=r(1),a=function(p){o(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.value=function(c){return!0},h.prototype.index=function(c,s){return this.domNode===c||this.domNode.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(s,1):-1},h.prototype.position=function(c,s){var u=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return c>0&&(u+=1),[this.parent.domNode,u]},h.prototype.value=function(){var c;return c={},c[this.statics.blotName]=this.statics.value(this.domNode)||!0,c},h.scope=f.Scope.INLINE_BLOT,h}(l.default);i.default=a},function(t,i,r){var o=r(11),l=r(3),f={attributes:{compose:function(p,h,c){typeof p!="object"&&(p={}),typeof h!="object"&&(h={});var s=l(!0,{},h);c||(s=Object.keys(s).reduce(function(b,g){return s[g]!=null&&(b[g]=s[g]),b},{}));for(var u in p)p[u]!==void 0&&h[u]===void 0&&(s[u]=p[u]);return Object.keys(s).length>0?s:void 0},diff:function(p,h){typeof p!="object"&&(p={}),typeof h!="object"&&(h={});var c=Object.keys(p).concat(Object.keys(h)).reduce(function(s,u){return o(p[u],h[u])||(s[u]=h[u]===void 0?null:h[u]),s},{});return Object.keys(c).length>0?c:void 0},transform:function(p,h,c){if(typeof p!="object")return h;if(typeof h=="object"){if(!c)return h;var s=Object.keys(h).reduce(function(u,b){return p[b]===void 0&&(u[b]=h[b]),u},{});return Object.keys(s).length>0?s:void 0}}},iterator:function(p){return new a(p)},length:function(p){return typeof p.delete=="number"?p.delete:typeof p.retain=="number"?p.retain:typeof p.insert=="string"?p.insert.length:1}};function a(p){this.ops=p,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(p){p||(p=1/0);var h=this.ops[this.index];if(h){var c=this.offset,s=f.length(h);if(p>=s-c?(p=s-c,this.index+=1,this.offset=0):this.offset+=p,typeof h.delete=="number")return{delete:p};var u={};return h.attributes&&(u.attributes=h.attributes),typeof h.retain=="number"?u.retain=p:typeof h.insert=="string"?u.insert=h.insert.substr(c,p):u.insert=h.insert,u}else return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?f.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var p=this.offset,h=this.index,c=this.next(),s=this.ops.slice(this.index);return this.offset=p,this.index=h,[c].concat(s)}else return[]},t.exports=f},function(t,i){var r=function(){function o(g,y){return y!=null&&g instanceof y}var l;try{l=Map}catch{l=function(){}}var f;try{f=Set}catch{f=function(){}}var a;try{a=Promise}catch{a=function(){}}function p(g,y,v,m,w){typeof y=="object"&&(v=y.depth,m=y.prototype,w=y.includeNonEnumerable,y=y.circular);var d=[],O=[],R=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof v>"u"&&(v=1/0);function S(T,L){if(T===null)return null;if(L===0)return T;var k,A;if(typeof T!="object")return T;if(o(T,l))k=new l;else if(o(T,f))k=new f;else if(o(T,a))k=new a(function(I,N){T.then(function(D){I(S(D,L-1))},function(D){N(S(D,L-1))})});else if(p.__isArray(T))k=[];else if(p.__isRegExp(T))k=new RegExp(T.source,b(T)),T.lastIndex&&(k.lastIndex=T.lastIndex);else if(p.__isDate(T))k=new Date(T.getTime());else{if(R&&Buffer.isBuffer(T))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(T.length):k=new Buffer(T.length),T.copy(k),k;o(T,Error)?k=Object.create(T):typeof m>"u"?(A=Object.getPrototypeOf(T),k=Object.create(A)):(k=Object.create(m),A=m)}if(y){var E=d.indexOf(T);if(E!=-1)return O[E];d.push(T),O.push(k)}o(T,l)&&T.forEach(function(I,N){var D=S(N,L-1),j=S(I,L-1);k.set(D,j)}),o(T,f)&&T.forEach(function(I){var N=S(I,L-1);k.add(N)});for(var x in T){var M;A&&(M=Object.getOwnPropertyDescriptor(A,x)),!(M&&M.set==null)&&(k[x]=S(T[x],L-1))}if(Object.getOwnPropertySymbols)for(var z=Object.getOwnPropertySymbols(T),x=0;x<z.length;x++){var U=z[x],V=Object.getOwnPropertyDescriptor(T,U);V&&!V.enumerable&&!w||(k[U]=S(T[U],L-1),V.enumerable||Object.defineProperty(k,U,{enumerable:!1}))}if(w)for(var te=Object.getOwnPropertyNames(T),x=0;x<te.length;x++){var H=te[x],V=Object.getOwnPropertyDescriptor(T,H);V&&V.enumerable||(k[H]=S(T[H],L-1),Object.defineProperty(k,H,{enumerable:!1}))}return k}return S(g,v)}p.clonePrototype=function(y){if(y===null)return null;var v=function(){};return v.prototype=y,new v};function h(g){return Object.prototype.toString.call(g)}p.__objToStr=h;function c(g){return typeof g=="object"&&h(g)==="[object Date]"}p.__isDate=c;function s(g){return typeof g=="object"&&h(g)==="[object Array]"}p.__isArray=s;function u(g){return typeof g=="object"&&h(g)==="[object RegExp]"}p.__isRegExp=u;function b(g){var y="";return g.global&&(y+="g"),g.ignoreCase&&(y+="i"),g.multiline&&(y+="m"),y}return p.__getRegExpFlags=b,p}();typeof t=="object"&&t.exports&&(t.exports=r)},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function k(A,E){var x=[],M=!0,z=!1,U=void 0;try{for(var V=A[Symbol.iterator](),te;!(M=(te=V.next()).done)&&(x.push(te.value),!(E&&x.length===E));M=!0);}catch(H){z=!0,U=H}finally{try{!M&&V.return&&V.return()}finally{if(z)throw U}}return x}return function(A,E){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return k(A,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function k(A,E){for(var x=0;x<E.length;x++){var M=E[x];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,E,x){return E&&k(A.prototype,E),x&&k(A,x),A}}(),f=function k(A,E,x){A===null&&(A=Function.prototype);var M=Object.getOwnPropertyDescriptor(A,E);if(M===void 0){var z=Object.getPrototypeOf(A);return z===null?void 0:k(z,E,x)}else{if("value"in M)return M.value;var U=M.get;return U===void 0?void 0:U.call(x)}},a=r(0),p=d(a),h=r(8),c=d(h),s=r(4),u=d(s),b=r(16),g=d(b),y=r(13),v=d(y),m=r(25),w=d(m);function d(k){return k&&k.__esModule?k:{default:k}}function O(k,A){if(!(k instanceof A))throw new TypeError("Cannot call a class as a function")}function R(k,A){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:k}function S(k,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);k.prototype=Object.create(A&&A.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(k,A):k.__proto__=A)}function T(k){return k instanceof u.default||k instanceof s.BlockEmbed}var L=function(k){S(A,k);function A(E,x){O(this,A);var M=R(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E));return M.emitter=x.emitter,Array.isArray(x.whitelist)&&(M.whitelist=x.whitelist.reduce(function(z,U){return z[U]=!0,z},{})),M.domNode.addEventListener("DOMNodeInserted",function(){}),M.optimize(),M.enable(),M}return l(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(x,M){var z=this.line(x),U=o(z,2),V=U[0],te=U[1],H=this.line(x+M),I=o(H,1),N=I[0];if(f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,x,M),N!=null&&V!==N&&te>0){if(V instanceof s.BlockEmbed||N instanceof s.BlockEmbed){this.optimize();return}if(V instanceof v.default){var D=V.newlineIndex(V.length(),!0);if(D>-1&&(V=V.split(D+1),V===N)){this.optimize();return}}else if(N instanceof v.default){var j=N.newlineIndex(0);j>-1&&N.split(j+1)}var W=N.children.head instanceof g.default?null:N.children.head;V.moveChildren(N,W),V.remove()}this.optimize()}},{key:"enable",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",x)}},{key:"formatAt",value:function(x,M,z,U){this.whitelist!=null&&!this.whitelist[z]||(f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,x,M,z,U),this.optimize())}},{key:"insertAt",value:function(x,M,z){if(!(z!=null&&this.whitelist!=null&&!this.whitelist[M])){if(x>=this.length())if(z==null||p.default.query(M,p.default.Scope.BLOCK)==null){var U=p.default.create(this.statics.defaultChild);this.appendChild(U),z==null&&M.endsWith(` `)&&(M=M.slice(0,-1)),U.insertAt(0,M,z)}else{var V=p.default.create(M,z);this.appendChild(V)}else f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,x,M,z);this.optimize()}}},{key:"insertBefore",value:function(x,M){if(x.statics.scope===p.default.Scope.INLINE_BLOT){var z=p.default.create(this.statics.defaultChild);z.appendChild(x),x=z}f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,x,M)}},{key:"leaf",value:function(x){return this.path(x).pop()||[null,-1]}},{key:"line",value:function(x){return x===this.length()?this.line(x-1):this.descendant(T,x)}},{key:"lines",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,z=function U(V,te,H){var I=[],N=H;return V.children.forEachAt(te,H,function(D,j,W){T(D)?I.push(D):D instanceof p.default.Container&&(I=I.concat(U(D,j,N))),N-=W}),I};return z(this,x,M)}},{key:"optimize",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,x,M),x.length>0&&this.emitter.emit(c.default.events.SCROLL_OPTIMIZE,x,M))}},{key:"path",value:function(x){return f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,x).slice(1)}},{key:"update",value:function(x){if(this.batch!==!0){var M=c.default.sources.USER;typeof x=="string"&&(M=x),Array.isArray(x)||(x=this.observer.takeRecords()),x.length>0&&this.emitter.emit(c.default.events.SCROLL_BEFORE_UPDATE,M,x),f(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,x.concat([])),x.length>0&&this.emitter.emit(c.default.events.SCROLL_UPDATE,M,x)}}}]),A}(p.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[u.default,s.BlockEmbed,w.default],i.default=L},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.SHORTKEY=i.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},l=function(){function C(F,K){var Y=[],J=!0,oe=!1,le=void 0;try{for(var fe=F[Symbol.iterator](),me;!(J=(me=fe.next()).done)&&(Y.push(me.value),!(K&&Y.length===K));J=!0);}catch(be){oe=!0,le=be}finally{try{!J&&fe.return&&fe.return()}finally{if(oe)throw le}}return Y}return function(F,K){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return C(F,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function C(F,K){for(var Y=0;Y<K.length;Y++){var J=K[Y];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(F,J.key,J)}}return function(F,K,Y){return K&&C(F.prototype,K),Y&&C(F,Y),F}}(),a=r(21),p=k(a),h=r(11),c=k(h),s=r(3),u=k(s),b=r(2),g=k(b),y=r(20),v=k(y),m=r(0),w=k(m),d=r(5),O=k(d),R=r(10),S=k(R),T=r(9),L=k(T);function k(C){return C&&C.__esModule?C:{default:C}}function A(C,F,K){return F in C?Object.defineProperty(C,F,{value:K,enumerable:!0,configurable:!0,writable:!0}):C[F]=K,C}function E(C,F){if(!(C instanceof F))throw new TypeError("Cannot call a class as a function")}function x(C,F){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:C}function M(C,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);C.prototype=Object.create(F&&F.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(C,F):C.__proto__=F)}var z=(0,S.default)("quill:keyboard"),U=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",V=function(C){M(F,C),f(F,null,[{key:"match",value:function(Y,J){return J=$(J),["altKey","ctrlKey","metaKey","shiftKey"].some(function(oe){return!!J[oe]!==Y[oe]&&J[oe]!==null})?!1:J.key===(Y.which||Y.keyCode)}}]);function F(K,Y){E(this,F);var J=x(this,(F.__proto__||Object.getPrototypeOf(F)).call(this,K,Y));return J.bindings={},Object.keys(J.options.bindings).forEach(function(oe){oe==="list autofill"&&K.scroll.whitelist!=null&&!K.scroll.whitelist.list||J.options.bindings[oe]&&J.addBinding(J.options.bindings[oe])}),J.addBinding({key:F.keys.ENTER,shiftKey:null},D),J.addBinding({key:F.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(J.addBinding({key:F.keys.BACKSPACE},{collapsed:!0},H),J.addBinding({key:F.keys.DELETE},{collapsed:!0},I)):(J.addBinding({key:F.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},H),J.addBinding({key:F.keys.DELETE},{collapsed:!0,suffix:/^.?$/},I)),J.addBinding({key:F.keys.BACKSPACE},{collapsed:!1},N),J.addBinding({key:F.keys.DELETE},{collapsed:!1},N),J.addBinding({key:F.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},H),J.listen(),J}return f(F,[{key:"addBinding",value:function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=$(Y);if(le==null||le.key==null)return z.warn("Attempted to add invalid keyboard binding",le);typeof J=="function"&&(J={handler:J}),typeof oe=="function"&&(oe={handler:oe}),le=(0,u.default)(le,J,oe),this.bindings[le.key]=this.bindings[le.key]||[],this.bindings[le.key].push(le)}},{key:"listen",value:function(){var Y=this;this.quill.root.addEventListener("keydown",function(J){if(!J.defaultPrevented){var oe=J.which||J.keyCode,le=(Y.bindings[oe]||[]).filter(function(_e){return F.match(J,_e)});if(le.length!==0){var fe=Y.quill.getSelection();if(!(fe==null||!Y.quill.hasFocus())){var me=Y.quill.getLine(fe.index),be=l(me,2),Ne=be[0],Re=be[1],Z=Y.quill.getLeaf(fe.index),Q=l(Z,2),ie=Q[0],re=Q[1],ee=fe.length===0?[ie,re]:Y.quill.getLeaf(fe.index+fe.length),pe=l(ee,2),ce=pe[0],he=pe[1],Ke=ie instanceof w.default.Text?ie.value().slice(0,re):"",ze=ce instanceof w.default.Text?ce.value().slice(he):"",Se={collapsed:fe.length===0,empty:fe.length===0&&Ne.length()<=1,format:Y.quill.getFormat(fe),offset:Re,prefix:Ke,suffix:ze},Nt=le.some(function(_e){if(_e.collapsed!=null&&_e.collapsed!==Se.collapsed||_e.empty!=null&&_e.empty!==Se.empty||_e.offset!=null&&_e.offset!==Se.offset)return!1;if(Array.isArray(_e.format)){if(_e.format.every(function(it){return Se.format[it]==null}))return!1}else if(o(_e.format)==="object"&&!Object.keys(_e.format).every(function(it){return _e.format[it]===!0?Se.format[it]!=null:_e.format[it]===!1?Se.format[it]==null:(0,c.default)(_e.format[it],Se.format[it])}))return!1;return _e.prefix!=null&&!_e.prefix.test(Se.prefix)||_e.suffix!=null&&!_e.suffix.test(Se.suffix)?!1:_e.handler.call(Y,fe,Se)!==!0});Nt&&J.preventDefault()}}}})}}]),F}(L.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:W("bold"),italic:W("italic"),underline:W("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(F,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",O.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(F,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",O.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(F,K){K.format.indent!=null?this.quill.format("indent","-1",O.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,O.default.sources.USER)}},"indent code-block":j(!0),"outdent code-block":j(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(F){this.quill.deleteText(F.index-1,1,O.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(F){this.quill.history.cutoff();var K=new g.default().retain(F.index).delete(F.length).insert(" ");this.quill.updateContents(K,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(F.index+1,O.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(F,K){this.quill.format("list",!1,O.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,O.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(F){var K=this.quill.getLine(F.index),Y=l(K,2),J=Y[0],oe=Y[1],le=(0,u.default)({},J.formats(),{list:"checked"}),fe=new g.default().retain(F.index).insert(` `,le).retain(J.length()-oe-1).retain(1,{list:"unchecked"});this.quill.updateContents(fe,O.default.sources.USER),this.quill.setSelection(F.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(F,K){var Y=this.quill.getLine(F.index),J=l(Y,2),oe=J[0],le=J[1],fe=new g.default().retain(F.index).insert(` `,K.format).retain(oe.length()-le-1).retain(1,{header:null});this.quill.updateContents(fe,O.default.sources.USER),this.quill.setSelection(F.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(F,K){var Y=K.prefix.length,J=this.quill.getLine(F.index),oe=l(J,2),le=oe[0],fe=oe[1];if(fe>Y)return!0;var me=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":me="unchecked";break;case"[x]":me="checked";break;case"-":case"*":me="bullet";break;default:me="ordered"}this.quill.insertText(F.index," ",O.default.sources.USER),this.quill.history.cutoff();var be=new g.default().retain(F.index-fe).delete(Y+1).retain(le.length()-2-fe).retain(1,{list:me});this.quill.updateContents(be,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(F.index-Y,O.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(F){var K=this.quill.getLine(F.index),Y=l(K,2),J=Y[0],oe=Y[1],le=new g.default().retain(F.index+J.length()-oe-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(le,O.default.sources.USER)}},"embed left":te(V.keys.LEFT,!1),"embed left shift":te(V.keys.LEFT,!0),"embed right":te(V.keys.RIGHT,!1),"embed right shift":te(V.keys.RIGHT,!0)}};function te(C,F){var K,Y=C===V.keys.LEFT?"prefix":"suffix";return K={key:C,shiftKey:F,altKey:null},A(K,Y,/^$/),A(K,"handler",function(oe){var le=oe.index;C===V.keys.RIGHT&&(le+=oe.length+1);var fe=this.quill.getLeaf(le),me=l(fe,1),be=me[0];return be instanceof w.default.Embed?(C===V.keys.LEFT?F?this.quill.setSelection(oe.index-1,oe.length+1,O.default.sources.USER):this.quill.setSelection(oe.index-1,O.default.sources.USER):F?this.quill.setSelection(oe.index,oe.length+1,O.default.sources.USER):this.quill.setSelection(oe.index+oe.length+1,O.default.sources.USER),!1):!0}),K}function H(C,F){if(!(C.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(C.index),Y=l(K,1),J=Y[0],oe={};if(F.offset===0){var le=this.quill.getLine(C.index-1),fe=l(le,1),me=fe[0];if(me!=null&&me.length()>1){var be=J.formats(),Ne=this.quill.getFormat(C.index-1,1);oe=v.default.attributes.diff(be,Ne)||{}}}var Re=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(F.prefix)?2:1;this.quill.deleteText(C.index-Re,Re,O.default.sources.USER),Object.keys(oe).length>0&&this.quill.formatLine(C.index-Re,Re,oe,O.default.sources.USER),this.quill.focus()}}function I(C,F){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(F.suffix)?2:1;if(!(C.index>=this.quill.getLength()-K)){var Y={},J=0,oe=this.quill.getLine(C.index),le=l(oe,1),fe=le[0];if(F.offset>=fe.length()-1){var me=this.quill.getLine(C.index+1),be=l(me,1),Ne=be[0];if(Ne){var Re=fe.formats(),Z=this.quill.getFormat(C.index,1);Y=v.default.attributes.diff(Re,Z)||{},J=Ne.length()}}this.quill.deleteText(C.index,K,O.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(C.index+J-1,K,Y,O.default.sources.USER)}}function N(C){var F=this.quill.getLines(C),K={};if(F.length>1){var Y=F[0].formats(),J=F[F.length-1].formats();K=v.default.attributes.diff(J,Y)||{}}this.quill.deleteText(C,O.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(C.index,1,K,O.default.sources.USER),this.quill.setSelection(C.index,O.default.sources.SILENT),this.quill.focus()}function D(C,F){var K=this;C.length>0&&this.quill.scroll.deleteAt(C.index,C.length);var Y=Object.keys(F.format).reduce(function(J,oe){return w.default.query(oe,w.default.Scope.BLOCK)&&!Array.isArray(F.format[oe])&&(J[oe]=F.format[oe]),J},{});this.quill.insertText(C.index,` `,Y,O.default.sources.USER),this.quill.setSelection(C.index+1,O.default.sources.SILENT),this.quill.focus(),Object.keys(F.format).forEach(function(J){Y[J]==null&&(Array.isArray(F.format[J])||J!=="link"&&K.quill.format(J,F.format[J],O.default.sources.USER))})}function j(C){return{key:V.keys.TAB,shiftKey:!C,format:{"code-block":!0},handler:function(K){var Y=w.default.query("code-block"),J=K.index,oe=K.length,le=this.quill.scroll.descendant(Y,J),fe=l(le,2),me=fe[0],be=fe[1];if(me!=null){var Ne=this.quill.getIndex(me),Re=me.newlineIndex(be,!0)+1,Z=me.newlineIndex(Ne+be+oe),Q=me.domNode.textContent.slice(Re,Z).split(` `);be=0,Q.forEach(function(ie,re){C?(me.insertAt(Re+be,Y.TAB),be+=Y.TAB.length,re===0?J+=Y.TAB.length:oe+=Y.TAB.length):ie.startsWith(Y.TAB)&&(me.deleteAt(Re+be,Y.TAB.length),be-=Y.TAB.length,re===0?J-=Y.TAB.length:oe-=Y.TAB.length),be+=ie.length+1}),this.quill.update(O.default.sources.USER),this.quill.setSelection(J,oe,O.default.sources.SILENT)}}}}function W(C){return{key:C[0].toUpperCase(),shortKey:!0,handler:function(K,Y){this.quill.format(C,!Y.format[C],O.default.sources.USER)}}}function $(C){if(typeof C=="string"||typeof C=="number")return $({key:C});if((typeof C>"u"?"undefined":o(C))==="object"&&(C=(0,p.default)(C,!1)),typeof C.key=="string")if(V.keys[C.key.toUpperCase()]!=null)C.key=V.keys[C.key.toUpperCase()];else if(C.key.length===1)C.key=C.key.toUpperCase().charCodeAt(0);else return null;return C.shortKey&&(C[U]=C.shortKey,delete C.shortKey),C}i.default=V,i.SHORTKEY=U},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function v(m,w){var d=[],O=!0,R=!1,S=void 0;try{for(var T=m[Symbol.iterator](),L;!(O=(L=T.next()).done)&&(d.push(L.value),!(w&&d.length===w));O=!0);}catch(k){R=!0,S=k}finally{try{!O&&T.return&&T.return()}finally{if(R)throw S}}return d}return function(m,w){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return v(m,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function v(m,w,d){m===null&&(m=Function.prototype);var O=Object.getOwnPropertyDescriptor(m,w);if(O===void 0){var R=Object.getPrototypeOf(m);return R===null?void 0:v(R,w,d)}else{if("value"in O)return O.value;var S=O.get;return S===void 0?void 0:S.call(d)}},f=function(){function v(m,w){for(var d=0;d<w.length;d++){var O=w[d];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,w,d){return w&&v(m.prototype,w),d&&v(m,d),m}}(),a=r(0),p=s(a),h=r(7),c=s(h);function s(v){return v&&v.__esModule?v:{default:v}}function u(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}function b(v,m){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:v}function g(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);v.prototype=Object.create(m&&m.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(v,m):v.__proto__=m)}var y=function(v){g(m,v),f(m,null,[{key:"value",value:function(){}}]);function m(w,d){u(this,m);var O=b(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,w));return O.selection=d,O.textNode=document.createTextNode(m.CONTENTS),O.domNode.appendChild(O.textNode),O._length=0,O}return f(m,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(d,O){if(this._length!==0)return l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,d,O);for(var R=this,S=0;R!=null&&R.statics.scope!==p.default.Scope.BLOCK_BLOT;)S+=R.offset(R.parent),R=R.parent;R!=null&&(this._length=m.CONTENTS.length,R.optimize(),R.formatAt(S,m.CONTENTS.length,d,O),this._length=0)}},{key:"index",value:function(d,O){return d===this.textNode?0:l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,d,O)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var d=this.textNode,O=this.selection.getNativeRange(),R=void 0,S=void 0,T=void 0;if(O!=null&&O.start.node===d&&O.end.node===d){var L=[d,O.start.offset,O.end.offset];R=L[0],S=L[1],T=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==m.CONTENTS){var k=this.textNode.data.split(m.CONTENTS).join("");this.next instanceof c.default?(R=this.next.domNode,this.next.insertAt(0,k),this.textNode.data=m.CONTENTS):(this.textNode.data=k,this.parent.insertBefore(p.default.create(this.textNode),this),this.textNode=document.createTextNode(m.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),S!=null){var A=[S,T].map(function(x){return Math.max(0,Math.min(R.data.length,x-1))}),E=o(A,2);return S=E[0],T=E[1],{startNode:R,startOffset:S,endNode:R,endOffset:T}}}}},{key:"update",value:function(d,O){var R=this;if(d.some(function(T){return T.type==="characterData"&&T.target===R.textNode})){var S=this.restore();S&&(O.range=S)}}},{key:"value",value:function(){return""}}]),m}(p.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",i.default=y},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(0),l=p(o),f=r(4),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(){return h(this,g),c(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(l.default.Container);u.allowedChildren=[a.default,f.BlockEmbed,u],i.default=u},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.ColorStyle=i.ColorClass=i.ColorAttributor=void 0;var o=function(){function y(v,m){for(var w=0;w<m.length;w++){var d=m[w];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(v,d.key,d)}}return function(v,m,w){return m&&y(v.prototype,m),w&&y(v,w),v}}(),l=function y(v,m,w){v===null&&(v=Function.prototype);var d=Object.getOwnPropertyDescriptor(v,m);if(d===void 0){var O=Object.getPrototypeOf(v);return O===null?void 0:y(O,m,w)}else{if("value"in d)return d.value;var R=d.get;return R===void 0?void 0:R.call(w)}},f=r(0),a=p(f);function p(y){return y&&y.__esModule?y:{default:y}}function h(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function c(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function s(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var u=function(y){s(v,y);function v(){return h(this,v),c(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return o(v,[{key:"value",value:function(w){var d=l(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,w);return d.startsWith("rgb(")?(d=d.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+d.split(",").map(function(O){return("00"+parseInt(O).toString(16)).slice(-2)}).join("")):d}}]),v}(a.default.Attributor.Style),b=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),g=new u("color","color",{scope:a.default.Scope.INLINE});i.ColorAttributor=u,i.ColorClass=b,i.ColorStyle=g},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.sanitize=i.default=void 0;var o=function(){function g(y,v){for(var m=0;m<v.length;m++){var w=v[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,m){return v&&g(y.prototype,v),m&&g(y,m),y}}(),l=function g(y,v,m){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var d=Object.getPrototypeOf(y);return d===null?void 0:g(d,v,m)}else{if("value"in w)return w.value;var O=w.get;return O===void 0?void 0:O.call(m)}},f=r(6),a=p(f);function p(g){return g&&g.__esModule?g:{default:g}}function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function c(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function s(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var u=function(g){s(y,g);function y(){return h(this,y),c(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"format",value:function(m,w){if(m!==this.statics.blotName||!w)return l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,m,w);w=this.constructor.sanitize(w),this.domNode.setAttribute("href",w)}}],[{key:"create",value:function(m){var w=l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,m);return m=this.sanitize(m),w.setAttribute("href",m),w.setAttribute("rel","noopener noreferrer"),w.setAttribute("target","_blank"),w}},{key:"formats",value:function(m){return m.getAttribute("href")}},{key:"sanitize",value:function(m){return b(m,this.PROTOCOL_WHITELIST)?m:this.SANITIZED_URL}}]),y}(a.default);u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function b(g,y){var v=document.createElement("a");v.href=g;var m=v.href.slice(0,v.href.indexOf(":"));return y.indexOf(m)>-1}i.default=u,i.sanitize=b},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},l=function(){function y(v,m){for(var w=0;w<m.length;w++){var d=m[w];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(v,d.key,d)}}return function(v,m,w){return m&&y(v.prototype,m),w&&y(v,w),v}}(),f=r(23),a=c(f),p=r(107),h=c(p);function c(y){return y&&y.__esModule?y:{default:y}}function s(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}var u=0;function b(y,v){y.setAttribute(v,y.getAttribute(v)!=="true")}var g=function(){function y(v){var m=this;s(this,y),this.select=v,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){m.togglePicker()}),this.label.addEventListener("keydown",function(w){switch(w.keyCode){case a.default.keys.ENTER:m.togglePicker();break;case a.default.keys.ESCAPE:m.escape(),w.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return l(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),b(this.label,"aria-expanded"),b(this.options,"aria-hidden")}},{key:"buildItem",value:function(m){var w=this,d=document.createElement("span");return d.tabIndex="0",d.setAttribute("role","button"),d.classList.add("ql-picker-item"),m.hasAttribute("value")&&d.setAttribute("data-value",m.getAttribute("value")),m.textContent&&d.setAttribute("data-label",m.textContent),d.addEventListener("click",function(){w.selectItem(d,!0)}),d.addEventListener("keydown",function(O){switch(O.keyCode){case a.default.keys.ENTER:w.selectItem(d,!0),O.preventDefault();break;case a.default.keys.ESCAPE:w.escape(),O.preventDefault();break}}),d}},{key:"buildLabel",value:function(){var m=document.createElement("span");return m.classList.add("ql-picker-label"),m.innerHTML=h.default,m.tabIndex="0",m.setAttribute("role","button"),m.setAttribute("aria-expanded","false"),this.container.appendChild(m),m}},{key:"buildOptions",value:function(){var m=this,w=document.createElement("span");w.classList.add("ql-picker-options"),w.setAttribute("aria-hidden","true"),w.tabIndex="-1",w.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",w.id),this.options=w,[].slice.call(this.select.options).forEach(function(d){var O=m.buildItem(d);w.appendChild(O),d.selected===!0&&m.selectItem(O)}),this.container.appendChild(w)}},{key:"buildPicker",value:function(){var m=this;[].slice.call(this.select.attributes).forEach(function(w){m.container.setAttribute(w.name,w.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var m=this;this.close(),setTimeout(function(){return m.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(m){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=this.container.querySelector(".ql-selected");if(m!==d&&(d!=null&&d.classList.remove("ql-selected"),m!=null&&(m.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(m.parentNode.children,m),m.hasAttribute("data-value")?this.label.setAttribute("data-value",m.getAttribute("data-value")):this.label.removeAttribute("data-value"),m.hasAttribute("data-label")?this.label.setAttribute("data-label",m.getAttribute("data-label")):this.label.removeAttribute("data-label"),w))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var O=document.createEvent("Event");O.initEvent("change",!0,!0),this.select.dispatchEvent(O)}this.close()}}},{key:"update",value:function(){var m=void 0;if(this.select.selectedIndex>-1){var w=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];m=this.select.options[this.select.selectedIndex],this.selectItem(w)}else this.selectItem(null);var d=m!=null&&m!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",d)}}]),y}();i.default=g},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(0),l=z(o),f=r(5),a=z(f),p=r(4),h=z(p),c=r(16),s=z(c),u=r(25),b=z(u),g=r(24),y=z(g),v=r(35),m=z(v),w=r(6),d=z(w),O=r(22),R=z(O),S=r(7),T=z(S),L=r(55),k=z(L),A=r(42),E=z(A),x=r(23),M=z(x);function z(U){return U&&U.__esModule?U:{default:U}}a.default.register({"blots/block":h.default,"blots/block/embed":p.BlockEmbed,"blots/break":s.default,"blots/container":b.default,"blots/cursor":y.default,"blots/embed":m.default,"blots/inline":d.default,"blots/scroll":R.default,"blots/text":T.default,"modules/clipboard":k.default,"modules/history":E.default,"modules/keyboard":M.default}),l.default.register(h.default,s.default,y.default,d.default,R.default,T.default),i.default=a.default},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(1),l=function(){function f(a){this.domNode=a,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(f.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),f.create=function(a){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var p;return Array.isArray(this.tagName)?(typeof a=="string"&&(a=a.toUpperCase(),parseInt(a).toString()===a&&(a=parseInt(a))),typeof a=="number"?p=document.createElement(this.tagName[a-1]):this.tagName.indexOf(a)>-1?p=document.createElement(a):p=document.createElement(this.tagName[0])):p=document.createElement(this.tagName),this.className&&p.classList.add(this.className),p},f.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},f.prototype.clone=function(){var a=this.domNode.cloneNode(!1);return o.create(a)},f.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},f.prototype.deleteAt=function(a,p){var h=this.isolate(a,p);h.remove()},f.prototype.formatAt=function(a,p,h,c){var s=this.isolate(a,p);if(o.query(h,o.Scope.BLOT)!=null&&c)s.wrap(h,c);else if(o.query(h,o.Scope.ATTRIBUTE)!=null){var u=o.create(this.statics.scope);s.wrap(u),u.format(h,c)}},f.prototype.insertAt=function(a,p,h){var c=h==null?o.create("text",p):o.create(p,h),s=this.split(a);this.parent.insertBefore(c,s)},f.prototype.insertInto=function(a,p){p===void 0&&(p=null),this.parent!=null&&this.parent.children.remove(this);var h=null;a.children.insertBefore(this,p),p!=null&&(h=p.domNode),(this.domNode.parentNode!=a.domNode||this.domNode.nextSibling!=h)&&a.domNode.insertBefore(this.domNode,h),this.parent=a,this.attach()},f.prototype.isolate=function(a,p){var h=this.split(a);return h.split(p),h},f.prototype.length=function(){return 1},f.prototype.offset=function(a){return a===void 0&&(a=this.parent),this.parent==null||this==a?0:this.parent.children.offset(this)+this.parent.offset(a)},f.prototype.optimize=function(a){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},f.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},f.prototype.replace=function(a){a.parent!=null&&(a.parent.insertBefore(this,a.next),a.remove())},f.prototype.replaceWith=function(a,p){var h=typeof a=="string"?o.create(a,p):a;return h.replace(this),h},f.prototype.split=function(a,p){return a===0?this:this.next},f.prototype.update=function(a,p){},f.prototype.wrap=function(a,p){var h=typeof a=="string"?o.create(a,p):a;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},f.blotName="abstract",f}();i.default=l},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(12),l=r(32),f=r(33),a=r(1),p=function(){function h(c){this.attributes={},this.domNode=c,this.build()}return h.prototype.attribute=function(c,s){s?c.add(this.domNode,s)&&(c.value(this.domNode)!=null?this.attributes[c.attrName]=c:delete this.attributes[c.attrName]):(c.remove(this.domNode),delete this.attributes[c.attrName])},h.prototype.build=function(){var c=this;this.attributes={};var s=o.default.keys(this.domNode),u=l.default.keys(this.domNode),b=f.default.keys(this.domNode);s.concat(u).concat(b).forEach(function(g){var y=a.query(g,a.Scope.ATTRIBUTE);y instanceof o.default&&(c.attributes[y.attrName]=y)})},h.prototype.copy=function(c){var s=this;Object.keys(this.attributes).forEach(function(u){var b=s.attributes[u].value(s.domNode);c.format(u,b)})},h.prototype.move=function(c){var s=this;this.copy(c),Object.keys(this.attributes).forEach(function(u){s.attributes[u].remove(s.domNode)}),this.attributes={}},h.prototype.values=function(){var c=this;return Object.keys(this.attributes).reduce(function(s,u){return s[u]=c.attributes[u].value(c.domNode),s},{})},h}();i.default=p},function(t,i,r){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var s in c)c.hasOwnProperty(s)&&(h[s]=c[s])};return function(h,c){p(h,c);function s(){this.constructor=h}h.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(12);function f(p,h){var c=p.getAttribute("class")||"";return c.split(/\s+/).filter(function(s){return s.indexOf(h+"-")===0})}var a=function(p){o(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.keys=function(c){return(c.getAttribute("class")||"").split(/\s+/).map(function(s){return s.split("-").slice(0,-1).join("-")})},h.prototype.add=function(c,s){return this.canAdd(c,s)?(this.remove(c),c.classList.add(this.keyName+"-"+s),!0):!1},h.prototype.remove=function(c){var s=f(c,this.keyName);s.forEach(function(u){c.classList.remove(u)}),c.classList.length===0&&c.removeAttribute("class")},h.prototype.value=function(c){var s=f(c,this.keyName)[0]||"",u=s.slice(this.keyName.length+1);return this.canAdd(c,u)?u:""},h}(l.default);i.default=a},function(t,i,r){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var s in c)c.hasOwnProperty(s)&&(h[s]=c[s])};return function(h,c){p(h,c);function s(){this.constructor=h}h.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(12);function f(p){var h=p.split("-"),c=h.slice(1).map(function(s){return s[0].toUpperCase()+s.slice(1)}).join("");return h[0]+c}var a=function(p){o(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.keys=function(c){return(c.getAttribute("style")||"").split(";").map(function(s){var u=s.split(":");return u[0].trim()})},h.prototype.add=function(c,s){return this.canAdd(c,s)?(c.style[f(this.keyName)]=s,!0):!1},h.prototype.remove=function(c){c.style[f(this.keyName)]="",c.getAttribute("style")||c.removeAttribute("style")},h.prototype.value=function(c){var s=c.style[f(this.keyName)];return this.canAdd(c,s)?s:""},h}(l.default);i.default=a},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function a(p,h){for(var c=0;c<h.length;c++){var s=h[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(p,s.key,s)}}return function(p,h,c){return h&&a(p.prototype,h),c&&a(p,c),p}}();function l(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")}var f=function(){function a(p,h){l(this,a),this.quill=p,this.options=h,this.modules={}}return o(a,[{key:"init",value:function(){var h=this;Object.keys(this.options.modules).forEach(function(c){h.modules[c]==null&&h.addModule(c)})}},{key:"addModule",value:function(h){var c=this.quill.constructor.import("modules/"+h);return this.modules[h]=new c(this.quill,this.options.modules[h]||{}),this.modules[h]}}]),a}();f.DEFAULTS={modules:{}},f.themes={default:f},i.default=f},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function v(m,w){for(var d=0;d<w.length;d++){var O=w[d];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,w,d){return w&&v(m.prototype,w),d&&v(m,d),m}}(),l=function v(m,w,d){m===null&&(m=Function.prototype);var O=Object.getOwnPropertyDescriptor(m,w);if(O===void 0){var R=Object.getPrototypeOf(m);return R===null?void 0:v(R,w,d)}else{if("value"in O)return O.value;var S=O.get;return S===void 0?void 0:S.call(d)}},f=r(0),a=c(f),p=r(7),h=c(p);function c(v){return v&&v.__esModule?v:{default:v}}function s(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}function u(v,m){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:v}function b(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);v.prototype=Object.create(m&&m.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(v,m):v.__proto__=m)}var g="\uFEFF",y=function(v){b(m,v);function m(w){s(this,m);var d=u(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,w));return d.contentNode=document.createElement("span"),d.contentNode.setAttribute("contenteditable",!1),[].slice.call(d.domNode.childNodes).forEach(function(O){d.contentNode.appendChild(O)}),d.leftGuard=document.createTextNode(g),d.rightGuard=document.createTextNode(g),d.domNode.appendChild(d.leftGuard),d.domNode.appendChild(d.contentNode),d.domNode.appendChild(d.rightGuard),d}return o(m,[{key:"index",value:function(d,O){return d===this.leftGuard?0:d===this.rightGuard?1:l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"index",this).call(this,d,O)}},{key:"restore",value:function(d){var O=void 0,R=void 0,S=d.data.split(g).join("");if(d===this.leftGuard)if(this.prev instanceof h.default){var T=this.prev.length();this.prev.insertAt(T,S),O={startNode:this.prev.domNode,startOffset:T+S.length}}else R=document.createTextNode(S),this.parent.insertBefore(a.default.create(R),this),O={startNode:R,startOffset:S.length};else d===this.rightGuard&&(this.next instanceof h.default?(this.next.insertAt(0,S),O={startNode:this.next.domNode,startOffset:S.length}):(R=document.createTextNode(S),this.parent.insertBefore(a.default.create(R),this.next),O={startNode:R,startOffset:S.length}));return d.data=g,O}},{key:"update",value:function(d,O){var R=this;d.forEach(function(S){if(S.type==="characterData"&&(S.target===R.leftGuard||S.target===R.rightGuard)){var T=R.restore(S.target);T&&(O.range=T)}})}}]),m}(a.default.Embed);i.default=y},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.AlignStyle=i.AlignClass=i.AlignAttribute=void 0;var o=r(0),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}var a={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},p=new l.default.Attributor.Attribute("align","align",a),h=new l.default.Attributor.Class("align","ql-align",a),c=new l.default.Attributor.Style("align","text-align",a);i.AlignAttribute=p,i.AlignClass=h,i.AlignStyle=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.BackgroundStyle=i.BackgroundClass=void 0;var o=r(0),l=a(o),f=r(26);function a(c){return c&&c.__esModule?c:{default:c}}var p=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),h=new f.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});i.BackgroundClass=p,i.BackgroundStyle=h},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.DirectionStyle=i.DirectionClass=i.DirectionAttribute=void 0;var o=r(0),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}var a={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},p=new l.default.Attributor.Attribute("direction","dir",a),h=new l.default.Attributor.Class("direction","ql-direction",a),c=new l.default.Attributor.Style("direction","direction",a);i.DirectionAttribute=p,i.DirectionClass=h,i.DirectionStyle=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.FontClass=i.FontStyle=void 0;var o=function(){function v(m,w){for(var d=0;d<w.length;d++){var O=w[d];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(m,O.key,O)}}return function(m,w,d){return w&&v(m.prototype,w),d&&v(m,d),m}}(),l=function v(m,w,d){m===null&&(m=Function.prototype);var O=Object.getOwnPropertyDescriptor(m,w);if(O===void 0){var R=Object.getPrototypeOf(m);return R===null?void 0:v(R,w,d)}else{if("value"in O)return O.value;var S=O.get;return S===void 0?void 0:S.call(d)}},f=r(0),a=p(f);function p(v){return v&&v.__esModule?v:{default:v}}function h(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}function c(v,m){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:v}function s(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);v.prototype=Object.create(m&&m.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(v,m):v.__proto__=m)}var u={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},b=new a.default.Attributor.Class("font","ql-font",u),g=function(v){s(m,v);function m(){return h(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(d){return l(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,d).replace(/["']/g,"")}}]),m}(a.default.Attributor.Style),y=new g("font","font-family",u);i.FontStyle=y,i.FontClass=b},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.SizeStyle=i.SizeClass=void 0;var o=r(0),l=f(o);function f(h){return h&&h.__esModule?h:{default:h}}var a=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),p=new l.default.Attributor.Style("size","font-size",{scope:l.default.Scope.INLINE,whitelist:["10px","18px","32px"]});i.SizeClass=a,i.SizeStyle=p},function(t,i,r){t.exports={align:{"":r(76),center:r(77),right:r(78),justify:r(79)},background:r(80),blockquote:r(81),bold:r(82),clean:r(83),code:r(58),"code-block":r(58),color:r(84),direction:{"":r(85),rtl:r(86)},float:{center:r(87),full:r(88),left:r(89),right:r(90)},formula:r(91),header:{1:r(92),2:r(93)},italic:r(94),image:r(95),indent:{"+1":r(96),"-1":r(97)},link:r(98),list:{ordered:r(99),bullet:r(100),check:r(101)},script:{sub:r(102),super:r(103)},strike:r(104),underline:r(105),video:r(106)}},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.getLastChangeIndex=i.default=void 0;var o=function(){function w(d,O){for(var R=0;R<O.length;R++){var S=O[R];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}return function(d,O,R){return O&&w(d.prototype,O),R&&w(d,R),d}}(),l=r(0),f=s(l),a=r(5),p=s(a),h=r(9),c=s(h);function s(w){return w&&w.__esModule?w:{default:w}}function u(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function b(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function g(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var y=function(w){g(d,w);function d(O,R){u(this,d);var S=b(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,O,R));return S.lastRecorded=0,S.ignoreChange=!1,S.clear(),S.quill.on(p.default.events.EDITOR_CHANGE,function(T,L,k,A){T!==p.default.events.TEXT_CHANGE||S.ignoreChange||(!S.options.userOnly||A===p.default.sources.USER?S.record(L,k):S.transform(L))}),S.quill.keyboard.addBinding({key:"Z",shortKey:!0},S.undo.bind(S)),S.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},S.redo.bind(S)),/Win/i.test(navigator.platform)&&S.quill.keyboard.addBinding({key:"Y",shortKey:!0},S.redo.bind(S)),S}return o(d,[{key:"change",value:function(R,S){if(this.stack[R].length!==0){var T=this.stack[R].pop();this.stack[S].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[R],p.default.sources.USER),this.ignoreChange=!1;var L=m(T[R]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(R,S){if(R.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(S),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var k=this.stack.undo.pop();T=T.compose(k.undo),R=k.redo.compose(R)}else this.lastRecorded=L;this.stack.undo.push({redo:R,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(R){this.stack.undo.forEach(function(S){S.undo=R.transform(S.undo,!0),S.redo=R.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=R.transform(S.undo,!0),S.redo=R.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),d}(c.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function v(w){var d=w.ops[w.ops.length-1];return d==null?!1:d.insert!=null?typeof d.insert=="string"&&d.insert.endsWith(` `):d.attributes!=null?Object.keys(d.attributes).some(function(O){return f.default.query(O,f.default.Scope.BLOCK)!=null}):!1}function m(w){var d=w.reduce(function(R,S){return R+=S.delete||0,R},0),O=w.length()-d;return v(w)&&(O-=1),O}i.default=y,i.getLastChangeIndex=m},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BaseTooltip=void 0;var o=function(){function D(j,W){for(var $=0;$<W.length;$++){var C=W[$];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(j,C.key,C)}}return function(j,W,$){return W&&D(j.prototype,W),$&&D(j,$),j}}(),l=function D(j,W,$){j===null&&(j=Function.prototype);var C=Object.getOwnPropertyDescriptor(j,W);if(C===void 0){var F=Object.getPrototypeOf(j);return F===null?void 0:D(F,W,$)}else{if("value"in C)return C.value;var K=C.get;return K===void 0?void 0:K.call($)}},f=r(3),a=L(f),p=r(2),h=L(p),c=r(8),s=L(c),u=r(23),b=L(u),g=r(34),y=L(g),v=r(59),m=L(v),w=r(60),d=L(w),O=r(28),R=L(O),S=r(61),T=L(S);function L(D){return D&&D.__esModule?D:{default:D}}function k(D,j){if(!(D instanceof j))throw new TypeError("Cannot call a class as a function")}function A(D,j){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:D}function E(D,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);D.prototype=Object.create(j&&j.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(D,j):D.__proto__=j)}var x=[!1,"center","right","justify"],M=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],z=[!1,"serif","monospace"],U=["1","2","3",!1],V=["small",!1,"large","huge"],te=function(D){E(j,D);function j(W,$){k(this,j);var C=A(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,W,$)),F=function K(Y){if(!document.body.contains(W.root))return document.body.removeEventListener("click",K);C.tooltip!=null&&!C.tooltip.root.contains(Y.target)&&document.activeElement!==C.tooltip.textbox&&!C.quill.hasFocus()&&C.tooltip.hide(),C.pickers!=null&&C.pickers.forEach(function(J){J.container.contains(Y.target)||J.close()})};return W.emitter.listenDOM("click",document.body,F),C}return o(j,[{key:"addModule",value:function($){var C=l(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"addModule",this).call(this,$);return $==="toolbar"&&this.extendToolbar(C),C}},{key:"buildButtons",value:function($,C){$.forEach(function(F){var K=F.getAttribute("class")||"";K.split(/\s+/).forEach(function(Y){if(Y.startsWith("ql-")&&(Y=Y.slice(3),C[Y]!=null))if(Y==="direction")F.innerHTML=C[Y][""]+C[Y].rtl;else if(typeof C[Y]=="string")F.innerHTML=C[Y];else{var J=F.value||"";J!=null&&C[Y][J]&&(F.innerHTML=C[Y][J])}})})}},{key:"buildPickers",value:function($,C){var F=this;this.pickers=$.map(function(Y){if(Y.classList.contains("ql-align"))return Y.querySelector("option")==null&&N(Y,x),new d.default(Y,C.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){var J=Y.classList.contains("ql-background")?"background":"color";return Y.querySelector("option")==null&&N(Y,M,J==="background"?"#ffffff":"#000000"),new m.default(Y,C[J])}else return Y.querySelector("option")==null&&(Y.classList.contains("ql-font")?N(Y,z):Y.classList.contains("ql-header")?N(Y,U):Y.classList.contains("ql-size")&&N(Y,V)),new R.default(Y)});var K=function(){F.pickers.forEach(function(J){J.update()})};this.quill.on(s.default.events.EDITOR_CHANGE,K)}}]),j}(y.default);te.DEFAULTS=(0,a.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var j=this,W=this.container.querySelector("input.ql-image[type=file]");W==null&&(W=document.createElement("input"),W.setAttribute("type","file"),W.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),W.classList.add("ql-image"),W.addEventListener("change",function(){if(W.files!=null&&W.files[0]!=null){var $=new FileReader;$.onload=function(C){var F=j.quill.getSelection(!0);j.quill.updateContents(new h.default().retain(F.index).delete(F.length).insert({image:C.target.result}),s.default.sources.USER),j.quill.setSelection(F.index+1,s.default.sources.SILENT),W.value=""},$.readAsDataURL(W.files[0])}}),this.container.appendChild(W)),W.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var H=function(D){E(j,D);function j(W,$){k(this,j);var C=A(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,W,$));return C.textbox=C.root.querySelector('input[type="text"]'),C.listen(),C}return o(j,[{key:"listen",value:function(){var $=this;this.textbox.addEventListener("keydown",function(C){b.default.match(C,"enter")?($.save(),C.preventDefault()):b.default.match(C,"escape")&&($.cancel(),C.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),C!=null?this.textbox.value=C:$!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+$)||""),this.root.setAttribute("data-mode",$)}},{key:"restoreFocus",value:function(){var $=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=$}},{key:"save",value:function(){var $=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var C=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",$,s.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",$,s.default.sources.USER)),this.quill.root.scrollTop=C;break}case"video":$=I($);case"formula":{if(!$)break;var F=this.quill.getSelection(!0);if(F!=null){var K=F.index+F.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),$,s.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",s.default.sources.USER),this.quill.setSelection(K+2,s.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),j}(T.default);function I(D){var j=D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||D.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return j?(j[1]||"https")+"://www.youtube.com/embed/"+j[2]+"?showinfo=0":(j=D.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(j[1]||"https")+"://player.vimeo.com/video/"+j[2]+"/":D}function N(D,j){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;j.forEach(function($){var C=document.createElement("option");$===W?C.setAttribute("selected","selected"):C.setAttribute("value",$),D.appendChild(C)})}i.BaseTooltip=H,i.default=te},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function l(){this.head=this.tail=null,this.length=0}return l.prototype.append=function(){for(var f=[],a=0;a<arguments.length;a++)f[a]=arguments[a];this.insertBefore(f[0],null),f.length>1&&this.append.apply(this,f.slice(1))},l.prototype.contains=function(f){for(var a,p=this.iterator();a=p();)if(a===f)return!0;return!1},l.prototype.insertBefore=function(f,a){f&&(f.next=a,a!=null?(f.prev=a.prev,a.prev!=null&&(a.prev.next=f),a.prev=f,a===this.head&&(this.head=f)):this.tail!=null?(this.tail.next=f,f.prev=this.tail,this.tail=f):(f.prev=null,this.head=this.tail=f),this.length+=1)},l.prototype.offset=function(f){for(var a=0,p=this.head;p!=null;){if(p===f)return a;a+=p.length(),p=p.next}return-1},l.prototype.remove=function(f){this.contains(f)&&(f.prev!=null&&(f.prev.next=f.next),f.next!=null&&(f.next.prev=f.prev),f===this.head&&(this.head=f.next),f===this.tail&&(this.tail=f.prev),this.length-=1)},l.prototype.iterator=function(f){return f===void 0&&(f=this.head),function(){var a=f;return f!=null&&(f=f.next),a}},l.prototype.find=function(f,a){a===void 0&&(a=!1);for(var p,h=this.iterator();p=h();){var c=p.length();if(f<c||a&&f===c&&(p.next==null||p.next.length()!==0))return[p,f];f-=c}return[null,0]},l.prototype.forEach=function(f){for(var a,p=this.iterator();a=p();)f(a)},l.prototype.forEachAt=function(f,a,p){if(!(a<=0))for(var h=this.find(f),c=h[0],s=h[1],u,b=f-s,g=this.iterator(c);(u=g())&&b<f+a;){var y=u.length();f>b?p(u,f-b,Math.min(a,b+y-f)):p(u,0,Math.min(y,f+a-b)),b+=y}},l.prototype.map=function(f){return this.reduce(function(a,p){return a.push(f(p)),a},[])},l.prototype.reduce=function(f,a){for(var p,h=this.iterator();p=h();)a=f(a,p);return a},l}();i.default=o},function(t,i,r){var o=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,u){s.__proto__=u}||function(s,u){for(var b in u)u.hasOwnProperty(b)&&(s[b]=u[b])};return function(s,u){c(s,u);function b(){this.constructor=s}s.prototype=u===null?Object.create(u):(b.prototype=u.prototype,new b)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(17),f=r(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},p=100,h=function(c){o(s,c);function s(u){var b=c.call(this,u)||this;return b.scroll=b,b.observer=new MutationObserver(function(g){b.update(g)}),b.observer.observe(b.domNode,a),b.attach(),b}return s.prototype.detach=function(){c.prototype.detach.call(this),this.observer.disconnect()},s.prototype.deleteAt=function(u,b){this.update(),u===0&&b===this.length()?this.children.forEach(function(g){g.remove()}):c.prototype.deleteAt.call(this,u,b)},s.prototype.formatAt=function(u,b,g,y){this.update(),c.prototype.formatAt.call(this,u,b,g,y)},s.prototype.insertAt=function(u,b,g){this.update(),c.prototype.insertAt.call(this,u,b,g)},s.prototype.optimize=function(u,b){var g=this;u===void 0&&(u=[]),b===void 0&&(b={}),c.prototype.optimize.call(this,b);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)u.push(y.pop());for(var v=function(O,R){R===void 0&&(R=!0),!(O==null||O===g)&&O.domNode.parentNode!=null&&(O.domNode[f.DATA_KEY].mutations==null&&(O.domNode[f.DATA_KEY].mutations=[]),R&&v(O.parent))},m=function(O){O.domNode[f.DATA_KEY]==null||O.domNode[f.DATA_KEY].mutations==null||(O instanceof l.default&&O.children.forEach(m),O.optimize(b))},w=u,d=0;w.length>0;d+=1){if(d>=p)throw new Error("[Parchment] Maximum optimize iterations reached");for(w.forEach(function(O){var R=f.find(O.target,!0);R!=null&&(R.domNode===O.target&&(O.type==="childList"?(v(f.find(O.previousSibling,!1)),[].forEach.call(O.addedNodes,function(S){var T=f.find(S,!1);v(T,!1),T instanceof l.default&&T.children.forEach(function(L){v(L,!1)})})):O.type==="attributes"&&v(R.prev)),v(R))}),this.children.forEach(m),w=[].slice.call(this.observer.takeRecords()),y=w.slice();y.length>0;)u.push(y.pop())}},s.prototype.update=function(u,b){var g=this;b===void 0&&(b={}),u=u||this.observer.takeRecords(),u.map(function(y){var v=f.find(y.target,!0);return v==null?null:v.domNode[f.DATA_KEY].mutations==null?(v.domNode[f.DATA_KEY].mutations=[y],v):(v.domNode[f.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===g||y.domNode[f.DATA_KEY]==null||y.update(y.domNode[f.DATA_KEY].mutations||[],b)}),this.domNode[f.DATA_KEY].mutations!=null&&c.prototype.update.call(this,this.domNode[f.DATA_KEY].mutations,b),this.optimize(u,b)},s.blotName="scroll",s.defaultChild="block",s.scope=f.Scope.BLOCK_BLOT,s.tagName="DIV",s}(l.default);i.default=h},function(t,i,r){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,s){c.__proto__=s}||function(c,s){for(var u in s)s.hasOwnProperty(u)&&(c[u]=s[u])};return function(c,s){h(c,s);function u(){this.constructor=c}c.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(18),f=r(1);function a(h,c){if(Object.keys(h).length!==Object.keys(c).length)return!1;for(var s in h)if(h[s]!==c[s])return!1;return!0}var p=function(h){o(c,h);function c(){return h!==null&&h.apply(this,arguments)||this}return c.formats=function(s){if(s.tagName!==c.tagName)return h.formats.call(this,s)},c.prototype.format=function(s,u){var b=this;s===this.statics.blotName&&!u?(this.children.forEach(function(g){g instanceof l.default||(g=g.wrap(c.blotName,!0)),b.attributes.copy(g)}),this.unwrap()):h.prototype.format.call(this,s,u)},c.prototype.formatAt=function(s,u,b,g){if(this.formats()[b]!=null||f.query(b,f.Scope.ATTRIBUTE)){var y=this.isolate(s,u);y.format(b,g)}else h.prototype.formatAt.call(this,s,u,b,g)},c.prototype.optimize=function(s){h.prototype.optimize.call(this,s);var u=this.formats();if(Object.keys(u).length===0)return this.unwrap();var b=this.next;b instanceof c&&b.prev===this&&a(u,b.formats())&&(b.moveChildren(this),b.remove())},c.blotName="inline",c.scope=f.Scope.INLINE_BLOT,c.tagName="SPAN",c}(l.default);i.default=p},function(t,i,r){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var s in c)c.hasOwnProperty(s)&&(h[s]=c[s])};return function(h,c){p(h,c);function s(){this.constructor=h}h.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(18),f=r(1),a=function(p){o(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.formats=function(c){var s=f.query(h.blotName).tagName;if(c.tagName!==s)return p.formats.call(this,c)},h.prototype.format=function(c,s){f.query(c,f.Scope.BLOCK)!=null&&(c===this.statics.blotName&&!s?this.replaceWith(h.blotName):p.prototype.format.call(this,c,s))},h.prototype.formatAt=function(c,s,u,b){f.query(u,f.Scope.BLOCK)!=null?this.format(u,b):p.prototype.formatAt.call(this,c,s,u,b)},h.prototype.insertAt=function(c,s,u){if(u==null||f.query(s,f.Scope.INLINE)!=null)p.prototype.insertAt.call(this,c,s,u);else{var b=this.split(c),g=f.create(s,u);b.parent.insertBefore(g,b)}},h.prototype.update=function(c,s){navigator.userAgent.match(/Trident/)?this.build():p.prototype.update.call(this,c,s)},h.blotName="block",h.scope=f.Scope.BLOCK_BLOT,h.tagName="P",h}(l.default);i.default=a},function(t,i,r){var o=this&&this.__extends||function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var c in h)h.hasOwnProperty(c)&&(p[c]=h[c])};return function(p,h){a(p,h);function c(){this.constructor=p}p.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(19),f=function(a){o(p,a);function p(){return a!==null&&a.apply(this,arguments)||this}return p.formats=function(h){},p.prototype.format=function(h,c){a.prototype.formatAt.call(this,0,this.length(),h,c)},p.prototype.formatAt=function(h,c,s,u){h===0&&c===this.length()?this.format(s,u):a.prototype.formatAt.call(this,h,c,s,u)},p.prototype.formats=function(){return this.statics.formats(this.domNode)},p}(l.default);i.default=f},function(t,i,r){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var s in c)c.hasOwnProperty(s)&&(h[s]=c[s])};return function(h,c){p(h,c);function s(){this.constructor=h}h.prototype=c===null?Object.create(c):(s.prototype=c.prototype,new s)}}();Object.defineProperty(i,"__esModule",{value:!0});var l=r(19),f=r(1),a=function(p){o(h,p);function h(c){var s=p.call(this,c)||this;return s.text=s.statics.value(s.domNode),s}return h.create=function(c){return document.createTextNode(c)},h.value=function(c){var s=c.data;return s.normalize&&(s=s.normalize()),s},h.prototype.deleteAt=function(c,s){this.domNode.data=this.text=this.text.slice(0,c)+this.text.slice(c+s)},h.prototype.index=function(c,s){return this.domNode===c?s:-1},h.prototype.insertAt=function(c,s,u){u==null?(this.text=this.text.slice(0,c)+s+this.text.slice(c),this.domNode.data=this.text):p.prototype.insertAt.call(this,c,s,u)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(c){p.prototype.optimize.call(this,c),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(c,s){return[this.domNode,c]},h.prototype.split=function(c,s){if(s===void 0&&(s=!1),!s){if(c===0)return this;if(c===this.length())return this.next}var u=f.create(this.domNode.splitText(c));return this.parent.insertBefore(u,this.next),this.text=this.statics.value(this.domNode),u},h.prototype.update=function(c,s){var u=this;c.some(function(b){return b.type==="characterData"&&b.target===u.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=f.Scope.INLINE_BLOT,h}(l.default);i.default=a},function(t,i,r){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,a){return arguments.length>1&&!this.contains(f)==!a?a:l.call(this,f)}}String.prototype.startsWith||(String.prototype.startsWith=function(f,a){return a=a||0,this.substr(a,f.length)===f}),String.prototype.endsWith||(String.prototype.endsWith=function(f,a){var p=this.toString();(typeof a!="number"||!isFinite(a)||Math.floor(a)!==a||a>p.length)&&(a=p.length),a-=f.length;var h=p.indexOf(f,a);return h!==-1&&h===a}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(a){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof a!="function")throw new TypeError("predicate must be a function");for(var p=Object(this),h=p.length>>>0,c=arguments[1],s,u=0;u<h;u++)if(s=p[u],a.call(c,s,u,p))return s}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,i){var r=-1,o=1,l=0;function f(d,O,R){if(d==O)return d?[[l,d]]:[];(R<0||d.length<R)&&(R=null);var S=c(d,O),T=d.substring(0,S);d=d.substring(S),O=O.substring(S),S=s(d,O);var L=d.substring(d.length-S);d=d.substring(0,d.length-S),O=O.substring(0,O.length-S);var k=a(d,O);return T&&k.unshift([l,T]),L&&k.push([l,L]),b(k),R!=null&&(k=v(k,R)),k=m(k),k}function a(d,O){var R;if(!d)return[[o,O]];if(!O)return[[r,d]];var S=d.length>O.length?d:O,T=d.length>O.length?O:d,L=S.indexOf(T);if(L!=-1)return R=[[o,S.substring(0,L)],[l,T],[o,S.substring(L+T.length)]],d.length>O.length&&(R[0][0]=R[2][0]=r),R;if(T.length==1)return[[r,d],[o,O]];var k=u(d,O);if(k){var A=k[0],E=k[1],x=k[2],M=k[3],z=k[4],U=f(A,x),V=f(E,M);return U.concat([[l,z]],V)}return p(d,O)}function p(d,O){for(var R=d.length,S=O.length,T=Math.ceil((R+S)/2),L=T,k=2*T,A=new Array(k),E=new Array(k),x=0;x<k;x++)A[x]=-1,E[x]=-1;A[L+1]=0,E[L+1]=0;for(var M=R-S,z=M%2!=0,U=0,V=0,te=0,H=0,I=0;I<T;I++){for(var N=-I+U;N<=I-V;N+=2){var D=L+N,j;N==-I||N!=I&&A[D-1]<A[D+1]?j=A[D+1]:j=A[D-1]+1;for(var W=j-N;j<R&&W<S&&d.charAt(j)==O.charAt(W);)j++,W++;if(A[D]=j,j>R)V+=2;else if(W>S)U+=2;else if(z){var $=L+M-N;if($>=0&&$<k&&E[$]!=-1){var C=R-E[$];if(j>=C)return h(d,O,j,W)}}}for(var F=-I+te;F<=I-H;F+=2){var $=L+F,C;F==-I||F!=I&&E[$-1]<E[$+1]?C=E[$+1]:C=E[$-1]+1;for(var K=C-F;C<R&&K<S&&d.charAt(R-C-1)==O.charAt(S-K-1);)C++,K++;if(E[$]=C,C>R)H+=2;else if(K>S)te+=2;else if(!z){var D=L+M-F;if(D>=0&&D<k&&A[D]!=-1){var j=A[D],W=L+j-D;if(C=R-C,j>=C)return h(d,O,j,W)}}}}return[[r,d],[o,O]]}function h(d,O,R,S){var T=d.substring(0,R),L=O.substring(0,S),k=d.substring(R),A=O.substring(S),E=f(T,L),x=f(k,A);return E.concat(x)}function c(d,O){if(!d||!O||d.charAt(0)!=O.charAt(0))return 0;for(var R=0,S=Math.min(d.length,O.length),T=S,L=0;R<T;)d.substring(L,T)==O.substring(L,T)?(R=T,L=R):S=T,T=Math.floor((S-R)/2+R);return T}function s(d,O){if(!d||!O||d.charAt(d.length-1)!=O.charAt(O.length-1))return 0;for(var R=0,S=Math.min(d.length,O.length),T=S,L=0;R<T;)d.substring(d.length-T,d.length-L)==O.substring(O.length-T,O.length-L)?(R=T,L=R):S=T,T=Math.floor((S-R)/2+R);return T}function u(d,O){var R=d.length>O.length?d:O,S=d.length>O.length?O:d;if(R.length<4||S.length*2<R.length)return null;function T(V,te,H){for(var I=V.substring(H,H+Math.floor(V.length/4)),N=-1,D="",j,W,$,C;(N=te.indexOf(I,N+1))!=-1;){var F=c(V.substring(H),te.substring(N)),K=s(V.substring(0,H),te.substring(0,N));D.length<K+F&&(D=te.substring(N-K,N)+te.substring(N,N+F),j=V.substring(0,H-K),W=V.substring(H+F),$=te.substring(0,N-K),C=te.substring(N+F))}return D.length*2>=V.length?[j,W,$,C,D]:null}var L=T(R,S,Math.ceil(R.length/4)),k=T(R,S,Math.ceil(R.length/2)),A;if(!L&&!k)return null;k?L?A=L[4].length>k[4].length?L:k:A=k:A=L;var E,x,M,z;d.length>O.length?(E=A[0],x=A[1],M=A[2],z=A[3]):(M=A[0],z=A[1],E=A[2],x=A[3]);var U=A[4];return[E,x,M,z,U]}function b(d){d.push([l,""]);for(var O=0,R=0,S=0,T="",L="",k;O<d.length;)switch(d[O][0]){case o:S++,L+=d[O][1],O++;break;case r:R++,T+=d[O][1],O++;break;case l:R+S>1?(R!==0&&S!==0&&(k=c(L,T),k!==0&&(O-R-S>0&&d[O-R-S-1][0]==l?d[O-R-S-1][1]+=L.substring(0,k):(d.splice(0,0,[l,L.substring(0,k)]),O++),L=L.substring(k),T=T.substring(k)),k=s(L,T),k!==0&&(d[O][1]=L.substring(L.length-k)+d[O][1],L=L.substring(0,L.length-k),T=T.substring(0,T.length-k))),R===0?d.splice(O-S,R+S,[o,L]):S===0?d.splice(O-R,R+S,[r,T]):d.splice(O-R-S,R+S,[r,T],[o,L]),O=O-R-S+(R?1:0)+(S?1:0)+1):O!==0&&d[O-1][0]==l?(d[O-1][1]+=d[O][1],d.splice(O,1)):O++,S=0,R=0,T="",L="";break}d[d.length-1][1]===""&&d.pop();var A=!1;for(O=1;O<d.length-1;)d[O-1][0]==l&&d[O+1][0]==l&&(d[O][1].substring(d[O][1].length-d[O-1][1].length)==d[O-1][1]?(d[O][1]=d[O-1][1]+d[O][1].substring(0,d[O][1].length-d[O-1][1].length),d[O+1][1]=d[O-1][1]+d[O+1][1],d.splice(O-1,1),A=!0):d[O][1].substring(0,d[O+1][1].length)==d[O+1][1]&&(d[O-1][1]+=d[O+1][1],d[O][1]=d[O][1].substring(d[O+1][1].length)+d[O+1][1],d.splice(O+1,1),A=!0)),O++;A&&b(d)}var g=f;g.INSERT=o,g.DELETE=r,g.EQUAL=l,t.exports=g;function y(d,O){if(O===0)return[l,d];for(var R=0,S=0;S<d.length;S++){var T=d[S];if(T[0]===r||T[0]===l){var L=R+T[1].length;if(O===L)return[S+1,d];if(O<L){d=d.slice();var k=O-R,A=[T[0],T[1].slice(0,k)],E=[T[0],T[1].slice(k)];return d.splice(S,1,A,E),[S+1,d]}else R=L}}throw new Error("cursor_pos is out of bounds!")}function v(d,O){var R=y(d,O),S=R[1],T=R[0],L=S[T],k=S[T+1];if(L==null)return d;if(L[0]!==l)return d;if(k!=null&&L[1]+k[1]===k[1]+L[1])return S.splice(T,2,k,L),w(S,T,2);if(k!=null&&k[1].indexOf(L[1])===0){S.splice(T,2,[k[0],L[1]],[0,L[1]]);var A=k[1].slice(L[1].length);return A.length>0&&S.splice(T+2,0,[k[0],A]),w(S,T,3)}else return d}function m(d){for(var O=!1,R=function(k){return k.charCodeAt(0)>=56320&&k.charCodeAt(0)<=57343},S=function(k){return k.charCodeAt(k.length-1)>=55296&&k.charCodeAt(k.length-1)<=56319},T=2;T<d.length;T+=1)d[T-2][0]===l&&S(d[T-2][1])&&d[T-1][0]===r&&R(d[T-1][1])&&d[T][0]===o&&R(d[T][1])&&(O=!0,d[T-1][1]=d[T-2][1].slice(-1)+d[T-1][1],d[T][1]=d[T-2][1].slice(-1)+d[T][1],d[T-2][1]=d[T-2][1].slice(0,-1));if(!O)return d;for(var L=[],T=0;T<d.length;T+=1)d[T][1].length>0&&L.push(d[T]);return L}function w(d,O,R){for(var S=O+R-1;S>=0&&S>=O-1;S--)if(S+1<d.length){var T=d[S],L=d[S+1];T[0]===L[1]&&d.splice(S,2,[T[0],T[1]+L[1]])}return d}},function(t,i){i=t.exports=typeof Object.keys=="function"?Object.keys:r,i.shim=r;function r(o){var l=[];for(var f in o)l.push(f);return l}},function(t,i){var r=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";i=t.exports=r?o:l,i.supported=o;function o(f){return Object.prototype.toString.call(f)=="[object Arguments]"}i.unsupported=l;function l(f){return f&&typeof f=="object"&&typeof f.length=="number"&&Object.prototype.hasOwnProperty.call(f,"callee")&&!Object.prototype.propertyIsEnumerable.call(f,"callee")||!1}},function(t,i){var r=Object.prototype.hasOwnProperty,o="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(o=!1));function f(p,h,c){this.fn=p,this.context=h,this.once=c||!1}function a(){this._events=new l,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],c,s;if(this._eventsCount===0)return h;for(s in c=this._events)r.call(c,s)&&h.push(o?s.slice(1):s);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},a.prototype.listeners=function(h,c){var s=o?o+h:h,u=this._events[s];if(c)return!!u;if(!u)return[];if(u.fn)return[u.fn];for(var b=0,g=u.length,y=new Array(g);b<g;b++)y[b]=u[b].fn;return y},a.prototype.emit=function(h,c,s,u,b,g){var y=o?o+h:h;if(!this._events[y])return!1;var v=this._events[y],m=arguments.length,w,d;if(v.fn){switch(v.once&&this.removeListener(h,v.fn,void 0,!0),m){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,c),!0;case 3:return v.fn.call(v.context,c,s),!0;case 4:return v.fn.call(v.context,c,s,u),!0;case 5:return v.fn.call(v.context,c,s,u,b),!0;case 6:return v.fn.call(v.context,c,s,u,b,g),!0}for(d=1,w=new Array(m-1);d<m;d++)w[d-1]=arguments[d];v.fn.apply(v.context,w)}else{var O=v.length,R;for(d=0;d<O;d++)switch(v[d].once&&this.removeListener(h,v[d].fn,void 0,!0),m){case 1:v[d].fn.call(v[d].context);break;case 2:v[d].fn.call(v[d].context,c);break;case 3:v[d].fn.call(v[d].context,c,s);break;case 4:v[d].fn.call(v[d].context,c,s,u);break;default:if(!w)for(R=1,w=new Array(m-1);R<m;R++)w[R-1]=arguments[R];v[d].fn.apply(v[d].context,w)}}return!0},a.prototype.on=function(h,c,s){var u=new f(c,s||this),b=o?o+h:h;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],u]:this._events[b].push(u):(this._events[b]=u,this._eventsCount++),this},a.prototype.once=function(h,c,s){var u=new f(c,s||this,!0),b=o?o+h:h;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],u]:this._events[b].push(u):(this._events[b]=u,this._eventsCount++),this},a.prototype.removeListener=function(h,c,s,u){var b=o?o+h:h;if(!this._events[b])return this;if(!c)return--this._eventsCount===0?this._events=new l:delete this._events[b],this;var g=this._events[b];if(g.fn)g.fn===c&&(!u||g.once)&&(!s||g.context===s)&&(--this._eventsCount===0?this._events=new l:delete this._events[b]);else{for(var y=0,v=[],m=g.length;y<m;y++)(g[y].fn!==c||u&&!g[y].once||s&&g[y].context!==s)&&v.push(g[y]);v.length?this._events[b]=v.length===1?v[0]:v:--this._eventsCount===0?this._events=new l:delete this._events[b]}return this},a.prototype.removeAllListeners=function(h){var c;return h?(c=o?o+h:h,this._events[c]&&(--this._eventsCount===0?this._events=new l:delete this._events[c])):(this._events=new l,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=o,a.EventEmitter=a,typeof t<"u"&&(t.exports=a)},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.matchText=i.matchSpacing=i.matchNewline=i.matchBlot=i.matchAttributor=i.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},l=function(){function Z(Q,ie){var re=[],ee=!0,pe=!1,ce=void 0;try{for(var he=Q[Symbol.iterator](),Ke;!(ee=(Ke=he.next()).done)&&(re.push(Ke.value),!(ie&&re.length===ie));ee=!0);}catch(ze){pe=!0,ce=ze}finally{try{!ee&&he.return&&he.return()}finally{if(pe)throw ce}}return re}return function(Q,ie){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return Z(Q,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(){function Z(Q,ie){for(var re=0;re<ie.length;re++){var ee=ie[re];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Q,ee.key,ee)}}return function(Q,ie,re){return ie&&Z(Q.prototype,ie),re&&Z(Q,re),Q}}(),a=r(3),p=E(a),h=r(2),c=E(h),s=r(0),u=E(s),b=r(5),g=E(b),y=r(10),v=E(y),m=r(9),w=E(m),d=r(36),O=r(37),R=r(13),S=E(R),T=r(26),L=r(38),k=r(39),A=r(40);function E(Z){return Z&&Z.__esModule?Z:{default:Z}}function x(Z,Q,ie){return Q in Z?Object.defineProperty(Z,Q,{value:ie,enumerable:!0,configurable:!0,writable:!0}):Z[Q]=ie,Z}function M(Z,Q){if(!(Z instanceof Q))throw new TypeError("Cannot call a class as a function")}function z(Z,Q){if(!Z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q&&(typeof Q=="object"||typeof Q=="function")?Q:Z}function U(Z,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Q);Z.prototype=Object.create(Q&&Q.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(Z,Q):Z.__proto__=Q)}var V=(0,v.default)("quill:clipboard"),te="__ql-matcher",H=[[Node.TEXT_NODE,Re],[Node.TEXT_NODE,me],["br",oe],[Node.ELEMENT_NODE,me],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,be],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,Ne],["li",fe],["b",K.bind(K,"bold")],["i",K.bind(K,"italic")],["style",le]],I=[d.AlignAttribute,L.DirectionAttribute].reduce(function(Z,Q){return Z[Q.keyName]=Q,Z},{}),N=[d.AlignStyle,O.BackgroundStyle,T.ColorStyle,L.DirectionStyle,k.FontStyle,A.SizeStyle].reduce(function(Z,Q){return Z[Q.keyName]=Q,Z},{}),D=function(Z){U(Q,Z);function Q(ie,re){M(this,Q);var ee=z(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this,ie,re));return ee.quill.root.addEventListener("paste",ee.onPaste.bind(ee)),ee.container=ee.quill.addContainer("ql-clipboard"),ee.container.setAttribute("contenteditable",!0),ee.container.setAttribute("tabindex",-1),ee.matchers=[],H.concat(ee.options.matchers).forEach(function(pe){var ce=l(pe,2),he=ce[0],Ke=ce[1];!re.matchVisual&&Ke===be||ee.addMatcher(he,Ke)}),ee}return f(Q,[{key:"addMatcher",value:function(re,ee){this.matchers.push([re,ee])}},{key:"convert",value:function(re){if(typeof re=="string")return this.container.innerHTML=re.replace(/\>\r?\n +\</g,"><"),this.convert();var ee=this.quill.getFormat(this.quill.selection.savedRange.index);if(ee[S.default.blotName]){var pe=this.container.innerText;return this.container.innerHTML="",new c.default().insert(pe,x({},S.default.blotName,ee[S.default.blotName]))}var ce=this.prepareMatching(),he=l(ce,2),Ke=he[0],ze=he[1],Se=F(this.container,Ke,ze);return $(Se,` `)&&Se.ops[Se.ops.length-1].attributes==null&&(Se=Se.compose(new c.default().retain(Se.length()-1).delete(1))),V.log("convert",this.container.innerHTML,Se),this.container.innerHTML="",Se}},{key:"dangerouslyPasteHTML",value:function(re,ee){var pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof re=="string")this.quill.setContents(this.convert(re),ee),this.quill.setSelection(0,g.default.sources.SILENT);else{var ce=this.convert(ee);this.quill.updateContents(new c.default().retain(re).concat(ce),pe),this.quill.setSelection(re+ce.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(re){var ee=this;if(!(re.defaultPrevented||!this.quill.isEnabled())){var pe=this.quill.getSelection(),ce=new c.default().retain(pe.index),he=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){ce=ce.concat(ee.convert()).delete(pe.length),ee.quill.updateContents(ce,g.default.sources.USER),ee.quill.setSelection(ce.length()-pe.length,g.default.sources.SILENT),ee.quill.scrollingContainer.scrollTop=he,ee.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var re=this,ee=[],pe=[];return this.matchers.forEach(function(ce){var he=l(ce,2),Ke=he[0],ze=he[1];switch(Ke){case Node.TEXT_NODE:pe.push(ze);break;case Node.ELEMENT_NODE:ee.push(ze);break;default:[].forEach.call(re.container.querySelectorAll(Ke),function(Se){Se[te]=Se[te]||[],Se[te].push(ze)});break}}),[ee,pe]}}]),Q}(w.default);D.DEFAULTS={matchers:[],matchVisual:!0};function j(Z,Q,ie){return(typeof Q>"u"?"undefined":o(Q))==="object"?Object.keys(Q).reduce(function(re,ee){return j(re,ee,Q[ee])},Z):Z.reduce(function(re,ee){return ee.attributes&&ee.attributes[Q]?re.push(ee):re.insert(ee.insert,(0,p.default)({},x({},Q,ie),ee.attributes))},new c.default)}function W(Z){if(Z.nodeType!==Node.ELEMENT_NODE)return{};var Q="__ql-computed-style";return Z[Q]||(Z[Q]=window.getComputedStyle(Z))}function $(Z,Q){for(var ie="",re=Z.ops.length-1;re>=0&&ie.length<Q.length;--re){var ee=Z.ops[re];if(typeof ee.insert!="string")break;ie=ee.insert+ie}return ie.slice(-1*Q.length)===Q}function C(Z){if(Z.childNodes.length===0)return!1;var Q=W(Z);return["block","list-item"].indexOf(Q.display)>-1}function F(Z,Q,ie){return Z.nodeType===Z.TEXT_NODE?ie.reduce(function(re,ee){return ee(Z,re)},new c.default):Z.nodeType===Z.ELEMENT_NODE?[].reduce.call(Z.childNodes||[],function(re,ee){var pe=F(ee,Q,ie);return ee.nodeType===Z.ELEMENT_NODE&&(pe=Q.reduce(function(ce,he){return he(ee,ce)},pe),pe=(ee[te]||[]).reduce(function(ce,he){return he(ee,ce)},pe)),re.concat(pe)},new c.default):new c.default}function K(Z,Q,ie){return j(ie,Z,!0)}function Y(Z,Q){var ie=u.default.Attributor.Attribute.keys(Z),re=u.default.Attributor.Class.keys(Z),ee=u.default.Attributor.Style.keys(Z),pe={};return ie.concat(re).concat(ee).forEach(function(ce){var he=u.default.query(ce,u.default.Scope.ATTRIBUTE);he!=null&&(pe[he.attrName]=he.value(Z),pe[he.attrName])||(he=I[ce],he!=null&&(he.attrName===ce||he.keyName===ce)&&(pe[he.attrName]=he.value(Z)||void 0),he=N[ce],he!=null&&(he.attrName===ce||he.keyName===ce)&&(he=N[ce],pe[he.attrName]=he.value(Z)||void 0))}),Object.keys(pe).length>0&&(Q=j(Q,pe)),Q}function J(Z,Q){var ie=u.default.query(Z);if(ie==null)return Q;if(ie.prototype instanceof u.default.Embed){var re={},ee=ie.value(Z);ee!=null&&(re[ie.blotName]=ee,Q=new c.default().insert(re,ie.formats(Z)))}else typeof ie.formats=="function"&&(Q=j(Q,ie.blotName,ie.formats(Z)));return Q}function oe(Z,Q){return $(Q,` `)||Q.insert(` `),Q}function le(){return new c.default}function fe(Z,Q){var ie=u.default.query(Z);if(ie==null||ie.blotName!=="list-item"||!$(Q,` `))return Q;for(var re=-1,ee=Z.parentNode;!ee.classList.contains("ql-clipboard");)(u.default.query(ee)||{}).blotName==="list"&&(re+=1),ee=ee.parentNode;return re<=0?Q:Q.compose(new c.default().retain(Q.length()-1).retain(1,{indent:re}))}function me(Z,Q){return $(Q,` `)||(C(Z)||Q.length()>0&&Z.nextSibling&&C(Z.nextSibling))&&Q.insert(` `),Q}function be(Z,Q){if(C(Z)&&Z.nextElementSibling!=null&&!$(Q,` `)){var ie=Z.offsetHeight+parseFloat(W(Z).marginTop)+parseFloat(W(Z).marginBottom);Z.nextElementSibling.offsetTop>Z.offsetTop+ie*1.5&&Q.insert(` `)}return Q}function Ne(Z,Q){var ie={},re=Z.style||{};return re.fontStyle&&W(Z).fontStyle==="italic"&&(ie.italic=!0),re.fontWeight&&(W(Z).fontWeight.startsWith("bold")||parseInt(W(Z).fontWeight)>=700)&&(ie.bold=!0),Object.keys(ie).length>0&&(Q=j(Q,ie)),parseFloat(re.textIndent||0)>0&&(Q=new c.default().insert(" ").concat(Q)),Q}function Re(Z,Q){var ie=Z.data;if(Z.parentNode.tagName==="O:P")return Q.insert(ie.trim());if(ie.trim().length===0&&Z.parentNode.classList.contains("ql-clipboard"))return Q;if(!W(Z.parentNode).whiteSpace.startsWith("pre")){var re=function(pe,ce){return ce=ce.replace(/[^\u00a0]/g,""),ce.length<1&&pe?" ":ce};ie=ie.replace(/\r\n/g," ").replace(/\n/g," "),ie=ie.replace(/\s\s+/g,re.bind(re,!0)),(Z.previousSibling==null&&C(Z.parentNode)||Z.previousSibling!=null&&C(Z.previousSibling))&&(ie=ie.replace(/^\s+/,re.bind(re,!1))),(Z.nextSibling==null&&C(Z.parentNode)||Z.nextSibling!=null&&C(Z.nextSibling))&&(ie=ie.replace(/\s+$/,re.bind(re,!1)))}return Q.insert(ie)}i.default=D,i.matchAttributor=Y,i.matchBlot=J,i.matchNewline=me,i.matchSpacing=be,i.matchText=Re},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function b(g,y){for(var v=0;v<y.length;v++){var m=y[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),l=function b(g,y,v){g===null&&(g=Function.prototype);var m=Object.getOwnPropertyDescriptor(g,y);if(m===void 0){var w=Object.getPrototypeOf(g);return w===null?void 0:b(w,y,v)}else{if("value"in m)return m.value;var d=m.get;return d===void 0?void 0:d.call(v)}},f=r(6),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(){return h(this,g),c(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,[{key:"optimize",value:function(v){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,v),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(a.default);u.blotName="bold",u.tagName=["STRONG","B"],i.default=u},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.addControls=i.default=void 0;var o=function(){function A(E,x){var M=[],z=!0,U=!1,V=void 0;try{for(var te=E[Symbol.iterator](),H;!(z=(H=te.next()).done)&&(M.push(H.value),!(x&&M.length===x));z=!0);}catch(I){U=!0,V=I}finally{try{!z&&te.return&&te.return()}finally{if(U)throw V}}return M}return function(E,x){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return A(E,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function A(E,x){for(var M=0;M<x.length;M++){var z=x[M];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(E,z.key,z)}}return function(E,x,M){return x&&A(E.prototype,x),M&&A(E,M),E}}(),f=r(2),a=v(f),p=r(0),h=v(p),c=r(5),s=v(c),u=r(10),b=v(u),g=r(9),y=v(g);function v(A){return A&&A.__esModule?A:{default:A}}function m(A,E,x){return E in A?Object.defineProperty(A,E,{value:x,enumerable:!0,configurable:!0,writable:!0}):A[E]=x,A}function w(A,E){if(!(A instanceof E))throw new TypeError("Cannot call a class as a function")}function d(A,E){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:A}function O(A,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);A.prototype=Object.create(E&&E.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(A,E):A.__proto__=E)}var R=(0,b.default)("quill:toolbar"),S=function(A){O(E,A);function E(x,M){w(this,E);var z=d(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,x,M));if(Array.isArray(z.options.container)){var U=document.createElement("div");L(U,z.options.container),x.container.parentNode.insertBefore(U,x.container),z.container=U}else typeof z.options.container=="string"?z.container=document.querySelector(z.options.container):z.container=z.options.container;if(!(z.container instanceof HTMLElement)){var V;return V=R.error("Container required for toolbar",z.options),d(z,V)}return z.container.classList.add("ql-toolbar"),z.controls=[],z.handlers={},Object.keys(z.options.handlers).forEach(function(te){z.addHandler(te,z.options.handlers[te])}),[].forEach.call(z.container.querySelectorAll("button, select"),function(te){z.attach(te)}),z.quill.on(s.default.events.EDITOR_CHANGE,function(te,H){te===s.default.events.SELECTION_CHANGE&&z.update(H)}),z.quill.on(s.default.events.SCROLL_OPTIMIZE,function(){var te=z.quill.selection.getRange(),H=o(te,1),I=H[0];z.update(I)}),z}return l(E,[{key:"addHandler",value:function(M,z){this.handlers[M]=z}},{key:"attach",value:function(M){var z=this,U=[].find.call(M.classList,function(te){return te.indexOf("ql-")===0});if(U){if(U=U.slice(3),M.tagName==="BUTTON"&&M.setAttribute("type","button"),this.handlers[U]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[U]==null){R.warn("ignoring attaching to disabled format",U,M);return}if(h.default.query(U)==null){R.warn("ignoring attaching to nonexistent format",U,M);return}}var V=M.tagName==="SELECT"?"change":"click";M.addEventListener(V,function(te){var H=void 0;if(M.tagName==="SELECT"){if(M.selectedIndex<0)return;var I=M.options[M.selectedIndex];I.hasAttribute("selected")?H=!1:H=I.value||!1}else M.classList.contains("ql-active")?H=!1:H=M.value||!M.hasAttribute("value"),te.preventDefault();z.quill.focus();var N=z.quill.selection.getRange(),D=o(N,1),j=D[0];if(z.handlers[U]!=null)z.handlers[U].call(z,H);else if(h.default.query(U).prototype instanceof h.default.Embed){if(H=prompt("Enter "+U),!H)return;z.quill.updateContents(new a.default().retain(j.index).delete(j.length).insert(m({},U,H)),s.default.sources.USER)}else z.quill.format(U,H,s.default.sources.USER);z.update(j)}),this.controls.push([U,M])}}},{key:"update",value:function(M){var z=M==null?{}:this.quill.getFormat(M);this.controls.forEach(function(U){var V=o(U,2),te=V[0],H=V[1];if(H.tagName==="SELECT"){var I=void 0;if(M==null)I=null;else if(z[te]==null)I=H.querySelector("option[selected]");else if(!Array.isArray(z[te])){var N=z[te];typeof N=="string"&&(N=N.replace(/\"/g,'\\"')),I=H.querySelector('option[value="'+N+'"]')}I==null?(H.value="",H.selectedIndex=-1):I.selected=!0}else if(M==null)H.classList.remove("ql-active");else if(H.hasAttribute("value")){var D=z[te]===H.getAttribute("value")||z[te]!=null&&z[te].toString()===H.getAttribute("value")||z[te]==null&&!H.getAttribute("value");H.classList.toggle("ql-active",D)}else H.classList.toggle("ql-active",z[te]!=null)})}}]),E}(y.default);S.DEFAULTS={};function T(A,E,x){var M=document.createElement("button");M.setAttribute("type","button"),M.classList.add("ql-"+E),x!=null&&(M.value=x),A.appendChild(M)}function L(A,E){Array.isArray(E[0])||(E=[E]),E.forEach(function(x){var M=document.createElement("span");M.classList.add("ql-formats"),x.forEach(function(z){if(typeof z=="string")T(M,z);else{var U=Object.keys(z)[0],V=z[U];Array.isArray(V)?k(M,U,V):T(M,U,V)}}),A.appendChild(M)})}function k(A,E,x){var M=document.createElement("select");M.classList.add("ql-"+E),x.forEach(function(z){var U=document.createElement("option");z!==!1?U.setAttribute("value",z):U.setAttribute("selected","selected"),M.appendChild(U)}),A.appendChild(M)}S.DEFAULTS={container:null,handlers:{clean:function(){var E=this,x=this.quill.getSelection();if(x!=null)if(x.length==0){var M=this.quill.getFormat();Object.keys(M).forEach(function(z){h.default.query(z,h.default.Scope.INLINE)!=null&&E.quill.format(z,!1)})}else this.quill.removeFormat(x,s.default.sources.USER)},direction:function(E){var x=this.quill.getFormat().align;E==="rtl"&&x==null?this.quill.format("align","right",s.default.sources.USER):!E&&x==="right"&&this.quill.format("align",!1,s.default.sources.USER),this.quill.format("direction",E,s.default.sources.USER)},indent:function(E){var x=this.quill.getSelection(),M=this.quill.getFormat(x),z=parseInt(M.indent||0);if(E==="+1"||E==="-1"){var U=E==="+1"?1:-1;M.direction==="rtl"&&(U*=-1),this.quill.format("indent",z+U,s.default.sources.USER)}},link:function(E){E===!0&&(E=prompt("Enter link URL:")),this.quill.format("link",E,s.default.sources.USER)},list:function(E){var x=this.quill.getSelection(),M=this.quill.getFormat(x);E==="check"?M.list==="checked"||M.list==="unchecked"?this.quill.format("list",!1,s.default.sources.USER):this.quill.format("list","unchecked",s.default.sources.USER):this.quill.format("list",E,s.default.sources.USER)}}},i.default=S,i.addControls=L},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function b(g,y){for(var v=0;v<y.length;v++){var m=y[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),l=function b(g,y,v){g===null&&(g=Function.prototype);var m=Object.getOwnPropertyDescriptor(g,y);if(m===void 0){var w=Object.getPrototypeOf(g);return w===null?void 0:b(w,y,v)}else{if("value"in m)return m.value;var d=m.get;return d===void 0?void 0:d.call(v)}},f=r(28),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(y,v){h(this,g);var m=c(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y));return m.label.innerHTML=v,m.container.classList.add("ql-color-picker"),[].slice.call(m.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),m}return o(g,[{key:"buildItem",value:function(v){var m=l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,v);return m.style.backgroundColor=v.getAttribute("value")||"",m}},{key:"selectItem",value:function(v,m){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,v,m);var w=this.label.querySelector(".ql-color-label"),d=v&&v.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=d:w.style.fill=d)}}]),g}(a.default);i.default=u},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function b(g,y){for(var v=0;v<y.length;v++){var m=y[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),l=function b(g,y,v){g===null&&(g=Function.prototype);var m=Object.getOwnPropertyDescriptor(g,y);if(m===void 0){var w=Object.getPrototypeOf(g);return w===null?void 0:b(w,y,v)}else{if("value"in m)return m.value;var d=m.get;return d===void 0?void 0:d.call(v)}},f=r(28),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(y,v){h(this,g);var m=c(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y));return m.container.classList.add("ql-icon-picker"),[].forEach.call(m.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=v[w.getAttribute("data-value")||""]}),m.defaultItem=m.container.querySelector(".ql-selected"),m.selectItem(m.defaultItem),m}return o(g,[{key:"selectItem",value:function(v,m){l(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,v,m),v=v||this.defaultItem,this.label.innerHTML=v.innerHTML}}]),g}(a.default);i.default=u},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function a(p,h){for(var c=0;c<h.length;c++){var s=h[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(p,s.key,s)}}return function(p,h,c){return h&&a(p.prototype,h),c&&a(p,c),p}}();function l(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")}var f=function(){function a(p,h){var c=this;l(this,a),this.quill=p,this.boundsContainer=h||document.body,this.root=p.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){c.root.style.marginTop=-1*c.quill.root.scrollTop+"px"}),this.hide()}return o(a,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(h){var c=h.left+h.width/2-this.root.offsetWidth/2,s=h.bottom+this.quill.root.scrollTop;this.root.style.left=c+"px",this.root.style.top=s+"px",this.root.classList.remove("ql-flip");var u=this.boundsContainer.getBoundingClientRect(),b=this.root.getBoundingClientRect(),g=0;if(b.right>u.right&&(g=u.right-b.right,this.root.style.left=c+g+"px"),b.left<u.left&&(g=u.left-b.left,this.root.style.left=c+g+"px"),b.bottom>u.bottom){var y=b.bottom-b.top,v=h.bottom-h.top+y;this.root.style.top=s-v+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),a}();i.default=f},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function k(A,E){var x=[],M=!0,z=!1,U=void 0;try{for(var V=A[Symbol.iterator](),te;!(M=(te=V.next()).done)&&(x.push(te.value),!(E&&x.length===E));M=!0);}catch(H){z=!0,U=H}finally{try{!M&&V.return&&V.return()}finally{if(z)throw U}}return x}return function(A,E){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return k(A,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function k(A,E,x){A===null&&(A=Function.prototype);var M=Object.getOwnPropertyDescriptor(A,E);if(M===void 0){var z=Object.getPrototypeOf(A);return z===null?void 0:k(z,E,x)}else{if("value"in M)return M.value;var U=M.get;return U===void 0?void 0:U.call(x)}},f=function(){function k(A,E){for(var x=0;x<E.length;x++){var M=E[x];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,E,x){return E&&k(A.prototype,E),x&&k(A,x),A}}(),a=r(3),p=w(a),h=r(8),c=w(h),s=r(43),u=w(s),b=r(27),g=w(b),y=r(15),v=r(41),m=w(v);function w(k){return k&&k.__esModule?k:{default:k}}function d(k,A){if(!(k instanceof A))throw new TypeError("Cannot call a class as a function")}function O(k,A){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:k}function R(k,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);k.prototype=Object.create(A&&A.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(k,A):k.__proto__=A)}var S=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=function(k){R(A,k);function A(E,x){d(this,A),x.modules.toolbar!=null&&x.modules.toolbar.container==null&&(x.modules.toolbar.container=S);var M=O(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E,x));return M.quill.container.classList.add("ql-snow"),M}return f(A,[{key:"extendToolbar",value:function(x){x.container.classList.add("ql-snow"),this.buildButtons([].slice.call(x.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(x.container.querySelectorAll("select")),m.default),this.tooltip=new L(this.quill,this.options.bounds),x.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(M,z){x.handlers.link.call(x,!z.format.link)})}}]),A}(u.default);T.DEFAULTS=(0,p.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var E=this.quill.getSelection();if(E==null||E.length==0)return;var x=this.quill.getText(E);/^\S+@\S+\.\S+$/.test(x)&&x.indexOf("mailto:")!==0&&(x="mailto:"+x);var M=this.quill.theme.tooltip;M.edit("link",x)}else this.quill.format("link",!1)}}}}});var L=function(k){R(A,k);function A(E,x){d(this,A);var M=O(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E,x));return M.preview=M.root.querySelector("a.ql-preview"),M}return f(A,[{key:"listen",value:function(){var x=this;l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(M){x.root.classList.contains("ql-editing")?x.save():x.edit("link",x.preview.textContent),M.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(M){if(x.linkRange!=null){var z=x.linkRange;x.restoreFocus(),x.quill.formatText(z,"link",!1,c.default.sources.USER),delete x.linkRange}M.preventDefault(),x.hide()}),this.quill.on(c.default.events.SELECTION_CHANGE,function(M,z,U){if(M!=null){if(M.length===0&&U===c.default.sources.USER){var V=x.quill.scroll.descendant(g.default,M.index),te=o(V,2),H=te[0],I=te[1];if(H!=null){x.linkRange=new y.Range(M.index-I,H.length());var N=g.default.formats(H.domNode);x.preview.textContent=N,x.preview.setAttribute("href",N),x.show(),x.position(x.quill.getBounds(x.linkRange));return}}else delete x.linkRange;x.hide()}})}},{key:"show",value:function(){l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A}(s.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),i.default=T},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(29),l=ee(o),f=r(36),a=r(38),p=r(64),h=r(65),c=ee(h),s=r(66),u=ee(s),b=r(67),g=ee(b),y=r(37),v=r(26),m=r(39),w=r(40),d=r(56),O=ee(d),R=r(68),S=ee(R),T=r(27),L=ee(T),k=r(69),A=ee(k),E=r(70),x=ee(E),M=r(71),z=ee(M),U=r(72),V=ee(U),te=r(73),H=ee(te),I=r(13),N=ee(I),D=r(74),j=ee(D),W=r(75),$=ee(W),C=r(57),F=ee(C),K=r(41),Y=ee(K),J=r(28),oe=ee(J),le=r(59),fe=ee(le),me=r(60),be=ee(me),Ne=r(61),Re=ee(Ne),Z=r(108),Q=ee(Z),ie=r(62),re=ee(ie);function ee(pe){return pe&&pe.__esModule?pe:{default:pe}}l.default.register({"attributors/attribute/direction":a.DirectionAttribute,"attributors/class/align":f.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":v.ColorClass,"attributors/class/direction":a.DirectionClass,"attributors/class/font":m.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":f.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":v.ColorStyle,"attributors/style/direction":a.DirectionStyle,"attributors/style/font":m.FontStyle,"attributors/style/size":w.SizeStyle},!0),l.default.register({"formats/align":f.AlignClass,"formats/direction":a.DirectionClass,"formats/indent":p.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":v.ColorStyle,"formats/font":m.FontClass,"formats/size":w.SizeClass,"formats/blockquote":c.default,"formats/code-block":N.default,"formats/header":u.default,"formats/list":g.default,"formats/bold":O.default,"formats/code":I.Code,"formats/italic":S.default,"formats/link":L.default,"formats/script":A.default,"formats/strike":x.default,"formats/underline":z.default,"formats/image":V.default,"formats/video":H.default,"formats/list/item":b.ListItem,"modules/formula":j.default,"modules/syntax":$.default,"modules/toolbar":F.default,"themes/bubble":Q.default,"themes/snow":re.default,"ui/icons":Y.default,"ui/picker":oe.default,"ui/icon-picker":be.default,"ui/color-picker":fe.default,"ui/tooltip":Re.default},!0),i.default=l.default},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.IndentClass=void 0;var o=function(){function g(y,v){for(var m=0;m<v.length;m++){var w=v[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,m){return v&&g(y.prototype,v),m&&g(y,m),y}}(),l=function g(y,v,m){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var d=Object.getPrototypeOf(y);return d===null?void 0:g(d,v,m)}else{if("value"in w)return w.value;var O=w.get;return O===void 0?void 0:O.call(m)}},f=r(0),a=p(f);function p(g){return g&&g.__esModule?g:{default:g}}function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function c(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function s(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var u=function(g){s(y,g);function y(){return h(this,y),c(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"add",value:function(m,w){if(w==="+1"||w==="-1"){var d=this.value(m)||0;w=w==="+1"?d+1:d-1}return w===0?(this.remove(m),!0):l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,m,w)}},{key:"canAdd",value:function(m,w){return l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,m,w)||l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,m,parseInt(w))}},{key:"value",value:function(m){return parseInt(l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,m))||void 0}}]),y}(a.default.Attributor.Class),b=new u("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});i.IndentClass=b},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(4),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function p(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function h(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var c=function(s){h(u,s);function u(){return a(this,u),p(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(l.default);c.blotName="blockquote",c.tagName="blockquote",i.default=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function u(b,g){for(var y=0;y<g.length;y++){var v=g[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(b,v.key,v)}}return function(b,g,y){return g&&u(b.prototype,g),y&&u(b,y),b}}(),l=r(4),f=a(l);function a(u){return u&&u.__esModule?u:{default:u}}function p(u,b){if(!(u instanceof b))throw new TypeError("Cannot call a class as a function")}function h(u,b){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:u}function c(u,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);u.prototype=Object.create(b&&b.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(u,b):u.__proto__=b)}var s=function(u){c(b,u);function b(){return p(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),b}(f.default);s.blotName="header",s.tagName=["H1","H2","H3","H4","H5","H6"],i.default=s},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.ListItem=void 0;var o=function(){function d(O,R){for(var S=0;S<R.length;S++){var T=R[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}return function(O,R,S){return R&&d(O.prototype,R),S&&d(O,S),O}}(),l=function d(O,R,S){O===null&&(O=Function.prototype);var T=Object.getOwnPropertyDescriptor(O,R);if(T===void 0){var L=Object.getPrototypeOf(O);return L===null?void 0:d(L,R,S)}else{if("value"in T)return T.value;var k=T.get;return k===void 0?void 0:k.call(S)}},f=r(0),a=u(f),p=r(4),h=u(p),c=r(25),s=u(c);function u(d){return d&&d.__esModule?d:{default:d}}function b(d,O,R){return O in d?Object.defineProperty(d,O,{value:R,enumerable:!0,configurable:!0,writable:!0}):d[O]=R,d}function g(d,O){if(!(d instanceof O))throw new TypeError("Cannot call a class as a function")}function y(d,O){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:d}function v(d,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);d.prototype=Object.create(O&&O.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(d,O):d.__proto__=O)}var m=function(d){v(O,d);function O(){return g(this,O),y(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return o(O,[{key:"format",value:function(S,T){S===w.blotName&&!T?this.replaceWith(a.default.create(this.statics.scope)):l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,S,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(S,T){return this.parent.isolate(this.offset(this.parent),this.length()),S===this.parent.statics.blotName?(this.parent.replaceWith(S,T),this):(this.parent.unwrap(),l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,S,T))}}],[{key:"formats",value:function(S){return S.tagName===this.tagName?void 0:l(O.__proto__||Object.getPrototypeOf(O),"formats",this).call(this,S)}}]),O}(h.default);m.blotName="list-item",m.tagName="LI";var w=function(d){v(O,d),o(O,null,[{key:"create",value:function(S){var T=S==="ordered"?"OL":"UL",L=l(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,T);return(S==="checked"||S==="unchecked")&&L.setAttribute("data-checked",S==="checked"),L}},{key:"formats",value:function(S){if(S.tagName==="OL")return"ordered";if(S.tagName==="UL")return S.hasAttribute("data-checked")?S.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function O(R){g(this,O);var S=y(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,R)),T=function(k){if(k.target.parentNode===R){var A=S.statics.formats(R),E=a.default.find(k.target);A==="checked"?E.format("list","unchecked"):A==="unchecked"&&E.format("list","checked")}};return R.addEventListener("touchstart",T),R.addEventListener("mousedown",T),S}return o(O,[{key:"format",value:function(S,T){this.children.length>0&&this.children.tail.format(S,T)}},{key:"formats",value:function(){return b({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(S,T){if(S instanceof m)l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,S,T);else{var L=T==null?this.length():T.offset(this),k=this.split(L);k.parent.insertBefore(S,k)}}},{key:"optimize",value:function(S){l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,S);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(S){if(S.statics.blotName!==this.statics.blotName){var T=a.default.create(this.statics.defaultChild);S.moveChildren(T),this.appendChild(T)}l(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replace",this).call(this,S)}}]),O}(s.default);w.blotName="list",w.scope=a.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[m],i.ListItem=m,i.default=w},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(56),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function p(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function h(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var c=function(s){h(u,s);function u(){return a(this,u),p(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(l.default);c.blotName="italic",c.tagName=["EM","I"],i.default=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function b(g,y){for(var v=0;v<y.length;v++){var m=y[v];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(g,m.key,m)}}return function(g,y,v){return y&&b(g.prototype,y),v&&b(g,v),g}}(),l=function b(g,y,v){g===null&&(g=Function.prototype);var m=Object.getOwnPropertyDescriptor(g,y);if(m===void 0){var w=Object.getPrototypeOf(g);return w===null?void 0:b(w,y,v)}else{if("value"in m)return m.value;var d=m.get;return d===void 0?void 0:d.call(v)}},f=r(6),a=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function c(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function s(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var u=function(b){s(g,b);function g(){return h(this,g),c(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return o(g,null,[{key:"create",value:function(v){return v==="super"?document.createElement("sup"):v==="sub"?document.createElement("sub"):l(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,v)}},{key:"formats",value:function(v){if(v.tagName==="SUB")return"sub";if(v.tagName==="SUP")return"super"}}]),g}(a.default);u.blotName="script",u.tagName=["SUB","SUP"],i.default=u},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(6),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function p(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function h(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var c=function(s){h(u,s);function u(){return a(this,u),p(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(l.default);c.blotName="strike",c.tagName="S",i.default=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=r(6),l=f(o);function f(s){return s&&s.__esModule?s:{default:s}}function a(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")}function p(s,u){if(!s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:s}function h(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);s.prototype=Object.create(u&&u.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(s,u):s.__proto__=u)}var c=function(s){h(u,s);function u(){return a(this,u),p(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(l.default);c.blotName="underline",c.tagName="U",i.default=c},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function y(v,m){for(var w=0;w<m.length;w++){var d=m[w];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(v,d.key,d)}}return function(v,m,w){return m&&y(v.prototype,m),w&&y(v,w),v}}(),l=function y(v,m,w){v===null&&(v=Function.prototype);var d=Object.getOwnPropertyDescriptor(v,m);if(d===void 0){var O=Object.getPrototypeOf(v);return O===null?void 0:y(O,m,w)}else{if("value"in d)return d.value;var R=d.get;return R===void 0?void 0:R.call(w)}},f=r(0),a=h(f),p=r(27);function h(y){return y&&y.__esModule?y:{default:y}}function c(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function s(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function u(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=["alt","height","width"],g=function(y){u(v,y);function v(){return c(this,v),s(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return o(v,[{key:"format",value:function(w,d){b.indexOf(w)>-1?d?this.domNode.setAttribute(w,d):this.domNode.removeAttribute(w):l(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,d)}}],[{key:"create",value:function(w){var d=l(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,w);return typeof w=="string"&&d.setAttribute("src",this.sanitize(w)),d}},{key:"formats",value:function(w){return b.reduce(function(d,O){return w.hasAttribute(O)&&(d[O]=w.getAttribute(O)),d},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,p.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),v}(a.default.Embed);g.blotName="image",g.tagName="IMG",i.default=g},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function y(v,m){for(var w=0;w<m.length;w++){var d=m[w];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(v,d.key,d)}}return function(v,m,w){return m&&y(v.prototype,m),w&&y(v,w),v}}(),l=function y(v,m,w){v===null&&(v=Function.prototype);var d=Object.getOwnPropertyDescriptor(v,m);if(d===void 0){var O=Object.getPrototypeOf(v);return O===null?void 0:y(O,m,w)}else{if("value"in d)return d.value;var R=d.get;return R===void 0?void 0:R.call(w)}},f=r(4),a=r(27),p=h(a);function h(y){return y&&y.__esModule?y:{default:y}}function c(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function s(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function u(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=["height","width"],g=function(y){u(v,y);function v(){return c(this,v),s(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return o(v,[{key:"format",value:function(w,d){b.indexOf(w)>-1?d?this.domNode.setAttribute(w,d):this.domNode.removeAttribute(w):l(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,d)}}],[{key:"create",value:function(w){var d=l(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,w);return d.setAttribute("frameborder","0"),d.setAttribute("allowfullscreen",!0),d.setAttribute("src",this.sanitize(w)),d}},{key:"formats",value:function(w){return b.reduce(function(d,O){return w.hasAttribute(O)&&(d[O]=w.getAttribute(O)),d},{})}},{key:"sanitize",value:function(w){return p.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),v}(f.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",i.default=g},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.FormulaBlot=void 0;var o=function(){function w(d,O){for(var R=0;R<O.length;R++){var S=O[R];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(d,S.key,S)}}return function(d,O,R){return O&&w(d.prototype,O),R&&w(d,R),d}}(),l=function w(d,O,R){d===null&&(d=Function.prototype);var S=Object.getOwnPropertyDescriptor(d,O);if(S===void 0){var T=Object.getPrototypeOf(d);return T===null?void 0:w(T,O,R)}else{if("value"in S)return S.value;var L=S.get;return L===void 0?void 0:L.call(R)}},f=r(35),a=u(f),p=r(5),h=u(p),c=r(9),s=u(c);function u(w){return w&&w.__esModule?w:{default:w}}function b(w,d){if(!(w instanceof d))throw new TypeError("Cannot call a class as a function")}function g(w,d){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:w}function y(w,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);w.prototype=Object.create(d&&d.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(w,d):w.__proto__=d)}var v=function(w){y(d,w);function d(){return b(this,d),g(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return o(d,null,[{key:"create",value:function(R){var S=l(d.__proto__||Object.getPrototypeOf(d),"create",this).call(this,R);return typeof R=="string"&&(window.katex.render(R,S,{throwOnError:!1,errorColor:"#f00"}),S.setAttribute("data-value",R)),S}},{key:"value",value:function(R){return R.getAttribute("data-value")}}]),d}(a.default);v.blotName="formula",v.className="ql-formula",v.tagName="SPAN";var m=function(w){y(d,w),o(d,null,[{key:"register",value:function(){h.default.register(v,!0)}}]);function d(){b(this,d);var O=g(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return O}return d}(s.default);i.FormulaBlot=v,i.default=m},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.CodeToken=i.CodeBlock=void 0;var o=function(){function R(S,T){for(var L=0;L<T.length;L++){var k=T[L];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,T,L){return T&&R(S.prototype,T),L&&R(S,L),S}}(),l=function R(S,T,L){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,T);if(k===void 0){var A=Object.getPrototypeOf(S);return A===null?void 0:R(A,T,L)}else{if("value"in k)return k.value;var E=k.get;return E===void 0?void 0:E.call(L)}},f=r(0),a=g(f),p=r(5),h=g(p),c=r(9),s=g(c),u=r(13),b=g(u);function g(R){return R&&R.__esModule?R:{default:R}}function y(R,S){if(!(R instanceof S))throw new TypeError("Cannot call a class as a function")}function v(R,S){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:R}function m(R,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);R.prototype=Object.create(S&&S.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(R,S):R.__proto__=S)}var w=function(R){m(S,R);function S(){return y(this,S),v(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return o(S,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var k=this.domNode.textContent;this.cachedText!==k&&((k.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(k),this.domNode.normalize(),this.attach()),this.cachedText=k)}}]),S}(b.default);w.className="ql-syntax";var d=new a.default.Attributor.Class("token","hljs",{scope:a.default.Scope.INLINE}),O=function(R){m(S,R),o(S,null,[{key:"register",value:function(){h.default.register(d,!0),h.default.register(w,!0)}}]);function S(T,L){y(this,S);var k=v(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,T,L));if(typeof k.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return k.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){k.highlight(),A=null},k.options.interval)}),k.highlight(),k}return o(S,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var k=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(A){A.highlight(L.options.highlight)}),this.quill.update(h.default.sources.SILENT),k!=null&&this.quill.setSelection(k,h.default.sources.SILENT)}}}]),S}(s.default);O.DEFAULTS={highlight:function(){return window.hljs==null?null:function(R){var S=window.hljs.highlightAuto(R);return S.value}}(),interval:1e3},i.CodeBlock=w,i.CodeToken=d,i.default=O},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,i){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,i){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,i){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,i){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,i){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,i,r){Object.defineProperty(i,"__esModule",{value:!0}),i.default=i.BubbleTooltip=void 0;var o=function S(T,L,k){T===null&&(T=Function.prototype);var A=Object.getOwnPropertyDescriptor(T,L);if(A===void 0){var E=Object.getPrototypeOf(T);return E===null?void 0:S(E,L,k)}else{if("value"in A)return A.value;var x=A.get;return x===void 0?void 0:x.call(k)}},l=function(){function S(T,L){for(var k=0;k<L.length;k++){var A=L[k];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(T,A.key,A)}}return function(T,L,k){return L&&S(T.prototype,L),k&&S(T,k),T}}(),f=r(3),a=y(f),p=r(8),h=y(p),c=r(43),s=y(c),u=r(15),b=r(41),g=y(b);function y(S){return S&&S.__esModule?S:{default:S}}function v(S,T){if(!(S instanceof T))throw new TypeError("Cannot call a class as a function")}function m(S,T){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:S}function w(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}var d=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],O=function(S){w(T,S);function T(L,k){v(this,T),k.modules.toolbar!=null&&k.modules.toolbar.container==null&&(k.modules.toolbar.container=d);var A=m(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,L,k));return A.quill.container.classList.add("ql-bubble"),A}return l(T,[{key:"extendToolbar",value:function(k){this.tooltip=new R(this.quill,this.options.bounds),this.tooltip.root.appendChild(k.container),this.buildButtons([].slice.call(k.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(k.container.querySelectorAll("select")),g.default)}}]),T}(s.default);O.DEFAULTS=(0,a.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var R=function(S){w(T,S);function T(L,k){v(this,T);var A=m(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,L,k));return A.quill.on(h.default.events.EDITOR_CHANGE,function(E,x,M,z){if(E===h.default.events.SELECTION_CHANGE)if(x!=null&&x.length>0&&z===h.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var U=A.quill.getLines(x.index,x.length);if(U.length===1)A.position(A.quill.getBounds(x));else{var V=U[U.length-1],te=A.quill.getIndex(V),H=Math.min(V.length()-1,x.index+x.length-te),I=A.quill.getBounds(new u.Range(te,H));A.position(I)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return l(T,[{key:"listen",value:function(){var k=this;o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){k.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!k.root.classList.contains("ql-hidden")){var A=k.quill.getSelection();A!=null&&k.position(k.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(k){var A=o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,k),E=this.root.querySelector(".ql-tooltip-arrow");if(E.style.marginLeft="",A===0)return A;E.style.marginLeft=-1*A-E.offsetWidth/2+"px"}}]),T}(c.BaseTooltip);R.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),i.BubbleTooltip=R,i.default=O},function(t,i,r){t.exports=r(63)}]).default})})(so);var Fu=so.exports;const Gi=qr(Fu);var mt=-1,lt=1,tt=0;function bn(e,n,t,i){if(e===n)return e?[[tt,e]]:[];if(t!=null){var r=Ku(e,n,t);if(r)return r}var o=fr(e,n),l=e.substring(0,o);e=e.substring(o),n=n.substring(o),o=hr(e,n);var f=e.substring(e.length-o);e=e.substring(0,e.length-o),n=n.substring(0,n.length-o);var a=Hu(e,n);return l&&a.unshift([tt,l]),f&&a.push([tt,f]),lo(a,i),a}function Hu(e,n){var t;if(!e)return[[lt,n]];if(!n)return[[mt,e]];var i=e.length>n.length?e:n,r=e.length>n.length?n:e,o=i.indexOf(r);if(o!==-1)return t=[[lt,i.substring(0,o)],[tt,r],[lt,i.substring(o+r.length)]],e.length>n.length&&(t[0][0]=t[2][0]=mt),t;if(r.length===1)return[[mt,e],[lt,n]];var l=Wu(e,n);if(l){var f=l[0],a=l[1],p=l[2],h=l[3],c=l[4],s=bn(f,p),u=bn(a,h);return s.concat([[tt,c]],u)}return Uu(e,n)}function Uu(e,n){for(var t=e.length,i=n.length,r=Math.ceil((t+i)/2),o=r,l=2*r,f=new Array(l),a=new Array(l),p=0;p<l;p++)f[p]=-1,a[p]=-1;f[o+1]=0,a[o+1]=0;for(var h=t-i,c=h%2!==0,s=0,u=0,b=0,g=0,y=0;y<r;y++){for(var v=-y+s;v<=y-u;v+=2){var m=o+v,w;v===-y||v!==y&&f[m-1]<f[m+1]?w=f[m+1]:w=f[m-1]+1;for(var d=w-v;w<t&&d<i&&e.charAt(w)===n.charAt(d);)w++,d++;if(f[m]=w,w>t)u+=2;else if(d>i)s+=2;else if(c){var O=o+h-v;if(O>=0&&O<l&&a[O]!==-1){var R=t-a[O];if(w>=R)return Tr(e,n,w,d)}}}for(var S=-y+b;S<=y-g;S+=2){var O=o+S,R;S===-y||S!==y&&a[O-1]<a[O+1]?R=a[O+1]:R=a[O-1]+1;for(var T=R-S;R<t&&T<i&&e.charAt(t-R-1)===n.charAt(i-T-1);)R++,T++;if(a[O]=R,R>t)g+=2;else if(T>i)b+=2;else if(!c){var m=o+h-S;if(m>=0&&m<l&&f[m]!==-1){var w=f[m],d=o+w-m;if(R=t-R,w>=R)return Tr(e,n,w,d)}}}}return[[mt,e],[lt,n]]}function Tr(e,n,t,i){var r=e.substring(0,t),o=n.substring(0,i),l=e.substring(t),f=n.substring(i),a=bn(r,o),p=bn(l,f);return a.concat(p)}function fr(e,n){if(!e||!n||e.charAt(0)!==n.charAt(0))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,o=0;t<r;)e.substring(o,r)==n.substring(o,r)?(t=r,o=t):i=r,r=Math.floor((i-t)/2+t);return uo(e.charCodeAt(r-1))&&r--,r}function hr(e,n){if(!e||!n||e.slice(-1)!==n.slice(-1))return 0;for(var t=0,i=Math.min(e.length,n.length),r=i,o=0;t<r;)e.substring(e.length-r,e.length-o)==n.substring(n.length-r,n.length-o)?(t=r,o=t):i=r,r=Math.floor((i-t)/2+t);return co(e.charCodeAt(e.length-r))&&r--,r}function Wu(e,n){var t=e.length>n.length?e:n,i=e.length>n.length?n:e;if(t.length<4||i.length*2<t.length)return null;function r(u,b,g){for(var y=u.substring(g,g+Math.floor(u.length/4)),v=-1,m="",w,d,O,R;(v=b.indexOf(y,v+1))!==-1;){var S=fr(u.substring(g),b.substring(v)),T=hr(u.substring(0,g),b.substring(0,v));m.length<T+S&&(m=b.substring(v-T,v)+b.substring(v,v+S),w=u.substring(0,g-T),d=u.substring(g+S),O=b.substring(0,v-T),R=b.substring(v+S))}return m.length*2>=u.length?[w,d,O,R,m]:null}var o=r(t,i,Math.ceil(t.length/4)),l=r(t,i,Math.ceil(t.length/2)),f;if(!o&&!l)return null;l?o?f=o[4].length>l[4].length?o:l:f=l:f=o;var a,p,h,c;e.length>n.length?(a=f[0],p=f[1],h=f[2],c=f[3]):(h=f[0],c=f[1],a=f[2],p=f[3]);var s=f[4];return[a,p,h,c,s]}function lo(e,n){e.push([tt,""]);for(var t=0,i=0,r=0,o="",l="",f;t<e.length;){if(t<e.length-1&&!e[t][1]){e.splice(t,1);continue}switch(e[t][0]){case lt:r++,l+=e[t][1],t++;break;case mt:i++,o+=e[t][1],t++;break;case tt:var a=t-r-i-1;if(n){if(a>=0&&ho(e[a][1])){var p=e[a][1].slice(-1);if(e[a][1]=e[a][1].slice(0,-1),o=p+o,l=p+l,!e[a][1]){e.splice(a,1),t--;var h=a-1;e[h]&&e[h][0]===lt&&(r++,l=e[h][1]+l,h--),e[h]&&e[h][0]===mt&&(i++,o=e[h][1]+o,h--),a=h}}if(fo(e[t][1])){var p=e[t][1].charAt(0);e[t][1]=e[t][1].slice(1),o+=p,l+=p}}if(t<e.length-1&&!e[t][1]){e.splice(t,1);break}if(o.length>0||l.length>0){o.length>0&&l.length>0&&(f=fr(l,o),f!==0&&(a>=0?e[a][1]+=l.substring(0,f):(e.splice(0,0,[tt,l.substring(0,f)]),t++),l=l.substring(f),o=o.substring(f)),f=hr(l,o),f!==0&&(e[t][1]=l.substring(l.length-f)+e[t][1],l=l.substring(0,l.length-f),o=o.substring(0,o.length-f)));var c=r+i;o.length===0&&l.length===0?(e.splice(t-c,c),t=t-c):o.length===0?(e.splice(t-c,c,[lt,l]),t=t-c+1):l.length===0?(e.splice(t-c,c,[mt,o]),t=t-c+1):(e.splice(t-c,c,[mt,o],[lt,l]),t=t-c+2)}t!==0&&e[t-1][0]===tt?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,i=0,o="",l="";break}}e[e.length-1][1]===""&&e.pop();var s=!1;for(t=1;t<e.length-1;)e[t-1][0]===tt&&e[t+1][0]===tt&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&lo(e,n)}function uo(e){return e>=55296&&e<=56319}function co(e){return e>=56320&&e<=57343}function fo(e){return co(e.charCodeAt(0))}function ho(e){return uo(e.charCodeAt(e.length-1))}function Vu(e){for(var n=[],t=0;t<e.length;t++)e[t][1].length>0&&n.push(e[t]);return n}function Xi(e,n,t,i){return ho(e)||fo(i)?null:Vu([[tt,e],[mt,n],[lt,t],[tt,i]])}function Ku(e,n,t){var i=typeof t=="number"?{index:t,length:0}:t.oldRange,r=typeof t=="number"?null:t.newRange,o=e.length,l=n.length;if(i.length===0&&(r===null||r.length===0)){var f=i.index,a=e.slice(0,f),p=e.slice(f),h=r?r.index:null;e:{var c=f+l-o;if(h!==null&&h!==c||c<0||c>l)break e;var s=n.slice(0,c),u=n.slice(c);if(u!==p)break e;var b=Math.min(f,c),g=a.slice(0,b),y=s.slice(0,b);if(g!==y)break e;var v=a.slice(b),m=s.slice(b);return Xi(g,v,m,p)}e:{if(h!==null&&h!==f)break e;var w=f,s=n.slice(0,w),u=n.slice(w);if(s!==a)break e;var d=Math.min(o-w,l-w),O=p.slice(p.length-d),R=u.slice(u.length-d);if(O!==R)break e;var v=p.slice(0,p.length-d),m=u.slice(0,u.length-d);return Xi(a,v,m,O)}}if(i.length>0&&r&&r.length===0)e:{var g=e.slice(0,i.index),O=e.slice(i.index+i.length),b=g.length,d=O.length;if(l<b+d)break e;var y=n.slice(0,b),R=n.slice(l-d);if(g!==y||O!==R)break e;var v=e.slice(b,o-d),m=n.slice(b,l-d);return Xi(g,v,m,O)}return null}function ri(e,n,t){return bn(e,n,t,!0)}ri.INSERT=lt;ri.DELETE=mt;ri.EQUAL=tt;var Yu=ri,Jn={exports:{}};Jn.exports;(function(e,n){var t=200,i="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",l="[object Array]",f="[object Boolean]",a="[object Date]",p="[object Error]",h="[object Function]",c="[object GeneratorFunction]",s="[object Map]",u="[object Number]",b="[object Object]",g="[object Promise]",y="[object RegExp]",v="[object Set]",m="[object String]",w="[object Symbol]",d="[object WeakMap]",O="[object ArrayBuffer]",R="[object DataView]",S="[object Float32Array]",T="[object Float64Array]",L="[object Int8Array]",k="[object Int16Array]",A="[object Int32Array]",E="[object Uint8Array]",x="[object Uint8ClampedArray]",M="[object Uint16Array]",z="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,te=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,I={};I[o]=I[l]=I[O]=I[R]=I[f]=I[a]=I[S]=I[T]=I[L]=I[k]=I[A]=I[s]=I[u]=I[b]=I[y]=I[v]=I[m]=I[w]=I[E]=I[x]=I[M]=I[z]=!0,I[p]=I[h]=I[d]=!1;var N=typeof He=="object"&&He&&He.Object===Object&&He,D=typeof self=="object"&&self&&self.Object===Object&&self,j=N||D||Function("return this")(),W=n&&!n.nodeType&&n,$=W&&!0&&e&&!e.nodeType&&e,C=$&&$.exports===W;function F(_,P){return _.set(P[0],P[1]),_}function K(_,P){return _.add(P),_}function Y(_,P){for(var q=-1,G=_?_.length:0;++q<G&&P(_[q],q,_)!==!1;);return _}function J(_,P){for(var q=-1,G=P.length,ve=_.length;++q<G;)_[ve+q]=P[q];return _}function oe(_,P,q,G){for(var ve=-1,ae=_?_.length:0;++ve<ae;)q=P(q,_[ve],ve,_);return q}function le(_,P){for(var q=-1,G=Array(_);++q<_;)G[q]=P(q);return G}function fe(_,P){return _==null?void 0:_[P]}function me(_){var P=!1;if(_!=null&&typeof _.toString!="function")try{P=!!(_+"")}catch{}return P}function be(_){var P=-1,q=Array(_.size);return _.forEach(function(G,ve){q[++P]=[ve,G]}),q}function Ne(_,P){return function(q){return _(P(q))}}function Re(_){var P=-1,q=Array(_.size);return _.forEach(function(G){q[++P]=G}),q}var Z=Array.prototype,Q=Function.prototype,ie=Object.prototype,re=j["__core-js_shared__"],ee=function(){var _=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),pe=Q.toString,ce=ie.hasOwnProperty,he=ie.toString,Ke=RegExp("^"+pe.call(ce).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=C?j.Buffer:void 0,Se=j.Symbol,Nt=j.Uint8Array,_e=Ne(Object.getPrototypeOf,Object),it=Object.create,kn=ie.propertyIsEnumerable,oi=Z.splice,nn=Object.getOwnPropertySymbols,Ft=ze?ze.isBuffer:void 0,Sn=Ne(Object.keys,Object),Ht=st(j,"DataView"),Pt=st(j,"Map"),at=st(j,"Promise"),Ut=st(j,"Set"),rn=st(j,"WeakMap"),Lt=st(Object,"create"),on=Qe(Ht),Mt=Qe(Pt),an=Qe(at),sn=Qe(Ut),ln=Qe(rn),St=Se?Se.prototype:void 0,Tn=St?St.valueOf:void 0;function _t(_){var P=-1,q=_?_.length:0;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function ai(){this.__data__=Lt?Lt(null):{}}function si(_){return this.has(_)&&delete this.__data__[_]}function li(_){var P=this.__data__;if(Lt){var q=P[_];return q===i?void 0:q}return ce.call(P,_)?P[_]:void 0}function Rn(_){var P=this.__data__;return Lt?P[_]!==void 0:ce.call(P,_)}function un(_,P){var q=this.__data__;return q[_]=Lt&&P===void 0?i:P,this}_t.prototype.clear=ai,_t.prototype.delete=si,_t.prototype.get=li,_t.prototype.has=Rn,_t.prototype.set=un;function qe(_){var P=-1,q=_?_.length:0;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function ui(){this.__data__=[]}function ci(_){var P=this.__data__,q=Vt(P,_);if(q<0)return!1;var G=P.length-1;return q==G?P.pop():oi.call(P,q,1),!0}function fi(_){var P=this.__data__,q=Vt(P,_);return q<0?void 0:P[q][1]}function hi(_){return Vt(this.__data__,_)>-1}function di(_,P){var q=this.__data__,G=Vt(q,_);return G<0?q.push([_,P]):q[G][1]=P,this}qe.prototype.clear=ui,qe.prototype.delete=ci,qe.prototype.get=fi,qe.prototype.has=hi,qe.prototype.set=di;function Ye(_){var P=-1,q=_?_.length:0;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function pi(){this.__data__={hash:new _t,map:new(Pt||qe),string:new _t}}function vi(_){return It(this,_).delete(_)}function mi(_){return It(this,_).get(_)}function gi(_){return It(this,_).has(_)}function yi(_,P){return It(this,_).set(_,P),this}Ye.prototype.clear=pi,Ye.prototype.delete=vi,Ye.prototype.get=mi,Ye.prototype.has=gi,Ye.prototype.set=yi;function Je(_){this.__data__=new qe(_)}function bi(){this.__data__=new qe}function _i(_){return this.__data__.delete(_)}function wi(_){return this.__data__.get(_)}function Oi(_){return this.__data__.has(_)}function Ai(_,P){var q=this.__data__;if(q instanceof qe){var G=q.__data__;if(!Pt||G.length<t-1)return G.push([_,P]),this;q=this.__data__=new Ye(G)}return q.set(_,P),this}Je.prototype.clear=bi,Je.prototype.delete=_i,Je.prototype.get=wi,Je.prototype.has=Oi,Je.prototype.set=Ai;function Wt(_,P){var q=dn(_)||Yt(_)?le(_.length,String):[],G=q.length,ve=!!G;for(var ae in _)ce.call(_,ae)&&!(ve&&(ae=="length"||ji(ae,G)))&&q.push(ae);return q}function xn(_,P,q){var G=_[P];(!(ce.call(_,P)&&Cn(G,q))||q===void 0&&!(P in _))&&(_[P]=q)}function Vt(_,P){for(var q=_.length;q--;)if(Cn(_[q][0],P))return q;return-1}function ft(_,P){return _&&hn(P,vn(P),_)}function cn(_,P,q,G,ve,ae,Ae){var we;if(G&&(we=ae?G(_,ve,ae,Ae):G(_)),we!==void 0)return we;if(!dt(_))return _;var Pe=dn(_);if(Pe){if(we=Ii(_),!P)return Li(_,we)}else{var Te=Ot(_),Ze=Te==h||Te==c;if(In(_))return Kt(_,P);if(Te==b||Te==o||Ze&&!ae){if(me(_))return ae?_:{};if(we=ht(Ze?{}:_),!P)return Mi(_,ft(we,_))}else{if(!I[Te])return ae?_:{};we=Di(_,Te,cn,P)}}Ae||(Ae=new Je);var et=Ae.get(_);if(et)return et;if(Ae.set(_,we),!Pe)var Me=q?Ci(_):vn(_);return Y(Me||_,function(Ge,$e){Me&&($e=Ge,Ge=_[$e]),xn(we,$e,cn(Ge,P,q,G,$e,_,Ae))}),we}function Ei(_){return dt(_)?it(_):{}}function ki(_,P,q){var G=P(_);return dn(_)?G:J(G,q(_))}function Si(_){return he.call(_)}function Ti(_){if(!dt(_)||qi(_))return!1;var P=pn(_)||me(_)?Ke:te;return P.test(Qe(_))}function Ri(_){if(!Ln(_))return Sn(_);var P=[];for(var q in Object(_))ce.call(_,q)&&q!="constructor"&&P.push(q);return P}function Kt(_,P){if(P)return _.slice();var q=new _.constructor(_.length);return _.copy(q),q}function fn(_){var P=new _.constructor(_.byteLength);return new Nt(P).set(new Nt(_)),P}function Ct(_,P){var q=P?fn(_.buffer):_.buffer;return new _.constructor(q,_.byteOffset,_.byteLength)}function Nn(_,P,q){var G=P?q(be(_),!0):be(_);return oe(G,F,new _.constructor)}function Pn(_){var P=new _.constructor(_.source,V.exec(_));return P.lastIndex=_.lastIndex,P}function xi(_,P,q){var G=P?q(Re(_),!0):Re(_);return oe(G,K,new _.constructor)}function Ni(_){return Tn?Object(Tn.call(_)):{}}function Pi(_,P){var q=P?fn(_.buffer):_.buffer;return new _.constructor(q,_.byteOffset,_.length)}function Li(_,P){var q=-1,G=_.length;for(P||(P=Array(G));++q<G;)P[q]=_[q];return P}function hn(_,P,q,G){q||(q={});for(var ve=-1,ae=P.length;++ve<ae;){var Ae=P[ve],we=void 0;xn(q,Ae,we===void 0?_[Ae]:we)}return q}function Mi(_,P){return hn(_,wt(_),P)}function Ci(_){return ki(_,vn,wt)}function It(_,P){var q=_.__data__;return zi(P)?q[typeof P=="string"?"string":"hash"]:q.map}function st(_,P){var q=fe(_,P);return Ti(q)?q:void 0}var wt=nn?Ne(nn,Object):Bi,Ot=Si;(Ht&&Ot(new Ht(new ArrayBuffer(1)))!=R||Pt&&Ot(new Pt)!=s||at&&Ot(at.resolve())!=g||Ut&&Ot(new Ut)!=v||rn&&Ot(new rn)!=d)&&(Ot=function(_){var P=he.call(_),q=P==b?_.constructor:void 0,G=q?Qe(q):void 0;if(G)switch(G){case on:return R;case Mt:return s;case an:return g;case sn:return v;case ln:return d}return P});function Ii(_){var P=_.length,q=_.constructor(P);return P&&typeof _[0]=="string"&&ce.call(_,"index")&&(q.index=_.index,q.input=_.input),q}function ht(_){return typeof _.constructor=="function"&&!Ln(_)?Ei(_e(_)):{}}function Di(_,P,q,G){var ve=_.constructor;switch(P){case O:return fn(_);case f:case a:return new ve(+_);case R:return Ct(_,G);case S:case T:case L:case k:case A:case E:case x:case M:case z:return Pi(_,G);case s:return Nn(_,G,q);case u:case m:return new ve(_);case y:return Pn(_);case v:return xi(_,G,q);case w:return Ni(_)}}function ji(_,P){return P=P??r,!!P&&(typeof _=="number"||H.test(_))&&_>-1&&_%1==0&&_<P}function zi(_){var P=typeof _;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?_!=="__proto__":_===null}function qi(_){return!!ee&&ee in _}function Ln(_){var P=_&&_.constructor,q=typeof P=="function"&&P.prototype||ie;return _===q}function Qe(_){if(_!=null){try{return pe.call(_)}catch{}try{return _+""}catch{}}return""}function Mn(_){return cn(_,!0,!0)}function Cn(_,P){return _===P||_!==_&&P!==P}function Yt(_){return $i(_)&&ce.call(_,"callee")&&(!kn.call(_,"callee")||he.call(_)==o)}var dn=Array.isArray;function Zt(_){return _!=null&&Dn(_.length)&&!pn(_)}function $i(_){return jn(_)&&Zt(_)}var In=Ft||Fi;function pn(_){var P=dt(_)?he.call(_):"";return P==h||P==c}function Dn(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=r}function dt(_){var P=typeof _;return!!_&&(P=="object"||P=="function")}function jn(_){return!!_&&typeof _=="object"}function vn(_){return Zt(_)?Wt(_):Ri(_)}function Bi(){return[]}function Fi(){return!1}e.exports=Mn})(Jn,Jn.exports);var po=Jn.exports,ei={exports:{}};ei.exports;(function(e,n){var t=200,i="__lodash_hash_undefined__",r=1,o=2,l=9007199254740991,f="[object Arguments]",a="[object Array]",p="[object AsyncFunction]",h="[object Boolean]",c="[object Date]",s="[object Error]",u="[object Function]",b="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",m="[object Object]",w="[object Promise]",d="[object Proxy]",O="[object RegExp]",R="[object Set]",S="[object String]",T="[object Symbol]",L="[object Undefined]",k="[object WeakMap]",A="[object ArrayBuffer]",E="[object DataView]",x="[object Float32Array]",M="[object Float64Array]",z="[object Int8Array]",U="[object Int16Array]",V="[object Int32Array]",te="[object Uint8Array]",H="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]",D=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,$={};$[x]=$[M]=$[z]=$[U]=$[V]=$[te]=$[H]=$[I]=$[N]=!0,$[f]=$[a]=$[A]=$[h]=$[E]=$[c]=$[s]=$[u]=$[g]=$[y]=$[m]=$[O]=$[R]=$[S]=$[k]=!1;var C=typeof He=="object"&&He&&He.Object===Object&&He,F=typeof self=="object"&&self&&self.Object===Object&&self,K=C||F||Function("return this")(),Y=n&&!n.nodeType&&n,J=Y&&!0&&e&&!e.nodeType&&e,oe=J&&J.exports===Y,le=oe&&C.process,fe=function(){try{return le&&le.binding&&le.binding("util")}catch{}}(),me=fe&&fe.isTypedArray;function be(_,P){for(var q=-1,G=_==null?0:_.length,ve=0,ae=[];++q<G;){var Ae=_[q];P(Ae,q,_)&&(ae[ve++]=Ae)}return ae}function Ne(_,P){for(var q=-1,G=P.length,ve=_.length;++q<G;)_[ve+q]=P[q];return _}function Re(_,P){for(var q=-1,G=_==null?0:_.length;++q<G;)if(P(_[q],q,_))return!0;return!1}function Z(_,P){for(var q=-1,G=Array(_);++q<_;)G[q]=P(q);return G}function Q(_){return function(P){return _(P)}}function ie(_,P){return _.has(P)}function re(_,P){return _==null?void 0:_[P]}function ee(_){var P=-1,q=Array(_.size);return _.forEach(function(G,ve){q[++P]=[ve,G]}),q}function pe(_,P){return function(q){return _(P(q))}}function ce(_){var P=-1,q=Array(_.size);return _.forEach(function(G){q[++P]=G}),q}var he=Array.prototype,Ke=Function.prototype,ze=Object.prototype,Se=K["__core-js_shared__"],Nt=Ke.toString,_e=ze.hasOwnProperty,it=function(){var _=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),kn=ze.toString,oi=RegExp("^"+Nt.call(_e).replace(D,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nn=oe?K.Buffer:void 0,Ft=K.Symbol,Sn=K.Uint8Array,Ht=ze.propertyIsEnumerable,Pt=he.splice,at=Ft?Ft.toStringTag:void 0,Ut=Object.getOwnPropertySymbols,rn=nn?nn.isBuffer:void 0,Lt=pe(Object.keys,Object),on=wt(K,"DataView"),Mt=wt(K,"Map"),an=wt(K,"Promise"),sn=wt(K,"Set"),ln=wt(K,"WeakMap"),St=wt(Object,"create"),Tn=Qe(on),_t=Qe(Mt),ai=Qe(an),si=Qe(sn),li=Qe(ln),Rn=Ft?Ft.prototype:void 0,un=Rn?Rn.valueOf:void 0;function qe(_){var P=-1,q=_==null?0:_.length;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function ui(){this.__data__=St?St(null):{},this.size=0}function ci(_){var P=this.has(_)&&delete this.__data__[_];return this.size-=P?1:0,P}function fi(_){var P=this.__data__;if(St){var q=P[_];return q===i?void 0:q}return _e.call(P,_)?P[_]:void 0}function hi(_){var P=this.__data__;return St?P[_]!==void 0:_e.call(P,_)}function di(_,P){var q=this.__data__;return this.size+=this.has(_)?0:1,q[_]=St&&P===void 0?i:P,this}qe.prototype.clear=ui,qe.prototype.delete=ci,qe.prototype.get=fi,qe.prototype.has=hi,qe.prototype.set=di;function Ye(_){var P=-1,q=_==null?0:_.length;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function pi(){this.__data__=[],this.size=0}function vi(_){var P=this.__data__,q=Kt(P,_);if(q<0)return!1;var G=P.length-1;return q==G?P.pop():Pt.call(P,q,1),--this.size,!0}function mi(_){var P=this.__data__,q=Kt(P,_);return q<0?void 0:P[q][1]}function gi(_){return Kt(this.__data__,_)>-1}function yi(_,P){var q=this.__data__,G=Kt(q,_);return G<0?(++this.size,q.push([_,P])):q[G][1]=P,this}Ye.prototype.clear=pi,Ye.prototype.delete=vi,Ye.prototype.get=mi,Ye.prototype.has=gi,Ye.prototype.set=yi;function Je(_){var P=-1,q=_==null?0:_.length;for(this.clear();++P<q;){var G=_[P];this.set(G[0],G[1])}}function bi(){this.size=0,this.__data__={hash:new qe,map:new(Mt||Ye),string:new qe}}function _i(_){var P=st(this,_).delete(_);return this.size-=P?1:0,P}function wi(_){return st(this,_).get(_)}function Oi(_){return st(this,_).has(_)}function Ai(_,P){var q=st(this,_),G=q.size;return q.set(_,P),this.size+=q.size==G?0:1,this}Je.prototype.clear=bi,Je.prototype.delete=_i,Je.prototype.get=wi,Je.prototype.has=Oi,Je.prototype.set=Ai;function Wt(_){var P=-1,q=_==null?0:_.length;for(this.__data__=new Je;++P<q;)this.add(_[P])}function xn(_){return this.__data__.set(_,i),this}function Vt(_){return this.__data__.has(_)}Wt.prototype.add=Wt.prototype.push=xn,Wt.prototype.has=Vt;function ft(_){var P=this.__data__=new Ye(_);this.size=P.size}function cn(){this.__data__=new Ye,this.size=0}function Ei(_){var P=this.__data__,q=P.delete(_);return this.size=P.size,q}function ki(_){return this.__data__.get(_)}function Si(_){return this.__data__.has(_)}function Ti(_,P){var q=this.__data__;if(q instanceof Ye){var G=q.__data__;if(!Mt||G.length<t-1)return G.push([_,P]),this.size=++q.size,this;q=this.__data__=new Je(G)}return q.set(_,P),this.size=q.size,this}ft.prototype.clear=cn,ft.prototype.delete=Ei,ft.prototype.get=ki,ft.prototype.has=Si,ft.prototype.set=Ti;function Ri(_,P){var q=Yt(_),G=!q&&Cn(_),ve=!q&&!G&&Zt(_),ae=!q&&!G&&!ve&&jn(_),Ae=q||G||ve||ae,we=Ae?Z(_.length,String):[],Pe=we.length;for(var Te in _)_e.call(_,Te)&&!(Ae&&(Te=="length"||ve&&(Te=="offset"||Te=="parent")||ae&&(Te=="buffer"||Te=="byteLength"||Te=="byteOffset")||Di(Te,Pe)))&&we.push(Te);return we}function Kt(_,P){for(var q=_.length;q--;)if(Mn(_[q][0],P))return q;return-1}function fn(_,P,q){var G=P(_);return Yt(_)?G:Ne(G,q(_))}function Ct(_){return _==null?_===void 0?L:v:at&&at in Object(_)?Ot(_):Ln(_)}function Nn(_){return dt(_)&&Ct(_)==f}function Pn(_,P,q,G,ve){return _===P?!0:_==null||P==null||!dt(_)&&!dt(P)?_!==_&&P!==P:xi(_,P,q,G,Pn,ve)}function xi(_,P,q,G,ve,ae){var Ae=Yt(_),we=Yt(P),Pe=Ae?a:ht(_),Te=we?a:ht(P);Pe=Pe==f?m:Pe,Te=Te==f?m:Te;var Ze=Pe==m,et=Te==m,Me=Pe==Te;if(Me&&Zt(_)){if(!Zt(P))return!1;Ae=!0,Ze=!1}if(Me&&!Ze)return ae||(ae=new ft),Ae||jn(_)?hn(_,P,q,G,ve,ae):Mi(_,P,Pe,q,G,ve,ae);if(!(q&r)){var Ge=Ze&&_e.call(_,"__wrapped__"),$e=et&&_e.call(P,"__wrapped__");if(Ge||$e){var Tt=Ge?_.value():_,At=$e?P.value():P;return ae||(ae=new ft),ve(Tt,At,q,G,ae)}}return Me?(ae||(ae=new ft),Ci(_,P,q,G,ve,ae)):!1}function Ni(_){if(!Dn(_)||zi(_))return!1;var P=In(_)?oi:j;return P.test(Qe(_))}function Pi(_){return dt(_)&&pn(_.length)&&!!$[Ct(_)]}function Li(_){if(!qi(_))return Lt(_);var P=[];for(var q in Object(_))_e.call(_,q)&&q!="constructor"&&P.push(q);return P}function hn(_,P,q,G,ve,ae){var Ae=q&r,we=_.length,Pe=P.length;if(we!=Pe&&!(Ae&&Pe>we))return!1;var Te=ae.get(_);if(Te&&ae.get(P))return Te==P;var Ze=-1,et=!0,Me=q&o?new Wt:void 0;for(ae.set(_,P),ae.set(P,_);++Ze<we;){var Ge=_[Ze],$e=P[Ze];if(G)var Tt=Ae?G($e,Ge,Ze,P,_,ae):G(Ge,$e,Ze,_,P,ae);if(Tt!==void 0){if(Tt)continue;et=!1;break}if(Me){if(!Re(P,function(At,Dt){if(!ie(Me,Dt)&&(Ge===At||ve(Ge,At,q,G,ae)))return Me.push(Dt)})){et=!1;break}}else if(!(Ge===$e||ve(Ge,$e,q,G,ae))){et=!1;break}}return ae.delete(_),ae.delete(P),et}function Mi(_,P,q,G,ve,ae,Ae){switch(q){case E:if(_.byteLength!=P.byteLength||_.byteOffset!=P.byteOffset)return!1;_=_.buffer,P=P.buffer;case A:return!(_.byteLength!=P.byteLength||!ae(new Sn(_),new Sn(P)));case h:case c:case y:return Mn(+_,+P);case s:return _.name==P.name&&_.message==P.message;case O:case S:return _==P+"";case g:var we=ee;case R:var Pe=G&r;if(we||(we=ce),_.size!=P.size&&!Pe)return!1;var Te=Ae.get(_);if(Te)return Te==P;G|=o,Ae.set(_,P);var Ze=hn(we(_),we(P),G,ve,ae,Ae);return Ae.delete(_),Ze;case T:if(un)return un.call(_)==un.call(P)}return!1}function Ci(_,P,q,G,ve,ae){var Ae=q&r,we=It(_),Pe=we.length,Te=It(P),Ze=Te.length;if(Pe!=Ze&&!Ae)return!1;for(var et=Pe;et--;){var Me=we[et];if(!(Ae?Me in P:_e.call(P,Me)))return!1}var Ge=ae.get(_);if(Ge&&ae.get(P))return Ge==P;var $e=!0;ae.set(_,P),ae.set(P,_);for(var Tt=Ae;++et<Pe;){Me=we[et];var At=_[Me],Dt=P[Me];if(G)var vr=Ae?G(Dt,At,Me,P,_,ae):G(At,Dt,Me,_,P,ae);if(!(vr===void 0?At===Dt||ve(At,Dt,q,G,ae):vr)){$e=!1;break}Tt||(Tt=Me=="constructor")}if($e&&!Tt){var zn=_.constructor,qn=P.constructor;zn!=qn&&"constructor"in _&&"constructor"in P&&!(typeof zn=="function"&&zn instanceof zn&&typeof qn=="function"&&qn instanceof qn)&&($e=!1)}return ae.delete(_),ae.delete(P),$e}function It(_){return fn(_,vn,Ii)}function st(_,P){var q=_.__data__;return ji(P)?q[typeof P=="string"?"string":"hash"]:q.map}function wt(_,P){var q=re(_,P);return Ni(q)?q:void 0}function Ot(_){var P=_e.call(_,at),q=_[at];try{_[at]=void 0;var G=!0}catch{}var ve=kn.call(_);return G&&(P?_[at]=q:delete _[at]),ve}var Ii=Ut?function(_){return _==null?[]:(_=Object(_),be(Ut(_),function(P){return Ht.call(_,P)}))}:Bi,ht=Ct;(on&&ht(new on(new ArrayBuffer(1)))!=E||Mt&&ht(new Mt)!=g||an&&ht(an.resolve())!=w||sn&&ht(new sn)!=R||ln&&ht(new ln)!=k)&&(ht=function(_){var P=Ct(_),q=P==m?_.constructor:void 0,G=q?Qe(q):"";if(G)switch(G){case Tn:return E;case _t:return g;case ai:return w;case si:return R;case li:return k}return P});function Di(_,P){return P=P??l,!!P&&(typeof _=="number"||W.test(_))&&_>-1&&_%1==0&&_<P}function ji(_){var P=typeof _;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?_!=="__proto__":_===null}function zi(_){return!!it&&it in _}function qi(_){var P=_&&_.constructor,q=typeof P=="function"&&P.prototype||ze;return _===q}function Ln(_){return kn.call(_)}function Qe(_){if(_!=null){try{return Nt.call(_)}catch{}try{return _+""}catch{}}return""}function Mn(_,P){return _===P||_!==_&&P!==P}var Cn=Nn(function(){return arguments}())?Nn:function(_){return dt(_)&&_e.call(_,"callee")&&!Ht.call(_,"callee")},Yt=Array.isArray;function dn(_){return _!=null&&pn(_.length)&&!In(_)}var Zt=rn||Fi;function $i(_,P){return Pn(_,P)}function In(_){if(!Dn(_))return!1;var P=Ct(_);return P==u||P==b||P==p||P==d}function pn(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=l}function Dn(_){var P=typeof _;return _!=null&&(P=="object"||P=="function")}function dt(_){return _!=null&&typeof _=="object"}var jn=me?Q(me):Pi;function vn(_){return dn(_)?Ri(_):Li(_)}function Bi(){return[]}function Fi(){return!1}e.exports=$i})(ei,ei.exports);var vo=ei.exports,dr={},mo=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dr,"__esModule",{value:!0});var Zu=mo(po),Gu=mo(vo),or;(function(e){function n(o,l,f){o===void 0&&(o={}),l===void 0&&(l={}),typeof o!="object"&&(o={}),typeof l!="object"&&(l={});var a=Zu.default(l);f||(a=Object.keys(a).reduce(function(h,c){return a[c]!=null&&(h[c]=a[c]),h},{}));for(var p in o)o[p]!==void 0&&l[p]===void 0&&(a[p]=o[p]);return Object.keys(a).length>0?a:void 0}e.compose=n;function t(o,l){o===void 0&&(o={}),l===void 0&&(l={}),typeof o!="object"&&(o={}),typeof l!="object"&&(l={});var f=Object.keys(o).concat(Object.keys(l)).reduce(function(a,p){return Gu.default(o[p],l[p])||(a[p]=l[p]===void 0?null:l[p]),a},{});return Object.keys(f).length>0?f:void 0}e.diff=t;function i(o,l){o===void 0&&(o={}),l===void 0&&(l={}),o=o||{};var f=Object.keys(l).reduce(function(a,p){return l[p]!==o[p]&&o[p]!==void 0&&(a[p]=l[p]),a},{});return Object.keys(o).reduce(function(a,p){return o[p]!==l[p]&&l[p]===void 0&&(a[p]=null),a},f)}e.invert=i;function r(o,l,f){if(f===void 0&&(f=!1),typeof o!="object")return l;if(typeof l=="object"){if(!f)return l;var a=Object.keys(l).reduce(function(p,h){return o[h]===void 0&&(p[h]=l[h]),p},{});return Object.keys(a).length>0?a:void 0}}e.transform=r})(or||(or={}));dr.default=or;var Wn={},Vn={},Rr;function Xu(){if(Rr)return Vn;Rr=1;var e=He&&He.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vn,"__esModule",{value:!0});var n=e(go()),t=function(){function i(r){this.ops=r,this.index=0,this.offset=0}return i.prototype.hasNext=function(){return this.peekLength()<1/0},i.prototype.next=function(r){r||(r=1/0);var o=this.ops[this.index];if(o){var l=this.offset,f=n.default.length(o);if(r>=f-l?(r=f-l,this.index+=1,this.offset=0):this.offset+=r,typeof o.delete=="number")return{delete:r};var a={};return o.attributes&&(a.attributes=o.attributes),typeof o.retain=="number"?a.retain=r:typeof o.insert=="string"?a.insert=o.insert.substr(l,r):a.insert=o.insert,a}else return{retain:1/0}},i.prototype.peek=function(){return this.ops[this.index]},i.prototype.peekLength=function(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0},i.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},i.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var r=this.offset,o=this.index,l=this.next(),f=this.ops.slice(this.index);return this.offset=r,this.index=o,[l].concat(f)}else return[]},i}();return Vn.default=t,Vn}var xr;function go(){if(xr)return Wn;xr=1;var e=He&&He.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wn,"__esModule",{value:!0});var n=e(Xu()),t;return function(i){function r(l){return new n.default(l)}i.iterator=r;function o(l){return typeof l.delete=="number"?l.delete:typeof l.retain=="number"?l.retain:typeof l.insert=="string"?l.insert.length:1}i.length=o}(t||(t={})),Wn.default=t,Wn}var An=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Kn=An(Yu),Qu=An(po),Qi=An(vo),mn=An(dr),Be=An(go()),Ju="\0",ec=function(){function e(n){Array.isArray(n)?this.ops=n:n!=null&&Array.isArray(n.ops)?this.ops=n.ops:this.ops=[]}return e.prototype.insert=function(n,t){var i={};return typeof n=="string"&&n.length===0?this:(i.insert=n,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(i.attributes=t),this.push(i))},e.prototype.delete=function(n){return n<=0?this:this.push({delete:n})},e.prototype.retain=function(n,t){if(n<=0)return this;var i={retain:n};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(i.attributes=t),this.push(i)},e.prototype.push=function(n){var t=this.ops.length,i=this.ops[t-1];if(n=Qu.default(n),typeof i=="object"){if(typeof n.delete=="number"&&typeof i.delete=="number")return this.ops[t-1]={delete:i.delete+n.delete},this;if(typeof i.delete=="number"&&n.insert!=null&&(t-=1,i=this.ops[t-1],typeof i!="object"))return this.ops.unshift(n),this;if(Qi.default(n.attributes,i.attributes)){if(typeof n.insert=="string"&&typeof i.insert=="string")return this.ops[t-1]={insert:i.insert+n.insert},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this;if(typeof n.retain=="number"&&typeof i.retain=="number")return this.ops[t-1]={retain:i.retain+n.retain},typeof n.attributes=="object"&&(this.ops[t-1].attributes=n.attributes),this}}return t===this.ops.length?this.ops.push(n):this.ops.splice(t,0,n),this},e.prototype.chop=function(){var n=this.ops[this.ops.length-1];return n&&n.retain&&!n.attributes&&this.ops.pop(),this},e.prototype.filter=function(n){return this.ops.filter(n)},e.prototype.forEach=function(n){this.ops.forEach(n)},e.prototype.map=function(n){return this.ops.map(n)},e.prototype.partition=function(n){var t=[],i=[];return this.forEach(function(r){var o=n(r)?t:i;o.push(r)}),[t,i]},e.prototype.reduce=function(n,t){return this.ops.reduce(n,t)},e.prototype.changeLength=function(){return this.reduce(function(n,t){return t.insert?n+Be.default.length(t):t.delete?n-t.delete:n},0)},e.prototype.length=function(){return this.reduce(function(n,t){return n+Be.default.length(t)},0)},e.prototype.slice=function(n,t){n===void 0&&(n=0),t===void 0&&(t=1/0);for(var i=[],r=Be.default.iterator(this.ops),o=0;o<t&&r.hasNext();){var l=void 0;o<n?l=r.next(n-o):(l=r.next(t-o),i.push(l)),o+=Be.default.length(l)}return new e(i)},e.prototype.compose=function(n){var t=Be.default.iterator(this.ops),i=Be.default.iterator(n.ops),r=[],o=i.peek();if(o!=null&&typeof o.retain=="number"&&o.attributes==null){for(var l=o.retain;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),r.push(t.next());o.retain-l>0&&i.next(o.retain-l)}for(var f=new e(r);t.hasNext()||i.hasNext();)if(i.peekType()==="insert")f.push(i.next());else if(t.peekType()==="delete")f.push(t.next());else{var a=Math.min(t.peekLength(),i.peekLength()),p=t.next(a),h=i.next(a);if(typeof h.retain=="number"){var c={};typeof p.retain=="number"?c.retain=a:c.insert=p.insert;var s=mn.default.compose(p.attributes,h.attributes,typeof p.retain=="number");if(s&&(c.attributes=s),f.push(c),!i.hasNext()&&Qi.default(f.ops[f.ops.length-1],c)){var u=new e(t.rest());return f.concat(u).chop()}}else typeof h.delete=="number"&&typeof p.retain=="number"&&f.push(h)}return f.chop()},e.prototype.concat=function(n){var t=new e(this.ops.slice());return n.ops.length>0&&(t.push(n.ops[0]),t.ops=t.ops.concat(n.ops.slice(1))),t},e.prototype.diff=function(n,t){if(this.ops===n.ops)return new e;var i=[this,n].map(function(a){return a.map(function(p){if(p.insert!=null)return typeof p.insert=="string"?p.insert:Ju;var h=a===n?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),r=new e,o=Kn.default(i[0],i[1],t),l=Be.default.iterator(this.ops),f=Be.default.iterator(n.ops);return o.forEach(function(a){for(var p=a[1].length;p>0;){var h=0;switch(a[0]){case Kn.default.INSERT:h=Math.min(f.peekLength(),p),r.push(f.next(h));break;case Kn.default.DELETE:h=Math.min(p,l.peekLength()),l.next(h),r.delete(h);break;case Kn.default.EQUAL:h=Math.min(l.peekLength(),f.peekLength(),p);var c=l.next(h),s=f.next(h);Qi.default(c.insert,s.insert)?r.retain(h,mn.default.diff(c.attributes,s.attributes)):r.push(s).delete(h);break}p-=h}}),r.chop()},e.prototype.eachLine=function(n,t){t===void 0&&(t=` `);for(var i=Be.default.iterator(this.ops),r=new e,o=0;i.hasNext();){if(i.peekType()!=="insert")return;var l=i.peek(),f=Be.default.length(l)-i.peekLength(),a=typeof l.insert=="string"?l.insert.indexOf(t,f)-f:-1;if(a<0)r.push(i.next());else if(a>0)r.push(i.next(a));else{if(n(r,i.next(1).attributes||{},o)===!1)return;o+=1,r=new e}}r.length()>0&&n(r,{},o)},e.prototype.invert=function(n){var t=new e;return this.reduce(function(i,r){if(r.insert)t.delete(Be.default.length(r));else{if(r.retain&&r.attributes==null)return t.retain(r.retain),i+r.retain;if(r.delete||r.retain&&r.attributes){var o=r.delete||r.retain,l=n.slice(i,i+o);return l.forEach(function(f){r.delete?t.push(f):r.retain&&r.attributes&&t.retain(Be.default.length(f),mn.default.invert(r.attributes,f.attributes))}),i+o}}return i},0),t.chop()},e.prototype.transform=function(n,t){if(t===void 0&&(t=!1),t=!!t,typeof n=="number")return this.transformPosition(n,t);for(var i=n,r=Be.default.iterator(this.ops),o=Be.default.iterator(i.ops),l=new e;r.hasNext()||o.hasNext();)if(r.peekType()==="insert"&&(t||o.peekType()!=="insert"))l.retain(Be.default.length(r.next()));else if(o.peekType()==="insert")l.push(o.next());else{var f=Math.min(r.peekLength(),o.peekLength()),a=r.next(f),p=o.next(f);if(a.delete)continue;p.delete?l.push(p):l.retain(f,mn.default.transform(a.attributes,p.attributes,t))}return l.chop()},e.prototype.transformPosition=function(n,t){t===void 0&&(t=!1),t=!!t;for(var i=Be.default.iterator(this.ops),r=0;i.hasNext()&&r<=n;){var o=i.peekLength(),l=i.peekType();if(i.next(),l==="delete"){n-=Math.min(o,n-r);continue}else l==="insert"&&(r<n||!t)&&(n+=o);r+=o}return n},e.Op=Be.default,e.AttributeMap=mn.default,e}(),tc=ec;const nc=qr(tc);/*! * VueQuill @vueup/vue-quill v1.2.0 * https://vueup.github.io/vue-quill/ * * Includes quill v1.3.7 * https://quilljs.com/ * * Copyright (c) 2023 Ahmad Luthfi Masruri * Released under the MIT license * Date: 2023-05-12T08:44:03.742Z */const Nr={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},ic=je({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object],required:!1,validator:e=>typeof e=="string"&&e!==""?e.charAt(0)==="#"?!0:Object.keys(Nr).indexOf(e)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(e,n)=>{Cr(()=>{o()}),Ir(()=>{t=null});let t,i;const r=Xt(),o=()=>{var A;if(r.value){if(i=l(),e.modules)if(Array.isArray(e.modules))for(const E of e.modules)Gi.register(`modules/${E.name}`,E.module);else Gi.register(`modules/${e.modules.name}`,e.modules.module);t=new Gi(r.value,i),w(e.content),t.on("text-change",c),t.on("selection-change",u),t.on("editor-change",b),e.theme!=="bubble"&&r.value.classList.remove("ql-bubble"),e.theme!=="snow"&&r.value.classList.remove("ql-snow"),(A=t.getModule("toolbar"))===null||A===void 0||A.container.addEventListener("mousedown",E=>{E.preventDefault()}),n.emit("ready",t)}},l=()=>{const A={};if(e.theme!==""&&(A.theme=e.theme),e.readOnly&&(A.readOnly=e.readOnly),e.placeholder&&(A.placeholder=e.placeholder),e.toolbar&&e.toolbar!==""&&(A.modules={toolbar:(()=>{if(typeof e.toolbar=="object")return e.toolbar;if(typeof e.toolbar=="string")return e.toolbar.charAt(0)==="#"?e.toolbar:Nr[e.toolbar]})()}),e.modules){const E=(()=>{var x,M;const z={};if(Array.isArray(e.modules))for(const U of e.modules)z[U.name]=(x=U.options)!==null&&x!==void 0?x:{};else z[e.modules.name]=(M=e.modules.options)!==null&&M!==void 0?M:{};return z})();A.modules=Object.assign({},A.modules,E)}return Object.assign({},e.globalOptions,e.options,A)},f=A=>typeof A=="object"&&A?A.slice():A,a=A=>Object.values(A.ops).some(E=>!E.retain||Object.keys(E).length!==1);let p;const h=A=>{if(typeof p==typeof A){if(A===p)return!0;if(typeof A=="object"&&A&&typeof p=="object"&&p)return!a(p.diff(A))}return!1},c=(A,E,x)=>{p=f(m()),h(e.content)||n.emit("update:content",p),n.emit("textChange",{delta:A,oldContents:E,source:x})},s=Xt(),u=(A,E,x)=>{s.value=!!(t!=null&&t.hasFocus()),n.emit("selectionChange",{range:A,oldRange:E,source:x})};Hi(s,A=>{A?n.emit("focus",r):n.emit("blur",r)});const b=(...A)=>{A[0]==="text-change"&&n.emit("editorChange",{name:A[0],delta:A[1],oldContents:A[2],source:A[3]}),A[0]==="selection-change"&&n.emit("editorChange",{name:A[0],range:A[1],oldRange:A[2],source:A[3]})},g=()=>r.value,y=()=>{var A;return(A=t==null?void 0:t.getModule("toolbar"))===null||A===void 0?void 0:A.container},v=()=>{if(t)return t;throw`The quill editor hasn't been instantiated yet, make sure to call this method when the editor ready or use v-on:ready="onReady(quill)" event instead.`},m=(A,E)=>e.contentType==="html"?R():e.contentType==="text"?d(A,E):t==null?void 0:t.getContents(A,E),w=(A,E="api")=>{const x=A||(e.contentType==="delta"?new nc:"");e.contentType==="html"?S(x):e.contentType==="text"?O(x,E):t==null||t.setContents(x,E),p=f(x)},d=(A,E)=>{var x;return(x=t==null?void 0:t.getText(A,E))!==null&&x!==void 0?x:""},O=(A,E="api")=>{t==null||t.setText(A,E)},R=()=>{var A;return(A=t==null?void 0:t.root.innerHTML)!==null&&A!==void 0?A:""},S=A=>{t&&(t.root.innerHTML=A)},T=(A,E="api")=>{const x=t==null?void 0:t.clipboard.convert(A);x&&(t==null||t.setContents(x,E))},L=()=>{t==null||t.focus()},k=()=>{mr(()=>{var A;!n.slots.toolbar&&t&&((A=t.getModule("toolbar"))===null||A===void 0||A.container.remove()),o()})};return Hi(()=>e.content,A=>{if(!t||!A||h(A))return;const E=t.getSelection();E&&mr(()=>t==null?void 0:t.setSelection(E)),w(A)},{deep:!0}),Hi(()=>e.enable,A=>{t&&t.enable(A)}),{editor:r,getEditor:g,getToolbar:y,getQuill:v,getContents:m,setContents:w,getHTML:R,setHTML:S,pasteHTML:T,focus:L,getText:d,setText:O,reinit:k}},render(){var e,n;return[(n=(e=this.$slots).toolbar)===null||n===void 0?void 0:n.call(e),_o("div",{ref:"editor",...this.$attrs})]}}),rc=je({name:"ProfilEditDescription",components:{QuillEditor:ic},props:{defaultContent:{type:String,default:""}},emits:["dataChanged"],data(){return{content:""}},created(){this.content=this.defaultContent},methods:{getContent(){return this.content}},watch:{content:{handler(){this.$emit("dataChanged")},deep:!0}}}),pr=e=>(yt("data-v-a1064ff6"),e=e(),bt(),e),oc={class:"description-editor content flex flex-col"},ac=pr(()=>B("h3",null,"Beschreibung",-1)),sc=pr(()=>B("hr",null,null,-1)),lc={class:"full-width quill-editor"},uc=pr(()=>B("div",{id:"quill-toolbar"},[B("select",{class:"ql-header",style:{width:"160px"}},[B("option",{value:"3"},"Hauptüberschrift"),B("option",{value:"4"},"Abschnittsüberschrift"),B("option",{value:"",selected:""},"Fließtext")]),B("button",{class:"ql-bold"}),B("button",{class:"ql-italic"}),B("button",{class:"ql-underline"}),B("button",{class:"ql-strike"}),B("button",{class:"ql-list",value:"ordered"}),B("button",{class:"ql-list",value:"bullet"}),B("button",{class:"ql-clean"})],-1));function cc(e,n,t,i,r,o){const l=ge("quill-editor");return X(),ne("div",oc,[ac,sc,B("div",lc,[ue(l,{toolbar:"#quill-toolbar",theme:"snow","content-type":"html",content:e.content,"onUpdate:content":n[0]||(n[0]=f=>e.content=f)},{toolbar:ut(()=>[uc]),_:1},8,["content"])])])}const fc=Le(rc,[["render",cc],["__scopeId","data-v-a1064ff6"]]),hc=je({name:"ProfilEditInformation",components:{InputText:ar,ProfilSocialIcon:$r},data(){return{socialMediaFields:["Facebook","LinkedIn","Xing","YouTube","Twitter","Instagram","TikTok","Weiteres"]}},props:{socialLinks:Array},computed:{getModels(){let e=[];for(const n of this.socialMediaFields){let t=new Fe(n,"",!1);if(this.socialLinks)for(const i of this.socialLinks)i.name===n&&(t=new Fe(n,i.link,!1));t.setPlaceHolder(n),e.push(t)}return e}},methods:{getSocialLinksSave(){let e=[];for(const n of this.socialMediaFields)for(const t of this.getModels)t.label===n&&t.value&&t.value.trim()!==""&&e.push({name:n,link:t.value});return e}}}),dc={class:"social-links-editor content flex flex-col"},pc=B("h3",null,"Social-Media",-1),vc=B("hr",null,null,-1),mc={class:"inputs"};function gc(e,n,t,i,r,o){const l=ge("profil-social-icon"),f=ge("input-text");return X(),ne("div",dc,[pc,vc,B("div",mc,[(X(!0),ne(xe,null,De(e.getModels,(a,p)=>(X(),ne("div",{class:"input",key:p},[ue(l,{big:"","social-link":{name:a.label,link:a.value}},null,8,["social-link"]),ue(f,{model:a},null,8,["model"])]))),128))])])}const yc=Le(hc,[["render",gc]]),bc=je({name:"ProfilEdit",components:{ProfilEditDescription:fc,ProfilEditInformation:Bu,ProfilEditAvatar:Zl,ProfilEditHeader:ps,ProfilEditCheckboxes:Ss,ProfilEditDateiUpload:Zs,ProfilEditSocialLinks:yc},props:{user:{type:Object,default(){return{}}},checkboxes:Object,socialLinks:Object,documents:Object},emits:["dokument-delete","dokument-name-changed","dokument-add"],data(){var e,n,t;return{animation:{submitSuccess:!1,formLoading:!1},errorMessage:"",avatar:(e=this.user)==null?void 0:e.originalAvatar,resizedAvatar:(n=this.user)==null?void 0:n.avatar,defaultContent:(t=this.user)==null?void 0:t.beschreibung,dataWatcherActive:!1,onWebsiteUnloadListener:null}},mounted(){this.$nextTick(()=>{setTimeout(()=>{this.dataWatcherActive=!0,this.toggleWebsiteUnloading(!1)},100)}),this.onWebsiteUnloadListener=e=>(e.preventDefault(),e.returnValue="Sollen die Änderungen verworfen werden?")},methods:{toProfileRedirect(){location.href="/profil/"},onHandleError(e){this.errorMessage=e},onContentChanged(){this.errorMessage="",this.dataWatcherActive&&this.toggleWebsiteUnloading(!0)},toggleWebsiteUnloading(e){e?window.addEventListener("beforeunload",this.onWebsiteUnloadListener):window.removeEventListener("beforeunload",this.onWebsiteUnloadListener)},save(){this.errorMessage="",this.animation.formLoading=!0,this.toggleWebsiteUnloading(!1);const e=this.$refs.informationComponent,n=this.$refs.descriptionComponent,t=this.$refs.checkboxComponent,i=this.$refs.socialLinksComponent;if(e&&n&&t&&i){const r=e.getUserSave();if(!r.vorname||!isNaN(Number(r.vorname))||!r.nachname||!isNaN(Number(r.nachname))||!r.plz||!r.ort||!r.telefon||!r.strasse){this.animation.formLoading=!1,this.errorMessage="Fehlerhafte Eingabe";return}r.avatar=this.avatar,r.beschreibung=n.getContent();const o={},l=t.getFieldData(),f=i.getSocialLinksSave();for(const p in l)l[p].value&&(o[p]=l[p].value===!0?1:l[p].value);const a={};if(this.documents)for(const p of this.documents)a[p.path]=p.name;Js.save(r,o,a,f).then(p=>{this.animation.formLoading=!1,new jt(p).err.code===-1?Xs.refreshUser().then(c=>{var u;if(new jt(c).err.code===-1){this.animation.submitSuccess=!0,setTimeout(()=>{this.animation.submitSuccess=!1},1e3);const b=((u=this.user)==null?void 0:u.originalAvatar)!==this.avatar,g=document.querySelector(".usermenu .avatar .avatar__image");if(g&&b){const y=g.getAttribute("style");if(y){const v=y.match(/url\((.*?)\)/);if(v){const m=y.replace(v[1],this.avatar);g.setAttribute("style",m)}}}}else this.errorMessage="Beim Aktualisieren des Profils ist ein Fehler aufgetreten."}):this.errorMessage="Fehlerhafte Eingabe"})}}}});function _c(e,n,t,i,r,o){const l=ge("profil-edit-header"),f=ge("profil-edit-avatar"),a=ge("profil-edit-information"),p=ge("profil-edit-social-links"),h=ge("profil-edit-description"),c=ge("profil-edit-checkboxes"),s=ge("profil-edit-datei-upload");return X(),ne("form",{class:"editorIs",onSubmit:n[4]||(n[4]=Xn(()=>{},["prevent"]))},[ue(l,{"show-check":e.animation.submitSuccess,"show-loading":e.animation.formLoading,"error-message":e.errorMessage,onSave:e.save,onToProfile:e.toProfileRedirect},null,8,["show-check","show-loading","error-message","onSave","onToProfile"]),ue(f,{modelValue:e.avatar,"onUpdate:modelValue":n[0]||(n[0]=u=>e.avatar=u),"resized-avatar":e.resizedAvatar,onError:e.onHandleError,onDataChanged:e.onContentChanged},null,8,["modelValue","resized-avatar","onError","onDataChanged"]),ue(a,{ref:"informationComponent",user:e.user,onDataChanged:e.onContentChanged},null,8,["user","onDataChanged"]),ue(p,{ref:"socialLinksComponent","social-links":e.socialLinks},null,8,["social-links"]),ue(h,{ref:"descriptionComponent","default-content":e.user.beschreibung,onDataChanged:e.onContentChanged},null,8,["default-content","onDataChanged"]),ue(c,{ref:"checkboxComponent",checkboxes:e.checkboxes,onDataChanged:e.onContentChanged},null,8,["checkboxes","onDataChanged"]),ue(s,{documents:e.documents,onDokumentNameChanged:n[1]||(n[1]=(...u)=>e.$emit("dokument-name-changed",...u)),onDokumentDelete:n[2]||(n[2]=(...u)=>e.$emit("dokument-delete",...u)),onDokumentAdd:n[3]||(n[3]=(...u)=>e.$emit("dokument-add",...u)),onDataChanged:e.onContentChanged},null,8,["documents","onDataChanged"])],32)}const wc=Le(bc,[["render",_c],["__scopeId","data-v-b23bc420"]]),En=e=>(yt("data-v-a6292d40"),e=e(),bt(),e),Oc={class:"card"},Ac=["href","target","title"],Ec={class:"card-image"},kc=["src","alt"],Sc={class:"card-content"},Tc={key:0},Rc={key:1},xc=En(()=>B("hr",null,null,-1)),Nc={key:0},Pc=En(()=>B("br",null,null,-1)),Lc={key:1},Mc=En(()=>B("br",null,null,-1)),Cc={key:2},Ic=En(()=>B("br",null,null,-1)),Dc=En(()=>B("button",null,"zum Profil",-1)),jc=je({__name:"NearbySearchResult",props:{searchResult:{}},setup(e){const n=e,t=Zn(()=>n.searchResult.avatar&&n.searchResult.avatar!==""?n.searchResult.avatar+"_image_scaler_168xauto.jpg":"/buchhalterseite2022-wAssets/img/systembilder/Avatar-full-tuerkis.jpg"),i=Zn(()=>n.searchResult.anrede==="Herr"?"Buchhalter":"Buchhalterin"),r=Zn(()=>screen.width<=1281?"_self":"_blank");return(o,l)=>(X(),ne("div",Oc,[o.searchResult?(X(),ne("a",{key:0,href:"/profil/"+o.searchResult.link,target:r.value,title:o.searchResult.vorname+" "+o.searchResult.nachname+" - Buchhaltungsbüro in "+o.searchResult.ort,aga:"",category:"button",label:"btn_profil",action:"geklickt"},[B("div",Ec,[B("img",{src:t.value,alt:o.searchResult.vorname+" "+o.searchResult.nachname+" - "+i.value+" in "+o.searchResult.ort},null,8,kc)]),B("div",Sc,[o.searchResult.firma&&o.searchResult.firma.length?(X(),ne("h4",Tc,de(o.searchResult.firma),1)):(X(),ne("h4",Rc,de(o.searchResult.anrede)+" "+de(o.searchResult.vorname)+" "+de(o.searchResult.nachname),1)),xc,B("p",null,[o.searchResult.firma&&o.searchResult.firma.length?(X(),ne("span",Nc,[Xe(de(o.searchResult.anrede)+" "+de(o.searchResult.vorname)+" "+de(o.searchResult.nachname)+" ",1),Pc])):ye("",!0),o.searchResult.strasse&&o.searchResult.adresseSichtbar?(X(),ne("span",Lc,[Xe(de(o.searchResult.strasse),1),Mc])):ye("",!0),o.searchResult.plz||o.searchResult.ort?(X(),ne("span",Cc,[Xe(de(o.searchResult.plz)+" "+de(o.searchResult.ort),1),Ic])):ye("",!0)]),Dc])],8,Ac)):ye("",!0)]))}}),zc=Le(jc,[["__scopeId","data-v-a6292d40"]]),qc=e=>(yt("data-v-4edf44a7"),e=e(),bt(),e),$c={key:0,class:"nearby-search-result"},Bc=qc(()=>B("h2",null,"Weitere Buchhalter in der Umgebung",-1)),Fc=je({__name:"ProfilNearbySearch",props:{user:{}},setup(e){const n=Xt([]),t=Xt(!1),i=Xt(!1),r=Xt(!1),o=e;function l(h,c){let s=null;return()=>{s&&clearTimeout(s),s=setTimeout(()=>{h()},c)}}const f=()=>{const h=window.innerWidth||screen.width;i.value=h<=1024,t.value=h<=768},a=l(f,200);Cr(()=>{f(),window.addEventListener("resize",a),Eo.getProfilUmgebungResult(o.user.plz,o.user.seoLink,50).then(h=>{const c=new jt(h);c.err.code===-1&&c.tab.buchhalter.length>1&&(r.value=!0,n.value=c.tab.buchhalter)})}),Ir(()=>{window.removeEventListener("resize",a)});const p=Zn(()=>i.value&&!t.value?n.value.slice(0,2):n.value);return(h,c)=>r.value?(X(),ne("div",$c,[Bc,B("div",{class:Ve(["nearby-search-result-container",{"two-profiles":p.value.length===2}])},[(X(!0),ne(xe,null,De(p.value,(s,u)=>(X(),Oe(zc,{"search-result":s,key:u},null,8,["search-result"]))),128))],2)])):ye("",!0)}}),Hc=Le(Fc,[["__scopeId","data-v-4edf44a7"]]),Uc=je({props:{isEdit:{type:Boolean,default(){return!1}}},data(){return{user:{},checkboxes:[],documents:[],socialLinks:[],openDropdown:-1}},created(){let e=profileData;e&&(this.user=e.user,this.checkboxes=e.checkbox,this.socialLinks=e.socialLinks,this.documents=e.documents)},methods:{addDokument(e){this.documents.push(e)},changeDokumentName(e,n){this.documents[e].name=n},deleteDokument(e){this.documents.splice(e,1)},toggleDropdown(e){this.openDropdown===e?this.openDropdown=-1:this.openDropdown=e}},components:{NachrichtForm:Dr,ProfilEdit:wc,ProfilHeader:va,ProfilCheckbox:Fa,ProfilDocuments:ts,ProfilNearbySearch:Hc}}),yo=e=>(yt("data-v-d7883cb2"),e=e(),bt(),e),Wc={class:"profil"},Vc={key:1,class:"profil-checkbox profil-contact-footer"},Kc={class:"elementSection"},Yc={class:"bg-color"},Zc=yo(()=>B("div",{class:"elementHr"},[B("hr",{class:"hr"})],-1)),Gc=yo(()=>B("p",null,"Das Profil hat Ihr Interesse geweckt? Dann setzen Sie sich doch gleich in Verbindung!",-1));function Xc(e,n,t,i,r,o){const l=ge("profil-header"),f=ge("profil-documents"),a=ge("profil-checkbox"),p=ge("nachricht-form"),h=ge("profil-nearby-search"),c=ge("profil-edit");return X(),ne("div",Wc,[e.isEdit?(X(),Oe(c,{key:1,user:e.user,documents:e.documents,checkboxes:e.checkboxes,"social-links":e.socialLinks,onDokumentNameChanged:e.changeDokumentName,onDokumentDelete:e.deleteDokument,onDokumentAdd:e.addDokument},null,8,["user","documents","checkboxes","social-links","onDokumentNameChanged","onDokumentDelete","onDokumentAdd"])):(X(),ne(xe,{key:0},[ue(l,{user:e.user,"social-links":e.socialLinks},null,8,["user","social-links"]),e.documents.length>0?(X(),Oe(f,{key:0,documents:e.documents,open:e.openDropdown===123456789,onToggleDropdown:n[0]||(n[0]=s=>e.toggleDropdown(123456789))},null,8,["documents","open"])):ye("",!0),(X(!0),ne(xe,null,De(e.checkboxes,(s,u)=>(X(),Oe(a,{checkbox:s,key:u,open:u===e.openDropdown,onToggleDropdown:b=>e.toggleDropdown(u)},null,8,["checkbox","open","onToggleDropdown"]))),128)),e.user.emailSichtbar?(X(),ne("div",Vc,[B("div",Kc,[B("div",Yc,[Zc,B("div",null,[B("h2",null,[B("strong",null," Kontaktieren Sie "+de(e.user.anrede)+" "+de(e.user.nachname),1)]),Gc]),B("div",null,[ue(p,{"seo-link":e.user.seoLink,"profil-activ":e.user.profilAktiv},null,8,["seo-link","profil-activ"])])])])])):ye("",!0),ue(h,{user:e.user},null,8,["user"])],64))])}const pf=Le(Uc,[["render",Xc],["__scopeId","data-v-d7883cb2"]]);export{pf as default};